api.go 549 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package cloudfront
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  11. )
  12. const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2018_11_05"
  13. // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateCloudFrontOriginAccessIdentity for more information on using the CreateCloudFrontOriginAccessIdentity
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateCloudFrontOriginAccessIdentityRequest method.
  29. // req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity
  37. func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) {
  38. op := &request.Operation{
  39. Name: opCreateCloudFrontOriginAccessIdentity,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront",
  42. }
  43. if input == nil {
  44. input = &CreateCloudFrontOriginAccessIdentityInput{}
  45. }
  46. output = &CreateCloudFrontOriginAccessIdentityOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  51. //
  52. // Creates a new origin access identity. If you're using Amazon S3 for your
  53. // origin, you can use an origin access identity to require users to access
  54. // your content using a CloudFront URL instead of the Amazon S3 URL. For more
  55. // information about how to use origin access identities, see Serving Private
  56. // Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  57. // in the Amazon CloudFront Developer Guide.
  58. //
  59. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  60. // with awserr.Error's Code and Message methods to get detailed information about
  61. // the error.
  62. //
  63. // See the AWS API reference guide for Amazon CloudFront's
  64. // API operation CreateCloudFrontOriginAccessIdentity for usage and error information.
  65. //
  66. // Returned Error Codes:
  67. // * ErrCodeOriginAccessIdentityAlreadyExists "CloudFrontOriginAccessIdentityAlreadyExists"
  68. // If the CallerReference is a value you already sent in a previous request
  69. // to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
  70. // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
  71. // error.
  72. //
  73. // * ErrCodeMissingBody "MissingBody"
  74. // This operation requires a body. Ensure that the body is present and the Content-Type
  75. // header is set.
  76. //
  77. // * ErrCodeTooManyCloudFrontOriginAccessIdentities "TooManyCloudFrontOriginAccessIdentities"
  78. // Processing your request would cause you to exceed the maximum number of origin
  79. // access identities allowed.
  80. //
  81. // * ErrCodeInvalidArgument "InvalidArgument"
  82. // The argument is invalid.
  83. //
  84. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  85. // The value of Quantity and the size of Items don't match.
  86. //
  87. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity
  88. func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) {
  89. req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input)
  90. return out, req.Send()
  91. }
  92. // CreateCloudFrontOriginAccessIdentityWithContext is the same as CreateCloudFrontOriginAccessIdentity with the addition of
  93. // the ability to pass a context and additional request options.
  94. //
  95. // See CreateCloudFrontOriginAccessIdentity for details on how to use this API operation.
  96. //
  97. // The context must be non-nil and will be used for request cancellation. If
  98. // the context is nil a panic will occur. In the future the SDK may create
  99. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  100. // for more information on using Contexts.
  101. func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *CreateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*CreateCloudFrontOriginAccessIdentityOutput, error) {
  102. req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input)
  103. req.SetContext(ctx)
  104. req.ApplyOptions(opts...)
  105. return out, req.Send()
  106. }
  107. const opCreateDistribution = "CreateDistribution2018_11_05"
  108. // CreateDistributionRequest generates a "aws/request.Request" representing the
  109. // client's request for the CreateDistribution operation. The "output" return
  110. // value will be populated with the request's response once the request completes
  111. // successfully.
  112. //
  113. // Use "Send" method on the returned Request to send the API call to the service.
  114. // the "output" return value is not valid until after Send returns without error.
  115. //
  116. // See CreateDistribution for more information on using the CreateDistribution
  117. // API call, and error handling.
  118. //
  119. // This method is useful when you want to inject custom logic or configuration
  120. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  121. //
  122. //
  123. // // Example sending a request using the CreateDistributionRequest method.
  124. // req, resp := client.CreateDistributionRequest(params)
  125. //
  126. // err := req.Send()
  127. // if err == nil { // resp is now filled
  128. // fmt.Println(resp)
  129. // }
  130. //
  131. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution
  132. func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) {
  133. op := &request.Operation{
  134. Name: opCreateDistribution,
  135. HTTPMethod: "POST",
  136. HTTPPath: "/2018-11-05/distribution",
  137. }
  138. if input == nil {
  139. input = &CreateDistributionInput{}
  140. }
  141. output = &CreateDistributionOutput{}
  142. req = c.newRequest(op, input, output)
  143. return
  144. }
  145. // CreateDistribution API operation for Amazon CloudFront.
  146. //
  147. // Creates a new web distribution. You create a CloudFront distribution to tell
  148. // CloudFront where you want content to be delivered from, and the details about
  149. // how to track and manage content delivery. Send a POST request to the /CloudFront
  150. // API version/distribution/distribution ID resource.
  151. //
  152. // When you update a distribution, there are more required fields than when
  153. // you create a distribution. When you update your distribution by using UpdateDistribution,
  154. // follow the steps included in the documentation to get the current configuration
  155. // and then make your updates. This helps to make sure that you include all
  156. // of the required fields. To view a summary, see Required Fields for Create
  157. // Distribution and Update Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html)
  158. // in the Amazon CloudFront Developer Guide.
  159. //
  160. // If you are using Adobe Flash Media Server's RTMP protocol, you set up a different
  161. // kind of CloudFront distribution. For more information, see CreateStreamingDistribution.
  162. //
  163. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  164. // with awserr.Error's Code and Message methods to get detailed information about
  165. // the error.
  166. //
  167. // See the AWS API reference guide for Amazon CloudFront's
  168. // API operation CreateDistribution for usage and error information.
  169. //
  170. // Returned Error Codes:
  171. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  172. //
  173. // * ErrCodeDistributionAlreadyExists "DistributionAlreadyExists"
  174. // The caller reference you attempted to create the distribution with is associated
  175. // with another distribution.
  176. //
  177. // * ErrCodeInvalidOrigin "InvalidOrigin"
  178. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  179. // bucket.
  180. //
  181. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  182. // The origin access identity is not valid or doesn't exist.
  183. //
  184. // * ErrCodeAccessDenied "AccessDenied"
  185. // Access denied.
  186. //
  187. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  188. // Your request contains more trusted signers than are allowed per distribution.
  189. //
  190. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  191. // One or more of your trusted signers don't exist.
  192. //
  193. // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"
  194. //
  195. // * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"
  196. //
  197. // * ErrCodeMissingBody "MissingBody"
  198. // This operation requires a body. Ensure that the body is present and the Content-Type
  199. // header is set.
  200. //
  201. // * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs"
  202. // Your request contains more CNAMEs than are allowed per distribution.
  203. //
  204. // * ErrCodeTooManyDistributions "TooManyDistributions"
  205. // Processing your request would cause you to exceed the maximum number of distributions
  206. // allowed.
  207. //
  208. // * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject"
  209. // The default root object file name is too big or contains an invalid character.
  210. //
  211. // * ErrCodeInvalidRelativePath "InvalidRelativePath"
  212. // The relative path is too big, is not URL-encoded, or does not begin with
  213. // a slash (/).
  214. //
  215. // * ErrCodeInvalidErrorCode "InvalidErrorCode"
  216. //
  217. // * ErrCodeInvalidResponseCode "InvalidResponseCode"
  218. //
  219. // * ErrCodeInvalidArgument "InvalidArgument"
  220. // The argument is invalid.
  221. //
  222. // * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol"
  223. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  224. // protocol in your request, or omit the RequiredProtocols element from your
  225. // distribution configuration.
  226. //
  227. // * ErrCodeNoSuchOrigin "NoSuchOrigin"
  228. // No origin exists with the specified Origin Id.
  229. //
  230. // * ErrCodeTooManyOrigins "TooManyOrigins"
  231. // You cannot create more origins for the distribution.
  232. //
  233. // * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution"
  234. // Processing your request would cause you to exceed the maximum number of origin
  235. // groups allowed.
  236. //
  237. // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors"
  238. // You cannot create more cache behaviors for the distribution.
  239. //
  240. // * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList"
  241. // Your request contains more cookie names in the whitelist than are allowed
  242. // per cache behavior.
  243. //
  244. // * ErrCodeInvalidForwardCookies "InvalidForwardCookies"
  245. // Your request contains forward cookies option which doesn't match with the
  246. // expectation for the whitelisted list of cookie names. Either list of cookie
  247. // names has been specified when not allowed or list of cookie names is missing
  248. // when expected.
  249. //
  250. // * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"
  251. //
  252. // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"
  253. //
  254. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  255. // The value of Quantity and the size of Items don't match.
  256. //
  257. // * ErrCodeTooManyCertificates "TooManyCertificates"
  258. // You cannot create anymore custom SSL/TLS certificates.
  259. //
  260. // * ErrCodeInvalidLocationCode "InvalidLocationCode"
  261. //
  262. // * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"
  263. //
  264. // * ErrCodeInvalidProtocolSettings "InvalidProtocolSettings"
  265. // You cannot specify SSLv3 as the minimum protocol version if you only want
  266. // to support only clients that support Server Name Indication (SNI).
  267. //
  268. // * ErrCodeInvalidTTLOrder "InvalidTTLOrder"
  269. //
  270. // * ErrCodeInvalidWebACLId "InvalidWebACLId"
  271. //
  272. // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"
  273. //
  274. // * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"
  275. //
  276. // * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"
  277. //
  278. // * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations"
  279. // Processing your request would cause the maximum number of distributions with
  280. // Lambda function associations per owner to be exceeded.
  281. //
  282. // * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations"
  283. // Your request contains more Lambda function associations than are allowed
  284. // per distribution.
  285. //
  286. // * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation"
  287. // The specified Lambda function association is invalid.
  288. //
  289. // * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"
  290. //
  291. // * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"
  292. //
  293. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  294. // The specified configuration for field-level encryption doesn't exist.
  295. //
  296. // * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"
  297. // The specified configuration for field-level encryption can't be associated
  298. // with the specified cache behavior.
  299. //
  300. // * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"
  301. // The maximum number of distributions have been associated with the specified
  302. // configuration for field-level encryption.
  303. //
  304. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution
  305. func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) {
  306. req, out := c.CreateDistributionRequest(input)
  307. return out, req.Send()
  308. }
  309. // CreateDistributionWithContext is the same as CreateDistribution with the addition of
  310. // the ability to pass a context and additional request options.
  311. //
  312. // See CreateDistribution for details on how to use this API operation.
  313. //
  314. // The context must be non-nil and will be used for request cancellation. If
  315. // the context is nil a panic will occur. In the future the SDK may create
  316. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  317. // for more information on using Contexts.
  318. func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *CreateDistributionInput, opts ...request.Option) (*CreateDistributionOutput, error) {
  319. req, out := c.CreateDistributionRequest(input)
  320. req.SetContext(ctx)
  321. req.ApplyOptions(opts...)
  322. return out, req.Send()
  323. }
  324. const opCreateDistributionWithTags = "CreateDistributionWithTags2018_11_05"
  325. // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the
  326. // client's request for the CreateDistributionWithTags operation. The "output" return
  327. // value will be populated with the request's response once the request completes
  328. // successfully.
  329. //
  330. // Use "Send" method on the returned Request to send the API call to the service.
  331. // the "output" return value is not valid until after Send returns without error.
  332. //
  333. // See CreateDistributionWithTags for more information on using the CreateDistributionWithTags
  334. // API call, and error handling.
  335. //
  336. // This method is useful when you want to inject custom logic or configuration
  337. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  338. //
  339. //
  340. // // Example sending a request using the CreateDistributionWithTagsRequest method.
  341. // req, resp := client.CreateDistributionWithTagsRequest(params)
  342. //
  343. // err := req.Send()
  344. // if err == nil { // resp is now filled
  345. // fmt.Println(resp)
  346. // }
  347. //
  348. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags
  349. func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) {
  350. op := &request.Operation{
  351. Name: opCreateDistributionWithTags,
  352. HTTPMethod: "POST",
  353. HTTPPath: "/2018-11-05/distribution?WithTags",
  354. }
  355. if input == nil {
  356. input = &CreateDistributionWithTagsInput{}
  357. }
  358. output = &CreateDistributionWithTagsOutput{}
  359. req = c.newRequest(op, input, output)
  360. return
  361. }
  362. // CreateDistributionWithTags API operation for Amazon CloudFront.
  363. //
  364. // Create a new distribution with tags.
  365. //
  366. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  367. // with awserr.Error's Code and Message methods to get detailed information about
  368. // the error.
  369. //
  370. // See the AWS API reference guide for Amazon CloudFront's
  371. // API operation CreateDistributionWithTags for usage and error information.
  372. //
  373. // Returned Error Codes:
  374. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  375. //
  376. // * ErrCodeDistributionAlreadyExists "DistributionAlreadyExists"
  377. // The caller reference you attempted to create the distribution with is associated
  378. // with another distribution.
  379. //
  380. // * ErrCodeInvalidOrigin "InvalidOrigin"
  381. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  382. // bucket.
  383. //
  384. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  385. // The origin access identity is not valid or doesn't exist.
  386. //
  387. // * ErrCodeAccessDenied "AccessDenied"
  388. // Access denied.
  389. //
  390. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  391. // Your request contains more trusted signers than are allowed per distribution.
  392. //
  393. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  394. // One or more of your trusted signers don't exist.
  395. //
  396. // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"
  397. //
  398. // * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"
  399. //
  400. // * ErrCodeMissingBody "MissingBody"
  401. // This operation requires a body. Ensure that the body is present and the Content-Type
  402. // header is set.
  403. //
  404. // * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs"
  405. // Your request contains more CNAMEs than are allowed per distribution.
  406. //
  407. // * ErrCodeTooManyDistributions "TooManyDistributions"
  408. // Processing your request would cause you to exceed the maximum number of distributions
  409. // allowed.
  410. //
  411. // * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject"
  412. // The default root object file name is too big or contains an invalid character.
  413. //
  414. // * ErrCodeInvalidRelativePath "InvalidRelativePath"
  415. // The relative path is too big, is not URL-encoded, or does not begin with
  416. // a slash (/).
  417. //
  418. // * ErrCodeInvalidErrorCode "InvalidErrorCode"
  419. //
  420. // * ErrCodeInvalidResponseCode "InvalidResponseCode"
  421. //
  422. // * ErrCodeInvalidArgument "InvalidArgument"
  423. // The argument is invalid.
  424. //
  425. // * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol"
  426. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  427. // protocol in your request, or omit the RequiredProtocols element from your
  428. // distribution configuration.
  429. //
  430. // * ErrCodeNoSuchOrigin "NoSuchOrigin"
  431. // No origin exists with the specified Origin Id.
  432. //
  433. // * ErrCodeTooManyOrigins "TooManyOrigins"
  434. // You cannot create more origins for the distribution.
  435. //
  436. // * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution"
  437. // Processing your request would cause you to exceed the maximum number of origin
  438. // groups allowed.
  439. //
  440. // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors"
  441. // You cannot create more cache behaviors for the distribution.
  442. //
  443. // * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList"
  444. // Your request contains more cookie names in the whitelist than are allowed
  445. // per cache behavior.
  446. //
  447. // * ErrCodeInvalidForwardCookies "InvalidForwardCookies"
  448. // Your request contains forward cookies option which doesn't match with the
  449. // expectation for the whitelisted list of cookie names. Either list of cookie
  450. // names has been specified when not allowed or list of cookie names is missing
  451. // when expected.
  452. //
  453. // * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"
  454. //
  455. // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"
  456. //
  457. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  458. // The value of Quantity and the size of Items don't match.
  459. //
  460. // * ErrCodeTooManyCertificates "TooManyCertificates"
  461. // You cannot create anymore custom SSL/TLS certificates.
  462. //
  463. // * ErrCodeInvalidLocationCode "InvalidLocationCode"
  464. //
  465. // * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"
  466. //
  467. // * ErrCodeInvalidProtocolSettings "InvalidProtocolSettings"
  468. // You cannot specify SSLv3 as the minimum protocol version if you only want
  469. // to support only clients that support Server Name Indication (SNI).
  470. //
  471. // * ErrCodeInvalidTTLOrder "InvalidTTLOrder"
  472. //
  473. // * ErrCodeInvalidWebACLId "InvalidWebACLId"
  474. //
  475. // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"
  476. //
  477. // * ErrCodeInvalidTagging "InvalidTagging"
  478. //
  479. // * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"
  480. //
  481. // * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"
  482. //
  483. // * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations"
  484. // Processing your request would cause the maximum number of distributions with
  485. // Lambda function associations per owner to be exceeded.
  486. //
  487. // * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations"
  488. // Your request contains more Lambda function associations than are allowed
  489. // per distribution.
  490. //
  491. // * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation"
  492. // The specified Lambda function association is invalid.
  493. //
  494. // * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"
  495. //
  496. // * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"
  497. //
  498. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  499. // The specified configuration for field-level encryption doesn't exist.
  500. //
  501. // * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"
  502. // The specified configuration for field-level encryption can't be associated
  503. // with the specified cache behavior.
  504. //
  505. // * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"
  506. // The maximum number of distributions have been associated with the specified
  507. // configuration for field-level encryption.
  508. //
  509. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags
  510. func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) {
  511. req, out := c.CreateDistributionWithTagsRequest(input)
  512. return out, req.Send()
  513. }
  514. // CreateDistributionWithTagsWithContext is the same as CreateDistributionWithTags with the addition of
  515. // the ability to pass a context and additional request options.
  516. //
  517. // See CreateDistributionWithTags for details on how to use this API operation.
  518. //
  519. // The context must be non-nil and will be used for request cancellation. If
  520. // the context is nil a panic will occur. In the future the SDK may create
  521. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  522. // for more information on using Contexts.
  523. func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, input *CreateDistributionWithTagsInput, opts ...request.Option) (*CreateDistributionWithTagsOutput, error) {
  524. req, out := c.CreateDistributionWithTagsRequest(input)
  525. req.SetContext(ctx)
  526. req.ApplyOptions(opts...)
  527. return out, req.Send()
  528. }
  529. const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018_11_05"
  530. // CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the
  531. // client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return
  532. // value will be populated with the request's response once the request completes
  533. // successfully.
  534. //
  535. // Use "Send" method on the returned Request to send the API call to the service.
  536. // the "output" return value is not valid until after Send returns without error.
  537. //
  538. // See CreateFieldLevelEncryptionConfig for more information on using the CreateFieldLevelEncryptionConfig
  539. // API call, and error handling.
  540. //
  541. // This method is useful when you want to inject custom logic or configuration
  542. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  543. //
  544. //
  545. // // Example sending a request using the CreateFieldLevelEncryptionConfigRequest method.
  546. // req, resp := client.CreateFieldLevelEncryptionConfigRequest(params)
  547. //
  548. // err := req.Send()
  549. // if err == nil { // resp is now filled
  550. // fmt.Println(resp)
  551. // }
  552. //
  553. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig
  554. func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) {
  555. op := &request.Operation{
  556. Name: opCreateFieldLevelEncryptionConfig,
  557. HTTPMethod: "POST",
  558. HTTPPath: "/2018-11-05/field-level-encryption",
  559. }
  560. if input == nil {
  561. input = &CreateFieldLevelEncryptionConfigInput{}
  562. }
  563. output = &CreateFieldLevelEncryptionConfigOutput{}
  564. req = c.newRequest(op, input, output)
  565. return
  566. }
  567. // CreateFieldLevelEncryptionConfig API operation for Amazon CloudFront.
  568. //
  569. // Create a new field-level encryption configuration.
  570. //
  571. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  572. // with awserr.Error's Code and Message methods to get detailed information about
  573. // the error.
  574. //
  575. // See the AWS API reference guide for Amazon CloudFront's
  576. // API operation CreateFieldLevelEncryptionConfig for usage and error information.
  577. //
  578. // Returned Error Codes:
  579. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  580. // The value of Quantity and the size of Items don't match.
  581. //
  582. // * ErrCodeInvalidArgument "InvalidArgument"
  583. // The argument is invalid.
  584. //
  585. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  586. // The specified profile for field-level encryption doesn't exist.
  587. //
  588. // * ErrCodeFieldLevelEncryptionConfigAlreadyExists "FieldLevelEncryptionConfigAlreadyExists"
  589. // The specified configuration for field-level encryption already exists.
  590. //
  591. // * ErrCodeTooManyFieldLevelEncryptionConfigs "TooManyFieldLevelEncryptionConfigs"
  592. // The maximum number of configurations for field-level encryption have been
  593. // created.
  594. //
  595. // * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles"
  596. // The maximum number of query arg profiles for field-level encryption have
  597. // been created.
  598. //
  599. // * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles"
  600. // The maximum number of content type profiles for field-level encryption have
  601. // been created.
  602. //
  603. // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty"
  604. // No profile specified for the field-level encryption query argument.
  605. //
  606. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig
  607. func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) {
  608. req, out := c.CreateFieldLevelEncryptionConfigRequest(input)
  609. return out, req.Send()
  610. }
  611. // CreateFieldLevelEncryptionConfigWithContext is the same as CreateFieldLevelEncryptionConfig with the addition of
  612. // the ability to pass a context and additional request options.
  613. //
  614. // See CreateFieldLevelEncryptionConfig for details on how to use this API operation.
  615. //
  616. // The context must be non-nil and will be used for request cancellation. If
  617. // the context is nil a panic will occur. In the future the SDK may create
  618. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  619. // for more information on using Contexts.
  620. func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionConfigInput, opts ...request.Option) (*CreateFieldLevelEncryptionConfigOutput, error) {
  621. req, out := c.CreateFieldLevelEncryptionConfigRequest(input)
  622. req.SetContext(ctx)
  623. req.ApplyOptions(opts...)
  624. return out, req.Send()
  625. }
  626. const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2018_11_05"
  627. // CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the
  628. // client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return
  629. // value will be populated with the request's response once the request completes
  630. // successfully.
  631. //
  632. // Use "Send" method on the returned Request to send the API call to the service.
  633. // the "output" return value is not valid until after Send returns without error.
  634. //
  635. // See CreateFieldLevelEncryptionProfile for more information on using the CreateFieldLevelEncryptionProfile
  636. // API call, and error handling.
  637. //
  638. // This method is useful when you want to inject custom logic or configuration
  639. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  640. //
  641. //
  642. // // Example sending a request using the CreateFieldLevelEncryptionProfileRequest method.
  643. // req, resp := client.CreateFieldLevelEncryptionProfileRequest(params)
  644. //
  645. // err := req.Send()
  646. // if err == nil { // resp is now filled
  647. // fmt.Println(resp)
  648. // }
  649. //
  650. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile
  651. func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) {
  652. op := &request.Operation{
  653. Name: opCreateFieldLevelEncryptionProfile,
  654. HTTPMethod: "POST",
  655. HTTPPath: "/2018-11-05/field-level-encryption-profile",
  656. }
  657. if input == nil {
  658. input = &CreateFieldLevelEncryptionProfileInput{}
  659. }
  660. output = &CreateFieldLevelEncryptionProfileOutput{}
  661. req = c.newRequest(op, input, output)
  662. return
  663. }
  664. // CreateFieldLevelEncryptionProfile API operation for Amazon CloudFront.
  665. //
  666. // Create a field-level encryption profile.
  667. //
  668. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  669. // with awserr.Error's Code and Message methods to get detailed information about
  670. // the error.
  671. //
  672. // See the AWS API reference guide for Amazon CloudFront's
  673. // API operation CreateFieldLevelEncryptionProfile for usage and error information.
  674. //
  675. // Returned Error Codes:
  676. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  677. // The value of Quantity and the size of Items don't match.
  678. //
  679. // * ErrCodeInvalidArgument "InvalidArgument"
  680. // The argument is invalid.
  681. //
  682. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  683. // The specified public key doesn't exist.
  684. //
  685. // * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists"
  686. // The specified profile for field-level encryption already exists.
  687. //
  688. // * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded"
  689. // The maximum size of a profile for field-level encryption was exceeded.
  690. //
  691. // * ErrCodeTooManyFieldLevelEncryptionProfiles "TooManyFieldLevelEncryptionProfiles"
  692. // The maximum number of profiles for field-level encryption have been created.
  693. //
  694. // * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities"
  695. // The maximum number of encryption entities for field-level encryption have
  696. // been created.
  697. //
  698. // * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns"
  699. // The maximum number of field patterns for field-level encryption have been
  700. // created.
  701. //
  702. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile
  703. func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) {
  704. req, out := c.CreateFieldLevelEncryptionProfileRequest(input)
  705. return out, req.Send()
  706. }
  707. // CreateFieldLevelEncryptionProfileWithContext is the same as CreateFieldLevelEncryptionProfile with the addition of
  708. // the ability to pass a context and additional request options.
  709. //
  710. // See CreateFieldLevelEncryptionProfile for details on how to use this API operation.
  711. //
  712. // The context must be non-nil and will be used for request cancellation. If
  713. // the context is nil a panic will occur. In the future the SDK may create
  714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  715. // for more information on using Contexts.
  716. func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *CreateFieldLevelEncryptionProfileInput, opts ...request.Option) (*CreateFieldLevelEncryptionProfileOutput, error) {
  717. req, out := c.CreateFieldLevelEncryptionProfileRequest(input)
  718. req.SetContext(ctx)
  719. req.ApplyOptions(opts...)
  720. return out, req.Send()
  721. }
  722. const opCreateInvalidation = "CreateInvalidation2018_11_05"
  723. // CreateInvalidationRequest generates a "aws/request.Request" representing the
  724. // client's request for the CreateInvalidation operation. The "output" return
  725. // value will be populated with the request's response once the request completes
  726. // successfully.
  727. //
  728. // Use "Send" method on the returned Request to send the API call to the service.
  729. // the "output" return value is not valid until after Send returns without error.
  730. //
  731. // See CreateInvalidation for more information on using the CreateInvalidation
  732. // API call, and error handling.
  733. //
  734. // This method is useful when you want to inject custom logic or configuration
  735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  736. //
  737. //
  738. // // Example sending a request using the CreateInvalidationRequest method.
  739. // req, resp := client.CreateInvalidationRequest(params)
  740. //
  741. // err := req.Send()
  742. // if err == nil { // resp is now filled
  743. // fmt.Println(resp)
  744. // }
  745. //
  746. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation
  747. func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) {
  748. op := &request.Operation{
  749. Name: opCreateInvalidation,
  750. HTTPMethod: "POST",
  751. HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation",
  752. }
  753. if input == nil {
  754. input = &CreateInvalidationInput{}
  755. }
  756. output = &CreateInvalidationOutput{}
  757. req = c.newRequest(op, input, output)
  758. return
  759. }
  760. // CreateInvalidation API operation for Amazon CloudFront.
  761. //
  762. // Create a new invalidation.
  763. //
  764. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  765. // with awserr.Error's Code and Message methods to get detailed information about
  766. // the error.
  767. //
  768. // See the AWS API reference guide for Amazon CloudFront's
  769. // API operation CreateInvalidation for usage and error information.
  770. //
  771. // Returned Error Codes:
  772. // * ErrCodeAccessDenied "AccessDenied"
  773. // Access denied.
  774. //
  775. // * ErrCodeMissingBody "MissingBody"
  776. // This operation requires a body. Ensure that the body is present and the Content-Type
  777. // header is set.
  778. //
  779. // * ErrCodeInvalidArgument "InvalidArgument"
  780. // The argument is invalid.
  781. //
  782. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  783. // The specified distribution does not exist.
  784. //
  785. // * ErrCodeBatchTooLarge "BatchTooLarge"
  786. //
  787. // * ErrCodeTooManyInvalidationsInProgress "TooManyInvalidationsInProgress"
  788. // You have exceeded the maximum number of allowable InProgress invalidation
  789. // batch requests, or invalidation objects.
  790. //
  791. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  792. // The value of Quantity and the size of Items don't match.
  793. //
  794. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation
  795. func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) {
  796. req, out := c.CreateInvalidationRequest(input)
  797. return out, req.Send()
  798. }
  799. // CreateInvalidationWithContext is the same as CreateInvalidation with the addition of
  800. // the ability to pass a context and additional request options.
  801. //
  802. // See CreateInvalidation for details on how to use this API operation.
  803. //
  804. // The context must be non-nil and will be used for request cancellation. If
  805. // the context is nil a panic will occur. In the future the SDK may create
  806. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  807. // for more information on using Contexts.
  808. func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *CreateInvalidationInput, opts ...request.Option) (*CreateInvalidationOutput, error) {
  809. req, out := c.CreateInvalidationRequest(input)
  810. req.SetContext(ctx)
  811. req.ApplyOptions(opts...)
  812. return out, req.Send()
  813. }
  814. const opCreatePublicKey = "CreatePublicKey2018_11_05"
  815. // CreatePublicKeyRequest generates a "aws/request.Request" representing the
  816. // client's request for the CreatePublicKey operation. The "output" return
  817. // value will be populated with the request's response once the request completes
  818. // successfully.
  819. //
  820. // Use "Send" method on the returned Request to send the API call to the service.
  821. // the "output" return value is not valid until after Send returns without error.
  822. //
  823. // See CreatePublicKey for more information on using the CreatePublicKey
  824. // API call, and error handling.
  825. //
  826. // This method is useful when you want to inject custom logic or configuration
  827. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  828. //
  829. //
  830. // // Example sending a request using the CreatePublicKeyRequest method.
  831. // req, resp := client.CreatePublicKeyRequest(params)
  832. //
  833. // err := req.Send()
  834. // if err == nil { // resp is now filled
  835. // fmt.Println(resp)
  836. // }
  837. //
  838. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey
  839. func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) {
  840. op := &request.Operation{
  841. Name: opCreatePublicKey,
  842. HTTPMethod: "POST",
  843. HTTPPath: "/2018-11-05/public-key",
  844. }
  845. if input == nil {
  846. input = &CreatePublicKeyInput{}
  847. }
  848. output = &CreatePublicKeyOutput{}
  849. req = c.newRequest(op, input, output)
  850. return
  851. }
  852. // CreatePublicKey API operation for Amazon CloudFront.
  853. //
  854. // Add a new public key to CloudFront to use, for example, for field-level encryption.
  855. // You can add a maximum of 10 public keys with one AWS account.
  856. //
  857. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  858. // with awserr.Error's Code and Message methods to get detailed information about
  859. // the error.
  860. //
  861. // See the AWS API reference guide for Amazon CloudFront's
  862. // API operation CreatePublicKey for usage and error information.
  863. //
  864. // Returned Error Codes:
  865. // * ErrCodePublicKeyAlreadyExists "PublicKeyAlreadyExists"
  866. // The specified public key already exists.
  867. //
  868. // * ErrCodeInvalidArgument "InvalidArgument"
  869. // The argument is invalid.
  870. //
  871. // * ErrCodeTooManyPublicKeys "TooManyPublicKeys"
  872. // The maximum number of public keys for field-level encryption have been created.
  873. // To create a new public key, delete one of the existing keys.
  874. //
  875. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey
  876. func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) {
  877. req, out := c.CreatePublicKeyRequest(input)
  878. return out, req.Send()
  879. }
  880. // CreatePublicKeyWithContext is the same as CreatePublicKey with the addition of
  881. // the ability to pass a context and additional request options.
  882. //
  883. // See CreatePublicKey for details on how to use this API operation.
  884. //
  885. // The context must be non-nil and will be used for request cancellation. If
  886. // the context is nil a panic will occur. In the future the SDK may create
  887. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  888. // for more information on using Contexts.
  889. func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePublicKeyInput, opts ...request.Option) (*CreatePublicKeyOutput, error) {
  890. req, out := c.CreatePublicKeyRequest(input)
  891. req.SetContext(ctx)
  892. req.ApplyOptions(opts...)
  893. return out, req.Send()
  894. }
  895. const opCreateStreamingDistribution = "CreateStreamingDistribution2018_11_05"
  896. // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the
  897. // client's request for the CreateStreamingDistribution operation. The "output" return
  898. // value will be populated with the request's response once the request completes
  899. // successfully.
  900. //
  901. // Use "Send" method on the returned Request to send the API call to the service.
  902. // the "output" return value is not valid until after Send returns without error.
  903. //
  904. // See CreateStreamingDistribution for more information on using the CreateStreamingDistribution
  905. // API call, and error handling.
  906. //
  907. // This method is useful when you want to inject custom logic or configuration
  908. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  909. //
  910. //
  911. // // Example sending a request using the CreateStreamingDistributionRequest method.
  912. // req, resp := client.CreateStreamingDistributionRequest(params)
  913. //
  914. // err := req.Send()
  915. // if err == nil { // resp is now filled
  916. // fmt.Println(resp)
  917. // }
  918. //
  919. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution
  920. func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) {
  921. op := &request.Operation{
  922. Name: opCreateStreamingDistribution,
  923. HTTPMethod: "POST",
  924. HTTPPath: "/2018-11-05/streaming-distribution",
  925. }
  926. if input == nil {
  927. input = &CreateStreamingDistributionInput{}
  928. }
  929. output = &CreateStreamingDistributionOutput{}
  930. req = c.newRequest(op, input, output)
  931. return
  932. }
  933. // CreateStreamingDistribution API operation for Amazon CloudFront.
  934. //
  935. // Creates a new RMTP distribution. An RTMP distribution is similar to a web
  936. // distribution, but an RTMP distribution streams media files using the Adobe
  937. // Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.
  938. //
  939. // To create a new web distribution, submit a POST request to the CloudFront
  940. // API version/distribution resource. The request body must include a document
  941. // with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig
  942. // element and returns other information about the RTMP distribution.
  943. //
  944. // To get the status of your request, use the GET StreamingDistribution API
  945. // action. When the value of Enabled is true and the value of Status is Deployed,
  946. // your distribution is ready. A distribution usually deploys in less than 15
  947. // minutes.
  948. //
  949. // For more information about web distributions, see Working with RTMP Distributions
  950. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html)
  951. // in the Amazon CloudFront Developer Guide.
  952. //
  953. // Beginning with the 2012-05-05 version of the CloudFront API, we made substantial
  954. // changes to the format of the XML document that you include in the request
  955. // body when you create or update a web distribution or an RTMP distribution,
  956. // and when you invalidate objects. With previous versions of the API, we discovered
  957. // that it was too easy to accidentally delete one or more values for an element
  958. // that accepts multiple values, for example, CNAMEs and trusted signers. Our
  959. // changes for the 2012-05-05 release are intended to prevent these accidental
  960. // deletions and to notify you when there's a mismatch between the number of
  961. // values you say you're specifying in the Quantity element and the number of
  962. // values specified.
  963. //
  964. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  965. // with awserr.Error's Code and Message methods to get detailed information about
  966. // the error.
  967. //
  968. // See the AWS API reference guide for Amazon CloudFront's
  969. // API operation CreateStreamingDistribution for usage and error information.
  970. //
  971. // Returned Error Codes:
  972. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  973. //
  974. // * ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists"
  975. //
  976. // * ErrCodeInvalidOrigin "InvalidOrigin"
  977. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  978. // bucket.
  979. //
  980. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  981. // The origin access identity is not valid or doesn't exist.
  982. //
  983. // * ErrCodeAccessDenied "AccessDenied"
  984. // Access denied.
  985. //
  986. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  987. // Your request contains more trusted signers than are allowed per distribution.
  988. //
  989. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  990. // One or more of your trusted signers don't exist.
  991. //
  992. // * ErrCodeMissingBody "MissingBody"
  993. // This operation requires a body. Ensure that the body is present and the Content-Type
  994. // header is set.
  995. //
  996. // * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"
  997. //
  998. // * ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions"
  999. // Processing your request would cause you to exceed the maximum number of streaming
  1000. // distributions allowed.
  1001. //
  1002. // * ErrCodeInvalidArgument "InvalidArgument"
  1003. // The argument is invalid.
  1004. //
  1005. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  1006. // The value of Quantity and the size of Items don't match.
  1007. //
  1008. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution
  1009. func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) {
  1010. req, out := c.CreateStreamingDistributionRequest(input)
  1011. return out, req.Send()
  1012. }
  1013. // CreateStreamingDistributionWithContext is the same as CreateStreamingDistribution with the addition of
  1014. // the ability to pass a context and additional request options.
  1015. //
  1016. // See CreateStreamingDistribution for details on how to use this API operation.
  1017. //
  1018. // The context must be non-nil and will be used for request cancellation. If
  1019. // the context is nil a panic will occur. In the future the SDK may create
  1020. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1021. // for more information on using Contexts.
  1022. func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, input *CreateStreamingDistributionInput, opts ...request.Option) (*CreateStreamingDistributionOutput, error) {
  1023. req, out := c.CreateStreamingDistributionRequest(input)
  1024. req.SetContext(ctx)
  1025. req.ApplyOptions(opts...)
  1026. return out, req.Send()
  1027. }
  1028. const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2018_11_05"
  1029. // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the
  1030. // client's request for the CreateStreamingDistributionWithTags operation. The "output" return
  1031. // value will be populated with the request's response once the request completes
  1032. // successfully.
  1033. //
  1034. // Use "Send" method on the returned Request to send the API call to the service.
  1035. // the "output" return value is not valid until after Send returns without error.
  1036. //
  1037. // See CreateStreamingDistributionWithTags for more information on using the CreateStreamingDistributionWithTags
  1038. // API call, and error handling.
  1039. //
  1040. // This method is useful when you want to inject custom logic or configuration
  1041. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1042. //
  1043. //
  1044. // // Example sending a request using the CreateStreamingDistributionWithTagsRequest method.
  1045. // req, resp := client.CreateStreamingDistributionWithTagsRequest(params)
  1046. //
  1047. // err := req.Send()
  1048. // if err == nil { // resp is now filled
  1049. // fmt.Println(resp)
  1050. // }
  1051. //
  1052. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags
  1053. func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) {
  1054. op := &request.Operation{
  1055. Name: opCreateStreamingDistributionWithTags,
  1056. HTTPMethod: "POST",
  1057. HTTPPath: "/2018-11-05/streaming-distribution?WithTags",
  1058. }
  1059. if input == nil {
  1060. input = &CreateStreamingDistributionWithTagsInput{}
  1061. }
  1062. output = &CreateStreamingDistributionWithTagsOutput{}
  1063. req = c.newRequest(op, input, output)
  1064. return
  1065. }
  1066. // CreateStreamingDistributionWithTags API operation for Amazon CloudFront.
  1067. //
  1068. // Create a new streaming distribution with tags.
  1069. //
  1070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1071. // with awserr.Error's Code and Message methods to get detailed information about
  1072. // the error.
  1073. //
  1074. // See the AWS API reference guide for Amazon CloudFront's
  1075. // API operation CreateStreamingDistributionWithTags for usage and error information.
  1076. //
  1077. // Returned Error Codes:
  1078. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  1079. //
  1080. // * ErrCodeStreamingDistributionAlreadyExists "StreamingDistributionAlreadyExists"
  1081. //
  1082. // * ErrCodeInvalidOrigin "InvalidOrigin"
  1083. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  1084. // bucket.
  1085. //
  1086. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  1087. // The origin access identity is not valid or doesn't exist.
  1088. //
  1089. // * ErrCodeAccessDenied "AccessDenied"
  1090. // Access denied.
  1091. //
  1092. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  1093. // Your request contains more trusted signers than are allowed per distribution.
  1094. //
  1095. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  1096. // One or more of your trusted signers don't exist.
  1097. //
  1098. // * ErrCodeMissingBody "MissingBody"
  1099. // This operation requires a body. Ensure that the body is present and the Content-Type
  1100. // header is set.
  1101. //
  1102. // * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"
  1103. //
  1104. // * ErrCodeTooManyStreamingDistributions "TooManyStreamingDistributions"
  1105. // Processing your request would cause you to exceed the maximum number of streaming
  1106. // distributions allowed.
  1107. //
  1108. // * ErrCodeInvalidArgument "InvalidArgument"
  1109. // The argument is invalid.
  1110. //
  1111. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  1112. // The value of Quantity and the size of Items don't match.
  1113. //
  1114. // * ErrCodeInvalidTagging "InvalidTagging"
  1115. //
  1116. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags
  1117. func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) {
  1118. req, out := c.CreateStreamingDistributionWithTagsRequest(input)
  1119. return out, req.Send()
  1120. }
  1121. // CreateStreamingDistributionWithTagsWithContext is the same as CreateStreamingDistributionWithTags with the addition of
  1122. // the ability to pass a context and additional request options.
  1123. //
  1124. // See CreateStreamingDistributionWithTags for details on how to use this API operation.
  1125. //
  1126. // The context must be non-nil and will be used for request cancellation. If
  1127. // the context is nil a panic will occur. In the future the SDK may create
  1128. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1129. // for more information on using Contexts.
  1130. func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Context, input *CreateStreamingDistributionWithTagsInput, opts ...request.Option) (*CreateStreamingDistributionWithTagsOutput, error) {
  1131. req, out := c.CreateStreamingDistributionWithTagsRequest(input)
  1132. req.SetContext(ctx)
  1133. req.ApplyOptions(opts...)
  1134. return out, req.Send()
  1135. }
  1136. const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2018_11_05"
  1137. // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  1138. // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return
  1139. // value will be populated with the request's response once the request completes
  1140. // successfully.
  1141. //
  1142. // Use "Send" method on the returned Request to send the API call to the service.
  1143. // the "output" return value is not valid until after Send returns without error.
  1144. //
  1145. // See DeleteCloudFrontOriginAccessIdentity for more information on using the DeleteCloudFrontOriginAccessIdentity
  1146. // API call, and error handling.
  1147. //
  1148. // This method is useful when you want to inject custom logic or configuration
  1149. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1150. //
  1151. //
  1152. // // Example sending a request using the DeleteCloudFrontOriginAccessIdentityRequest method.
  1153. // req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params)
  1154. //
  1155. // err := req.Send()
  1156. // if err == nil { // resp is now filled
  1157. // fmt.Println(resp)
  1158. // }
  1159. //
  1160. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity
  1161. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) {
  1162. op := &request.Operation{
  1163. Name: opDeleteCloudFrontOriginAccessIdentity,
  1164. HTTPMethod: "DELETE",
  1165. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}",
  1166. }
  1167. if input == nil {
  1168. input = &DeleteCloudFrontOriginAccessIdentityInput{}
  1169. }
  1170. output = &DeleteCloudFrontOriginAccessIdentityOutput{}
  1171. req = c.newRequest(op, input, output)
  1172. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1173. return
  1174. }
  1175. // DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  1176. //
  1177. // Delete an origin access identity.
  1178. //
  1179. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1180. // with awserr.Error's Code and Message methods to get detailed information about
  1181. // the error.
  1182. //
  1183. // See the AWS API reference guide for Amazon CloudFront's
  1184. // API operation DeleteCloudFrontOriginAccessIdentity for usage and error information.
  1185. //
  1186. // Returned Error Codes:
  1187. // * ErrCodeAccessDenied "AccessDenied"
  1188. // Access denied.
  1189. //
  1190. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1191. // The If-Match version is missing or not valid for the distribution.
  1192. //
  1193. // * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity"
  1194. // The specified origin access identity does not exist.
  1195. //
  1196. // * ErrCodePreconditionFailed "PreconditionFailed"
  1197. // The precondition given in one or more of the request-header fields evaluated
  1198. // to false.
  1199. //
  1200. // * ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse"
  1201. //
  1202. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity
  1203. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) {
  1204. req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input)
  1205. return out, req.Send()
  1206. }
  1207. // DeleteCloudFrontOriginAccessIdentityWithContext is the same as DeleteCloudFrontOriginAccessIdentity with the addition of
  1208. // the ability to pass a context and additional request options.
  1209. //
  1210. // See DeleteCloudFrontOriginAccessIdentity for details on how to use this API operation.
  1211. //
  1212. // The context must be non-nil and will be used for request cancellation. If
  1213. // the context is nil a panic will occur. In the future the SDK may create
  1214. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1215. // for more information on using Contexts.
  1216. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *DeleteCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*DeleteCloudFrontOriginAccessIdentityOutput, error) {
  1217. req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input)
  1218. req.SetContext(ctx)
  1219. req.ApplyOptions(opts...)
  1220. return out, req.Send()
  1221. }
  1222. const opDeleteDistribution = "DeleteDistribution2018_11_05"
  1223. // DeleteDistributionRequest generates a "aws/request.Request" representing the
  1224. // client's request for the DeleteDistribution operation. The "output" return
  1225. // value will be populated with the request's response once the request completes
  1226. // successfully.
  1227. //
  1228. // Use "Send" method on the returned Request to send the API call to the service.
  1229. // the "output" return value is not valid until after Send returns without error.
  1230. //
  1231. // See DeleteDistribution for more information on using the DeleteDistribution
  1232. // API call, and error handling.
  1233. //
  1234. // This method is useful when you want to inject custom logic or configuration
  1235. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1236. //
  1237. //
  1238. // // Example sending a request using the DeleteDistributionRequest method.
  1239. // req, resp := client.DeleteDistributionRequest(params)
  1240. //
  1241. // err := req.Send()
  1242. // if err == nil { // resp is now filled
  1243. // fmt.Println(resp)
  1244. // }
  1245. //
  1246. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution
  1247. func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) {
  1248. op := &request.Operation{
  1249. Name: opDeleteDistribution,
  1250. HTTPMethod: "DELETE",
  1251. HTTPPath: "/2018-11-05/distribution/{Id}",
  1252. }
  1253. if input == nil {
  1254. input = &DeleteDistributionInput{}
  1255. }
  1256. output = &DeleteDistributionOutput{}
  1257. req = c.newRequest(op, input, output)
  1258. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1259. return
  1260. }
  1261. // DeleteDistribution API operation for Amazon CloudFront.
  1262. //
  1263. // Delete a distribution.
  1264. //
  1265. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1266. // with awserr.Error's Code and Message methods to get detailed information about
  1267. // the error.
  1268. //
  1269. // See the AWS API reference guide for Amazon CloudFront's
  1270. // API operation DeleteDistribution for usage and error information.
  1271. //
  1272. // Returned Error Codes:
  1273. // * ErrCodeAccessDenied "AccessDenied"
  1274. // Access denied.
  1275. //
  1276. // * ErrCodeDistributionNotDisabled "DistributionNotDisabled"
  1277. //
  1278. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1279. // The If-Match version is missing or not valid for the distribution.
  1280. //
  1281. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  1282. // The specified distribution does not exist.
  1283. //
  1284. // * ErrCodePreconditionFailed "PreconditionFailed"
  1285. // The precondition given in one or more of the request-header fields evaluated
  1286. // to false.
  1287. //
  1288. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution
  1289. func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) {
  1290. req, out := c.DeleteDistributionRequest(input)
  1291. return out, req.Send()
  1292. }
  1293. // DeleteDistributionWithContext is the same as DeleteDistribution with the addition of
  1294. // the ability to pass a context and additional request options.
  1295. //
  1296. // See DeleteDistribution for details on how to use this API operation.
  1297. //
  1298. // The context must be non-nil and will be used for request cancellation. If
  1299. // the context is nil a panic will occur. In the future the SDK may create
  1300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1301. // for more information on using Contexts.
  1302. func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *DeleteDistributionInput, opts ...request.Option) (*DeleteDistributionOutput, error) {
  1303. req, out := c.DeleteDistributionRequest(input)
  1304. req.SetContext(ctx)
  1305. req.ApplyOptions(opts...)
  1306. return out, req.Send()
  1307. }
  1308. const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018_11_05"
  1309. // DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the
  1310. // client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return
  1311. // value will be populated with the request's response once the request completes
  1312. // successfully.
  1313. //
  1314. // Use "Send" method on the returned Request to send the API call to the service.
  1315. // the "output" return value is not valid until after Send returns without error.
  1316. //
  1317. // See DeleteFieldLevelEncryptionConfig for more information on using the DeleteFieldLevelEncryptionConfig
  1318. // API call, and error handling.
  1319. //
  1320. // This method is useful when you want to inject custom logic or configuration
  1321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1322. //
  1323. //
  1324. // // Example sending a request using the DeleteFieldLevelEncryptionConfigRequest method.
  1325. // req, resp := client.DeleteFieldLevelEncryptionConfigRequest(params)
  1326. //
  1327. // err := req.Send()
  1328. // if err == nil { // resp is now filled
  1329. // fmt.Println(resp)
  1330. // }
  1331. //
  1332. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig
  1333. func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) {
  1334. op := &request.Operation{
  1335. Name: opDeleteFieldLevelEncryptionConfig,
  1336. HTTPMethod: "DELETE",
  1337. HTTPPath: "/2018-11-05/field-level-encryption/{Id}",
  1338. }
  1339. if input == nil {
  1340. input = &DeleteFieldLevelEncryptionConfigInput{}
  1341. }
  1342. output = &DeleteFieldLevelEncryptionConfigOutput{}
  1343. req = c.newRequest(op, input, output)
  1344. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1345. return
  1346. }
  1347. // DeleteFieldLevelEncryptionConfig API operation for Amazon CloudFront.
  1348. //
  1349. // Remove a field-level encryption configuration.
  1350. //
  1351. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1352. // with awserr.Error's Code and Message methods to get detailed information about
  1353. // the error.
  1354. //
  1355. // See the AWS API reference guide for Amazon CloudFront's
  1356. // API operation DeleteFieldLevelEncryptionConfig for usage and error information.
  1357. //
  1358. // Returned Error Codes:
  1359. // * ErrCodeAccessDenied "AccessDenied"
  1360. // Access denied.
  1361. //
  1362. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1363. // The If-Match version is missing or not valid for the distribution.
  1364. //
  1365. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  1366. // The specified configuration for field-level encryption doesn't exist.
  1367. //
  1368. // * ErrCodePreconditionFailed "PreconditionFailed"
  1369. // The precondition given in one or more of the request-header fields evaluated
  1370. // to false.
  1371. //
  1372. // * ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse"
  1373. // The specified configuration for field-level encryption is in use.
  1374. //
  1375. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig
  1376. func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) {
  1377. req, out := c.DeleteFieldLevelEncryptionConfigRequest(input)
  1378. return out, req.Send()
  1379. }
  1380. // DeleteFieldLevelEncryptionConfigWithContext is the same as DeleteFieldLevelEncryptionConfig with the addition of
  1381. // the ability to pass a context and additional request options.
  1382. //
  1383. // See DeleteFieldLevelEncryptionConfig for details on how to use this API operation.
  1384. //
  1385. // The context must be non-nil and will be used for request cancellation. If
  1386. // the context is nil a panic will occur. In the future the SDK may create
  1387. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1388. // for more information on using Contexts.
  1389. func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionConfigInput, opts ...request.Option) (*DeleteFieldLevelEncryptionConfigOutput, error) {
  1390. req, out := c.DeleteFieldLevelEncryptionConfigRequest(input)
  1391. req.SetContext(ctx)
  1392. req.ApplyOptions(opts...)
  1393. return out, req.Send()
  1394. }
  1395. const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2018_11_05"
  1396. // DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the
  1397. // client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return
  1398. // value will be populated with the request's response once the request completes
  1399. // successfully.
  1400. //
  1401. // Use "Send" method on the returned Request to send the API call to the service.
  1402. // the "output" return value is not valid until after Send returns without error.
  1403. //
  1404. // See DeleteFieldLevelEncryptionProfile for more information on using the DeleteFieldLevelEncryptionProfile
  1405. // API call, and error handling.
  1406. //
  1407. // This method is useful when you want to inject custom logic or configuration
  1408. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1409. //
  1410. //
  1411. // // Example sending a request using the DeleteFieldLevelEncryptionProfileRequest method.
  1412. // req, resp := client.DeleteFieldLevelEncryptionProfileRequest(params)
  1413. //
  1414. // err := req.Send()
  1415. // if err == nil { // resp is now filled
  1416. // fmt.Println(resp)
  1417. // }
  1418. //
  1419. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile
  1420. func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) {
  1421. op := &request.Operation{
  1422. Name: opDeleteFieldLevelEncryptionProfile,
  1423. HTTPMethod: "DELETE",
  1424. HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}",
  1425. }
  1426. if input == nil {
  1427. input = &DeleteFieldLevelEncryptionProfileInput{}
  1428. }
  1429. output = &DeleteFieldLevelEncryptionProfileOutput{}
  1430. req = c.newRequest(op, input, output)
  1431. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1432. return
  1433. }
  1434. // DeleteFieldLevelEncryptionProfile API operation for Amazon CloudFront.
  1435. //
  1436. // Remove a field-level encryption profile.
  1437. //
  1438. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1439. // with awserr.Error's Code and Message methods to get detailed information about
  1440. // the error.
  1441. //
  1442. // See the AWS API reference guide for Amazon CloudFront's
  1443. // API operation DeleteFieldLevelEncryptionProfile for usage and error information.
  1444. //
  1445. // Returned Error Codes:
  1446. // * ErrCodeAccessDenied "AccessDenied"
  1447. // Access denied.
  1448. //
  1449. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1450. // The If-Match version is missing or not valid for the distribution.
  1451. //
  1452. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  1453. // The specified profile for field-level encryption doesn't exist.
  1454. //
  1455. // * ErrCodePreconditionFailed "PreconditionFailed"
  1456. // The precondition given in one or more of the request-header fields evaluated
  1457. // to false.
  1458. //
  1459. // * ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse"
  1460. // The specified profile for field-level encryption is in use.
  1461. //
  1462. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile
  1463. func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) {
  1464. req, out := c.DeleteFieldLevelEncryptionProfileRequest(input)
  1465. return out, req.Send()
  1466. }
  1467. // DeleteFieldLevelEncryptionProfileWithContext is the same as DeleteFieldLevelEncryptionProfile with the addition of
  1468. // the ability to pass a context and additional request options.
  1469. //
  1470. // See DeleteFieldLevelEncryptionProfile for details on how to use this API operation.
  1471. //
  1472. // The context must be non-nil and will be used for request cancellation. If
  1473. // the context is nil a panic will occur. In the future the SDK may create
  1474. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1475. // for more information on using Contexts.
  1476. func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *DeleteFieldLevelEncryptionProfileInput, opts ...request.Option) (*DeleteFieldLevelEncryptionProfileOutput, error) {
  1477. req, out := c.DeleteFieldLevelEncryptionProfileRequest(input)
  1478. req.SetContext(ctx)
  1479. req.ApplyOptions(opts...)
  1480. return out, req.Send()
  1481. }
  1482. const opDeletePublicKey = "DeletePublicKey2018_11_05"
  1483. // DeletePublicKeyRequest generates a "aws/request.Request" representing the
  1484. // client's request for the DeletePublicKey operation. The "output" return
  1485. // value will be populated with the request's response once the request completes
  1486. // successfully.
  1487. //
  1488. // Use "Send" method on the returned Request to send the API call to the service.
  1489. // the "output" return value is not valid until after Send returns without error.
  1490. //
  1491. // See DeletePublicKey for more information on using the DeletePublicKey
  1492. // API call, and error handling.
  1493. //
  1494. // This method is useful when you want to inject custom logic or configuration
  1495. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1496. //
  1497. //
  1498. // // Example sending a request using the DeletePublicKeyRequest method.
  1499. // req, resp := client.DeletePublicKeyRequest(params)
  1500. //
  1501. // err := req.Send()
  1502. // if err == nil { // resp is now filled
  1503. // fmt.Println(resp)
  1504. // }
  1505. //
  1506. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey
  1507. func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) {
  1508. op := &request.Operation{
  1509. Name: opDeletePublicKey,
  1510. HTTPMethod: "DELETE",
  1511. HTTPPath: "/2018-11-05/public-key/{Id}",
  1512. }
  1513. if input == nil {
  1514. input = &DeletePublicKeyInput{}
  1515. }
  1516. output = &DeletePublicKeyOutput{}
  1517. req = c.newRequest(op, input, output)
  1518. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1519. return
  1520. }
  1521. // DeletePublicKey API operation for Amazon CloudFront.
  1522. //
  1523. // Remove a public key you previously added to CloudFront.
  1524. //
  1525. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1526. // with awserr.Error's Code and Message methods to get detailed information about
  1527. // the error.
  1528. //
  1529. // See the AWS API reference guide for Amazon CloudFront's
  1530. // API operation DeletePublicKey for usage and error information.
  1531. //
  1532. // Returned Error Codes:
  1533. // * ErrCodeAccessDenied "AccessDenied"
  1534. // Access denied.
  1535. //
  1536. // * ErrCodePublicKeyInUse "PublicKeyInUse"
  1537. // The specified public key is in use.
  1538. //
  1539. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1540. // The If-Match version is missing or not valid for the distribution.
  1541. //
  1542. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  1543. // The specified public key doesn't exist.
  1544. //
  1545. // * ErrCodePreconditionFailed "PreconditionFailed"
  1546. // The precondition given in one or more of the request-header fields evaluated
  1547. // to false.
  1548. //
  1549. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey
  1550. func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) {
  1551. req, out := c.DeletePublicKeyRequest(input)
  1552. return out, req.Send()
  1553. }
  1554. // DeletePublicKeyWithContext is the same as DeletePublicKey with the addition of
  1555. // the ability to pass a context and additional request options.
  1556. //
  1557. // See DeletePublicKey for details on how to use this API operation.
  1558. //
  1559. // The context must be non-nil and will be used for request cancellation. If
  1560. // the context is nil a panic will occur. In the future the SDK may create
  1561. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1562. // for more information on using Contexts.
  1563. func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePublicKeyInput, opts ...request.Option) (*DeletePublicKeyOutput, error) {
  1564. req, out := c.DeletePublicKeyRequest(input)
  1565. req.SetContext(ctx)
  1566. req.ApplyOptions(opts...)
  1567. return out, req.Send()
  1568. }
  1569. const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_11_05"
  1570. // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the
  1571. // client's request for the DeleteStreamingDistribution operation. The "output" return
  1572. // value will be populated with the request's response once the request completes
  1573. // successfully.
  1574. //
  1575. // Use "Send" method on the returned Request to send the API call to the service.
  1576. // the "output" return value is not valid until after Send returns without error.
  1577. //
  1578. // See DeleteStreamingDistribution for more information on using the DeleteStreamingDistribution
  1579. // API call, and error handling.
  1580. //
  1581. // This method is useful when you want to inject custom logic or configuration
  1582. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1583. //
  1584. //
  1585. // // Example sending a request using the DeleteStreamingDistributionRequest method.
  1586. // req, resp := client.DeleteStreamingDistributionRequest(params)
  1587. //
  1588. // err := req.Send()
  1589. // if err == nil { // resp is now filled
  1590. // fmt.Println(resp)
  1591. // }
  1592. //
  1593. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution
  1594. func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) {
  1595. op := &request.Operation{
  1596. Name: opDeleteStreamingDistribution,
  1597. HTTPMethod: "DELETE",
  1598. HTTPPath: "/2018-11-05/streaming-distribution/{Id}",
  1599. }
  1600. if input == nil {
  1601. input = &DeleteStreamingDistributionInput{}
  1602. }
  1603. output = &DeleteStreamingDistributionOutput{}
  1604. req = c.newRequest(op, input, output)
  1605. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1606. return
  1607. }
  1608. // DeleteStreamingDistribution API operation for Amazon CloudFront.
  1609. //
  1610. // Delete a streaming distribution. To delete an RTMP distribution using the
  1611. // CloudFront API, perform the following steps.
  1612. //
  1613. // To delete an RTMP distribution using the CloudFront API:
  1614. //
  1615. // Disable the RTMP distribution.
  1616. //
  1617. // Submit a GET Streaming Distribution Config request to get the current configuration
  1618. // and the Etag header for the distribution.
  1619. //
  1620. // Update the XML document that was returned in the response to your GET Streaming
  1621. // Distribution Config request to change the value of Enabled to false.
  1622. //
  1623. // Submit a PUT Streaming Distribution Config request to update the configuration
  1624. // for your distribution. In the request body, include the XML document that
  1625. // you updated in Step 3. Then set the value of the HTTP If-Match header to
  1626. // the value of the ETag header that CloudFront returned when you submitted
  1627. // the GET Streaming Distribution Config request in Step 2.
  1628. //
  1629. // Review the response to the PUT Streaming Distribution Config request to confirm
  1630. // that the distribution was successfully disabled.
  1631. //
  1632. // Submit a GET Streaming Distribution Config request to confirm that your changes
  1633. // have propagated. When propagation is complete, the value of Status is Deployed.
  1634. //
  1635. // Submit a DELETE Streaming Distribution request. Set the value of the HTTP
  1636. // If-Match header to the value of the ETag header that CloudFront returned
  1637. // when you submitted the GET Streaming Distribution Config request in Step
  1638. // 2.
  1639. //
  1640. // Review the response to your DELETE Streaming Distribution request to confirm
  1641. // that the distribution was successfully deleted.
  1642. //
  1643. // For information about deleting a distribution using the CloudFront console,
  1644. // see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html)
  1645. // in the Amazon CloudFront Developer Guide.
  1646. //
  1647. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1648. // with awserr.Error's Code and Message methods to get detailed information about
  1649. // the error.
  1650. //
  1651. // See the AWS API reference guide for Amazon CloudFront's
  1652. // API operation DeleteStreamingDistribution for usage and error information.
  1653. //
  1654. // Returned Error Codes:
  1655. // * ErrCodeAccessDenied "AccessDenied"
  1656. // Access denied.
  1657. //
  1658. // * ErrCodeStreamingDistributionNotDisabled "StreamingDistributionNotDisabled"
  1659. //
  1660. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  1661. // The If-Match version is missing or not valid for the distribution.
  1662. //
  1663. // * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution"
  1664. // The specified streaming distribution does not exist.
  1665. //
  1666. // * ErrCodePreconditionFailed "PreconditionFailed"
  1667. // The precondition given in one or more of the request-header fields evaluated
  1668. // to false.
  1669. //
  1670. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution
  1671. func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) {
  1672. req, out := c.DeleteStreamingDistributionRequest(input)
  1673. return out, req.Send()
  1674. }
  1675. // DeleteStreamingDistributionWithContext is the same as DeleteStreamingDistribution with the addition of
  1676. // the ability to pass a context and additional request options.
  1677. //
  1678. // See DeleteStreamingDistribution for details on how to use this API operation.
  1679. //
  1680. // The context must be non-nil and will be used for request cancellation. If
  1681. // the context is nil a panic will occur. In the future the SDK may create
  1682. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1683. // for more information on using Contexts.
  1684. func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, input *DeleteStreamingDistributionInput, opts ...request.Option) (*DeleteStreamingDistributionOutput, error) {
  1685. req, out := c.DeleteStreamingDistributionRequest(input)
  1686. req.SetContext(ctx)
  1687. req.ApplyOptions(opts...)
  1688. return out, req.Send()
  1689. }
  1690. const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2018_11_05"
  1691. // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  1692. // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return
  1693. // value will be populated with the request's response once the request completes
  1694. // successfully.
  1695. //
  1696. // Use "Send" method on the returned Request to send the API call to the service.
  1697. // the "output" return value is not valid until after Send returns without error.
  1698. //
  1699. // See GetCloudFrontOriginAccessIdentity for more information on using the GetCloudFrontOriginAccessIdentity
  1700. // API call, and error handling.
  1701. //
  1702. // This method is useful when you want to inject custom logic or configuration
  1703. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1704. //
  1705. //
  1706. // // Example sending a request using the GetCloudFrontOriginAccessIdentityRequest method.
  1707. // req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params)
  1708. //
  1709. // err := req.Send()
  1710. // if err == nil { // resp is now filled
  1711. // fmt.Println(resp)
  1712. // }
  1713. //
  1714. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity
  1715. func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) {
  1716. op := &request.Operation{
  1717. Name: opGetCloudFrontOriginAccessIdentity,
  1718. HTTPMethod: "GET",
  1719. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}",
  1720. }
  1721. if input == nil {
  1722. input = &GetCloudFrontOriginAccessIdentityInput{}
  1723. }
  1724. output = &GetCloudFrontOriginAccessIdentityOutput{}
  1725. req = c.newRequest(op, input, output)
  1726. return
  1727. }
  1728. // GetCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  1729. //
  1730. // Get the information about an origin access identity.
  1731. //
  1732. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1733. // with awserr.Error's Code and Message methods to get detailed information about
  1734. // the error.
  1735. //
  1736. // See the AWS API reference guide for Amazon CloudFront's
  1737. // API operation GetCloudFrontOriginAccessIdentity for usage and error information.
  1738. //
  1739. // Returned Error Codes:
  1740. // * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity"
  1741. // The specified origin access identity does not exist.
  1742. //
  1743. // * ErrCodeAccessDenied "AccessDenied"
  1744. // Access denied.
  1745. //
  1746. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity
  1747. func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) {
  1748. req, out := c.GetCloudFrontOriginAccessIdentityRequest(input)
  1749. return out, req.Send()
  1750. }
  1751. // GetCloudFrontOriginAccessIdentityWithContext is the same as GetCloudFrontOriginAccessIdentity with the addition of
  1752. // the ability to pass a context and additional request options.
  1753. //
  1754. // See GetCloudFrontOriginAccessIdentity for details on how to use this API operation.
  1755. //
  1756. // The context must be non-nil and will be used for request cancellation. If
  1757. // the context is nil a panic will occur. In the future the SDK may create
  1758. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1759. // for more information on using Contexts.
  1760. func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityOutput, error) {
  1761. req, out := c.GetCloudFrontOriginAccessIdentityRequest(input)
  1762. req.SetContext(ctx)
  1763. req.ApplyOptions(opts...)
  1764. return out, req.Send()
  1765. }
  1766. const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2018_11_05"
  1767. // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the
  1768. // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return
  1769. // value will be populated with the request's response once the request completes
  1770. // successfully.
  1771. //
  1772. // Use "Send" method on the returned Request to send the API call to the service.
  1773. // the "output" return value is not valid until after Send returns without error.
  1774. //
  1775. // See GetCloudFrontOriginAccessIdentityConfig for more information on using the GetCloudFrontOriginAccessIdentityConfig
  1776. // API call, and error handling.
  1777. //
  1778. // This method is useful when you want to inject custom logic or configuration
  1779. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1780. //
  1781. //
  1782. // // Example sending a request using the GetCloudFrontOriginAccessIdentityConfigRequest method.
  1783. // req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params)
  1784. //
  1785. // err := req.Send()
  1786. // if err == nil { // resp is now filled
  1787. // fmt.Println(resp)
  1788. // }
  1789. //
  1790. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig
  1791. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) {
  1792. op := &request.Operation{
  1793. Name: opGetCloudFrontOriginAccessIdentityConfig,
  1794. HTTPMethod: "GET",
  1795. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config",
  1796. }
  1797. if input == nil {
  1798. input = &GetCloudFrontOriginAccessIdentityConfigInput{}
  1799. }
  1800. output = &GetCloudFrontOriginAccessIdentityConfigOutput{}
  1801. req = c.newRequest(op, input, output)
  1802. return
  1803. }
  1804. // GetCloudFrontOriginAccessIdentityConfig API operation for Amazon CloudFront.
  1805. //
  1806. // Get the configuration information about an origin access identity.
  1807. //
  1808. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1809. // with awserr.Error's Code and Message methods to get detailed information about
  1810. // the error.
  1811. //
  1812. // See the AWS API reference guide for Amazon CloudFront's
  1813. // API operation GetCloudFrontOriginAccessIdentityConfig for usage and error information.
  1814. //
  1815. // Returned Error Codes:
  1816. // * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity"
  1817. // The specified origin access identity does not exist.
  1818. //
  1819. // * ErrCodeAccessDenied "AccessDenied"
  1820. // Access denied.
  1821. //
  1822. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig
  1823. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) {
  1824. req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input)
  1825. return out, req.Send()
  1826. }
  1827. // GetCloudFrontOriginAccessIdentityConfigWithContext is the same as GetCloudFrontOriginAccessIdentityConfig with the addition of
  1828. // the ability to pass a context and additional request options.
  1829. //
  1830. // See GetCloudFrontOriginAccessIdentityConfig for details on how to use this API operation.
  1831. //
  1832. // The context must be non-nil and will be used for request cancellation. If
  1833. // the context is nil a panic will occur. In the future the SDK may create
  1834. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1835. // for more information on using Contexts.
  1836. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws.Context, input *GetCloudFrontOriginAccessIdentityConfigInput, opts ...request.Option) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) {
  1837. req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input)
  1838. req.SetContext(ctx)
  1839. req.ApplyOptions(opts...)
  1840. return out, req.Send()
  1841. }
  1842. const opGetDistribution = "GetDistribution2018_11_05"
  1843. // GetDistributionRequest generates a "aws/request.Request" representing the
  1844. // client's request for the GetDistribution operation. The "output" return
  1845. // value will be populated with the request's response once the request completes
  1846. // successfully.
  1847. //
  1848. // Use "Send" method on the returned Request to send the API call to the service.
  1849. // the "output" return value is not valid until after Send returns without error.
  1850. //
  1851. // See GetDistribution for more information on using the GetDistribution
  1852. // API call, and error handling.
  1853. //
  1854. // This method is useful when you want to inject custom logic or configuration
  1855. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1856. //
  1857. //
  1858. // // Example sending a request using the GetDistributionRequest method.
  1859. // req, resp := client.GetDistributionRequest(params)
  1860. //
  1861. // err := req.Send()
  1862. // if err == nil { // resp is now filled
  1863. // fmt.Println(resp)
  1864. // }
  1865. //
  1866. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution
  1867. func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) {
  1868. op := &request.Operation{
  1869. Name: opGetDistribution,
  1870. HTTPMethod: "GET",
  1871. HTTPPath: "/2018-11-05/distribution/{Id}",
  1872. }
  1873. if input == nil {
  1874. input = &GetDistributionInput{}
  1875. }
  1876. output = &GetDistributionOutput{}
  1877. req = c.newRequest(op, input, output)
  1878. return
  1879. }
  1880. // GetDistribution API operation for Amazon CloudFront.
  1881. //
  1882. // Get the information about a distribution.
  1883. //
  1884. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1885. // with awserr.Error's Code and Message methods to get detailed information about
  1886. // the error.
  1887. //
  1888. // See the AWS API reference guide for Amazon CloudFront's
  1889. // API operation GetDistribution for usage and error information.
  1890. //
  1891. // Returned Error Codes:
  1892. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  1893. // The specified distribution does not exist.
  1894. //
  1895. // * ErrCodeAccessDenied "AccessDenied"
  1896. // Access denied.
  1897. //
  1898. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution
  1899. func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) {
  1900. req, out := c.GetDistributionRequest(input)
  1901. return out, req.Send()
  1902. }
  1903. // GetDistributionWithContext is the same as GetDistribution with the addition of
  1904. // the ability to pass a context and additional request options.
  1905. //
  1906. // See GetDistribution for details on how to use this API operation.
  1907. //
  1908. // The context must be non-nil and will be used for request cancellation. If
  1909. // the context is nil a panic will occur. In the future the SDK may create
  1910. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1911. // for more information on using Contexts.
  1912. func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.Option) (*GetDistributionOutput, error) {
  1913. req, out := c.GetDistributionRequest(input)
  1914. req.SetContext(ctx)
  1915. req.ApplyOptions(opts...)
  1916. return out, req.Send()
  1917. }
  1918. const opGetDistributionConfig = "GetDistributionConfig2018_11_05"
  1919. // GetDistributionConfigRequest generates a "aws/request.Request" representing the
  1920. // client's request for the GetDistributionConfig operation. The "output" return
  1921. // value will be populated with the request's response once the request completes
  1922. // successfully.
  1923. //
  1924. // Use "Send" method on the returned Request to send the API call to the service.
  1925. // the "output" return value is not valid until after Send returns without error.
  1926. //
  1927. // See GetDistributionConfig for more information on using the GetDistributionConfig
  1928. // API call, and error handling.
  1929. //
  1930. // This method is useful when you want to inject custom logic or configuration
  1931. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1932. //
  1933. //
  1934. // // Example sending a request using the GetDistributionConfigRequest method.
  1935. // req, resp := client.GetDistributionConfigRequest(params)
  1936. //
  1937. // err := req.Send()
  1938. // if err == nil { // resp is now filled
  1939. // fmt.Println(resp)
  1940. // }
  1941. //
  1942. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig
  1943. func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) {
  1944. op := &request.Operation{
  1945. Name: opGetDistributionConfig,
  1946. HTTPMethod: "GET",
  1947. HTTPPath: "/2018-11-05/distribution/{Id}/config",
  1948. }
  1949. if input == nil {
  1950. input = &GetDistributionConfigInput{}
  1951. }
  1952. output = &GetDistributionConfigOutput{}
  1953. req = c.newRequest(op, input, output)
  1954. return
  1955. }
  1956. // GetDistributionConfig API operation for Amazon CloudFront.
  1957. //
  1958. // Get the configuration information about a distribution.
  1959. //
  1960. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1961. // with awserr.Error's Code and Message methods to get detailed information about
  1962. // the error.
  1963. //
  1964. // See the AWS API reference guide for Amazon CloudFront's
  1965. // API operation GetDistributionConfig for usage and error information.
  1966. //
  1967. // Returned Error Codes:
  1968. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  1969. // The specified distribution does not exist.
  1970. //
  1971. // * ErrCodeAccessDenied "AccessDenied"
  1972. // Access denied.
  1973. //
  1974. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig
  1975. func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) {
  1976. req, out := c.GetDistributionConfigRequest(input)
  1977. return out, req.Send()
  1978. }
  1979. // GetDistributionConfigWithContext is the same as GetDistributionConfig with the addition of
  1980. // the ability to pass a context and additional request options.
  1981. //
  1982. // See GetDistributionConfig for details on how to use this API operation.
  1983. //
  1984. // The context must be non-nil and will be used for request cancellation. If
  1985. // the context is nil a panic will occur. In the future the SDK may create
  1986. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1987. // for more information on using Contexts.
  1988. func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *GetDistributionConfigInput, opts ...request.Option) (*GetDistributionConfigOutput, error) {
  1989. req, out := c.GetDistributionConfigRequest(input)
  1990. req.SetContext(ctx)
  1991. req.ApplyOptions(opts...)
  1992. return out, req.Send()
  1993. }
  1994. const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_11_05"
  1995. // GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the
  1996. // client's request for the GetFieldLevelEncryption operation. The "output" return
  1997. // value will be populated with the request's response once the request completes
  1998. // successfully.
  1999. //
  2000. // Use "Send" method on the returned Request to send the API call to the service.
  2001. // the "output" return value is not valid until after Send returns without error.
  2002. //
  2003. // See GetFieldLevelEncryption for more information on using the GetFieldLevelEncryption
  2004. // API call, and error handling.
  2005. //
  2006. // This method is useful when you want to inject custom logic or configuration
  2007. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2008. //
  2009. //
  2010. // // Example sending a request using the GetFieldLevelEncryptionRequest method.
  2011. // req, resp := client.GetFieldLevelEncryptionRequest(params)
  2012. //
  2013. // err := req.Send()
  2014. // if err == nil { // resp is now filled
  2015. // fmt.Println(resp)
  2016. // }
  2017. //
  2018. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption
  2019. func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) {
  2020. op := &request.Operation{
  2021. Name: opGetFieldLevelEncryption,
  2022. HTTPMethod: "GET",
  2023. HTTPPath: "/2018-11-05/field-level-encryption/{Id}",
  2024. }
  2025. if input == nil {
  2026. input = &GetFieldLevelEncryptionInput{}
  2027. }
  2028. output = &GetFieldLevelEncryptionOutput{}
  2029. req = c.newRequest(op, input, output)
  2030. return
  2031. }
  2032. // GetFieldLevelEncryption API operation for Amazon CloudFront.
  2033. //
  2034. // Get the field-level encryption configuration information.
  2035. //
  2036. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2037. // with awserr.Error's Code and Message methods to get detailed information about
  2038. // the error.
  2039. //
  2040. // See the AWS API reference guide for Amazon CloudFront's
  2041. // API operation GetFieldLevelEncryption for usage and error information.
  2042. //
  2043. // Returned Error Codes:
  2044. // * ErrCodeAccessDenied "AccessDenied"
  2045. // Access denied.
  2046. //
  2047. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  2048. // The specified configuration for field-level encryption doesn't exist.
  2049. //
  2050. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption
  2051. func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) {
  2052. req, out := c.GetFieldLevelEncryptionRequest(input)
  2053. return out, req.Send()
  2054. }
  2055. // GetFieldLevelEncryptionWithContext is the same as GetFieldLevelEncryption with the addition of
  2056. // the ability to pass a context and additional request options.
  2057. //
  2058. // See GetFieldLevelEncryption for details on how to use this API operation.
  2059. //
  2060. // The context must be non-nil and will be used for request cancellation. If
  2061. // the context is nil a panic will occur. In the future the SDK may create
  2062. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2063. // for more information on using Contexts.
  2064. func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input *GetFieldLevelEncryptionInput, opts ...request.Option) (*GetFieldLevelEncryptionOutput, error) {
  2065. req, out := c.GetFieldLevelEncryptionRequest(input)
  2066. req.SetContext(ctx)
  2067. req.ApplyOptions(opts...)
  2068. return out, req.Send()
  2069. }
  2070. const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_11_05"
  2071. // GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the
  2072. // client's request for the GetFieldLevelEncryptionConfig operation. The "output" return
  2073. // value will be populated with the request's response once the request completes
  2074. // successfully.
  2075. //
  2076. // Use "Send" method on the returned Request to send the API call to the service.
  2077. // the "output" return value is not valid until after Send returns without error.
  2078. //
  2079. // See GetFieldLevelEncryptionConfig for more information on using the GetFieldLevelEncryptionConfig
  2080. // API call, and error handling.
  2081. //
  2082. // This method is useful when you want to inject custom logic or configuration
  2083. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2084. //
  2085. //
  2086. // // Example sending a request using the GetFieldLevelEncryptionConfigRequest method.
  2087. // req, resp := client.GetFieldLevelEncryptionConfigRequest(params)
  2088. //
  2089. // err := req.Send()
  2090. // if err == nil { // resp is now filled
  2091. // fmt.Println(resp)
  2092. // }
  2093. //
  2094. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig
  2095. func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) {
  2096. op := &request.Operation{
  2097. Name: opGetFieldLevelEncryptionConfig,
  2098. HTTPMethod: "GET",
  2099. HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config",
  2100. }
  2101. if input == nil {
  2102. input = &GetFieldLevelEncryptionConfigInput{}
  2103. }
  2104. output = &GetFieldLevelEncryptionConfigOutput{}
  2105. req = c.newRequest(op, input, output)
  2106. return
  2107. }
  2108. // GetFieldLevelEncryptionConfig API operation for Amazon CloudFront.
  2109. //
  2110. // Get the field-level encryption configuration information.
  2111. //
  2112. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2113. // with awserr.Error's Code and Message methods to get detailed information about
  2114. // the error.
  2115. //
  2116. // See the AWS API reference guide for Amazon CloudFront's
  2117. // API operation GetFieldLevelEncryptionConfig for usage and error information.
  2118. //
  2119. // Returned Error Codes:
  2120. // * ErrCodeAccessDenied "AccessDenied"
  2121. // Access denied.
  2122. //
  2123. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  2124. // The specified configuration for field-level encryption doesn't exist.
  2125. //
  2126. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig
  2127. func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) {
  2128. req, out := c.GetFieldLevelEncryptionConfigRequest(input)
  2129. return out, req.Send()
  2130. }
  2131. // GetFieldLevelEncryptionConfigWithContext is the same as GetFieldLevelEncryptionConfig with the addition of
  2132. // the ability to pass a context and additional request options.
  2133. //
  2134. // See GetFieldLevelEncryptionConfig for details on how to use this API operation.
  2135. //
  2136. // The context must be non-nil and will be used for request cancellation. If
  2137. // the context is nil a panic will occur. In the future the SDK may create
  2138. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2139. // for more information on using Contexts.
  2140. func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionConfigOutput, error) {
  2141. req, out := c.GetFieldLevelEncryptionConfigRequest(input)
  2142. req.SetContext(ctx)
  2143. req.ApplyOptions(opts...)
  2144. return out, req.Send()
  2145. }
  2146. const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_11_05"
  2147. // GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the
  2148. // client's request for the GetFieldLevelEncryptionProfile operation. The "output" return
  2149. // value will be populated with the request's response once the request completes
  2150. // successfully.
  2151. //
  2152. // Use "Send" method on the returned Request to send the API call to the service.
  2153. // the "output" return value is not valid until after Send returns without error.
  2154. //
  2155. // See GetFieldLevelEncryptionProfile for more information on using the GetFieldLevelEncryptionProfile
  2156. // API call, and error handling.
  2157. //
  2158. // This method is useful when you want to inject custom logic or configuration
  2159. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2160. //
  2161. //
  2162. // // Example sending a request using the GetFieldLevelEncryptionProfileRequest method.
  2163. // req, resp := client.GetFieldLevelEncryptionProfileRequest(params)
  2164. //
  2165. // err := req.Send()
  2166. // if err == nil { // resp is now filled
  2167. // fmt.Println(resp)
  2168. // }
  2169. //
  2170. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile
  2171. func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) {
  2172. op := &request.Operation{
  2173. Name: opGetFieldLevelEncryptionProfile,
  2174. HTTPMethod: "GET",
  2175. HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}",
  2176. }
  2177. if input == nil {
  2178. input = &GetFieldLevelEncryptionProfileInput{}
  2179. }
  2180. output = &GetFieldLevelEncryptionProfileOutput{}
  2181. req = c.newRequest(op, input, output)
  2182. return
  2183. }
  2184. // GetFieldLevelEncryptionProfile API operation for Amazon CloudFront.
  2185. //
  2186. // Get the field-level encryption profile information.
  2187. //
  2188. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2189. // with awserr.Error's Code and Message methods to get detailed information about
  2190. // the error.
  2191. //
  2192. // See the AWS API reference guide for Amazon CloudFront's
  2193. // API operation GetFieldLevelEncryptionProfile for usage and error information.
  2194. //
  2195. // Returned Error Codes:
  2196. // * ErrCodeAccessDenied "AccessDenied"
  2197. // Access denied.
  2198. //
  2199. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  2200. // The specified profile for field-level encryption doesn't exist.
  2201. //
  2202. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile
  2203. func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) {
  2204. req, out := c.GetFieldLevelEncryptionProfileRequest(input)
  2205. return out, req.Send()
  2206. }
  2207. // GetFieldLevelEncryptionProfileWithContext is the same as GetFieldLevelEncryptionProfile with the addition of
  2208. // the ability to pass a context and additional request options.
  2209. //
  2210. // See GetFieldLevelEncryptionProfile for details on how to use this API operation.
  2211. //
  2212. // The context must be non-nil and will be used for request cancellation. If
  2213. // the context is nil a panic will occur. In the future the SDK may create
  2214. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2215. // for more information on using Contexts.
  2216. func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileOutput, error) {
  2217. req, out := c.GetFieldLevelEncryptionProfileRequest(input)
  2218. req.SetContext(ctx)
  2219. req.ApplyOptions(opts...)
  2220. return out, req.Send()
  2221. }
  2222. const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2018_11_05"
  2223. // GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the
  2224. // client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return
  2225. // value will be populated with the request's response once the request completes
  2226. // successfully.
  2227. //
  2228. // Use "Send" method on the returned Request to send the API call to the service.
  2229. // the "output" return value is not valid until after Send returns without error.
  2230. //
  2231. // See GetFieldLevelEncryptionProfileConfig for more information on using the GetFieldLevelEncryptionProfileConfig
  2232. // API call, and error handling.
  2233. //
  2234. // This method is useful when you want to inject custom logic or configuration
  2235. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2236. //
  2237. //
  2238. // // Example sending a request using the GetFieldLevelEncryptionProfileConfigRequest method.
  2239. // req, resp := client.GetFieldLevelEncryptionProfileConfigRequest(params)
  2240. //
  2241. // err := req.Send()
  2242. // if err == nil { // resp is now filled
  2243. // fmt.Println(resp)
  2244. // }
  2245. //
  2246. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig
  2247. func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) {
  2248. op := &request.Operation{
  2249. Name: opGetFieldLevelEncryptionProfileConfig,
  2250. HTTPMethod: "GET",
  2251. HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config",
  2252. }
  2253. if input == nil {
  2254. input = &GetFieldLevelEncryptionProfileConfigInput{}
  2255. }
  2256. output = &GetFieldLevelEncryptionProfileConfigOutput{}
  2257. req = c.newRequest(op, input, output)
  2258. return
  2259. }
  2260. // GetFieldLevelEncryptionProfileConfig API operation for Amazon CloudFront.
  2261. //
  2262. // Get the field-level encryption profile configuration information.
  2263. //
  2264. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2265. // with awserr.Error's Code and Message methods to get detailed information about
  2266. // the error.
  2267. //
  2268. // See the AWS API reference guide for Amazon CloudFront's
  2269. // API operation GetFieldLevelEncryptionProfileConfig for usage and error information.
  2270. //
  2271. // Returned Error Codes:
  2272. // * ErrCodeAccessDenied "AccessDenied"
  2273. // Access denied.
  2274. //
  2275. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  2276. // The specified profile for field-level encryption doesn't exist.
  2277. //
  2278. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig
  2279. func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) {
  2280. req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input)
  2281. return out, req.Send()
  2282. }
  2283. // GetFieldLevelEncryptionProfileConfigWithContext is the same as GetFieldLevelEncryptionProfileConfig with the addition of
  2284. // the ability to pass a context and additional request options.
  2285. //
  2286. // See GetFieldLevelEncryptionProfileConfig for details on how to use this API operation.
  2287. //
  2288. // The context must be non-nil and will be used for request cancellation. If
  2289. // the context is nil a panic will occur. In the future the SDK may create
  2290. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2291. // for more information on using Contexts.
  2292. func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Context, input *GetFieldLevelEncryptionProfileConfigInput, opts ...request.Option) (*GetFieldLevelEncryptionProfileConfigOutput, error) {
  2293. req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input)
  2294. req.SetContext(ctx)
  2295. req.ApplyOptions(opts...)
  2296. return out, req.Send()
  2297. }
  2298. const opGetInvalidation = "GetInvalidation2018_11_05"
  2299. // GetInvalidationRequest generates a "aws/request.Request" representing the
  2300. // client's request for the GetInvalidation operation. The "output" return
  2301. // value will be populated with the request's response once the request completes
  2302. // successfully.
  2303. //
  2304. // Use "Send" method on the returned Request to send the API call to the service.
  2305. // the "output" return value is not valid until after Send returns without error.
  2306. //
  2307. // See GetInvalidation for more information on using the GetInvalidation
  2308. // API call, and error handling.
  2309. //
  2310. // This method is useful when you want to inject custom logic or configuration
  2311. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2312. //
  2313. //
  2314. // // Example sending a request using the GetInvalidationRequest method.
  2315. // req, resp := client.GetInvalidationRequest(params)
  2316. //
  2317. // err := req.Send()
  2318. // if err == nil { // resp is now filled
  2319. // fmt.Println(resp)
  2320. // }
  2321. //
  2322. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation
  2323. func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) {
  2324. op := &request.Operation{
  2325. Name: opGetInvalidation,
  2326. HTTPMethod: "GET",
  2327. HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation/{Id}",
  2328. }
  2329. if input == nil {
  2330. input = &GetInvalidationInput{}
  2331. }
  2332. output = &GetInvalidationOutput{}
  2333. req = c.newRequest(op, input, output)
  2334. return
  2335. }
  2336. // GetInvalidation API operation for Amazon CloudFront.
  2337. //
  2338. // Get the information about an invalidation.
  2339. //
  2340. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2341. // with awserr.Error's Code and Message methods to get detailed information about
  2342. // the error.
  2343. //
  2344. // See the AWS API reference guide for Amazon CloudFront's
  2345. // API operation GetInvalidation for usage and error information.
  2346. //
  2347. // Returned Error Codes:
  2348. // * ErrCodeNoSuchInvalidation "NoSuchInvalidation"
  2349. // The specified invalidation does not exist.
  2350. //
  2351. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  2352. // The specified distribution does not exist.
  2353. //
  2354. // * ErrCodeAccessDenied "AccessDenied"
  2355. // Access denied.
  2356. //
  2357. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation
  2358. func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) {
  2359. req, out := c.GetInvalidationRequest(input)
  2360. return out, req.Send()
  2361. }
  2362. // GetInvalidationWithContext is the same as GetInvalidation with the addition of
  2363. // the ability to pass a context and additional request options.
  2364. //
  2365. // See GetInvalidation for details on how to use this API operation.
  2366. //
  2367. // The context must be non-nil and will be used for request cancellation. If
  2368. // the context is nil a panic will occur. In the future the SDK may create
  2369. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2370. // for more information on using Contexts.
  2371. func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.Option) (*GetInvalidationOutput, error) {
  2372. req, out := c.GetInvalidationRequest(input)
  2373. req.SetContext(ctx)
  2374. req.ApplyOptions(opts...)
  2375. return out, req.Send()
  2376. }
  2377. const opGetPublicKey = "GetPublicKey2018_11_05"
  2378. // GetPublicKeyRequest generates a "aws/request.Request" representing the
  2379. // client's request for the GetPublicKey operation. The "output" return
  2380. // value will be populated with the request's response once the request completes
  2381. // successfully.
  2382. //
  2383. // Use "Send" method on the returned Request to send the API call to the service.
  2384. // the "output" return value is not valid until after Send returns without error.
  2385. //
  2386. // See GetPublicKey for more information on using the GetPublicKey
  2387. // API call, and error handling.
  2388. //
  2389. // This method is useful when you want to inject custom logic or configuration
  2390. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2391. //
  2392. //
  2393. // // Example sending a request using the GetPublicKeyRequest method.
  2394. // req, resp := client.GetPublicKeyRequest(params)
  2395. //
  2396. // err := req.Send()
  2397. // if err == nil { // resp is now filled
  2398. // fmt.Println(resp)
  2399. // }
  2400. //
  2401. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey
  2402. func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) {
  2403. op := &request.Operation{
  2404. Name: opGetPublicKey,
  2405. HTTPMethod: "GET",
  2406. HTTPPath: "/2018-11-05/public-key/{Id}",
  2407. }
  2408. if input == nil {
  2409. input = &GetPublicKeyInput{}
  2410. }
  2411. output = &GetPublicKeyOutput{}
  2412. req = c.newRequest(op, input, output)
  2413. return
  2414. }
  2415. // GetPublicKey API operation for Amazon CloudFront.
  2416. //
  2417. // Get the public key information.
  2418. //
  2419. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2420. // with awserr.Error's Code and Message methods to get detailed information about
  2421. // the error.
  2422. //
  2423. // See the AWS API reference guide for Amazon CloudFront's
  2424. // API operation GetPublicKey for usage and error information.
  2425. //
  2426. // Returned Error Codes:
  2427. // * ErrCodeAccessDenied "AccessDenied"
  2428. // Access denied.
  2429. //
  2430. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  2431. // The specified public key doesn't exist.
  2432. //
  2433. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey
  2434. func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) {
  2435. req, out := c.GetPublicKeyRequest(input)
  2436. return out, req.Send()
  2437. }
  2438. // GetPublicKeyWithContext is the same as GetPublicKey with the addition of
  2439. // the ability to pass a context and additional request options.
  2440. //
  2441. // See GetPublicKey for details on how to use this API operation.
  2442. //
  2443. // The context must be non-nil and will be used for request cancellation. If
  2444. // the context is nil a panic will occur. In the future the SDK may create
  2445. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2446. // for more information on using Contexts.
  2447. func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error) {
  2448. req, out := c.GetPublicKeyRequest(input)
  2449. req.SetContext(ctx)
  2450. req.ApplyOptions(opts...)
  2451. return out, req.Send()
  2452. }
  2453. const opGetPublicKeyConfig = "GetPublicKeyConfig2018_11_05"
  2454. // GetPublicKeyConfigRequest generates a "aws/request.Request" representing the
  2455. // client's request for the GetPublicKeyConfig operation. The "output" return
  2456. // value will be populated with the request's response once the request completes
  2457. // successfully.
  2458. //
  2459. // Use "Send" method on the returned Request to send the API call to the service.
  2460. // the "output" return value is not valid until after Send returns without error.
  2461. //
  2462. // See GetPublicKeyConfig for more information on using the GetPublicKeyConfig
  2463. // API call, and error handling.
  2464. //
  2465. // This method is useful when you want to inject custom logic or configuration
  2466. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2467. //
  2468. //
  2469. // // Example sending a request using the GetPublicKeyConfigRequest method.
  2470. // req, resp := client.GetPublicKeyConfigRequest(params)
  2471. //
  2472. // err := req.Send()
  2473. // if err == nil { // resp is now filled
  2474. // fmt.Println(resp)
  2475. // }
  2476. //
  2477. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig
  2478. func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) {
  2479. op := &request.Operation{
  2480. Name: opGetPublicKeyConfig,
  2481. HTTPMethod: "GET",
  2482. HTTPPath: "/2018-11-05/public-key/{Id}/config",
  2483. }
  2484. if input == nil {
  2485. input = &GetPublicKeyConfigInput{}
  2486. }
  2487. output = &GetPublicKeyConfigOutput{}
  2488. req = c.newRequest(op, input, output)
  2489. return
  2490. }
  2491. // GetPublicKeyConfig API operation for Amazon CloudFront.
  2492. //
  2493. // Return public key configuration informaation
  2494. //
  2495. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2496. // with awserr.Error's Code and Message methods to get detailed information about
  2497. // the error.
  2498. //
  2499. // See the AWS API reference guide for Amazon CloudFront's
  2500. // API operation GetPublicKeyConfig for usage and error information.
  2501. //
  2502. // Returned Error Codes:
  2503. // * ErrCodeAccessDenied "AccessDenied"
  2504. // Access denied.
  2505. //
  2506. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  2507. // The specified public key doesn't exist.
  2508. //
  2509. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig
  2510. func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) {
  2511. req, out := c.GetPublicKeyConfigRequest(input)
  2512. return out, req.Send()
  2513. }
  2514. // GetPublicKeyConfigWithContext is the same as GetPublicKeyConfig with the addition of
  2515. // the ability to pass a context and additional request options.
  2516. //
  2517. // See GetPublicKeyConfig for details on how to use this API operation.
  2518. //
  2519. // The context must be non-nil and will be used for request cancellation. If
  2520. // the context is nil a panic will occur. In the future the SDK may create
  2521. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2522. // for more information on using Contexts.
  2523. func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPublicKeyConfigInput, opts ...request.Option) (*GetPublicKeyConfigOutput, error) {
  2524. req, out := c.GetPublicKeyConfigRequest(input)
  2525. req.SetContext(ctx)
  2526. req.ApplyOptions(opts...)
  2527. return out, req.Send()
  2528. }
  2529. const opGetStreamingDistribution = "GetStreamingDistribution2018_11_05"
  2530. // GetStreamingDistributionRequest generates a "aws/request.Request" representing the
  2531. // client's request for the GetStreamingDistribution operation. The "output" return
  2532. // value will be populated with the request's response once the request completes
  2533. // successfully.
  2534. //
  2535. // Use "Send" method on the returned Request to send the API call to the service.
  2536. // the "output" return value is not valid until after Send returns without error.
  2537. //
  2538. // See GetStreamingDistribution for more information on using the GetStreamingDistribution
  2539. // API call, and error handling.
  2540. //
  2541. // This method is useful when you want to inject custom logic or configuration
  2542. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2543. //
  2544. //
  2545. // // Example sending a request using the GetStreamingDistributionRequest method.
  2546. // req, resp := client.GetStreamingDistributionRequest(params)
  2547. //
  2548. // err := req.Send()
  2549. // if err == nil { // resp is now filled
  2550. // fmt.Println(resp)
  2551. // }
  2552. //
  2553. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution
  2554. func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) {
  2555. op := &request.Operation{
  2556. Name: opGetStreamingDistribution,
  2557. HTTPMethod: "GET",
  2558. HTTPPath: "/2018-11-05/streaming-distribution/{Id}",
  2559. }
  2560. if input == nil {
  2561. input = &GetStreamingDistributionInput{}
  2562. }
  2563. output = &GetStreamingDistributionOutput{}
  2564. req = c.newRequest(op, input, output)
  2565. return
  2566. }
  2567. // GetStreamingDistribution API operation for Amazon CloudFront.
  2568. //
  2569. // Gets information about a specified RTMP distribution, including the distribution
  2570. // configuration.
  2571. //
  2572. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2573. // with awserr.Error's Code and Message methods to get detailed information about
  2574. // the error.
  2575. //
  2576. // See the AWS API reference guide for Amazon CloudFront's
  2577. // API operation GetStreamingDistribution for usage and error information.
  2578. //
  2579. // Returned Error Codes:
  2580. // * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution"
  2581. // The specified streaming distribution does not exist.
  2582. //
  2583. // * ErrCodeAccessDenied "AccessDenied"
  2584. // Access denied.
  2585. //
  2586. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution
  2587. func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) {
  2588. req, out := c.GetStreamingDistributionRequest(input)
  2589. return out, req.Send()
  2590. }
  2591. // GetStreamingDistributionWithContext is the same as GetStreamingDistribution with the addition of
  2592. // the ability to pass a context and additional request options.
  2593. //
  2594. // See GetStreamingDistribution for details on how to use this API operation.
  2595. //
  2596. // The context must be non-nil and will be used for request cancellation. If
  2597. // the context is nil a panic will occur. In the future the SDK may create
  2598. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2599. // for more information on using Contexts.
  2600. func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.Option) (*GetStreamingDistributionOutput, error) {
  2601. req, out := c.GetStreamingDistributionRequest(input)
  2602. req.SetContext(ctx)
  2603. req.ApplyOptions(opts...)
  2604. return out, req.Send()
  2605. }
  2606. const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_11_05"
  2607. // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the
  2608. // client's request for the GetStreamingDistributionConfig operation. The "output" return
  2609. // value will be populated with the request's response once the request completes
  2610. // successfully.
  2611. //
  2612. // Use "Send" method on the returned Request to send the API call to the service.
  2613. // the "output" return value is not valid until after Send returns without error.
  2614. //
  2615. // See GetStreamingDistributionConfig for more information on using the GetStreamingDistributionConfig
  2616. // API call, and error handling.
  2617. //
  2618. // This method is useful when you want to inject custom logic or configuration
  2619. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2620. //
  2621. //
  2622. // // Example sending a request using the GetStreamingDistributionConfigRequest method.
  2623. // req, resp := client.GetStreamingDistributionConfigRequest(params)
  2624. //
  2625. // err := req.Send()
  2626. // if err == nil { // resp is now filled
  2627. // fmt.Println(resp)
  2628. // }
  2629. //
  2630. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig
  2631. func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) {
  2632. op := &request.Operation{
  2633. Name: opGetStreamingDistributionConfig,
  2634. HTTPMethod: "GET",
  2635. HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config",
  2636. }
  2637. if input == nil {
  2638. input = &GetStreamingDistributionConfigInput{}
  2639. }
  2640. output = &GetStreamingDistributionConfigOutput{}
  2641. req = c.newRequest(op, input, output)
  2642. return
  2643. }
  2644. // GetStreamingDistributionConfig API operation for Amazon CloudFront.
  2645. //
  2646. // Get the configuration information about a streaming distribution.
  2647. //
  2648. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2649. // with awserr.Error's Code and Message methods to get detailed information about
  2650. // the error.
  2651. //
  2652. // See the AWS API reference guide for Amazon CloudFront's
  2653. // API operation GetStreamingDistributionConfig for usage and error information.
  2654. //
  2655. // Returned Error Codes:
  2656. // * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution"
  2657. // The specified streaming distribution does not exist.
  2658. //
  2659. // * ErrCodeAccessDenied "AccessDenied"
  2660. // Access denied.
  2661. //
  2662. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig
  2663. func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) {
  2664. req, out := c.GetStreamingDistributionConfigRequest(input)
  2665. return out, req.Send()
  2666. }
  2667. // GetStreamingDistributionConfigWithContext is the same as GetStreamingDistributionConfig with the addition of
  2668. // the ability to pass a context and additional request options.
  2669. //
  2670. // See GetStreamingDistributionConfig for details on how to use this API operation.
  2671. //
  2672. // The context must be non-nil and will be used for request cancellation. If
  2673. // the context is nil a panic will occur. In the future the SDK may create
  2674. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2675. // for more information on using Contexts.
  2676. func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, input *GetStreamingDistributionConfigInput, opts ...request.Option) (*GetStreamingDistributionConfigOutput, error) {
  2677. req, out := c.GetStreamingDistributionConfigRequest(input)
  2678. req.SetContext(ctx)
  2679. req.ApplyOptions(opts...)
  2680. return out, req.Send()
  2681. }
  2682. const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2018_11_05"
  2683. // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the
  2684. // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return
  2685. // value will be populated with the request's response once the request completes
  2686. // successfully.
  2687. //
  2688. // Use "Send" method on the returned Request to send the API call to the service.
  2689. // the "output" return value is not valid until after Send returns without error.
  2690. //
  2691. // See ListCloudFrontOriginAccessIdentities for more information on using the ListCloudFrontOriginAccessIdentities
  2692. // API call, and error handling.
  2693. //
  2694. // This method is useful when you want to inject custom logic or configuration
  2695. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2696. //
  2697. //
  2698. // // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method.
  2699. // req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params)
  2700. //
  2701. // err := req.Send()
  2702. // if err == nil { // resp is now filled
  2703. // fmt.Println(resp)
  2704. // }
  2705. //
  2706. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities
  2707. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) {
  2708. op := &request.Operation{
  2709. Name: opListCloudFrontOriginAccessIdentities,
  2710. HTTPMethod: "GET",
  2711. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront",
  2712. Paginator: &request.Paginator{
  2713. InputTokens: []string{"Marker"},
  2714. OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"},
  2715. LimitToken: "MaxItems",
  2716. TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated",
  2717. },
  2718. }
  2719. if input == nil {
  2720. input = &ListCloudFrontOriginAccessIdentitiesInput{}
  2721. }
  2722. output = &ListCloudFrontOriginAccessIdentitiesOutput{}
  2723. req = c.newRequest(op, input, output)
  2724. return
  2725. }
  2726. // ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront.
  2727. //
  2728. // Lists origin access identities.
  2729. //
  2730. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2731. // with awserr.Error's Code and Message methods to get detailed information about
  2732. // the error.
  2733. //
  2734. // See the AWS API reference guide for Amazon CloudFront's
  2735. // API operation ListCloudFrontOriginAccessIdentities for usage and error information.
  2736. //
  2737. // Returned Error Codes:
  2738. // * ErrCodeInvalidArgument "InvalidArgument"
  2739. // The argument is invalid.
  2740. //
  2741. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities
  2742. func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) {
  2743. req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  2744. return out, req.Send()
  2745. }
  2746. // ListCloudFrontOriginAccessIdentitiesWithContext is the same as ListCloudFrontOriginAccessIdentities with the addition of
  2747. // the ability to pass a context and additional request options.
  2748. //
  2749. // See ListCloudFrontOriginAccessIdentities for details on how to use this API operation.
  2750. //
  2751. // The context must be non-nil and will be used for request cancellation. If
  2752. // the context is nil a panic will occur. In the future the SDK may create
  2753. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2754. // for more information on using Contexts.
  2755. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, opts ...request.Option) (*ListCloudFrontOriginAccessIdentitiesOutput, error) {
  2756. req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  2757. req.SetContext(ctx)
  2758. req.ApplyOptions(opts...)
  2759. return out, req.Send()
  2760. }
  2761. // ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation,
  2762. // calling the "fn" function with the response data for each page. To stop
  2763. // iterating, return false from the fn function.
  2764. //
  2765. // See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation.
  2766. //
  2767. // Note: This operation can generate multiple requests to a service.
  2768. //
  2769. // // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation.
  2770. // pageNum := 0
  2771. // err := client.ListCloudFrontOriginAccessIdentitiesPages(params,
  2772. // func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool {
  2773. // pageNum++
  2774. // fmt.Println(page)
  2775. // return pageNum <= 3
  2776. // })
  2777. //
  2778. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error {
  2779. return c.ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.BackgroundContext(), input, fn)
  2780. }
  2781. // ListCloudFrontOriginAccessIdentitiesPagesWithContext same as ListCloudFrontOriginAccessIdentitiesPages except
  2782. // it takes a Context and allows setting request options on the pages.
  2783. //
  2784. // The context must be non-nil and will be used for request cancellation. If
  2785. // the context is nil a panic will occur. In the future the SDK may create
  2786. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2787. // for more information on using Contexts.
  2788. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aws.Context, input *ListCloudFrontOriginAccessIdentitiesInput, fn func(*ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, opts ...request.Option) error {
  2789. p := request.Pagination{
  2790. NewRequest: func() (*request.Request, error) {
  2791. var inCpy *ListCloudFrontOriginAccessIdentitiesInput
  2792. if input != nil {
  2793. tmp := *input
  2794. inCpy = &tmp
  2795. }
  2796. req, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(inCpy)
  2797. req.SetContext(ctx)
  2798. req.ApplyOptions(opts...)
  2799. return req, nil
  2800. },
  2801. }
  2802. cont := true
  2803. for p.Next() && cont {
  2804. cont = fn(p.Page().(*ListCloudFrontOriginAccessIdentitiesOutput), !p.HasNextPage())
  2805. }
  2806. return p.Err()
  2807. }
  2808. const opListDistributions = "ListDistributions2018_11_05"
  2809. // ListDistributionsRequest generates a "aws/request.Request" representing the
  2810. // client's request for the ListDistributions operation. The "output" return
  2811. // value will be populated with the request's response once the request completes
  2812. // successfully.
  2813. //
  2814. // Use "Send" method on the returned Request to send the API call to the service.
  2815. // the "output" return value is not valid until after Send returns without error.
  2816. //
  2817. // See ListDistributions for more information on using the ListDistributions
  2818. // API call, and error handling.
  2819. //
  2820. // This method is useful when you want to inject custom logic or configuration
  2821. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2822. //
  2823. //
  2824. // // Example sending a request using the ListDistributionsRequest method.
  2825. // req, resp := client.ListDistributionsRequest(params)
  2826. //
  2827. // err := req.Send()
  2828. // if err == nil { // resp is now filled
  2829. // fmt.Println(resp)
  2830. // }
  2831. //
  2832. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions
  2833. func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) {
  2834. op := &request.Operation{
  2835. Name: opListDistributions,
  2836. HTTPMethod: "GET",
  2837. HTTPPath: "/2018-11-05/distribution",
  2838. Paginator: &request.Paginator{
  2839. InputTokens: []string{"Marker"},
  2840. OutputTokens: []string{"DistributionList.NextMarker"},
  2841. LimitToken: "MaxItems",
  2842. TruncationToken: "DistributionList.IsTruncated",
  2843. },
  2844. }
  2845. if input == nil {
  2846. input = &ListDistributionsInput{}
  2847. }
  2848. output = &ListDistributionsOutput{}
  2849. req = c.newRequest(op, input, output)
  2850. return
  2851. }
  2852. // ListDistributions API operation for Amazon CloudFront.
  2853. //
  2854. // List distributions.
  2855. //
  2856. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2857. // with awserr.Error's Code and Message methods to get detailed information about
  2858. // the error.
  2859. //
  2860. // See the AWS API reference guide for Amazon CloudFront's
  2861. // API operation ListDistributions for usage and error information.
  2862. //
  2863. // Returned Error Codes:
  2864. // * ErrCodeInvalidArgument "InvalidArgument"
  2865. // The argument is invalid.
  2866. //
  2867. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions
  2868. func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) {
  2869. req, out := c.ListDistributionsRequest(input)
  2870. return out, req.Send()
  2871. }
  2872. // ListDistributionsWithContext is the same as ListDistributions with the addition of
  2873. // the ability to pass a context and additional request options.
  2874. //
  2875. // See ListDistributions for details on how to use this API operation.
  2876. //
  2877. // The context must be non-nil and will be used for request cancellation. If
  2878. // the context is nil a panic will occur. In the future the SDK may create
  2879. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2880. // for more information on using Contexts.
  2881. func (c *CloudFront) ListDistributionsWithContext(ctx aws.Context, input *ListDistributionsInput, opts ...request.Option) (*ListDistributionsOutput, error) {
  2882. req, out := c.ListDistributionsRequest(input)
  2883. req.SetContext(ctx)
  2884. req.ApplyOptions(opts...)
  2885. return out, req.Send()
  2886. }
  2887. // ListDistributionsPages iterates over the pages of a ListDistributions operation,
  2888. // calling the "fn" function with the response data for each page. To stop
  2889. // iterating, return false from the fn function.
  2890. //
  2891. // See ListDistributions method for more information on how to use this operation.
  2892. //
  2893. // Note: This operation can generate multiple requests to a service.
  2894. //
  2895. // // Example iterating over at most 3 pages of a ListDistributions operation.
  2896. // pageNum := 0
  2897. // err := client.ListDistributionsPages(params,
  2898. // func(page *ListDistributionsOutput, lastPage bool) bool {
  2899. // pageNum++
  2900. // fmt.Println(page)
  2901. // return pageNum <= 3
  2902. // })
  2903. //
  2904. func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool) error {
  2905. return c.ListDistributionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2906. }
  2907. // ListDistributionsPagesWithContext same as ListDistributionsPages except
  2908. // it takes a Context and allows setting request options on the pages.
  2909. //
  2910. // The context must be non-nil and will be used for request cancellation. If
  2911. // the context is nil a panic will occur. In the future the SDK may create
  2912. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2913. // for more information on using Contexts.
  2914. func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *ListDistributionsInput, fn func(*ListDistributionsOutput, bool) bool, opts ...request.Option) error {
  2915. p := request.Pagination{
  2916. NewRequest: func() (*request.Request, error) {
  2917. var inCpy *ListDistributionsInput
  2918. if input != nil {
  2919. tmp := *input
  2920. inCpy = &tmp
  2921. }
  2922. req, _ := c.ListDistributionsRequest(inCpy)
  2923. req.SetContext(ctx)
  2924. req.ApplyOptions(opts...)
  2925. return req, nil
  2926. },
  2927. }
  2928. cont := true
  2929. for p.Next() && cont {
  2930. cont = fn(p.Page().(*ListDistributionsOutput), !p.HasNextPage())
  2931. }
  2932. return p.Err()
  2933. }
  2934. const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_11_05"
  2935. // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the
  2936. // client's request for the ListDistributionsByWebACLId operation. The "output" return
  2937. // value will be populated with the request's response once the request completes
  2938. // successfully.
  2939. //
  2940. // Use "Send" method on the returned Request to send the API call to the service.
  2941. // the "output" return value is not valid until after Send returns without error.
  2942. //
  2943. // See ListDistributionsByWebACLId for more information on using the ListDistributionsByWebACLId
  2944. // API call, and error handling.
  2945. //
  2946. // This method is useful when you want to inject custom logic or configuration
  2947. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2948. //
  2949. //
  2950. // // Example sending a request using the ListDistributionsByWebACLIdRequest method.
  2951. // req, resp := client.ListDistributionsByWebACLIdRequest(params)
  2952. //
  2953. // err := req.Send()
  2954. // if err == nil { // resp is now filled
  2955. // fmt.Println(resp)
  2956. // }
  2957. //
  2958. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId
  2959. func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) {
  2960. op := &request.Operation{
  2961. Name: opListDistributionsByWebACLId,
  2962. HTTPMethod: "GET",
  2963. HTTPPath: "/2018-11-05/distributionsByWebACLId/{WebACLId}",
  2964. }
  2965. if input == nil {
  2966. input = &ListDistributionsByWebACLIdInput{}
  2967. }
  2968. output = &ListDistributionsByWebACLIdOutput{}
  2969. req = c.newRequest(op, input, output)
  2970. return
  2971. }
  2972. // ListDistributionsByWebACLId API operation for Amazon CloudFront.
  2973. //
  2974. // List the distributions that are associated with a specified AWS WAF web ACL.
  2975. //
  2976. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2977. // with awserr.Error's Code and Message methods to get detailed information about
  2978. // the error.
  2979. //
  2980. // See the AWS API reference guide for Amazon CloudFront's
  2981. // API operation ListDistributionsByWebACLId for usage and error information.
  2982. //
  2983. // Returned Error Codes:
  2984. // * ErrCodeInvalidArgument "InvalidArgument"
  2985. // The argument is invalid.
  2986. //
  2987. // * ErrCodeInvalidWebACLId "InvalidWebACLId"
  2988. //
  2989. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId
  2990. func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) {
  2991. req, out := c.ListDistributionsByWebACLIdRequest(input)
  2992. return out, req.Send()
  2993. }
  2994. // ListDistributionsByWebACLIdWithContext is the same as ListDistributionsByWebACLId with the addition of
  2995. // the ability to pass a context and additional request options.
  2996. //
  2997. // See ListDistributionsByWebACLId for details on how to use this API operation.
  2998. //
  2999. // The context must be non-nil and will be used for request cancellation. If
  3000. // the context is nil a panic will occur. In the future the SDK may create
  3001. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3002. // for more information on using Contexts.
  3003. func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, input *ListDistributionsByWebACLIdInput, opts ...request.Option) (*ListDistributionsByWebACLIdOutput, error) {
  3004. req, out := c.ListDistributionsByWebACLIdRequest(input)
  3005. req.SetContext(ctx)
  3006. req.ApplyOptions(opts...)
  3007. return out, req.Send()
  3008. }
  3009. const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_11_05"
  3010. // ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the
  3011. // client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return
  3012. // value will be populated with the request's response once the request completes
  3013. // successfully.
  3014. //
  3015. // Use "Send" method on the returned Request to send the API call to the service.
  3016. // the "output" return value is not valid until after Send returns without error.
  3017. //
  3018. // See ListFieldLevelEncryptionConfigs for more information on using the ListFieldLevelEncryptionConfigs
  3019. // API call, and error handling.
  3020. //
  3021. // This method is useful when you want to inject custom logic or configuration
  3022. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3023. //
  3024. //
  3025. // // Example sending a request using the ListFieldLevelEncryptionConfigsRequest method.
  3026. // req, resp := client.ListFieldLevelEncryptionConfigsRequest(params)
  3027. //
  3028. // err := req.Send()
  3029. // if err == nil { // resp is now filled
  3030. // fmt.Println(resp)
  3031. // }
  3032. //
  3033. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs
  3034. func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) {
  3035. op := &request.Operation{
  3036. Name: opListFieldLevelEncryptionConfigs,
  3037. HTTPMethod: "GET",
  3038. HTTPPath: "/2018-11-05/field-level-encryption",
  3039. }
  3040. if input == nil {
  3041. input = &ListFieldLevelEncryptionConfigsInput{}
  3042. }
  3043. output = &ListFieldLevelEncryptionConfigsOutput{}
  3044. req = c.newRequest(op, input, output)
  3045. return
  3046. }
  3047. // ListFieldLevelEncryptionConfigs API operation for Amazon CloudFront.
  3048. //
  3049. // List all field-level encryption configurations that have been created in
  3050. // CloudFront for this account.
  3051. //
  3052. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3053. // with awserr.Error's Code and Message methods to get detailed information about
  3054. // the error.
  3055. //
  3056. // See the AWS API reference guide for Amazon CloudFront's
  3057. // API operation ListFieldLevelEncryptionConfigs for usage and error information.
  3058. //
  3059. // Returned Error Codes:
  3060. // * ErrCodeInvalidArgument "InvalidArgument"
  3061. // The argument is invalid.
  3062. //
  3063. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs
  3064. func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) {
  3065. req, out := c.ListFieldLevelEncryptionConfigsRequest(input)
  3066. return out, req.Send()
  3067. }
  3068. // ListFieldLevelEncryptionConfigsWithContext is the same as ListFieldLevelEncryptionConfigs with the addition of
  3069. // the ability to pass a context and additional request options.
  3070. //
  3071. // See ListFieldLevelEncryptionConfigs for details on how to use this API operation.
  3072. //
  3073. // The context must be non-nil and will be used for request cancellation. If
  3074. // the context is nil a panic will occur. In the future the SDK may create
  3075. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3076. // for more information on using Contexts.
  3077. func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, input *ListFieldLevelEncryptionConfigsInput, opts ...request.Option) (*ListFieldLevelEncryptionConfigsOutput, error) {
  3078. req, out := c.ListFieldLevelEncryptionConfigsRequest(input)
  3079. req.SetContext(ctx)
  3080. req.ApplyOptions(opts...)
  3081. return out, req.Send()
  3082. }
  3083. const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018_11_05"
  3084. // ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the
  3085. // client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return
  3086. // value will be populated with the request's response once the request completes
  3087. // successfully.
  3088. //
  3089. // Use "Send" method on the returned Request to send the API call to the service.
  3090. // the "output" return value is not valid until after Send returns without error.
  3091. //
  3092. // See ListFieldLevelEncryptionProfiles for more information on using the ListFieldLevelEncryptionProfiles
  3093. // API call, and error handling.
  3094. //
  3095. // This method is useful when you want to inject custom logic or configuration
  3096. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3097. //
  3098. //
  3099. // // Example sending a request using the ListFieldLevelEncryptionProfilesRequest method.
  3100. // req, resp := client.ListFieldLevelEncryptionProfilesRequest(params)
  3101. //
  3102. // err := req.Send()
  3103. // if err == nil { // resp is now filled
  3104. // fmt.Println(resp)
  3105. // }
  3106. //
  3107. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles
  3108. func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) {
  3109. op := &request.Operation{
  3110. Name: opListFieldLevelEncryptionProfiles,
  3111. HTTPMethod: "GET",
  3112. HTTPPath: "/2018-11-05/field-level-encryption-profile",
  3113. }
  3114. if input == nil {
  3115. input = &ListFieldLevelEncryptionProfilesInput{}
  3116. }
  3117. output = &ListFieldLevelEncryptionProfilesOutput{}
  3118. req = c.newRequest(op, input, output)
  3119. return
  3120. }
  3121. // ListFieldLevelEncryptionProfiles API operation for Amazon CloudFront.
  3122. //
  3123. // Request a list of field-level encryption profiles that have been created
  3124. // in CloudFront for this account.
  3125. //
  3126. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3127. // with awserr.Error's Code and Message methods to get detailed information about
  3128. // the error.
  3129. //
  3130. // See the AWS API reference guide for Amazon CloudFront's
  3131. // API operation ListFieldLevelEncryptionProfiles for usage and error information.
  3132. //
  3133. // Returned Error Codes:
  3134. // * ErrCodeInvalidArgument "InvalidArgument"
  3135. // The argument is invalid.
  3136. //
  3137. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles
  3138. func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) {
  3139. req, out := c.ListFieldLevelEncryptionProfilesRequest(input)
  3140. return out, req.Send()
  3141. }
  3142. // ListFieldLevelEncryptionProfilesWithContext is the same as ListFieldLevelEncryptionProfiles with the addition of
  3143. // the ability to pass a context and additional request options.
  3144. //
  3145. // See ListFieldLevelEncryptionProfiles for details on how to use this API operation.
  3146. //
  3147. // The context must be non-nil and will be used for request cancellation. If
  3148. // the context is nil a panic will occur. In the future the SDK may create
  3149. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3150. // for more information on using Contexts.
  3151. func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context, input *ListFieldLevelEncryptionProfilesInput, opts ...request.Option) (*ListFieldLevelEncryptionProfilesOutput, error) {
  3152. req, out := c.ListFieldLevelEncryptionProfilesRequest(input)
  3153. req.SetContext(ctx)
  3154. req.ApplyOptions(opts...)
  3155. return out, req.Send()
  3156. }
  3157. const opListInvalidations = "ListInvalidations2018_11_05"
  3158. // ListInvalidationsRequest generates a "aws/request.Request" representing the
  3159. // client's request for the ListInvalidations operation. The "output" return
  3160. // value will be populated with the request's response once the request completes
  3161. // successfully.
  3162. //
  3163. // Use "Send" method on the returned Request to send the API call to the service.
  3164. // the "output" return value is not valid until after Send returns without error.
  3165. //
  3166. // See ListInvalidations for more information on using the ListInvalidations
  3167. // API call, and error handling.
  3168. //
  3169. // This method is useful when you want to inject custom logic or configuration
  3170. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3171. //
  3172. //
  3173. // // Example sending a request using the ListInvalidationsRequest method.
  3174. // req, resp := client.ListInvalidationsRequest(params)
  3175. //
  3176. // err := req.Send()
  3177. // if err == nil { // resp is now filled
  3178. // fmt.Println(resp)
  3179. // }
  3180. //
  3181. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations
  3182. func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) {
  3183. op := &request.Operation{
  3184. Name: opListInvalidations,
  3185. HTTPMethod: "GET",
  3186. HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation",
  3187. Paginator: &request.Paginator{
  3188. InputTokens: []string{"Marker"},
  3189. OutputTokens: []string{"InvalidationList.NextMarker"},
  3190. LimitToken: "MaxItems",
  3191. TruncationToken: "InvalidationList.IsTruncated",
  3192. },
  3193. }
  3194. if input == nil {
  3195. input = &ListInvalidationsInput{}
  3196. }
  3197. output = &ListInvalidationsOutput{}
  3198. req = c.newRequest(op, input, output)
  3199. return
  3200. }
  3201. // ListInvalidations API operation for Amazon CloudFront.
  3202. //
  3203. // Lists invalidation batches.
  3204. //
  3205. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3206. // with awserr.Error's Code and Message methods to get detailed information about
  3207. // the error.
  3208. //
  3209. // See the AWS API reference guide for Amazon CloudFront's
  3210. // API operation ListInvalidations for usage and error information.
  3211. //
  3212. // Returned Error Codes:
  3213. // * ErrCodeInvalidArgument "InvalidArgument"
  3214. // The argument is invalid.
  3215. //
  3216. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  3217. // The specified distribution does not exist.
  3218. //
  3219. // * ErrCodeAccessDenied "AccessDenied"
  3220. // Access denied.
  3221. //
  3222. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations
  3223. func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) {
  3224. req, out := c.ListInvalidationsRequest(input)
  3225. return out, req.Send()
  3226. }
  3227. // ListInvalidationsWithContext is the same as ListInvalidations with the addition of
  3228. // the ability to pass a context and additional request options.
  3229. //
  3230. // See ListInvalidations for details on how to use this API operation.
  3231. //
  3232. // The context must be non-nil and will be used for request cancellation. If
  3233. // the context is nil a panic will occur. In the future the SDK may create
  3234. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3235. // for more information on using Contexts.
  3236. func (c *CloudFront) ListInvalidationsWithContext(ctx aws.Context, input *ListInvalidationsInput, opts ...request.Option) (*ListInvalidationsOutput, error) {
  3237. req, out := c.ListInvalidationsRequest(input)
  3238. req.SetContext(ctx)
  3239. req.ApplyOptions(opts...)
  3240. return out, req.Send()
  3241. }
  3242. // ListInvalidationsPages iterates over the pages of a ListInvalidations operation,
  3243. // calling the "fn" function with the response data for each page. To stop
  3244. // iterating, return false from the fn function.
  3245. //
  3246. // See ListInvalidations method for more information on how to use this operation.
  3247. //
  3248. // Note: This operation can generate multiple requests to a service.
  3249. //
  3250. // // Example iterating over at most 3 pages of a ListInvalidations operation.
  3251. // pageNum := 0
  3252. // err := client.ListInvalidationsPages(params,
  3253. // func(page *ListInvalidationsOutput, lastPage bool) bool {
  3254. // pageNum++
  3255. // fmt.Println(page)
  3256. // return pageNum <= 3
  3257. // })
  3258. //
  3259. func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool) error {
  3260. return c.ListInvalidationsPagesWithContext(aws.BackgroundContext(), input, fn)
  3261. }
  3262. // ListInvalidationsPagesWithContext same as ListInvalidationsPages except
  3263. // it takes a Context and allows setting request options on the pages.
  3264. //
  3265. // The context must be non-nil and will be used for request cancellation. If
  3266. // the context is nil a panic will occur. In the future the SDK may create
  3267. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3268. // for more information on using Contexts.
  3269. func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *ListInvalidationsInput, fn func(*ListInvalidationsOutput, bool) bool, opts ...request.Option) error {
  3270. p := request.Pagination{
  3271. NewRequest: func() (*request.Request, error) {
  3272. var inCpy *ListInvalidationsInput
  3273. if input != nil {
  3274. tmp := *input
  3275. inCpy = &tmp
  3276. }
  3277. req, _ := c.ListInvalidationsRequest(inCpy)
  3278. req.SetContext(ctx)
  3279. req.ApplyOptions(opts...)
  3280. return req, nil
  3281. },
  3282. }
  3283. cont := true
  3284. for p.Next() && cont {
  3285. cont = fn(p.Page().(*ListInvalidationsOutput), !p.HasNextPage())
  3286. }
  3287. return p.Err()
  3288. }
  3289. const opListPublicKeys = "ListPublicKeys2018_11_05"
  3290. // ListPublicKeysRequest generates a "aws/request.Request" representing the
  3291. // client's request for the ListPublicKeys operation. The "output" return
  3292. // value will be populated with the request's response once the request completes
  3293. // successfully.
  3294. //
  3295. // Use "Send" method on the returned Request to send the API call to the service.
  3296. // the "output" return value is not valid until after Send returns without error.
  3297. //
  3298. // See ListPublicKeys for more information on using the ListPublicKeys
  3299. // API call, and error handling.
  3300. //
  3301. // This method is useful when you want to inject custom logic or configuration
  3302. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3303. //
  3304. //
  3305. // // Example sending a request using the ListPublicKeysRequest method.
  3306. // req, resp := client.ListPublicKeysRequest(params)
  3307. //
  3308. // err := req.Send()
  3309. // if err == nil { // resp is now filled
  3310. // fmt.Println(resp)
  3311. // }
  3312. //
  3313. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys
  3314. func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
  3315. op := &request.Operation{
  3316. Name: opListPublicKeys,
  3317. HTTPMethod: "GET",
  3318. HTTPPath: "/2018-11-05/public-key",
  3319. }
  3320. if input == nil {
  3321. input = &ListPublicKeysInput{}
  3322. }
  3323. output = &ListPublicKeysOutput{}
  3324. req = c.newRequest(op, input, output)
  3325. return
  3326. }
  3327. // ListPublicKeys API operation for Amazon CloudFront.
  3328. //
  3329. // List all public keys that have been added to CloudFront for this account.
  3330. //
  3331. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3332. // with awserr.Error's Code and Message methods to get detailed information about
  3333. // the error.
  3334. //
  3335. // See the AWS API reference guide for Amazon CloudFront's
  3336. // API operation ListPublicKeys for usage and error information.
  3337. //
  3338. // Returned Error Codes:
  3339. // * ErrCodeInvalidArgument "InvalidArgument"
  3340. // The argument is invalid.
  3341. //
  3342. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys
  3343. func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
  3344. req, out := c.ListPublicKeysRequest(input)
  3345. return out, req.Send()
  3346. }
  3347. // ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
  3348. // the ability to pass a context and additional request options.
  3349. //
  3350. // See ListPublicKeys for details on how to use this API operation.
  3351. //
  3352. // The context must be non-nil and will be used for request cancellation. If
  3353. // the context is nil a panic will occur. In the future the SDK may create
  3354. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3355. // for more information on using Contexts.
  3356. func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
  3357. req, out := c.ListPublicKeysRequest(input)
  3358. req.SetContext(ctx)
  3359. req.ApplyOptions(opts...)
  3360. return out, req.Send()
  3361. }
  3362. const opListStreamingDistributions = "ListStreamingDistributions2018_11_05"
  3363. // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the
  3364. // client's request for the ListStreamingDistributions operation. The "output" return
  3365. // value will be populated with the request's response once the request completes
  3366. // successfully.
  3367. //
  3368. // Use "Send" method on the returned Request to send the API call to the service.
  3369. // the "output" return value is not valid until after Send returns without error.
  3370. //
  3371. // See ListStreamingDistributions for more information on using the ListStreamingDistributions
  3372. // API call, and error handling.
  3373. //
  3374. // This method is useful when you want to inject custom logic or configuration
  3375. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3376. //
  3377. //
  3378. // // Example sending a request using the ListStreamingDistributionsRequest method.
  3379. // req, resp := client.ListStreamingDistributionsRequest(params)
  3380. //
  3381. // err := req.Send()
  3382. // if err == nil { // resp is now filled
  3383. // fmt.Println(resp)
  3384. // }
  3385. //
  3386. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions
  3387. func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) {
  3388. op := &request.Operation{
  3389. Name: opListStreamingDistributions,
  3390. HTTPMethod: "GET",
  3391. HTTPPath: "/2018-11-05/streaming-distribution",
  3392. Paginator: &request.Paginator{
  3393. InputTokens: []string{"Marker"},
  3394. OutputTokens: []string{"StreamingDistributionList.NextMarker"},
  3395. LimitToken: "MaxItems",
  3396. TruncationToken: "StreamingDistributionList.IsTruncated",
  3397. },
  3398. }
  3399. if input == nil {
  3400. input = &ListStreamingDistributionsInput{}
  3401. }
  3402. output = &ListStreamingDistributionsOutput{}
  3403. req = c.newRequest(op, input, output)
  3404. return
  3405. }
  3406. // ListStreamingDistributions API operation for Amazon CloudFront.
  3407. //
  3408. // List streaming distributions.
  3409. //
  3410. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3411. // with awserr.Error's Code and Message methods to get detailed information about
  3412. // the error.
  3413. //
  3414. // See the AWS API reference guide for Amazon CloudFront's
  3415. // API operation ListStreamingDistributions for usage and error information.
  3416. //
  3417. // Returned Error Codes:
  3418. // * ErrCodeInvalidArgument "InvalidArgument"
  3419. // The argument is invalid.
  3420. //
  3421. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions
  3422. func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) {
  3423. req, out := c.ListStreamingDistributionsRequest(input)
  3424. return out, req.Send()
  3425. }
  3426. // ListStreamingDistributionsWithContext is the same as ListStreamingDistributions with the addition of
  3427. // the ability to pass a context and additional request options.
  3428. //
  3429. // See ListStreamingDistributions for details on how to use this API operation.
  3430. //
  3431. // The context must be non-nil and will be used for request cancellation. If
  3432. // the context is nil a panic will occur. In the future the SDK may create
  3433. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3434. // for more information on using Contexts.
  3435. func (c *CloudFront) ListStreamingDistributionsWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, opts ...request.Option) (*ListStreamingDistributionsOutput, error) {
  3436. req, out := c.ListStreamingDistributionsRequest(input)
  3437. req.SetContext(ctx)
  3438. req.ApplyOptions(opts...)
  3439. return out, req.Send()
  3440. }
  3441. // ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation,
  3442. // calling the "fn" function with the response data for each page. To stop
  3443. // iterating, return false from the fn function.
  3444. //
  3445. // See ListStreamingDistributions method for more information on how to use this operation.
  3446. //
  3447. // Note: This operation can generate multiple requests to a service.
  3448. //
  3449. // // Example iterating over at most 3 pages of a ListStreamingDistributions operation.
  3450. // pageNum := 0
  3451. // err := client.ListStreamingDistributionsPages(params,
  3452. // func(page *ListStreamingDistributionsOutput, lastPage bool) bool {
  3453. // pageNum++
  3454. // fmt.Println(page)
  3455. // return pageNum <= 3
  3456. // })
  3457. //
  3458. func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool) error {
  3459. return c.ListStreamingDistributionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3460. }
  3461. // ListStreamingDistributionsPagesWithContext same as ListStreamingDistributionsPages except
  3462. // it takes a Context and allows setting request options on the pages.
  3463. //
  3464. // The context must be non-nil and will be used for request cancellation. If
  3465. // the context is nil a panic will occur. In the future the SDK may create
  3466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3467. // for more information on using Contexts.
  3468. func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, input *ListStreamingDistributionsInput, fn func(*ListStreamingDistributionsOutput, bool) bool, opts ...request.Option) error {
  3469. p := request.Pagination{
  3470. NewRequest: func() (*request.Request, error) {
  3471. var inCpy *ListStreamingDistributionsInput
  3472. if input != nil {
  3473. tmp := *input
  3474. inCpy = &tmp
  3475. }
  3476. req, _ := c.ListStreamingDistributionsRequest(inCpy)
  3477. req.SetContext(ctx)
  3478. req.ApplyOptions(opts...)
  3479. return req, nil
  3480. },
  3481. }
  3482. cont := true
  3483. for p.Next() && cont {
  3484. cont = fn(p.Page().(*ListStreamingDistributionsOutput), !p.HasNextPage())
  3485. }
  3486. return p.Err()
  3487. }
  3488. const opListTagsForResource = "ListTagsForResource2018_11_05"
  3489. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  3490. // client's request for the ListTagsForResource operation. The "output" return
  3491. // value will be populated with the request's response once the request completes
  3492. // successfully.
  3493. //
  3494. // Use "Send" method on the returned Request to send the API call to the service.
  3495. // the "output" return value is not valid until after Send returns without error.
  3496. //
  3497. // See ListTagsForResource for more information on using the ListTagsForResource
  3498. // API call, and error handling.
  3499. //
  3500. // This method is useful when you want to inject custom logic or configuration
  3501. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3502. //
  3503. //
  3504. // // Example sending a request using the ListTagsForResourceRequest method.
  3505. // req, resp := client.ListTagsForResourceRequest(params)
  3506. //
  3507. // err := req.Send()
  3508. // if err == nil { // resp is now filled
  3509. // fmt.Println(resp)
  3510. // }
  3511. //
  3512. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource
  3513. func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  3514. op := &request.Operation{
  3515. Name: opListTagsForResource,
  3516. HTTPMethod: "GET",
  3517. HTTPPath: "/2018-11-05/tagging",
  3518. }
  3519. if input == nil {
  3520. input = &ListTagsForResourceInput{}
  3521. }
  3522. output = &ListTagsForResourceOutput{}
  3523. req = c.newRequest(op, input, output)
  3524. return
  3525. }
  3526. // ListTagsForResource API operation for Amazon CloudFront.
  3527. //
  3528. // List tags for a CloudFront resource.
  3529. //
  3530. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3531. // with awserr.Error's Code and Message methods to get detailed information about
  3532. // the error.
  3533. //
  3534. // See the AWS API reference guide for Amazon CloudFront's
  3535. // API operation ListTagsForResource for usage and error information.
  3536. //
  3537. // Returned Error Codes:
  3538. // * ErrCodeAccessDenied "AccessDenied"
  3539. // Access denied.
  3540. //
  3541. // * ErrCodeInvalidArgument "InvalidArgument"
  3542. // The argument is invalid.
  3543. //
  3544. // * ErrCodeInvalidTagging "InvalidTagging"
  3545. //
  3546. // * ErrCodeNoSuchResource "NoSuchResource"
  3547. //
  3548. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource
  3549. func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  3550. req, out := c.ListTagsForResourceRequest(input)
  3551. return out, req.Send()
  3552. }
  3553. // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
  3554. // the ability to pass a context and additional request options.
  3555. //
  3556. // See ListTagsForResource for details on how to use this API operation.
  3557. //
  3558. // The context must be non-nil and will be used for request cancellation. If
  3559. // the context is nil a panic will occur. In the future the SDK may create
  3560. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3561. // for more information on using Contexts.
  3562. func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
  3563. req, out := c.ListTagsForResourceRequest(input)
  3564. req.SetContext(ctx)
  3565. req.ApplyOptions(opts...)
  3566. return out, req.Send()
  3567. }
  3568. const opTagResource = "TagResource2018_11_05"
  3569. // TagResourceRequest generates a "aws/request.Request" representing the
  3570. // client's request for the TagResource operation. The "output" return
  3571. // value will be populated with the request's response once the request completes
  3572. // successfully.
  3573. //
  3574. // Use "Send" method on the returned Request to send the API call to the service.
  3575. // the "output" return value is not valid until after Send returns without error.
  3576. //
  3577. // See TagResource for more information on using the TagResource
  3578. // API call, and error handling.
  3579. //
  3580. // This method is useful when you want to inject custom logic or configuration
  3581. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3582. //
  3583. //
  3584. // // Example sending a request using the TagResourceRequest method.
  3585. // req, resp := client.TagResourceRequest(params)
  3586. //
  3587. // err := req.Send()
  3588. // if err == nil { // resp is now filled
  3589. // fmt.Println(resp)
  3590. // }
  3591. //
  3592. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource
  3593. func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  3594. op := &request.Operation{
  3595. Name: opTagResource,
  3596. HTTPMethod: "POST",
  3597. HTTPPath: "/2018-11-05/tagging?Operation=Tag",
  3598. }
  3599. if input == nil {
  3600. input = &TagResourceInput{}
  3601. }
  3602. output = &TagResourceOutput{}
  3603. req = c.newRequest(op, input, output)
  3604. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3605. return
  3606. }
  3607. // TagResource API operation for Amazon CloudFront.
  3608. //
  3609. // Add tags to a CloudFront resource.
  3610. //
  3611. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3612. // with awserr.Error's Code and Message methods to get detailed information about
  3613. // the error.
  3614. //
  3615. // See the AWS API reference guide for Amazon CloudFront's
  3616. // API operation TagResource for usage and error information.
  3617. //
  3618. // Returned Error Codes:
  3619. // * ErrCodeAccessDenied "AccessDenied"
  3620. // Access denied.
  3621. //
  3622. // * ErrCodeInvalidArgument "InvalidArgument"
  3623. // The argument is invalid.
  3624. //
  3625. // * ErrCodeInvalidTagging "InvalidTagging"
  3626. //
  3627. // * ErrCodeNoSuchResource "NoSuchResource"
  3628. //
  3629. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource
  3630. func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  3631. req, out := c.TagResourceRequest(input)
  3632. return out, req.Send()
  3633. }
  3634. // TagResourceWithContext is the same as TagResource with the addition of
  3635. // the ability to pass a context and additional request options.
  3636. //
  3637. // See TagResource for details on how to use this API operation.
  3638. //
  3639. // The context must be non-nil and will be used for request cancellation. If
  3640. // the context is nil a panic will occur. In the future the SDK may create
  3641. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3642. // for more information on using Contexts.
  3643. func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  3644. req, out := c.TagResourceRequest(input)
  3645. req.SetContext(ctx)
  3646. req.ApplyOptions(opts...)
  3647. return out, req.Send()
  3648. }
  3649. const opUntagResource = "UntagResource2018_11_05"
  3650. // UntagResourceRequest generates a "aws/request.Request" representing the
  3651. // client's request for the UntagResource operation. The "output" return
  3652. // value will be populated with the request's response once the request completes
  3653. // successfully.
  3654. //
  3655. // Use "Send" method on the returned Request to send the API call to the service.
  3656. // the "output" return value is not valid until after Send returns without error.
  3657. //
  3658. // See UntagResource for more information on using the UntagResource
  3659. // API call, and error handling.
  3660. //
  3661. // This method is useful when you want to inject custom logic or configuration
  3662. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3663. //
  3664. //
  3665. // // Example sending a request using the UntagResourceRequest method.
  3666. // req, resp := client.UntagResourceRequest(params)
  3667. //
  3668. // err := req.Send()
  3669. // if err == nil { // resp is now filled
  3670. // fmt.Println(resp)
  3671. // }
  3672. //
  3673. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource
  3674. func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  3675. op := &request.Operation{
  3676. Name: opUntagResource,
  3677. HTTPMethod: "POST",
  3678. HTTPPath: "/2018-11-05/tagging?Operation=Untag",
  3679. }
  3680. if input == nil {
  3681. input = &UntagResourceInput{}
  3682. }
  3683. output = &UntagResourceOutput{}
  3684. req = c.newRequest(op, input, output)
  3685. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3686. return
  3687. }
  3688. // UntagResource API operation for Amazon CloudFront.
  3689. //
  3690. // Remove tags from a CloudFront resource.
  3691. //
  3692. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3693. // with awserr.Error's Code and Message methods to get detailed information about
  3694. // the error.
  3695. //
  3696. // See the AWS API reference guide for Amazon CloudFront's
  3697. // API operation UntagResource for usage and error information.
  3698. //
  3699. // Returned Error Codes:
  3700. // * ErrCodeAccessDenied "AccessDenied"
  3701. // Access denied.
  3702. //
  3703. // * ErrCodeInvalidArgument "InvalidArgument"
  3704. // The argument is invalid.
  3705. //
  3706. // * ErrCodeInvalidTagging "InvalidTagging"
  3707. //
  3708. // * ErrCodeNoSuchResource "NoSuchResource"
  3709. //
  3710. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource
  3711. func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  3712. req, out := c.UntagResourceRequest(input)
  3713. return out, req.Send()
  3714. }
  3715. // UntagResourceWithContext is the same as UntagResource with the addition of
  3716. // the ability to pass a context and additional request options.
  3717. //
  3718. // See UntagResource for details on how to use this API operation.
  3719. //
  3720. // The context must be non-nil and will be used for request cancellation. If
  3721. // the context is nil a panic will occur. In the future the SDK may create
  3722. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3723. // for more information on using Contexts.
  3724. func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  3725. req, out := c.UntagResourceRequest(input)
  3726. req.SetContext(ctx)
  3727. req.ApplyOptions(opts...)
  3728. return out, req.Send()
  3729. }
  3730. const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2018_11_05"
  3731. // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  3732. // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return
  3733. // value will be populated with the request's response once the request completes
  3734. // successfully.
  3735. //
  3736. // Use "Send" method on the returned Request to send the API call to the service.
  3737. // the "output" return value is not valid until after Send returns without error.
  3738. //
  3739. // See UpdateCloudFrontOriginAccessIdentity for more information on using the UpdateCloudFrontOriginAccessIdentity
  3740. // API call, and error handling.
  3741. //
  3742. // This method is useful when you want to inject custom logic or configuration
  3743. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3744. //
  3745. //
  3746. // // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method.
  3747. // req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params)
  3748. //
  3749. // err := req.Send()
  3750. // if err == nil { // resp is now filled
  3751. // fmt.Println(resp)
  3752. // }
  3753. //
  3754. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity
  3755. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) {
  3756. op := &request.Operation{
  3757. Name: opUpdateCloudFrontOriginAccessIdentity,
  3758. HTTPMethod: "PUT",
  3759. HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config",
  3760. }
  3761. if input == nil {
  3762. input = &UpdateCloudFrontOriginAccessIdentityInput{}
  3763. }
  3764. output = &UpdateCloudFrontOriginAccessIdentityOutput{}
  3765. req = c.newRequest(op, input, output)
  3766. return
  3767. }
  3768. // UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  3769. //
  3770. // Update an origin access identity.
  3771. //
  3772. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3773. // with awserr.Error's Code and Message methods to get detailed information about
  3774. // the error.
  3775. //
  3776. // See the AWS API reference guide for Amazon CloudFront's
  3777. // API operation UpdateCloudFrontOriginAccessIdentity for usage and error information.
  3778. //
  3779. // Returned Error Codes:
  3780. // * ErrCodeAccessDenied "AccessDenied"
  3781. // Access denied.
  3782. //
  3783. // * ErrCodeIllegalUpdate "IllegalUpdate"
  3784. // Origin and CallerReference cannot be updated.
  3785. //
  3786. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  3787. // The If-Match version is missing or not valid for the distribution.
  3788. //
  3789. // * ErrCodeMissingBody "MissingBody"
  3790. // This operation requires a body. Ensure that the body is present and the Content-Type
  3791. // header is set.
  3792. //
  3793. // * ErrCodeNoSuchCloudFrontOriginAccessIdentity "NoSuchCloudFrontOriginAccessIdentity"
  3794. // The specified origin access identity does not exist.
  3795. //
  3796. // * ErrCodePreconditionFailed "PreconditionFailed"
  3797. // The precondition given in one or more of the request-header fields evaluated
  3798. // to false.
  3799. //
  3800. // * ErrCodeInvalidArgument "InvalidArgument"
  3801. // The argument is invalid.
  3802. //
  3803. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  3804. // The value of Quantity and the size of Items don't match.
  3805. //
  3806. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity
  3807. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) {
  3808. req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input)
  3809. return out, req.Send()
  3810. }
  3811. // UpdateCloudFrontOriginAccessIdentityWithContext is the same as UpdateCloudFrontOriginAccessIdentity with the addition of
  3812. // the ability to pass a context and additional request options.
  3813. //
  3814. // See UpdateCloudFrontOriginAccessIdentity for details on how to use this API operation.
  3815. //
  3816. // The context must be non-nil and will be used for request cancellation. If
  3817. // the context is nil a panic will occur. In the future the SDK may create
  3818. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3819. // for more information on using Contexts.
  3820. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Context, input *UpdateCloudFrontOriginAccessIdentityInput, opts ...request.Option) (*UpdateCloudFrontOriginAccessIdentityOutput, error) {
  3821. req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input)
  3822. req.SetContext(ctx)
  3823. req.ApplyOptions(opts...)
  3824. return out, req.Send()
  3825. }
  3826. const opUpdateDistribution = "UpdateDistribution2018_11_05"
  3827. // UpdateDistributionRequest generates a "aws/request.Request" representing the
  3828. // client's request for the UpdateDistribution operation. The "output" return
  3829. // value will be populated with the request's response once the request completes
  3830. // successfully.
  3831. //
  3832. // Use "Send" method on the returned Request to send the API call to the service.
  3833. // the "output" return value is not valid until after Send returns without error.
  3834. //
  3835. // See UpdateDistribution for more information on using the UpdateDistribution
  3836. // API call, and error handling.
  3837. //
  3838. // This method is useful when you want to inject custom logic or configuration
  3839. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3840. //
  3841. //
  3842. // // Example sending a request using the UpdateDistributionRequest method.
  3843. // req, resp := client.UpdateDistributionRequest(params)
  3844. //
  3845. // err := req.Send()
  3846. // if err == nil { // resp is now filled
  3847. // fmt.Println(resp)
  3848. // }
  3849. //
  3850. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution
  3851. func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) {
  3852. op := &request.Operation{
  3853. Name: opUpdateDistribution,
  3854. HTTPMethod: "PUT",
  3855. HTTPPath: "/2018-11-05/distribution/{Id}/config",
  3856. }
  3857. if input == nil {
  3858. input = &UpdateDistributionInput{}
  3859. }
  3860. output = &UpdateDistributionOutput{}
  3861. req = c.newRequest(op, input, output)
  3862. return
  3863. }
  3864. // UpdateDistribution API operation for Amazon CloudFront.
  3865. //
  3866. // Updates the configuration for a web distribution.
  3867. //
  3868. // When you update a distribution, there are more required fields than when
  3869. // you create a distribution. When you update your distribution by using this
  3870. // API action, follow the steps here to get the current configuration and then
  3871. // make your updates, to make sure that you include all of the required fields.
  3872. // To view a summary, see Required Fields for Create Distribution and Update
  3873. // Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html)
  3874. // in the Amazon CloudFront Developer Guide.
  3875. //
  3876. // The update process includes getting the current distribution configuration,
  3877. // updating the XML document that is returned to make your changes, and then
  3878. // submitting an UpdateDistribution request to make the updates.
  3879. //
  3880. // For information about updating a distribution using the CloudFront console
  3881. // instead, see Creating a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html)
  3882. // in the Amazon CloudFront Developer Guide.
  3883. //
  3884. // To update a web distribution using the CloudFront API
  3885. //
  3886. // Submit a GetDistributionConfig request to get the current configuration and
  3887. // an Etag header for the distribution.
  3888. //
  3889. // If you update the distribution again, you must get a new Etag header.
  3890. //
  3891. // Update the XML document that was returned in the response to your GetDistributionConfig
  3892. // request to include your changes.
  3893. //
  3894. // When you edit the XML file, be aware of the following:
  3895. //
  3896. // You must strip out the ETag parameter that is returned.
  3897. //
  3898. // Additional fields are required when you update a distribution. There may
  3899. // be fields included in the XML file for features that you haven't configured
  3900. // for your distribution. This is expected and required to successfully update
  3901. // the distribution.
  3902. //
  3903. // You can't change the value of CallerReference. If you try to change this
  3904. // value, CloudFront returns an IllegalUpdate error.
  3905. //
  3906. // The new configuration replaces the existing configuration; the values that
  3907. // you specify in an UpdateDistribution request are not merged into your existing
  3908. // configuration. When you add, delete, or replace values in an element that
  3909. // allows multiple values (for example, CNAME), you must specify all of the
  3910. // values that you want to appear in the updated distribution. In addition,
  3911. // you must update the corresponding Quantity element.
  3912. //
  3913. // Submit an UpdateDistribution request to update the configuration for your
  3914. // distribution:
  3915. //
  3916. // In the request body, include the XML document that you updated in Step 2.
  3917. // The request body must include an XML document with a DistributionConfig element.
  3918. //
  3919. // Set the value of the HTTP If-Match header to the value of the ETag header
  3920. // that CloudFront returned when you submitted the GetDistributionConfig request
  3921. // in Step 1.
  3922. //
  3923. // Review the response to the UpdateDistribution request to confirm that the
  3924. // configuration was successfully updated.
  3925. //
  3926. // Optional: Submit a GetDistribution request to confirm that your changes have
  3927. // propagated. When propagation is complete, the value of Status is Deployed.
  3928. //
  3929. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3930. // with awserr.Error's Code and Message methods to get detailed information about
  3931. // the error.
  3932. //
  3933. // See the AWS API reference guide for Amazon CloudFront's
  3934. // API operation UpdateDistribution for usage and error information.
  3935. //
  3936. // Returned Error Codes:
  3937. // * ErrCodeAccessDenied "AccessDenied"
  3938. // Access denied.
  3939. //
  3940. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  3941. //
  3942. // * ErrCodeIllegalUpdate "IllegalUpdate"
  3943. // Origin and CallerReference cannot be updated.
  3944. //
  3945. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  3946. // The If-Match version is missing or not valid for the distribution.
  3947. //
  3948. // * ErrCodeMissingBody "MissingBody"
  3949. // This operation requires a body. Ensure that the body is present and the Content-Type
  3950. // header is set.
  3951. //
  3952. // * ErrCodeNoSuchDistribution "NoSuchDistribution"
  3953. // The specified distribution does not exist.
  3954. //
  3955. // * ErrCodePreconditionFailed "PreconditionFailed"
  3956. // The precondition given in one or more of the request-header fields evaluated
  3957. // to false.
  3958. //
  3959. // * ErrCodeTooManyDistributionCNAMEs "TooManyDistributionCNAMEs"
  3960. // Your request contains more CNAMEs than are allowed per distribution.
  3961. //
  3962. // * ErrCodeInvalidDefaultRootObject "InvalidDefaultRootObject"
  3963. // The default root object file name is too big or contains an invalid character.
  3964. //
  3965. // * ErrCodeInvalidRelativePath "InvalidRelativePath"
  3966. // The relative path is too big, is not URL-encoded, or does not begin with
  3967. // a slash (/).
  3968. //
  3969. // * ErrCodeInvalidErrorCode "InvalidErrorCode"
  3970. //
  3971. // * ErrCodeInvalidResponseCode "InvalidResponseCode"
  3972. //
  3973. // * ErrCodeInvalidArgument "InvalidArgument"
  3974. // The argument is invalid.
  3975. //
  3976. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  3977. // The origin access identity is not valid or doesn't exist.
  3978. //
  3979. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  3980. // Your request contains more trusted signers than are allowed per distribution.
  3981. //
  3982. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  3983. // One or more of your trusted signers don't exist.
  3984. //
  3985. // * ErrCodeInvalidViewerCertificate "InvalidViewerCertificate"
  3986. //
  3987. // * ErrCodeInvalidMinimumProtocolVersion "InvalidMinimumProtocolVersion"
  3988. //
  3989. // * ErrCodeInvalidRequiredProtocol "InvalidRequiredProtocol"
  3990. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  3991. // protocol in your request, or omit the RequiredProtocols element from your
  3992. // distribution configuration.
  3993. //
  3994. // * ErrCodeNoSuchOrigin "NoSuchOrigin"
  3995. // No origin exists with the specified Origin Id.
  3996. //
  3997. // * ErrCodeTooManyOrigins "TooManyOrigins"
  3998. // You cannot create more origins for the distribution.
  3999. //
  4000. // * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution"
  4001. // Processing your request would cause you to exceed the maximum number of origin
  4002. // groups allowed.
  4003. //
  4004. // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors"
  4005. // You cannot create more cache behaviors for the distribution.
  4006. //
  4007. // * ErrCodeTooManyCookieNamesInWhiteList "TooManyCookieNamesInWhiteList"
  4008. // Your request contains more cookie names in the whitelist than are allowed
  4009. // per cache behavior.
  4010. //
  4011. // * ErrCodeInvalidForwardCookies "InvalidForwardCookies"
  4012. // Your request contains forward cookies option which doesn't match with the
  4013. // expectation for the whitelisted list of cookie names. Either list of cookie
  4014. // names has been specified when not allowed or list of cookie names is missing
  4015. // when expected.
  4016. //
  4017. // * ErrCodeTooManyHeadersInForwardedValues "TooManyHeadersInForwardedValues"
  4018. //
  4019. // * ErrCodeInvalidHeadersForS3Origin "InvalidHeadersForS3Origin"
  4020. //
  4021. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  4022. // The value of Quantity and the size of Items don't match.
  4023. //
  4024. // * ErrCodeTooManyCertificates "TooManyCertificates"
  4025. // You cannot create anymore custom SSL/TLS certificates.
  4026. //
  4027. // * ErrCodeInvalidLocationCode "InvalidLocationCode"
  4028. //
  4029. // * ErrCodeInvalidGeoRestrictionParameter "InvalidGeoRestrictionParameter"
  4030. //
  4031. // * ErrCodeInvalidTTLOrder "InvalidTTLOrder"
  4032. //
  4033. // * ErrCodeInvalidWebACLId "InvalidWebACLId"
  4034. //
  4035. // * ErrCodeTooManyOriginCustomHeaders "TooManyOriginCustomHeaders"
  4036. //
  4037. // * ErrCodeTooManyQueryStringParameters "TooManyQueryStringParameters"
  4038. //
  4039. // * ErrCodeInvalidQueryStringParameters "InvalidQueryStringParameters"
  4040. //
  4041. // * ErrCodeTooManyDistributionsWithLambdaAssociations "TooManyDistributionsWithLambdaAssociations"
  4042. // Processing your request would cause the maximum number of distributions with
  4043. // Lambda function associations per owner to be exceeded.
  4044. //
  4045. // * ErrCodeTooManyLambdaFunctionAssociations "TooManyLambdaFunctionAssociations"
  4046. // Your request contains more Lambda function associations than are allowed
  4047. // per distribution.
  4048. //
  4049. // * ErrCodeInvalidLambdaFunctionAssociation "InvalidLambdaFunctionAssociation"
  4050. // The specified Lambda function association is invalid.
  4051. //
  4052. // * ErrCodeInvalidOriginReadTimeout "InvalidOriginReadTimeout"
  4053. //
  4054. // * ErrCodeInvalidOriginKeepaliveTimeout "InvalidOriginKeepaliveTimeout"
  4055. //
  4056. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  4057. // The specified configuration for field-level encryption doesn't exist.
  4058. //
  4059. // * ErrCodeIllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior"
  4060. // The specified configuration for field-level encryption can't be associated
  4061. // with the specified cache behavior.
  4062. //
  4063. // * ErrCodeTooManyDistributionsAssociatedToFieldLevelEncryptionConfig "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig"
  4064. // The maximum number of distributions have been associated with the specified
  4065. // configuration for field-level encryption.
  4066. //
  4067. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution
  4068. func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) {
  4069. req, out := c.UpdateDistributionRequest(input)
  4070. return out, req.Send()
  4071. }
  4072. // UpdateDistributionWithContext is the same as UpdateDistribution with the addition of
  4073. // the ability to pass a context and additional request options.
  4074. //
  4075. // See UpdateDistribution for details on how to use this API operation.
  4076. //
  4077. // The context must be non-nil and will be used for request cancellation. If
  4078. // the context is nil a panic will occur. In the future the SDK may create
  4079. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4080. // for more information on using Contexts.
  4081. func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *UpdateDistributionInput, opts ...request.Option) (*UpdateDistributionOutput, error) {
  4082. req, out := c.UpdateDistributionRequest(input)
  4083. req.SetContext(ctx)
  4084. req.ApplyOptions(opts...)
  4085. return out, req.Send()
  4086. }
  4087. const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018_11_05"
  4088. // UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the
  4089. // client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return
  4090. // value will be populated with the request's response once the request completes
  4091. // successfully.
  4092. //
  4093. // Use "Send" method on the returned Request to send the API call to the service.
  4094. // the "output" return value is not valid until after Send returns without error.
  4095. //
  4096. // See UpdateFieldLevelEncryptionConfig for more information on using the UpdateFieldLevelEncryptionConfig
  4097. // API call, and error handling.
  4098. //
  4099. // This method is useful when you want to inject custom logic or configuration
  4100. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4101. //
  4102. //
  4103. // // Example sending a request using the UpdateFieldLevelEncryptionConfigRequest method.
  4104. // req, resp := client.UpdateFieldLevelEncryptionConfigRequest(params)
  4105. //
  4106. // err := req.Send()
  4107. // if err == nil { // resp is now filled
  4108. // fmt.Println(resp)
  4109. // }
  4110. //
  4111. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig
  4112. func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) {
  4113. op := &request.Operation{
  4114. Name: opUpdateFieldLevelEncryptionConfig,
  4115. HTTPMethod: "PUT",
  4116. HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config",
  4117. }
  4118. if input == nil {
  4119. input = &UpdateFieldLevelEncryptionConfigInput{}
  4120. }
  4121. output = &UpdateFieldLevelEncryptionConfigOutput{}
  4122. req = c.newRequest(op, input, output)
  4123. return
  4124. }
  4125. // UpdateFieldLevelEncryptionConfig API operation for Amazon CloudFront.
  4126. //
  4127. // Update a field-level encryption configuration.
  4128. //
  4129. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4130. // with awserr.Error's Code and Message methods to get detailed information about
  4131. // the error.
  4132. //
  4133. // See the AWS API reference guide for Amazon CloudFront's
  4134. // API operation UpdateFieldLevelEncryptionConfig for usage and error information.
  4135. //
  4136. // Returned Error Codes:
  4137. // * ErrCodeAccessDenied "AccessDenied"
  4138. // Access denied.
  4139. //
  4140. // * ErrCodeIllegalUpdate "IllegalUpdate"
  4141. // Origin and CallerReference cannot be updated.
  4142. //
  4143. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  4144. // The value of Quantity and the size of Items don't match.
  4145. //
  4146. // * ErrCodeInvalidArgument "InvalidArgument"
  4147. // The argument is invalid.
  4148. //
  4149. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  4150. // The If-Match version is missing or not valid for the distribution.
  4151. //
  4152. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  4153. // The specified profile for field-level encryption doesn't exist.
  4154. //
  4155. // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig"
  4156. // The specified configuration for field-level encryption doesn't exist.
  4157. //
  4158. // * ErrCodePreconditionFailed "PreconditionFailed"
  4159. // The precondition given in one or more of the request-header fields evaluated
  4160. // to false.
  4161. //
  4162. // * ErrCodeTooManyFieldLevelEncryptionQueryArgProfiles "TooManyFieldLevelEncryptionQueryArgProfiles"
  4163. // The maximum number of query arg profiles for field-level encryption have
  4164. // been created.
  4165. //
  4166. // * ErrCodeTooManyFieldLevelEncryptionContentTypeProfiles "TooManyFieldLevelEncryptionContentTypeProfiles"
  4167. // The maximum number of content type profiles for field-level encryption have
  4168. // been created.
  4169. //
  4170. // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty"
  4171. // No profile specified for the field-level encryption query argument.
  4172. //
  4173. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig
  4174. func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) {
  4175. req, out := c.UpdateFieldLevelEncryptionConfigRequest(input)
  4176. return out, req.Send()
  4177. }
  4178. // UpdateFieldLevelEncryptionConfigWithContext is the same as UpdateFieldLevelEncryptionConfig with the addition of
  4179. // the ability to pass a context and additional request options.
  4180. //
  4181. // See UpdateFieldLevelEncryptionConfig for details on how to use this API operation.
  4182. //
  4183. // The context must be non-nil and will be used for request cancellation. If
  4184. // the context is nil a panic will occur. In the future the SDK may create
  4185. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4186. // for more information on using Contexts.
  4187. func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionConfigInput, opts ...request.Option) (*UpdateFieldLevelEncryptionConfigOutput, error) {
  4188. req, out := c.UpdateFieldLevelEncryptionConfigRequest(input)
  4189. req.SetContext(ctx)
  4190. req.ApplyOptions(opts...)
  4191. return out, req.Send()
  4192. }
  4193. const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2018_11_05"
  4194. // UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the
  4195. // client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return
  4196. // value will be populated with the request's response once the request completes
  4197. // successfully.
  4198. //
  4199. // Use "Send" method on the returned Request to send the API call to the service.
  4200. // the "output" return value is not valid until after Send returns without error.
  4201. //
  4202. // See UpdateFieldLevelEncryptionProfile for more information on using the UpdateFieldLevelEncryptionProfile
  4203. // API call, and error handling.
  4204. //
  4205. // This method is useful when you want to inject custom logic or configuration
  4206. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4207. //
  4208. //
  4209. // // Example sending a request using the UpdateFieldLevelEncryptionProfileRequest method.
  4210. // req, resp := client.UpdateFieldLevelEncryptionProfileRequest(params)
  4211. //
  4212. // err := req.Send()
  4213. // if err == nil { // resp is now filled
  4214. // fmt.Println(resp)
  4215. // }
  4216. //
  4217. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile
  4218. func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) {
  4219. op := &request.Operation{
  4220. Name: opUpdateFieldLevelEncryptionProfile,
  4221. HTTPMethod: "PUT",
  4222. HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config",
  4223. }
  4224. if input == nil {
  4225. input = &UpdateFieldLevelEncryptionProfileInput{}
  4226. }
  4227. output = &UpdateFieldLevelEncryptionProfileOutput{}
  4228. req = c.newRequest(op, input, output)
  4229. return
  4230. }
  4231. // UpdateFieldLevelEncryptionProfile API operation for Amazon CloudFront.
  4232. //
  4233. // Update a field-level encryption profile.
  4234. //
  4235. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4236. // with awserr.Error's Code and Message methods to get detailed information about
  4237. // the error.
  4238. //
  4239. // See the AWS API reference guide for Amazon CloudFront's
  4240. // API operation UpdateFieldLevelEncryptionProfile for usage and error information.
  4241. //
  4242. // Returned Error Codes:
  4243. // * ErrCodeAccessDenied "AccessDenied"
  4244. // Access denied.
  4245. //
  4246. // * ErrCodeFieldLevelEncryptionProfileAlreadyExists "FieldLevelEncryptionProfileAlreadyExists"
  4247. // The specified profile for field-level encryption already exists.
  4248. //
  4249. // * ErrCodeIllegalUpdate "IllegalUpdate"
  4250. // Origin and CallerReference cannot be updated.
  4251. //
  4252. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  4253. // The value of Quantity and the size of Items don't match.
  4254. //
  4255. // * ErrCodeInvalidArgument "InvalidArgument"
  4256. // The argument is invalid.
  4257. //
  4258. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  4259. // The If-Match version is missing or not valid for the distribution.
  4260. //
  4261. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  4262. // The specified public key doesn't exist.
  4263. //
  4264. // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile"
  4265. // The specified profile for field-level encryption doesn't exist.
  4266. //
  4267. // * ErrCodePreconditionFailed "PreconditionFailed"
  4268. // The precondition given in one or more of the request-header fields evaluated
  4269. // to false.
  4270. //
  4271. // * ErrCodeFieldLevelEncryptionProfileSizeExceeded "FieldLevelEncryptionProfileSizeExceeded"
  4272. // The maximum size of a profile for field-level encryption was exceeded.
  4273. //
  4274. // * ErrCodeTooManyFieldLevelEncryptionEncryptionEntities "TooManyFieldLevelEncryptionEncryptionEntities"
  4275. // The maximum number of encryption entities for field-level encryption have
  4276. // been created.
  4277. //
  4278. // * ErrCodeTooManyFieldLevelEncryptionFieldPatterns "TooManyFieldLevelEncryptionFieldPatterns"
  4279. // The maximum number of field patterns for field-level encryption have been
  4280. // created.
  4281. //
  4282. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile
  4283. func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) {
  4284. req, out := c.UpdateFieldLevelEncryptionProfileRequest(input)
  4285. return out, req.Send()
  4286. }
  4287. // UpdateFieldLevelEncryptionProfileWithContext is the same as UpdateFieldLevelEncryptionProfile with the addition of
  4288. // the ability to pass a context and additional request options.
  4289. //
  4290. // See UpdateFieldLevelEncryptionProfile for details on how to use this API operation.
  4291. //
  4292. // The context must be non-nil and will be used for request cancellation. If
  4293. // the context is nil a panic will occur. In the future the SDK may create
  4294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4295. // for more information on using Contexts.
  4296. func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Context, input *UpdateFieldLevelEncryptionProfileInput, opts ...request.Option) (*UpdateFieldLevelEncryptionProfileOutput, error) {
  4297. req, out := c.UpdateFieldLevelEncryptionProfileRequest(input)
  4298. req.SetContext(ctx)
  4299. req.ApplyOptions(opts...)
  4300. return out, req.Send()
  4301. }
  4302. const opUpdatePublicKey = "UpdatePublicKey2018_11_05"
  4303. // UpdatePublicKeyRequest generates a "aws/request.Request" representing the
  4304. // client's request for the UpdatePublicKey operation. The "output" return
  4305. // value will be populated with the request's response once the request completes
  4306. // successfully.
  4307. //
  4308. // Use "Send" method on the returned Request to send the API call to the service.
  4309. // the "output" return value is not valid until after Send returns without error.
  4310. //
  4311. // See UpdatePublicKey for more information on using the UpdatePublicKey
  4312. // API call, and error handling.
  4313. //
  4314. // This method is useful when you want to inject custom logic or configuration
  4315. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4316. //
  4317. //
  4318. // // Example sending a request using the UpdatePublicKeyRequest method.
  4319. // req, resp := client.UpdatePublicKeyRequest(params)
  4320. //
  4321. // err := req.Send()
  4322. // if err == nil { // resp is now filled
  4323. // fmt.Println(resp)
  4324. // }
  4325. //
  4326. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey
  4327. func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) {
  4328. op := &request.Operation{
  4329. Name: opUpdatePublicKey,
  4330. HTTPMethod: "PUT",
  4331. HTTPPath: "/2018-11-05/public-key/{Id}/config",
  4332. }
  4333. if input == nil {
  4334. input = &UpdatePublicKeyInput{}
  4335. }
  4336. output = &UpdatePublicKeyOutput{}
  4337. req = c.newRequest(op, input, output)
  4338. return
  4339. }
  4340. // UpdatePublicKey API operation for Amazon CloudFront.
  4341. //
  4342. // Update public key information. Note that the only value you can change is
  4343. // the comment.
  4344. //
  4345. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4346. // with awserr.Error's Code and Message methods to get detailed information about
  4347. // the error.
  4348. //
  4349. // See the AWS API reference guide for Amazon CloudFront's
  4350. // API operation UpdatePublicKey for usage and error information.
  4351. //
  4352. // Returned Error Codes:
  4353. // * ErrCodeAccessDenied "AccessDenied"
  4354. // Access denied.
  4355. //
  4356. // * ErrCodeCannotChangeImmutablePublicKeyFields "CannotChangeImmutablePublicKeyFields"
  4357. // You can't change the value of a public key.
  4358. //
  4359. // * ErrCodeInvalidArgument "InvalidArgument"
  4360. // The argument is invalid.
  4361. //
  4362. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  4363. // The If-Match version is missing or not valid for the distribution.
  4364. //
  4365. // * ErrCodeIllegalUpdate "IllegalUpdate"
  4366. // Origin and CallerReference cannot be updated.
  4367. //
  4368. // * ErrCodeNoSuchPublicKey "NoSuchPublicKey"
  4369. // The specified public key doesn't exist.
  4370. //
  4371. // * ErrCodePreconditionFailed "PreconditionFailed"
  4372. // The precondition given in one or more of the request-header fields evaluated
  4373. // to false.
  4374. //
  4375. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey
  4376. func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) {
  4377. req, out := c.UpdatePublicKeyRequest(input)
  4378. return out, req.Send()
  4379. }
  4380. // UpdatePublicKeyWithContext is the same as UpdatePublicKey with the addition of
  4381. // the ability to pass a context and additional request options.
  4382. //
  4383. // See UpdatePublicKey for details on how to use this API operation.
  4384. //
  4385. // The context must be non-nil and will be used for request cancellation. If
  4386. // the context is nil a panic will occur. In the future the SDK may create
  4387. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4388. // for more information on using Contexts.
  4389. func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePublicKeyInput, opts ...request.Option) (*UpdatePublicKeyOutput, error) {
  4390. req, out := c.UpdatePublicKeyRequest(input)
  4391. req.SetContext(ctx)
  4392. req.ApplyOptions(opts...)
  4393. return out, req.Send()
  4394. }
  4395. const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_11_05"
  4396. // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the
  4397. // client's request for the UpdateStreamingDistribution operation. The "output" return
  4398. // value will be populated with the request's response once the request completes
  4399. // successfully.
  4400. //
  4401. // Use "Send" method on the returned Request to send the API call to the service.
  4402. // the "output" return value is not valid until after Send returns without error.
  4403. //
  4404. // See UpdateStreamingDistribution for more information on using the UpdateStreamingDistribution
  4405. // API call, and error handling.
  4406. //
  4407. // This method is useful when you want to inject custom logic or configuration
  4408. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4409. //
  4410. //
  4411. // // Example sending a request using the UpdateStreamingDistributionRequest method.
  4412. // req, resp := client.UpdateStreamingDistributionRequest(params)
  4413. //
  4414. // err := req.Send()
  4415. // if err == nil { // resp is now filled
  4416. // fmt.Println(resp)
  4417. // }
  4418. //
  4419. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution
  4420. func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) {
  4421. op := &request.Operation{
  4422. Name: opUpdateStreamingDistribution,
  4423. HTTPMethod: "PUT",
  4424. HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config",
  4425. }
  4426. if input == nil {
  4427. input = &UpdateStreamingDistributionInput{}
  4428. }
  4429. output = &UpdateStreamingDistributionOutput{}
  4430. req = c.newRequest(op, input, output)
  4431. return
  4432. }
  4433. // UpdateStreamingDistribution API operation for Amazon CloudFront.
  4434. //
  4435. // Update a streaming distribution.
  4436. //
  4437. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4438. // with awserr.Error's Code and Message methods to get detailed information about
  4439. // the error.
  4440. //
  4441. // See the AWS API reference guide for Amazon CloudFront's
  4442. // API operation UpdateStreamingDistribution for usage and error information.
  4443. //
  4444. // Returned Error Codes:
  4445. // * ErrCodeAccessDenied "AccessDenied"
  4446. // Access denied.
  4447. //
  4448. // * ErrCodeCNAMEAlreadyExists "CNAMEAlreadyExists"
  4449. //
  4450. // * ErrCodeIllegalUpdate "IllegalUpdate"
  4451. // Origin and CallerReference cannot be updated.
  4452. //
  4453. // * ErrCodeInvalidIfMatchVersion "InvalidIfMatchVersion"
  4454. // The If-Match version is missing or not valid for the distribution.
  4455. //
  4456. // * ErrCodeMissingBody "MissingBody"
  4457. // This operation requires a body. Ensure that the body is present and the Content-Type
  4458. // header is set.
  4459. //
  4460. // * ErrCodeNoSuchStreamingDistribution "NoSuchStreamingDistribution"
  4461. // The specified streaming distribution does not exist.
  4462. //
  4463. // * ErrCodePreconditionFailed "PreconditionFailed"
  4464. // The precondition given in one or more of the request-header fields evaluated
  4465. // to false.
  4466. //
  4467. // * ErrCodeTooManyStreamingDistributionCNAMEs "TooManyStreamingDistributionCNAMEs"
  4468. //
  4469. // * ErrCodeInvalidArgument "InvalidArgument"
  4470. // The argument is invalid.
  4471. //
  4472. // * ErrCodeInvalidOriginAccessIdentity "InvalidOriginAccessIdentity"
  4473. // The origin access identity is not valid or doesn't exist.
  4474. //
  4475. // * ErrCodeTooManyTrustedSigners "TooManyTrustedSigners"
  4476. // Your request contains more trusted signers than are allowed per distribution.
  4477. //
  4478. // * ErrCodeTrustedSignerDoesNotExist "TrustedSignerDoesNotExist"
  4479. // One or more of your trusted signers don't exist.
  4480. //
  4481. // * ErrCodeInconsistentQuantities "InconsistentQuantities"
  4482. // The value of Quantity and the size of Items don't match.
  4483. //
  4484. // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution
  4485. func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) {
  4486. req, out := c.UpdateStreamingDistributionRequest(input)
  4487. return out, req.Send()
  4488. }
  4489. // UpdateStreamingDistributionWithContext is the same as UpdateStreamingDistribution with the addition of
  4490. // the ability to pass a context and additional request options.
  4491. //
  4492. // See UpdateStreamingDistribution for details on how to use this API operation.
  4493. //
  4494. // The context must be non-nil and will be used for request cancellation. If
  4495. // the context is nil a panic will occur. In the future the SDK may create
  4496. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4497. // for more information on using Contexts.
  4498. func (c *CloudFront) UpdateStreamingDistributionWithContext(ctx aws.Context, input *UpdateStreamingDistributionInput, opts ...request.Option) (*UpdateStreamingDistributionOutput, error) {
  4499. req, out := c.UpdateStreamingDistributionRequest(input)
  4500. req.SetContext(ctx)
  4501. req.ApplyOptions(opts...)
  4502. return out, req.Send()
  4503. }
  4504. // A complex type that lists the AWS accounts, if any, that you included in
  4505. // the TrustedSigners complex type for this distribution. These are the accounts
  4506. // that you want to allow to create signed URLs for private content.
  4507. //
  4508. // The Signer complex type lists the AWS account number of the trusted signer
  4509. // or self if the signer is the AWS account that created the distribution. The
  4510. // Signer element also includes the IDs of any active CloudFront key pairs that
  4511. // are associated with the trusted signer's AWS account. If no KeyPairId element
  4512. // appears for a Signer, that signer can't create signed URLs.
  4513. //
  4514. // For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  4515. // in the Amazon CloudFront Developer Guide.
  4516. type ActiveTrustedSigners struct {
  4517. _ struct{} `type:"structure"`
  4518. // Enabled is true if any of the AWS accounts listed in the TrustedSigners complex
  4519. // type for this RTMP distribution have active CloudFront key pairs. If not,
  4520. // Enabled is false.
  4521. //
  4522. // For more information, see ActiveTrustedSigners.
  4523. //
  4524. // Enabled is a required field
  4525. Enabled *bool `type:"boolean" required:"true"`
  4526. // A complex type that contains one Signer complex type for each trusted signer
  4527. // that is specified in the TrustedSigners complex type.
  4528. //
  4529. // For more information, see ActiveTrustedSigners.
  4530. Items []*Signer `locationNameList:"Signer" type:"list"`
  4531. // A complex type that contains one Signer complex type for each trusted signer
  4532. // specified in the TrustedSigners complex type.
  4533. //
  4534. // For more information, see ActiveTrustedSigners.
  4535. //
  4536. // Quantity is a required field
  4537. Quantity *int64 `type:"integer" required:"true"`
  4538. }
  4539. // String returns the string representation
  4540. func (s ActiveTrustedSigners) String() string {
  4541. return awsutil.Prettify(s)
  4542. }
  4543. // GoString returns the string representation
  4544. func (s ActiveTrustedSigners) GoString() string {
  4545. return s.String()
  4546. }
  4547. // SetEnabled sets the Enabled field's value.
  4548. func (s *ActiveTrustedSigners) SetEnabled(v bool) *ActiveTrustedSigners {
  4549. s.Enabled = &v
  4550. return s
  4551. }
  4552. // SetItems sets the Items field's value.
  4553. func (s *ActiveTrustedSigners) SetItems(v []*Signer) *ActiveTrustedSigners {
  4554. s.Items = v
  4555. return s
  4556. }
  4557. // SetQuantity sets the Quantity field's value.
  4558. func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners {
  4559. s.Quantity = &v
  4560. return s
  4561. }
  4562. // A complex type that contains information about CNAMEs (alternate domain names),
  4563. // if any, for this distribution.
  4564. type Aliases struct {
  4565. _ struct{} `type:"structure"`
  4566. // A complex type that contains the CNAME aliases, if any, that you want to
  4567. // associate with this distribution.
  4568. Items []*string `locationNameList:"CNAME" type:"list"`
  4569. // The number of CNAME aliases, if any, that you want to associate with this
  4570. // distribution.
  4571. //
  4572. // Quantity is a required field
  4573. Quantity *int64 `type:"integer" required:"true"`
  4574. }
  4575. // String returns the string representation
  4576. func (s Aliases) String() string {
  4577. return awsutil.Prettify(s)
  4578. }
  4579. // GoString returns the string representation
  4580. func (s Aliases) GoString() string {
  4581. return s.String()
  4582. }
  4583. // Validate inspects the fields of the type to determine if they are valid.
  4584. func (s *Aliases) Validate() error {
  4585. invalidParams := request.ErrInvalidParams{Context: "Aliases"}
  4586. if s.Quantity == nil {
  4587. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4588. }
  4589. if invalidParams.Len() > 0 {
  4590. return invalidParams
  4591. }
  4592. return nil
  4593. }
  4594. // SetItems sets the Items field's value.
  4595. func (s *Aliases) SetItems(v []*string) *Aliases {
  4596. s.Items = v
  4597. return s
  4598. }
  4599. // SetQuantity sets the Quantity field's value.
  4600. func (s *Aliases) SetQuantity(v int64) *Aliases {
  4601. s.Quantity = &v
  4602. return s
  4603. }
  4604. // A complex type that controls which HTTP methods CloudFront processes and
  4605. // forwards to your Amazon S3 bucket or your custom origin. There are three
  4606. // choices:
  4607. //
  4608. // * CloudFront forwards only GET and HEAD requests.
  4609. //
  4610. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  4611. //
  4612. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  4613. // requests.
  4614. //
  4615. // If you pick the third choice, you may need to restrict access to your Amazon
  4616. // S3 bucket or to your custom origin so users can't perform operations that
  4617. // you don't want them to. For example, you might not want users to have permissions
  4618. // to delete objects from your origin.
  4619. type AllowedMethods struct {
  4620. _ struct{} `type:"structure"`
  4621. // A complex type that controls whether CloudFront caches the response to requests
  4622. // using the specified HTTP methods. There are two choices:
  4623. //
  4624. // * CloudFront caches responses to GET and HEAD requests.
  4625. //
  4626. // * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
  4627. //
  4628. // If you pick the second choice for your Amazon S3 Origin, you may need to
  4629. // forward Access-Control-Request-Method, Access-Control-Request-Headers, and
  4630. // Origin headers for the responses to be cached correctly.
  4631. CachedMethods *CachedMethods `type:"structure"`
  4632. // A complex type that contains the HTTP methods that you want CloudFront to
  4633. // process and forward to your origin.
  4634. //
  4635. // Items is a required field
  4636. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  4637. // The number of HTTP methods that you want CloudFront to forward to your origin.
  4638. // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS
  4639. // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).
  4640. //
  4641. // Quantity is a required field
  4642. Quantity *int64 `type:"integer" required:"true"`
  4643. }
  4644. // String returns the string representation
  4645. func (s AllowedMethods) String() string {
  4646. return awsutil.Prettify(s)
  4647. }
  4648. // GoString returns the string representation
  4649. func (s AllowedMethods) GoString() string {
  4650. return s.String()
  4651. }
  4652. // Validate inspects the fields of the type to determine if they are valid.
  4653. func (s *AllowedMethods) Validate() error {
  4654. invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"}
  4655. if s.Items == nil {
  4656. invalidParams.Add(request.NewErrParamRequired("Items"))
  4657. }
  4658. if s.Quantity == nil {
  4659. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4660. }
  4661. if s.CachedMethods != nil {
  4662. if err := s.CachedMethods.Validate(); err != nil {
  4663. invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams))
  4664. }
  4665. }
  4666. if invalidParams.Len() > 0 {
  4667. return invalidParams
  4668. }
  4669. return nil
  4670. }
  4671. // SetCachedMethods sets the CachedMethods field's value.
  4672. func (s *AllowedMethods) SetCachedMethods(v *CachedMethods) *AllowedMethods {
  4673. s.CachedMethods = v
  4674. return s
  4675. }
  4676. // SetItems sets the Items field's value.
  4677. func (s *AllowedMethods) SetItems(v []*string) *AllowedMethods {
  4678. s.Items = v
  4679. return s
  4680. }
  4681. // SetQuantity sets the Quantity field's value.
  4682. func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods {
  4683. s.Quantity = &v
  4684. return s
  4685. }
  4686. // A complex type that describes how CloudFront processes requests.
  4687. //
  4688. // You must create at least as many cache behaviors (including the default cache
  4689. // behavior) as you have origins if you want CloudFront to distribute objects
  4690. // from all of the origins. Each cache behavior specifies the one origin from
  4691. // which you want CloudFront to get objects. If you have two origins and only
  4692. // the default cache behavior, the default cache behavior will cause CloudFront
  4693. // to get objects from one of the origins, but the other origin is never used.
  4694. //
  4695. // For the current limit on the number of cache behaviors that you can add to
  4696. // a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  4697. // in the AWS General Reference.
  4698. //
  4699. // If you don't want to specify any cache behaviors, include only an empty CacheBehaviors
  4700. // element. Don't include an empty CacheBehavior element, or CloudFront returns
  4701. // a MalformedXML error.
  4702. //
  4703. // To delete all cache behaviors in an existing distribution, update the distribution
  4704. // configuration and include only an empty CacheBehaviors element.
  4705. //
  4706. // To add, change, or remove one or more cache behaviors, update the distribution
  4707. // configuration and specify all of the cache behaviors that you want to include
  4708. // in the updated distribution.
  4709. //
  4710. // For more information about cache behaviors, see Cache Behaviors (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior)
  4711. // in the Amazon CloudFront Developer Guide.
  4712. type CacheBehavior struct {
  4713. _ struct{} `type:"structure"`
  4714. // A complex type that controls which HTTP methods CloudFront processes and
  4715. // forwards to your Amazon S3 bucket or your custom origin. There are three
  4716. // choices:
  4717. //
  4718. // * CloudFront forwards only GET and HEAD requests.
  4719. //
  4720. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  4721. //
  4722. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  4723. // requests.
  4724. //
  4725. // If you pick the third choice, you may need to restrict access to your Amazon
  4726. // S3 bucket or to your custom origin so users can't perform operations that
  4727. // you don't want them to. For example, you might not want users to have permissions
  4728. // to delete objects from your origin.
  4729. AllowedMethods *AllowedMethods `type:"structure"`
  4730. // Whether you want CloudFront to automatically compress certain files for this
  4731. // cache behavior. If so, specify true; if not, specify false. For more information,
  4732. // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)
  4733. // in the Amazon CloudFront Developer Guide.
  4734. Compress *bool `type:"boolean"`
  4735. // The default amount of time that you want objects to stay in CloudFront caches
  4736. // before CloudFront forwards another request to your origin to determine whether
  4737. // the object has been updated. The value that you specify applies only when
  4738. // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control
  4739. // s-maxage, and Expires to objects. For more information, see Specifying How
  4740. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  4741. // in the Amazon CloudFront Developer Guide.
  4742. DefaultTTL *int64 `type:"long"`
  4743. // The value of ID for the field-level encryption configuration that you want
  4744. // CloudFront to use for encrypting specific fields of data for a cache behavior
  4745. // or for the default cache behavior in your distribution.
  4746. FieldLevelEncryptionId *string `type:"string"`
  4747. // A complex type that specifies how CloudFront handles query strings and cookies.
  4748. //
  4749. // ForwardedValues is a required field
  4750. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  4751. // A complex type that contains zero or more Lambda function associations for
  4752. // a cache behavior.
  4753. LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"`
  4754. // The maximum amount of time that you want objects to stay in CloudFront caches
  4755. // before CloudFront forwards another request to your origin to determine whether
  4756. // the object has been updated. The value that you specify applies only when
  4757. // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control
  4758. // s-maxage, and Expires to objects. For more information, see Specifying How
  4759. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  4760. // in the Amazon CloudFront Developer Guide.
  4761. MaxTTL *int64 `type:"long"`
  4762. // The minimum amount of time that you want objects to stay in CloudFront caches
  4763. // before CloudFront forwards another request to your origin to determine whether
  4764. // the object has been updated. For more information, see Specifying How Long
  4765. // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  4766. // in the Amazon Amazon CloudFront Developer Guide.
  4767. //
  4768. // You must specify 0 for MinTTL if you configure CloudFront to forward all
  4769. // headers to your origin (under Headers, if you specify 1 for Quantity and
  4770. // * for Name).
  4771. //
  4772. // MinTTL is a required field
  4773. MinTTL *int64 `type:"long" required:"true"`
  4774. // The pattern (for example, images/*.jpg) that specifies which requests to
  4775. // apply the behavior to. When CloudFront receives a viewer request, the requested
  4776. // path is compared with path patterns in the order in which cache behaviors
  4777. // are listed in the distribution.
  4778. //
  4779. // You can optionally include a slash (/) at the beginning of the path pattern.
  4780. // For example, /images/*.jpg. CloudFront behavior is the same with or without
  4781. // the leading /.
  4782. //
  4783. // The path pattern for the default cache behavior is * and cannot be changed.
  4784. // If the request for an object does not match the path pattern for any cache
  4785. // behaviors, CloudFront applies the behavior in the default cache behavior.
  4786. //
  4787. // For more information, see Path Pattern (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern)
  4788. // in the Amazon CloudFront Developer Guide.
  4789. //
  4790. // PathPattern is a required field
  4791. PathPattern *string `type:"string" required:"true"`
  4792. // Indicates whether you want to distribute media files in the Microsoft Smooth
  4793. // Streaming format using the origin that is associated with this cache behavior.
  4794. // If so, specify true; if not, specify false. If you specify true for SmoothStreaming,
  4795. // you can still distribute other content using this cache behavior if the content
  4796. // matches the value of PathPattern.
  4797. SmoothStreaming *bool `type:"boolean"`
  4798. // The value of ID for the origin that you want CloudFront to route requests
  4799. // to when a request matches the path pattern either for a cache behavior or
  4800. // for the default cache behavior in your distribution.
  4801. //
  4802. // TargetOriginId is a required field
  4803. TargetOriginId *string `type:"string" required:"true"`
  4804. // A complex type that specifies the AWS accounts, if any, that you want to
  4805. // allow to create signed URLs for private content.
  4806. //
  4807. // If you want to require signed URLs in requests for objects in the target
  4808. // origin that match the PathPattern for this cache behavior, specify true for
  4809. // Enabled, and specify the applicable values for Quantity and Items. For more
  4810. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  4811. // in the Amazon Amazon CloudFront Developer Guide.
  4812. //
  4813. // If you don't want to require signed URLs in requests for objects that match
  4814. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  4815. //
  4816. // To add, change, or remove one or more trusted signers, change Enabled to
  4817. // true (if it's currently false), change Quantity as applicable, and specify
  4818. // all of the trusted signers that you want to include in the updated distribution.
  4819. //
  4820. // TrustedSigners is a required field
  4821. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  4822. // The protocol that viewers can use to access the files in the origin specified
  4823. // by TargetOriginId when a request matches the path pattern in PathPattern.
  4824. // You can specify the following options:
  4825. //
  4826. // * allow-all: Viewers can use HTTP or HTTPS.
  4827. //
  4828. // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns
  4829. // an HTTP status code of 301 (Moved Permanently) to the viewer along with
  4830. // the HTTPS URL. The viewer then resubmits the request using the new URL.
  4831. //
  4832. //
  4833. // * https-only: If a viewer sends an HTTP request, CloudFront returns an
  4834. // HTTP status code of 403 (Forbidden).
  4835. //
  4836. // For more information about requiring the HTTPS protocol, see Using an HTTPS
  4837. // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  4838. // in the Amazon CloudFront Developer Guide.
  4839. //
  4840. // The only way to guarantee that viewers retrieve an object that was fetched
  4841. // from the origin using HTTPS is never to use any other protocol to fetch the
  4842. // object. If you have recently changed from HTTP to HTTPS, we recommend that
  4843. // you clear your objects' cache because cached objects are protocol agnostic.
  4844. // That means that an edge location will return an object from the cache regardless
  4845. // of whether the current request protocol matches the protocol used previously.
  4846. // For more information, see Specifying How Long Objects and Errors Stay in
  4847. // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  4848. // in the Amazon CloudFront Developer Guide.
  4849. //
  4850. // ViewerProtocolPolicy is a required field
  4851. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  4852. }
  4853. // String returns the string representation
  4854. func (s CacheBehavior) String() string {
  4855. return awsutil.Prettify(s)
  4856. }
  4857. // GoString returns the string representation
  4858. func (s CacheBehavior) GoString() string {
  4859. return s.String()
  4860. }
  4861. // Validate inspects the fields of the type to determine if they are valid.
  4862. func (s *CacheBehavior) Validate() error {
  4863. invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"}
  4864. if s.ForwardedValues == nil {
  4865. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  4866. }
  4867. if s.MinTTL == nil {
  4868. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  4869. }
  4870. if s.PathPattern == nil {
  4871. invalidParams.Add(request.NewErrParamRequired("PathPattern"))
  4872. }
  4873. if s.TargetOriginId == nil {
  4874. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  4875. }
  4876. if s.TrustedSigners == nil {
  4877. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  4878. }
  4879. if s.ViewerProtocolPolicy == nil {
  4880. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  4881. }
  4882. if s.AllowedMethods != nil {
  4883. if err := s.AllowedMethods.Validate(); err != nil {
  4884. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  4885. }
  4886. }
  4887. if s.ForwardedValues != nil {
  4888. if err := s.ForwardedValues.Validate(); err != nil {
  4889. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  4890. }
  4891. }
  4892. if s.LambdaFunctionAssociations != nil {
  4893. if err := s.LambdaFunctionAssociations.Validate(); err != nil {
  4894. invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams))
  4895. }
  4896. }
  4897. if s.TrustedSigners != nil {
  4898. if err := s.TrustedSigners.Validate(); err != nil {
  4899. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  4900. }
  4901. }
  4902. if invalidParams.Len() > 0 {
  4903. return invalidParams
  4904. }
  4905. return nil
  4906. }
  4907. // SetAllowedMethods sets the AllowedMethods field's value.
  4908. func (s *CacheBehavior) SetAllowedMethods(v *AllowedMethods) *CacheBehavior {
  4909. s.AllowedMethods = v
  4910. return s
  4911. }
  4912. // SetCompress sets the Compress field's value.
  4913. func (s *CacheBehavior) SetCompress(v bool) *CacheBehavior {
  4914. s.Compress = &v
  4915. return s
  4916. }
  4917. // SetDefaultTTL sets the DefaultTTL field's value.
  4918. func (s *CacheBehavior) SetDefaultTTL(v int64) *CacheBehavior {
  4919. s.DefaultTTL = &v
  4920. return s
  4921. }
  4922. // SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value.
  4923. func (s *CacheBehavior) SetFieldLevelEncryptionId(v string) *CacheBehavior {
  4924. s.FieldLevelEncryptionId = &v
  4925. return s
  4926. }
  4927. // SetForwardedValues sets the ForwardedValues field's value.
  4928. func (s *CacheBehavior) SetForwardedValues(v *ForwardedValues) *CacheBehavior {
  4929. s.ForwardedValues = v
  4930. return s
  4931. }
  4932. // SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value.
  4933. func (s *CacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *CacheBehavior {
  4934. s.LambdaFunctionAssociations = v
  4935. return s
  4936. }
  4937. // SetMaxTTL sets the MaxTTL field's value.
  4938. func (s *CacheBehavior) SetMaxTTL(v int64) *CacheBehavior {
  4939. s.MaxTTL = &v
  4940. return s
  4941. }
  4942. // SetMinTTL sets the MinTTL field's value.
  4943. func (s *CacheBehavior) SetMinTTL(v int64) *CacheBehavior {
  4944. s.MinTTL = &v
  4945. return s
  4946. }
  4947. // SetPathPattern sets the PathPattern field's value.
  4948. func (s *CacheBehavior) SetPathPattern(v string) *CacheBehavior {
  4949. s.PathPattern = &v
  4950. return s
  4951. }
  4952. // SetSmoothStreaming sets the SmoothStreaming field's value.
  4953. func (s *CacheBehavior) SetSmoothStreaming(v bool) *CacheBehavior {
  4954. s.SmoothStreaming = &v
  4955. return s
  4956. }
  4957. // SetTargetOriginId sets the TargetOriginId field's value.
  4958. func (s *CacheBehavior) SetTargetOriginId(v string) *CacheBehavior {
  4959. s.TargetOriginId = &v
  4960. return s
  4961. }
  4962. // SetTrustedSigners sets the TrustedSigners field's value.
  4963. func (s *CacheBehavior) SetTrustedSigners(v *TrustedSigners) *CacheBehavior {
  4964. s.TrustedSigners = v
  4965. return s
  4966. }
  4967. // SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value.
  4968. func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior {
  4969. s.ViewerProtocolPolicy = &v
  4970. return s
  4971. }
  4972. // A complex type that contains zero or more CacheBehavior elements.
  4973. type CacheBehaviors struct {
  4974. _ struct{} `type:"structure"`
  4975. // Optional: A complex type that contains cache behaviors for this distribution.
  4976. // If Quantity is 0, you can omit Items.
  4977. Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"`
  4978. // The number of cache behaviors for this distribution.
  4979. //
  4980. // Quantity is a required field
  4981. Quantity *int64 `type:"integer" required:"true"`
  4982. }
  4983. // String returns the string representation
  4984. func (s CacheBehaviors) String() string {
  4985. return awsutil.Prettify(s)
  4986. }
  4987. // GoString returns the string representation
  4988. func (s CacheBehaviors) GoString() string {
  4989. return s.String()
  4990. }
  4991. // Validate inspects the fields of the type to determine if they are valid.
  4992. func (s *CacheBehaviors) Validate() error {
  4993. invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"}
  4994. if s.Quantity == nil {
  4995. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4996. }
  4997. if s.Items != nil {
  4998. for i, v := range s.Items {
  4999. if v == nil {
  5000. continue
  5001. }
  5002. if err := v.Validate(); err != nil {
  5003. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  5004. }
  5005. }
  5006. }
  5007. if invalidParams.Len() > 0 {
  5008. return invalidParams
  5009. }
  5010. return nil
  5011. }
  5012. // SetItems sets the Items field's value.
  5013. func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors {
  5014. s.Items = v
  5015. return s
  5016. }
  5017. // SetQuantity sets the Quantity field's value.
  5018. func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors {
  5019. s.Quantity = &v
  5020. return s
  5021. }
  5022. // A complex type that controls whether CloudFront caches the response to requests
  5023. // using the specified HTTP methods. There are two choices:
  5024. //
  5025. // * CloudFront caches responses to GET and HEAD requests.
  5026. //
  5027. // * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
  5028. //
  5029. // If you pick the second choice for your Amazon S3 Origin, you may need to
  5030. // forward Access-Control-Request-Method, Access-Control-Request-Headers, and
  5031. // Origin headers for the responses to be cached correctly.
  5032. type CachedMethods struct {
  5033. _ struct{} `type:"structure"`
  5034. // A complex type that contains the HTTP methods that you want CloudFront to
  5035. // cache responses to.
  5036. //
  5037. // Items is a required field
  5038. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  5039. // The number of HTTP methods for which you want CloudFront to cache responses.
  5040. // Valid values are 2 (for caching responses to GET and HEAD requests) and 3
  5041. // (for caching responses to GET, HEAD, and OPTIONS requests).
  5042. //
  5043. // Quantity is a required field
  5044. Quantity *int64 `type:"integer" required:"true"`
  5045. }
  5046. // String returns the string representation
  5047. func (s CachedMethods) String() string {
  5048. return awsutil.Prettify(s)
  5049. }
  5050. // GoString returns the string representation
  5051. func (s CachedMethods) GoString() string {
  5052. return s.String()
  5053. }
  5054. // Validate inspects the fields of the type to determine if they are valid.
  5055. func (s *CachedMethods) Validate() error {
  5056. invalidParams := request.ErrInvalidParams{Context: "CachedMethods"}
  5057. if s.Items == nil {
  5058. invalidParams.Add(request.NewErrParamRequired("Items"))
  5059. }
  5060. if s.Quantity == nil {
  5061. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5062. }
  5063. if invalidParams.Len() > 0 {
  5064. return invalidParams
  5065. }
  5066. return nil
  5067. }
  5068. // SetItems sets the Items field's value.
  5069. func (s *CachedMethods) SetItems(v []*string) *CachedMethods {
  5070. s.Items = v
  5071. return s
  5072. }
  5073. // SetQuantity sets the Quantity field's value.
  5074. func (s *CachedMethods) SetQuantity(v int64) *CachedMethods {
  5075. s.Quantity = &v
  5076. return s
  5077. }
  5078. // A field-level encryption content type profile.
  5079. type ContentTypeProfile struct {
  5080. _ struct{} `type:"structure"`
  5081. // The content type for a field-level encryption content type-profile mapping.
  5082. //
  5083. // ContentType is a required field
  5084. ContentType *string `type:"string" required:"true"`
  5085. // The format for a field-level encryption content type-profile mapping.
  5086. //
  5087. // Format is a required field
  5088. Format *string `type:"string" required:"true" enum:"Format"`
  5089. // The profile ID for a field-level encryption content type-profile mapping.
  5090. ProfileId *string `type:"string"`
  5091. }
  5092. // String returns the string representation
  5093. func (s ContentTypeProfile) String() string {
  5094. return awsutil.Prettify(s)
  5095. }
  5096. // GoString returns the string representation
  5097. func (s ContentTypeProfile) GoString() string {
  5098. return s.String()
  5099. }
  5100. // Validate inspects the fields of the type to determine if they are valid.
  5101. func (s *ContentTypeProfile) Validate() error {
  5102. invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfile"}
  5103. if s.ContentType == nil {
  5104. invalidParams.Add(request.NewErrParamRequired("ContentType"))
  5105. }
  5106. if s.Format == nil {
  5107. invalidParams.Add(request.NewErrParamRequired("Format"))
  5108. }
  5109. if invalidParams.Len() > 0 {
  5110. return invalidParams
  5111. }
  5112. return nil
  5113. }
  5114. // SetContentType sets the ContentType field's value.
  5115. func (s *ContentTypeProfile) SetContentType(v string) *ContentTypeProfile {
  5116. s.ContentType = &v
  5117. return s
  5118. }
  5119. // SetFormat sets the Format field's value.
  5120. func (s *ContentTypeProfile) SetFormat(v string) *ContentTypeProfile {
  5121. s.Format = &v
  5122. return s
  5123. }
  5124. // SetProfileId sets the ProfileId field's value.
  5125. func (s *ContentTypeProfile) SetProfileId(v string) *ContentTypeProfile {
  5126. s.ProfileId = &v
  5127. return s
  5128. }
  5129. // The configuration for a field-level encryption content type-profile mapping.
  5130. type ContentTypeProfileConfig struct {
  5131. _ struct{} `type:"structure"`
  5132. // The configuration for a field-level encryption content type-profile.
  5133. ContentTypeProfiles *ContentTypeProfiles `type:"structure"`
  5134. // The setting in a field-level encryption content type-profile mapping that
  5135. // specifies what to do when an unknown content type is provided for the profile.
  5136. // If true, content is forwarded without being encrypted when the content type
  5137. // is unknown. If false (the default), an error is returned when the content
  5138. // type is unknown.
  5139. //
  5140. // ForwardWhenContentTypeIsUnknown is a required field
  5141. ForwardWhenContentTypeIsUnknown *bool `type:"boolean" required:"true"`
  5142. }
  5143. // String returns the string representation
  5144. func (s ContentTypeProfileConfig) String() string {
  5145. return awsutil.Prettify(s)
  5146. }
  5147. // GoString returns the string representation
  5148. func (s ContentTypeProfileConfig) GoString() string {
  5149. return s.String()
  5150. }
  5151. // Validate inspects the fields of the type to determine if they are valid.
  5152. func (s *ContentTypeProfileConfig) Validate() error {
  5153. invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfileConfig"}
  5154. if s.ForwardWhenContentTypeIsUnknown == nil {
  5155. invalidParams.Add(request.NewErrParamRequired("ForwardWhenContentTypeIsUnknown"))
  5156. }
  5157. if s.ContentTypeProfiles != nil {
  5158. if err := s.ContentTypeProfiles.Validate(); err != nil {
  5159. invalidParams.AddNested("ContentTypeProfiles", err.(request.ErrInvalidParams))
  5160. }
  5161. }
  5162. if invalidParams.Len() > 0 {
  5163. return invalidParams
  5164. }
  5165. return nil
  5166. }
  5167. // SetContentTypeProfiles sets the ContentTypeProfiles field's value.
  5168. func (s *ContentTypeProfileConfig) SetContentTypeProfiles(v *ContentTypeProfiles) *ContentTypeProfileConfig {
  5169. s.ContentTypeProfiles = v
  5170. return s
  5171. }
  5172. // SetForwardWhenContentTypeIsUnknown sets the ForwardWhenContentTypeIsUnknown field's value.
  5173. func (s *ContentTypeProfileConfig) SetForwardWhenContentTypeIsUnknown(v bool) *ContentTypeProfileConfig {
  5174. s.ForwardWhenContentTypeIsUnknown = &v
  5175. return s
  5176. }
  5177. // Field-level encryption content type-profile.
  5178. type ContentTypeProfiles struct {
  5179. _ struct{} `type:"structure"`
  5180. // Items in a field-level encryption content type-profile mapping.
  5181. Items []*ContentTypeProfile `locationNameList:"ContentTypeProfile" type:"list"`
  5182. // The number of field-level encryption content type-profile mappings.
  5183. //
  5184. // Quantity is a required field
  5185. Quantity *int64 `type:"integer" required:"true"`
  5186. }
  5187. // String returns the string representation
  5188. func (s ContentTypeProfiles) String() string {
  5189. return awsutil.Prettify(s)
  5190. }
  5191. // GoString returns the string representation
  5192. func (s ContentTypeProfiles) GoString() string {
  5193. return s.String()
  5194. }
  5195. // Validate inspects the fields of the type to determine if they are valid.
  5196. func (s *ContentTypeProfiles) Validate() error {
  5197. invalidParams := request.ErrInvalidParams{Context: "ContentTypeProfiles"}
  5198. if s.Quantity == nil {
  5199. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5200. }
  5201. if s.Items != nil {
  5202. for i, v := range s.Items {
  5203. if v == nil {
  5204. continue
  5205. }
  5206. if err := v.Validate(); err != nil {
  5207. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  5208. }
  5209. }
  5210. }
  5211. if invalidParams.Len() > 0 {
  5212. return invalidParams
  5213. }
  5214. return nil
  5215. }
  5216. // SetItems sets the Items field's value.
  5217. func (s *ContentTypeProfiles) SetItems(v []*ContentTypeProfile) *ContentTypeProfiles {
  5218. s.Items = v
  5219. return s
  5220. }
  5221. // SetQuantity sets the Quantity field's value.
  5222. func (s *ContentTypeProfiles) SetQuantity(v int64) *ContentTypeProfiles {
  5223. s.Quantity = &v
  5224. return s
  5225. }
  5226. // A complex type that specifies whether you want CloudFront to forward cookies
  5227. // to the origin and, if so, which ones. For more information about forwarding
  5228. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  5229. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  5230. // in the Amazon CloudFront Developer Guide.
  5231. type CookieNames struct {
  5232. _ struct{} `type:"structure"`
  5233. // A complex type that contains one Name element for each cookie that you want
  5234. // CloudFront to forward to the origin for this cache behavior.
  5235. Items []*string `locationNameList:"Name" type:"list"`
  5236. // The number of different cookies that you want CloudFront to forward to the
  5237. // origin for this cache behavior.
  5238. //
  5239. // Quantity is a required field
  5240. Quantity *int64 `type:"integer" required:"true"`
  5241. }
  5242. // String returns the string representation
  5243. func (s CookieNames) String() string {
  5244. return awsutil.Prettify(s)
  5245. }
  5246. // GoString returns the string representation
  5247. func (s CookieNames) GoString() string {
  5248. return s.String()
  5249. }
  5250. // Validate inspects the fields of the type to determine if they are valid.
  5251. func (s *CookieNames) Validate() error {
  5252. invalidParams := request.ErrInvalidParams{Context: "CookieNames"}
  5253. if s.Quantity == nil {
  5254. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5255. }
  5256. if invalidParams.Len() > 0 {
  5257. return invalidParams
  5258. }
  5259. return nil
  5260. }
  5261. // SetItems sets the Items field's value.
  5262. func (s *CookieNames) SetItems(v []*string) *CookieNames {
  5263. s.Items = v
  5264. return s
  5265. }
  5266. // SetQuantity sets the Quantity field's value.
  5267. func (s *CookieNames) SetQuantity(v int64) *CookieNames {
  5268. s.Quantity = &v
  5269. return s
  5270. }
  5271. // A complex type that specifies whether you want CloudFront to forward cookies
  5272. // to the origin and, if so, which ones. For more information about forwarding
  5273. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  5274. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  5275. // in the Amazon CloudFront Developer Guide.
  5276. type CookiePreference struct {
  5277. _ struct{} `type:"structure"`
  5278. // Specifies which cookies to forward to the origin for this cache behavior:
  5279. // all, none, or the list of cookies specified in the WhitelistedNames complex
  5280. // type.
  5281. //
  5282. // Amazon S3 doesn't process cookies. When the cache behavior is forwarding
  5283. // requests to an Amazon S3 origin, specify none for the Forward element.
  5284. //
  5285. // Forward is a required field
  5286. Forward *string `type:"string" required:"true" enum:"ItemSelection"`
  5287. // Required if you specify whitelist for the value of Forward:. A complex type
  5288. // that specifies how many different cookies you want CloudFront to forward
  5289. // to the origin for this cache behavior and, if you want to forward selected
  5290. // cookies, the names of those cookies.
  5291. //
  5292. // If you specify all or none for the value of Forward, omit WhitelistedNames.
  5293. // If you change the value of Forward from whitelist to all or none and you
  5294. // don't delete the WhitelistedNames element and its child elements, CloudFront
  5295. // deletes them automatically.
  5296. //
  5297. // For the current limit on the number of cookie names that you can whitelist
  5298. // for each cache behavior, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  5299. // in the AWS General Reference.
  5300. WhitelistedNames *CookieNames `type:"structure"`
  5301. }
  5302. // String returns the string representation
  5303. func (s CookiePreference) String() string {
  5304. return awsutil.Prettify(s)
  5305. }
  5306. // GoString returns the string representation
  5307. func (s CookiePreference) GoString() string {
  5308. return s.String()
  5309. }
  5310. // Validate inspects the fields of the type to determine if they are valid.
  5311. func (s *CookiePreference) Validate() error {
  5312. invalidParams := request.ErrInvalidParams{Context: "CookiePreference"}
  5313. if s.Forward == nil {
  5314. invalidParams.Add(request.NewErrParamRequired("Forward"))
  5315. }
  5316. if s.WhitelistedNames != nil {
  5317. if err := s.WhitelistedNames.Validate(); err != nil {
  5318. invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams))
  5319. }
  5320. }
  5321. if invalidParams.Len() > 0 {
  5322. return invalidParams
  5323. }
  5324. return nil
  5325. }
  5326. // SetForward sets the Forward field's value.
  5327. func (s *CookiePreference) SetForward(v string) *CookiePreference {
  5328. s.Forward = &v
  5329. return s
  5330. }
  5331. // SetWhitelistedNames sets the WhitelistedNames field's value.
  5332. func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference {
  5333. s.WhitelistedNames = v
  5334. return s
  5335. }
  5336. // The request to create a new origin access identity.
  5337. type CreateCloudFrontOriginAccessIdentityInput struct {
  5338. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  5339. // The current configuration information for the identity.
  5340. //
  5341. // CloudFrontOriginAccessIdentityConfig is a required field
  5342. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5343. }
  5344. // String returns the string representation
  5345. func (s CreateCloudFrontOriginAccessIdentityInput) String() string {
  5346. return awsutil.Prettify(s)
  5347. }
  5348. // GoString returns the string representation
  5349. func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string {
  5350. return s.String()
  5351. }
  5352. // Validate inspects the fields of the type to determine if they are valid.
  5353. func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error {
  5354. invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"}
  5355. if s.CloudFrontOriginAccessIdentityConfig == nil {
  5356. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  5357. }
  5358. if s.CloudFrontOriginAccessIdentityConfig != nil {
  5359. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  5360. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  5361. }
  5362. }
  5363. if invalidParams.Len() > 0 {
  5364. return invalidParams
  5365. }
  5366. return nil
  5367. }
  5368. // SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value.
  5369. func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *CreateCloudFrontOriginAccessIdentityInput {
  5370. s.CloudFrontOriginAccessIdentityConfig = v
  5371. return s
  5372. }
  5373. // The returned result of the corresponding request.
  5374. type CreateCloudFrontOriginAccessIdentityOutput struct {
  5375. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  5376. // The origin access identity's information.
  5377. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  5378. // The current version of the origin access identity created.
  5379. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5380. // The fully qualified URI of the new origin access identity just created. For
  5381. // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A.
  5382. Location *string `location:"header" locationName:"Location" type:"string"`
  5383. }
  5384. // String returns the string representation
  5385. func (s CreateCloudFrontOriginAccessIdentityOutput) String() string {
  5386. return awsutil.Prettify(s)
  5387. }
  5388. // GoString returns the string representation
  5389. func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string {
  5390. return s.String()
  5391. }
  5392. // SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value.
  5393. func (s *CreateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *CreateCloudFrontOriginAccessIdentityOutput {
  5394. s.CloudFrontOriginAccessIdentity = v
  5395. return s
  5396. }
  5397. // SetETag sets the ETag field's value.
  5398. func (s *CreateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *CreateCloudFrontOriginAccessIdentityOutput {
  5399. s.ETag = &v
  5400. return s
  5401. }
  5402. // SetLocation sets the Location field's value.
  5403. func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *CreateCloudFrontOriginAccessIdentityOutput {
  5404. s.Location = &v
  5405. return s
  5406. }
  5407. // The request to create a new distribution.
  5408. type CreateDistributionInput struct {
  5409. _ struct{} `type:"structure" payload:"DistributionConfig"`
  5410. // The distribution's configuration information.
  5411. //
  5412. // DistributionConfig is a required field
  5413. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5414. }
  5415. // String returns the string representation
  5416. func (s CreateDistributionInput) String() string {
  5417. return awsutil.Prettify(s)
  5418. }
  5419. // GoString returns the string representation
  5420. func (s CreateDistributionInput) GoString() string {
  5421. return s.String()
  5422. }
  5423. // Validate inspects the fields of the type to determine if they are valid.
  5424. func (s *CreateDistributionInput) Validate() error {
  5425. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"}
  5426. if s.DistributionConfig == nil {
  5427. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  5428. }
  5429. if s.DistributionConfig != nil {
  5430. if err := s.DistributionConfig.Validate(); err != nil {
  5431. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  5432. }
  5433. }
  5434. if invalidParams.Len() > 0 {
  5435. return invalidParams
  5436. }
  5437. return nil
  5438. }
  5439. // SetDistributionConfig sets the DistributionConfig field's value.
  5440. func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) *CreateDistributionInput {
  5441. s.DistributionConfig = v
  5442. return s
  5443. }
  5444. // The returned result of the corresponding request.
  5445. type CreateDistributionOutput struct {
  5446. _ struct{} `type:"structure" payload:"Distribution"`
  5447. // The distribution's information.
  5448. Distribution *Distribution `type:"structure"`
  5449. // The current version of the distribution created.
  5450. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5451. // The fully qualified URI of the new distribution resource just created. For
  5452. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  5453. Location *string `location:"header" locationName:"Location" type:"string"`
  5454. }
  5455. // String returns the string representation
  5456. func (s CreateDistributionOutput) String() string {
  5457. return awsutil.Prettify(s)
  5458. }
  5459. // GoString returns the string representation
  5460. func (s CreateDistributionOutput) GoString() string {
  5461. return s.String()
  5462. }
  5463. // SetDistribution sets the Distribution field's value.
  5464. func (s *CreateDistributionOutput) SetDistribution(v *Distribution) *CreateDistributionOutput {
  5465. s.Distribution = v
  5466. return s
  5467. }
  5468. // SetETag sets the ETag field's value.
  5469. func (s *CreateDistributionOutput) SetETag(v string) *CreateDistributionOutput {
  5470. s.ETag = &v
  5471. return s
  5472. }
  5473. // SetLocation sets the Location field's value.
  5474. func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutput {
  5475. s.Location = &v
  5476. return s
  5477. }
  5478. // The request to create a new distribution with tags.
  5479. type CreateDistributionWithTagsInput struct {
  5480. _ struct{} `type:"structure" payload:"DistributionConfigWithTags"`
  5481. // The distribution's configuration information.
  5482. //
  5483. // DistributionConfigWithTags is a required field
  5484. DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5485. }
  5486. // String returns the string representation
  5487. func (s CreateDistributionWithTagsInput) String() string {
  5488. return awsutil.Prettify(s)
  5489. }
  5490. // GoString returns the string representation
  5491. func (s CreateDistributionWithTagsInput) GoString() string {
  5492. return s.String()
  5493. }
  5494. // Validate inspects the fields of the type to determine if they are valid.
  5495. func (s *CreateDistributionWithTagsInput) Validate() error {
  5496. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"}
  5497. if s.DistributionConfigWithTags == nil {
  5498. invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags"))
  5499. }
  5500. if s.DistributionConfigWithTags != nil {
  5501. if err := s.DistributionConfigWithTags.Validate(); err != nil {
  5502. invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams))
  5503. }
  5504. }
  5505. if invalidParams.Len() > 0 {
  5506. return invalidParams
  5507. }
  5508. return nil
  5509. }
  5510. // SetDistributionConfigWithTags sets the DistributionConfigWithTags field's value.
  5511. func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *DistributionConfigWithTags) *CreateDistributionWithTagsInput {
  5512. s.DistributionConfigWithTags = v
  5513. return s
  5514. }
  5515. // The returned result of the corresponding request.
  5516. type CreateDistributionWithTagsOutput struct {
  5517. _ struct{} `type:"structure" payload:"Distribution"`
  5518. // The distribution's information.
  5519. Distribution *Distribution `type:"structure"`
  5520. // The current version of the distribution created.
  5521. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5522. // The fully qualified URI of the new distribution resource just created. For
  5523. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  5524. Location *string `location:"header" locationName:"Location" type:"string"`
  5525. }
  5526. // String returns the string representation
  5527. func (s CreateDistributionWithTagsOutput) String() string {
  5528. return awsutil.Prettify(s)
  5529. }
  5530. // GoString returns the string representation
  5531. func (s CreateDistributionWithTagsOutput) GoString() string {
  5532. return s.String()
  5533. }
  5534. // SetDistribution sets the Distribution field's value.
  5535. func (s *CreateDistributionWithTagsOutput) SetDistribution(v *Distribution) *CreateDistributionWithTagsOutput {
  5536. s.Distribution = v
  5537. return s
  5538. }
  5539. // SetETag sets the ETag field's value.
  5540. func (s *CreateDistributionWithTagsOutput) SetETag(v string) *CreateDistributionWithTagsOutput {
  5541. s.ETag = &v
  5542. return s
  5543. }
  5544. // SetLocation sets the Location field's value.
  5545. func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistributionWithTagsOutput {
  5546. s.Location = &v
  5547. return s
  5548. }
  5549. type CreateFieldLevelEncryptionConfigInput struct {
  5550. _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"`
  5551. // The request to create a new field-level encryption configuration.
  5552. //
  5553. // FieldLevelEncryptionConfig is a required field
  5554. FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5555. }
  5556. // String returns the string representation
  5557. func (s CreateFieldLevelEncryptionConfigInput) String() string {
  5558. return awsutil.Prettify(s)
  5559. }
  5560. // GoString returns the string representation
  5561. func (s CreateFieldLevelEncryptionConfigInput) GoString() string {
  5562. return s.String()
  5563. }
  5564. // Validate inspects the fields of the type to determine if they are valid.
  5565. func (s *CreateFieldLevelEncryptionConfigInput) Validate() error {
  5566. invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionConfigInput"}
  5567. if s.FieldLevelEncryptionConfig == nil {
  5568. invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig"))
  5569. }
  5570. if s.FieldLevelEncryptionConfig != nil {
  5571. if err := s.FieldLevelEncryptionConfig.Validate(); err != nil {
  5572. invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams))
  5573. }
  5574. }
  5575. if invalidParams.Len() > 0 {
  5576. return invalidParams
  5577. }
  5578. return nil
  5579. }
  5580. // SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value.
  5581. func (s *CreateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *CreateFieldLevelEncryptionConfigInput {
  5582. s.FieldLevelEncryptionConfig = v
  5583. return s
  5584. }
  5585. type CreateFieldLevelEncryptionConfigOutput struct {
  5586. _ struct{} `type:"structure" payload:"FieldLevelEncryption"`
  5587. // The current version of the field level encryption configuration. For example:
  5588. // E2QWRUHAPOMQZL.
  5589. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5590. // Returned when you create a new field-level encryption configuration.
  5591. FieldLevelEncryption *FieldLevelEncryption `type:"structure"`
  5592. // The fully qualified URI of the new configuration resource just created. For
  5593. // example: https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-config/EDFDVBD632BHDS5.
  5594. Location *string `location:"header" locationName:"Location" type:"string"`
  5595. }
  5596. // String returns the string representation
  5597. func (s CreateFieldLevelEncryptionConfigOutput) String() string {
  5598. return awsutil.Prettify(s)
  5599. }
  5600. // GoString returns the string representation
  5601. func (s CreateFieldLevelEncryptionConfigOutput) GoString() string {
  5602. return s.String()
  5603. }
  5604. // SetETag sets the ETag field's value.
  5605. func (s *CreateFieldLevelEncryptionConfigOutput) SetETag(v string) *CreateFieldLevelEncryptionConfigOutput {
  5606. s.ETag = &v
  5607. return s
  5608. }
  5609. // SetFieldLevelEncryption sets the FieldLevelEncryption field's value.
  5610. func (s *CreateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *CreateFieldLevelEncryptionConfigOutput {
  5611. s.FieldLevelEncryption = v
  5612. return s
  5613. }
  5614. // SetLocation sets the Location field's value.
  5615. func (s *CreateFieldLevelEncryptionConfigOutput) SetLocation(v string) *CreateFieldLevelEncryptionConfigOutput {
  5616. s.Location = &v
  5617. return s
  5618. }
  5619. type CreateFieldLevelEncryptionProfileInput struct {
  5620. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"`
  5621. // The request to create a field-level encryption profile.
  5622. //
  5623. // FieldLevelEncryptionProfileConfig is a required field
  5624. FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5625. }
  5626. // String returns the string representation
  5627. func (s CreateFieldLevelEncryptionProfileInput) String() string {
  5628. return awsutil.Prettify(s)
  5629. }
  5630. // GoString returns the string representation
  5631. func (s CreateFieldLevelEncryptionProfileInput) GoString() string {
  5632. return s.String()
  5633. }
  5634. // Validate inspects the fields of the type to determine if they are valid.
  5635. func (s *CreateFieldLevelEncryptionProfileInput) Validate() error {
  5636. invalidParams := request.ErrInvalidParams{Context: "CreateFieldLevelEncryptionProfileInput"}
  5637. if s.FieldLevelEncryptionProfileConfig == nil {
  5638. invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig"))
  5639. }
  5640. if s.FieldLevelEncryptionProfileConfig != nil {
  5641. if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil {
  5642. invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams))
  5643. }
  5644. }
  5645. if invalidParams.Len() > 0 {
  5646. return invalidParams
  5647. }
  5648. return nil
  5649. }
  5650. // SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value.
  5651. func (s *CreateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *CreateFieldLevelEncryptionProfileInput {
  5652. s.FieldLevelEncryptionProfileConfig = v
  5653. return s
  5654. }
  5655. type CreateFieldLevelEncryptionProfileOutput struct {
  5656. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"`
  5657. // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL.
  5658. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5659. // Returned when you create a new field-level encryption profile.
  5660. FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"`
  5661. // The fully qualified URI of the new profile resource just created. For example:
  5662. // https://cloudfront.amazonaws.com/2010-11-01/field-level-encryption-profile/EDFDVBD632BHDS5.
  5663. Location *string `location:"header" locationName:"Location" type:"string"`
  5664. }
  5665. // String returns the string representation
  5666. func (s CreateFieldLevelEncryptionProfileOutput) String() string {
  5667. return awsutil.Prettify(s)
  5668. }
  5669. // GoString returns the string representation
  5670. func (s CreateFieldLevelEncryptionProfileOutput) GoString() string {
  5671. return s.String()
  5672. }
  5673. // SetETag sets the ETag field's value.
  5674. func (s *CreateFieldLevelEncryptionProfileOutput) SetETag(v string) *CreateFieldLevelEncryptionProfileOutput {
  5675. s.ETag = &v
  5676. return s
  5677. }
  5678. // SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value.
  5679. func (s *CreateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *CreateFieldLevelEncryptionProfileOutput {
  5680. s.FieldLevelEncryptionProfile = v
  5681. return s
  5682. }
  5683. // SetLocation sets the Location field's value.
  5684. func (s *CreateFieldLevelEncryptionProfileOutput) SetLocation(v string) *CreateFieldLevelEncryptionProfileOutput {
  5685. s.Location = &v
  5686. return s
  5687. }
  5688. // The request to create an invalidation.
  5689. type CreateInvalidationInput struct {
  5690. _ struct{} `type:"structure" payload:"InvalidationBatch"`
  5691. // The distribution's id.
  5692. //
  5693. // DistributionId is a required field
  5694. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  5695. // The batch information for the invalidation.
  5696. //
  5697. // InvalidationBatch is a required field
  5698. InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5699. }
  5700. // String returns the string representation
  5701. func (s CreateInvalidationInput) String() string {
  5702. return awsutil.Prettify(s)
  5703. }
  5704. // GoString returns the string representation
  5705. func (s CreateInvalidationInput) GoString() string {
  5706. return s.String()
  5707. }
  5708. // Validate inspects the fields of the type to determine if they are valid.
  5709. func (s *CreateInvalidationInput) Validate() error {
  5710. invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"}
  5711. if s.DistributionId == nil {
  5712. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  5713. }
  5714. if s.DistributionId != nil && len(*s.DistributionId) < 1 {
  5715. invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1))
  5716. }
  5717. if s.InvalidationBatch == nil {
  5718. invalidParams.Add(request.NewErrParamRequired("InvalidationBatch"))
  5719. }
  5720. if s.InvalidationBatch != nil {
  5721. if err := s.InvalidationBatch.Validate(); err != nil {
  5722. invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams))
  5723. }
  5724. }
  5725. if invalidParams.Len() > 0 {
  5726. return invalidParams
  5727. }
  5728. return nil
  5729. }
  5730. // SetDistributionId sets the DistributionId field's value.
  5731. func (s *CreateInvalidationInput) SetDistributionId(v string) *CreateInvalidationInput {
  5732. s.DistributionId = &v
  5733. return s
  5734. }
  5735. // SetInvalidationBatch sets the InvalidationBatch field's value.
  5736. func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *CreateInvalidationInput {
  5737. s.InvalidationBatch = v
  5738. return s
  5739. }
  5740. // The returned result of the corresponding request.
  5741. type CreateInvalidationOutput struct {
  5742. _ struct{} `type:"structure" payload:"Invalidation"`
  5743. // The invalidation's information.
  5744. Invalidation *Invalidation `type:"structure"`
  5745. // The fully qualified URI of the distribution and invalidation batch request,
  5746. // including the Invalidation ID.
  5747. Location *string `location:"header" locationName:"Location" type:"string"`
  5748. }
  5749. // String returns the string representation
  5750. func (s CreateInvalidationOutput) String() string {
  5751. return awsutil.Prettify(s)
  5752. }
  5753. // GoString returns the string representation
  5754. func (s CreateInvalidationOutput) GoString() string {
  5755. return s.String()
  5756. }
  5757. // SetInvalidation sets the Invalidation field's value.
  5758. func (s *CreateInvalidationOutput) SetInvalidation(v *Invalidation) *CreateInvalidationOutput {
  5759. s.Invalidation = v
  5760. return s
  5761. }
  5762. // SetLocation sets the Location field's value.
  5763. func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutput {
  5764. s.Location = &v
  5765. return s
  5766. }
  5767. type CreatePublicKeyInput struct {
  5768. _ struct{} `type:"structure" payload:"PublicKeyConfig"`
  5769. // The request to add a public key to CloudFront.
  5770. //
  5771. // PublicKeyConfig is a required field
  5772. PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5773. }
  5774. // String returns the string representation
  5775. func (s CreatePublicKeyInput) String() string {
  5776. return awsutil.Prettify(s)
  5777. }
  5778. // GoString returns the string representation
  5779. func (s CreatePublicKeyInput) GoString() string {
  5780. return s.String()
  5781. }
  5782. // Validate inspects the fields of the type to determine if they are valid.
  5783. func (s *CreatePublicKeyInput) Validate() error {
  5784. invalidParams := request.ErrInvalidParams{Context: "CreatePublicKeyInput"}
  5785. if s.PublicKeyConfig == nil {
  5786. invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig"))
  5787. }
  5788. if s.PublicKeyConfig != nil {
  5789. if err := s.PublicKeyConfig.Validate(); err != nil {
  5790. invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams))
  5791. }
  5792. }
  5793. if invalidParams.Len() > 0 {
  5794. return invalidParams
  5795. }
  5796. return nil
  5797. }
  5798. // SetPublicKeyConfig sets the PublicKeyConfig field's value.
  5799. func (s *CreatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *CreatePublicKeyInput {
  5800. s.PublicKeyConfig = v
  5801. return s
  5802. }
  5803. type CreatePublicKeyOutput struct {
  5804. _ struct{} `type:"structure" payload:"PublicKey"`
  5805. // The current version of the public key. For example: E2QWRUHAPOMQZL.
  5806. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5807. // The fully qualified URI of the new public key resource just created. For
  5808. // example: https://cloudfront.amazonaws.com/2010-11-01/cloudfront-public-key/EDFDVBD632BHDS5.
  5809. Location *string `location:"header" locationName:"Location" type:"string"`
  5810. // Returned when you add a public key.
  5811. PublicKey *PublicKey `type:"structure"`
  5812. }
  5813. // String returns the string representation
  5814. func (s CreatePublicKeyOutput) String() string {
  5815. return awsutil.Prettify(s)
  5816. }
  5817. // GoString returns the string representation
  5818. func (s CreatePublicKeyOutput) GoString() string {
  5819. return s.String()
  5820. }
  5821. // SetETag sets the ETag field's value.
  5822. func (s *CreatePublicKeyOutput) SetETag(v string) *CreatePublicKeyOutput {
  5823. s.ETag = &v
  5824. return s
  5825. }
  5826. // SetLocation sets the Location field's value.
  5827. func (s *CreatePublicKeyOutput) SetLocation(v string) *CreatePublicKeyOutput {
  5828. s.Location = &v
  5829. return s
  5830. }
  5831. // SetPublicKey sets the PublicKey field's value.
  5832. func (s *CreatePublicKeyOutput) SetPublicKey(v *PublicKey) *CreatePublicKeyOutput {
  5833. s.PublicKey = v
  5834. return s
  5835. }
  5836. // The request to create a new streaming distribution.
  5837. type CreateStreamingDistributionInput struct {
  5838. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  5839. // The streaming distribution's configuration information.
  5840. //
  5841. // StreamingDistributionConfig is a required field
  5842. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5843. }
  5844. // String returns the string representation
  5845. func (s CreateStreamingDistributionInput) String() string {
  5846. return awsutil.Prettify(s)
  5847. }
  5848. // GoString returns the string representation
  5849. func (s CreateStreamingDistributionInput) GoString() string {
  5850. return s.String()
  5851. }
  5852. // Validate inspects the fields of the type to determine if they are valid.
  5853. func (s *CreateStreamingDistributionInput) Validate() error {
  5854. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"}
  5855. if s.StreamingDistributionConfig == nil {
  5856. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  5857. }
  5858. if s.StreamingDistributionConfig != nil {
  5859. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  5860. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  5861. }
  5862. }
  5863. if invalidParams.Len() > 0 {
  5864. return invalidParams
  5865. }
  5866. return nil
  5867. }
  5868. // SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value.
  5869. func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *CreateStreamingDistributionInput {
  5870. s.StreamingDistributionConfig = v
  5871. return s
  5872. }
  5873. // The returned result of the corresponding request.
  5874. type CreateStreamingDistributionOutput struct {
  5875. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  5876. // The current version of the streaming distribution created.
  5877. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5878. // The fully qualified URI of the new streaming distribution resource just created.
  5879. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  5880. Location *string `location:"header" locationName:"Location" type:"string"`
  5881. // The streaming distribution's information.
  5882. StreamingDistribution *StreamingDistribution `type:"structure"`
  5883. }
  5884. // String returns the string representation
  5885. func (s CreateStreamingDistributionOutput) String() string {
  5886. return awsutil.Prettify(s)
  5887. }
  5888. // GoString returns the string representation
  5889. func (s CreateStreamingDistributionOutput) GoString() string {
  5890. return s.String()
  5891. }
  5892. // SetETag sets the ETag field's value.
  5893. func (s *CreateStreamingDistributionOutput) SetETag(v string) *CreateStreamingDistributionOutput {
  5894. s.ETag = &v
  5895. return s
  5896. }
  5897. // SetLocation sets the Location field's value.
  5898. func (s *CreateStreamingDistributionOutput) SetLocation(v string) *CreateStreamingDistributionOutput {
  5899. s.Location = &v
  5900. return s
  5901. }
  5902. // SetStreamingDistribution sets the StreamingDistribution field's value.
  5903. func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionOutput {
  5904. s.StreamingDistribution = v
  5905. return s
  5906. }
  5907. // The request to create a new streaming distribution with tags.
  5908. type CreateStreamingDistributionWithTagsInput struct {
  5909. _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"`
  5910. // The streaming distribution's configuration information.
  5911. //
  5912. // StreamingDistributionConfigWithTags is a required field
  5913. StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  5914. }
  5915. // String returns the string representation
  5916. func (s CreateStreamingDistributionWithTagsInput) String() string {
  5917. return awsutil.Prettify(s)
  5918. }
  5919. // GoString returns the string representation
  5920. func (s CreateStreamingDistributionWithTagsInput) GoString() string {
  5921. return s.String()
  5922. }
  5923. // Validate inspects the fields of the type to determine if they are valid.
  5924. func (s *CreateStreamingDistributionWithTagsInput) Validate() error {
  5925. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"}
  5926. if s.StreamingDistributionConfigWithTags == nil {
  5927. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags"))
  5928. }
  5929. if s.StreamingDistributionConfigWithTags != nil {
  5930. if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil {
  5931. invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams))
  5932. }
  5933. }
  5934. if invalidParams.Len() > 0 {
  5935. return invalidParams
  5936. }
  5937. return nil
  5938. }
  5939. // SetStreamingDistributionConfigWithTags sets the StreamingDistributionConfigWithTags field's value.
  5940. func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfigWithTags(v *StreamingDistributionConfigWithTags) *CreateStreamingDistributionWithTagsInput {
  5941. s.StreamingDistributionConfigWithTags = v
  5942. return s
  5943. }
  5944. // The returned result of the corresponding request.
  5945. type CreateStreamingDistributionWithTagsOutput struct {
  5946. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  5947. // The current version of the distribution created.
  5948. ETag *string `location:"header" locationName:"ETag" type:"string"`
  5949. // The fully qualified URI of the new streaming distribution resource just created.
  5950. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  5951. Location *string `location:"header" locationName:"Location" type:"string"`
  5952. // The streaming distribution's information.
  5953. StreamingDistribution *StreamingDistribution `type:"structure"`
  5954. }
  5955. // String returns the string representation
  5956. func (s CreateStreamingDistributionWithTagsOutput) String() string {
  5957. return awsutil.Prettify(s)
  5958. }
  5959. // GoString returns the string representation
  5960. func (s CreateStreamingDistributionWithTagsOutput) GoString() string {
  5961. return s.String()
  5962. }
  5963. // SetETag sets the ETag field's value.
  5964. func (s *CreateStreamingDistributionWithTagsOutput) SetETag(v string) *CreateStreamingDistributionWithTagsOutput {
  5965. s.ETag = &v
  5966. return s
  5967. }
  5968. // SetLocation sets the Location field's value.
  5969. func (s *CreateStreamingDistributionWithTagsOutput) SetLocation(v string) *CreateStreamingDistributionWithTagsOutput {
  5970. s.Location = &v
  5971. return s
  5972. }
  5973. // SetStreamingDistribution sets the StreamingDistribution field's value.
  5974. func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v *StreamingDistribution) *CreateStreamingDistributionWithTagsOutput {
  5975. s.StreamingDistribution = v
  5976. return s
  5977. }
  5978. // A complex type that controls:
  5979. //
  5980. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  5981. // with custom error messages before returning the response to the viewer.
  5982. //
  5983. //
  5984. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  5985. //
  5986. // For more information about custom error pages, see Customizing Error Responses
  5987. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  5988. // in the Amazon CloudFront Developer Guide.
  5989. type CustomErrorResponse struct {
  5990. _ struct{} `type:"structure"`
  5991. // The minimum amount of time, in seconds, that you want CloudFront to cache
  5992. // the HTTP status code specified in ErrorCode. When this time period has elapsed,
  5993. // CloudFront queries your origin to see whether the problem that caused the
  5994. // error has been resolved and the requested object is now available.
  5995. //
  5996. // If you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>,
  5997. // in the XML document.
  5998. //
  5999. // For more information, see Customizing Error Responses (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  6000. // in the Amazon CloudFront Developer Guide.
  6001. ErrorCachingMinTTL *int64 `type:"long"`
  6002. // The HTTP status code for which you want to specify a custom error page and/or
  6003. // a caching duration.
  6004. //
  6005. // ErrorCode is a required field
  6006. ErrorCode *int64 `type:"integer" required:"true"`
  6007. // The HTTP status code that you want CloudFront to return to the viewer along
  6008. // with the custom error page. There are a variety of reasons that you might
  6009. // want CloudFront to return a status code different from the status code that
  6010. // your origin returned to CloudFront, for example:
  6011. //
  6012. // * Some Internet devices (some firewalls and corporate proxies, for example)
  6013. // intercept HTTP 4xx and 5xx and prevent the response from being returned
  6014. // to the viewer. If you substitute 200, the response typically won't be
  6015. // intercepted.
  6016. //
  6017. // * If you don't care about distinguishing among different client errors
  6018. // or server errors, you can specify 400 or 500 as the ResponseCode for all
  6019. // 4xx or 5xx errors.
  6020. //
  6021. // * You might want to return a 200 status code (OK) and static website so
  6022. // your customers don't know that your website is down.
  6023. //
  6024. // If you specify a value for ResponseCode, you must also specify a value for
  6025. // ResponsePagePath. If you don't want to specify a value, include an empty
  6026. // element, <ResponseCode>, in the XML document.
  6027. ResponseCode *string `type:"string"`
  6028. // The path to the custom error page that you want CloudFront to return to a
  6029. // viewer when your origin returns the HTTP status code specified by ErrorCode,
  6030. // for example, /4xx-errors/403-forbidden.html. If you want to store your objects
  6031. // and your custom error pages in different locations, your distribution must
  6032. // include a cache behavior for which the following is true:
  6033. //
  6034. // * The value of PathPattern matches the path to your custom error messages.
  6035. // For example, suppose you saved custom error pages for 4xx errors in an
  6036. // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must
  6037. // include a cache behavior for which the path pattern routes requests for
  6038. // your custom error pages to that location, for example, /4xx-errors/*.
  6039. //
  6040. //
  6041. // * The value of TargetOriginId specifies the value of the ID element for
  6042. // the origin that contains your custom error pages.
  6043. //
  6044. // If you specify a value for ResponsePagePath, you must also specify a value
  6045. // for ResponseCode. If you don't want to specify a value, include an empty
  6046. // element, <ResponsePagePath>, in the XML document.
  6047. //
  6048. // We recommend that you store custom error pages in an Amazon S3 bucket. If
  6049. // you store custom error pages on an HTTP server and the server starts to return
  6050. // 5xx errors, CloudFront can't get the files that you want to return to viewers
  6051. // because the origin server is unavailable.
  6052. ResponsePagePath *string `type:"string"`
  6053. }
  6054. // String returns the string representation
  6055. func (s CustomErrorResponse) String() string {
  6056. return awsutil.Prettify(s)
  6057. }
  6058. // GoString returns the string representation
  6059. func (s CustomErrorResponse) GoString() string {
  6060. return s.String()
  6061. }
  6062. // Validate inspects the fields of the type to determine if they are valid.
  6063. func (s *CustomErrorResponse) Validate() error {
  6064. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"}
  6065. if s.ErrorCode == nil {
  6066. invalidParams.Add(request.NewErrParamRequired("ErrorCode"))
  6067. }
  6068. if invalidParams.Len() > 0 {
  6069. return invalidParams
  6070. }
  6071. return nil
  6072. }
  6073. // SetErrorCachingMinTTL sets the ErrorCachingMinTTL field's value.
  6074. func (s *CustomErrorResponse) SetErrorCachingMinTTL(v int64) *CustomErrorResponse {
  6075. s.ErrorCachingMinTTL = &v
  6076. return s
  6077. }
  6078. // SetErrorCode sets the ErrorCode field's value.
  6079. func (s *CustomErrorResponse) SetErrorCode(v int64) *CustomErrorResponse {
  6080. s.ErrorCode = &v
  6081. return s
  6082. }
  6083. // SetResponseCode sets the ResponseCode field's value.
  6084. func (s *CustomErrorResponse) SetResponseCode(v string) *CustomErrorResponse {
  6085. s.ResponseCode = &v
  6086. return s
  6087. }
  6088. // SetResponsePagePath sets the ResponsePagePath field's value.
  6089. func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse {
  6090. s.ResponsePagePath = &v
  6091. return s
  6092. }
  6093. // A complex type that controls:
  6094. //
  6095. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  6096. // with custom error messages before returning the response to the viewer.
  6097. //
  6098. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  6099. //
  6100. // For more information about custom error pages, see Customizing Error Responses
  6101. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  6102. // in the Amazon CloudFront Developer Guide.
  6103. type CustomErrorResponses struct {
  6104. _ struct{} `type:"structure"`
  6105. // A complex type that contains a CustomErrorResponse element for each HTTP
  6106. // status code for which you want to specify a custom error page and/or a caching
  6107. // duration.
  6108. Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"`
  6109. // The number of HTTP status codes for which you want to specify a custom error
  6110. // page and/or a caching duration. If Quantity is 0, you can omit Items.
  6111. //
  6112. // Quantity is a required field
  6113. Quantity *int64 `type:"integer" required:"true"`
  6114. }
  6115. // String returns the string representation
  6116. func (s CustomErrorResponses) String() string {
  6117. return awsutil.Prettify(s)
  6118. }
  6119. // GoString returns the string representation
  6120. func (s CustomErrorResponses) GoString() string {
  6121. return s.String()
  6122. }
  6123. // Validate inspects the fields of the type to determine if they are valid.
  6124. func (s *CustomErrorResponses) Validate() error {
  6125. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"}
  6126. if s.Quantity == nil {
  6127. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  6128. }
  6129. if s.Items != nil {
  6130. for i, v := range s.Items {
  6131. if v == nil {
  6132. continue
  6133. }
  6134. if err := v.Validate(); err != nil {
  6135. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  6136. }
  6137. }
  6138. }
  6139. if invalidParams.Len() > 0 {
  6140. return invalidParams
  6141. }
  6142. return nil
  6143. }
  6144. // SetItems sets the Items field's value.
  6145. func (s *CustomErrorResponses) SetItems(v []*CustomErrorResponse) *CustomErrorResponses {
  6146. s.Items = v
  6147. return s
  6148. }
  6149. // SetQuantity sets the Quantity field's value.
  6150. func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses {
  6151. s.Quantity = &v
  6152. return s
  6153. }
  6154. // A complex type that contains the list of Custom Headers for each origin.
  6155. type CustomHeaders struct {
  6156. _ struct{} `type:"structure"`
  6157. // Optional: A list that contains one OriginCustomHeader element for each custom
  6158. // header that you want CloudFront to forward to the origin. If Quantity is
  6159. // 0, omit Items.
  6160. Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"`
  6161. // The number of custom headers, if any, for this distribution.
  6162. //
  6163. // Quantity is a required field
  6164. Quantity *int64 `type:"integer" required:"true"`
  6165. }
  6166. // String returns the string representation
  6167. func (s CustomHeaders) String() string {
  6168. return awsutil.Prettify(s)
  6169. }
  6170. // GoString returns the string representation
  6171. func (s CustomHeaders) GoString() string {
  6172. return s.String()
  6173. }
  6174. // Validate inspects the fields of the type to determine if they are valid.
  6175. func (s *CustomHeaders) Validate() error {
  6176. invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"}
  6177. if s.Quantity == nil {
  6178. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  6179. }
  6180. if s.Items != nil {
  6181. for i, v := range s.Items {
  6182. if v == nil {
  6183. continue
  6184. }
  6185. if err := v.Validate(); err != nil {
  6186. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  6187. }
  6188. }
  6189. }
  6190. if invalidParams.Len() > 0 {
  6191. return invalidParams
  6192. }
  6193. return nil
  6194. }
  6195. // SetItems sets the Items field's value.
  6196. func (s *CustomHeaders) SetItems(v []*OriginCustomHeader) *CustomHeaders {
  6197. s.Items = v
  6198. return s
  6199. }
  6200. // SetQuantity sets the Quantity field's value.
  6201. func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders {
  6202. s.Quantity = &v
  6203. return s
  6204. }
  6205. // A customer origin or an Amazon S3 bucket configured as a website endpoint.
  6206. type CustomOriginConfig struct {
  6207. _ struct{} `type:"structure"`
  6208. // The HTTP port the custom origin listens on.
  6209. //
  6210. // HTTPPort is a required field
  6211. HTTPPort *int64 `type:"integer" required:"true"`
  6212. // The HTTPS port the custom origin listens on.
  6213. //
  6214. // HTTPSPort is a required field
  6215. HTTPSPort *int64 `type:"integer" required:"true"`
  6216. // You can create a custom keep-alive timeout. All timeout units are in seconds.
  6217. // The default keep-alive timeout is 5 seconds, but you can configure custom
  6218. // timeout lengths using the CloudFront API. The minimum timeout length is 1
  6219. // second; the maximum is 60 seconds.
  6220. //
  6221. // If you need to increase the maximum time limit, contact the AWS Support Center
  6222. // (https://console.aws.amazon.com/support/home#/).
  6223. OriginKeepaliveTimeout *int64 `type:"integer"`
  6224. // The origin protocol policy to apply to your origin.
  6225. //
  6226. // OriginProtocolPolicy is a required field
  6227. OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"`
  6228. // You can create a custom origin read timeout. All timeout units are in seconds.
  6229. // The default origin read timeout is 30 seconds, but you can configure custom
  6230. // timeout lengths using the CloudFront API. The minimum timeout length is 4
  6231. // seconds; the maximum is 60 seconds.
  6232. //
  6233. // If you need to increase the maximum time limit, contact the AWS Support Center
  6234. // (https://console.aws.amazon.com/support/home#/).
  6235. OriginReadTimeout *int64 `type:"integer"`
  6236. // The SSL/TLS protocols that you want CloudFront to use when communicating
  6237. // with your origin over HTTPS.
  6238. OriginSslProtocols *OriginSslProtocols `type:"structure"`
  6239. }
  6240. // String returns the string representation
  6241. func (s CustomOriginConfig) String() string {
  6242. return awsutil.Prettify(s)
  6243. }
  6244. // GoString returns the string representation
  6245. func (s CustomOriginConfig) GoString() string {
  6246. return s.String()
  6247. }
  6248. // Validate inspects the fields of the type to determine if they are valid.
  6249. func (s *CustomOriginConfig) Validate() error {
  6250. invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"}
  6251. if s.HTTPPort == nil {
  6252. invalidParams.Add(request.NewErrParamRequired("HTTPPort"))
  6253. }
  6254. if s.HTTPSPort == nil {
  6255. invalidParams.Add(request.NewErrParamRequired("HTTPSPort"))
  6256. }
  6257. if s.OriginProtocolPolicy == nil {
  6258. invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy"))
  6259. }
  6260. if s.OriginSslProtocols != nil {
  6261. if err := s.OriginSslProtocols.Validate(); err != nil {
  6262. invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams))
  6263. }
  6264. }
  6265. if invalidParams.Len() > 0 {
  6266. return invalidParams
  6267. }
  6268. return nil
  6269. }
  6270. // SetHTTPPort sets the HTTPPort field's value.
  6271. func (s *CustomOriginConfig) SetHTTPPort(v int64) *CustomOriginConfig {
  6272. s.HTTPPort = &v
  6273. return s
  6274. }
  6275. // SetHTTPSPort sets the HTTPSPort field's value.
  6276. func (s *CustomOriginConfig) SetHTTPSPort(v int64) *CustomOriginConfig {
  6277. s.HTTPSPort = &v
  6278. return s
  6279. }
  6280. // SetOriginKeepaliveTimeout sets the OriginKeepaliveTimeout field's value.
  6281. func (s *CustomOriginConfig) SetOriginKeepaliveTimeout(v int64) *CustomOriginConfig {
  6282. s.OriginKeepaliveTimeout = &v
  6283. return s
  6284. }
  6285. // SetOriginProtocolPolicy sets the OriginProtocolPolicy field's value.
  6286. func (s *CustomOriginConfig) SetOriginProtocolPolicy(v string) *CustomOriginConfig {
  6287. s.OriginProtocolPolicy = &v
  6288. return s
  6289. }
  6290. // SetOriginReadTimeout sets the OriginReadTimeout field's value.
  6291. func (s *CustomOriginConfig) SetOriginReadTimeout(v int64) *CustomOriginConfig {
  6292. s.OriginReadTimeout = &v
  6293. return s
  6294. }
  6295. // SetOriginSslProtocols sets the OriginSslProtocols field's value.
  6296. func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *CustomOriginConfig {
  6297. s.OriginSslProtocols = v
  6298. return s
  6299. }
  6300. // A complex type that describes the default cache behavior if you don't specify
  6301. // a CacheBehavior element or if files don't match any of the values of PathPattern
  6302. // in CacheBehavior elements. You must create exactly one default cache behavior.
  6303. type DefaultCacheBehavior struct {
  6304. _ struct{} `type:"structure"`
  6305. // A complex type that controls which HTTP methods CloudFront processes and
  6306. // forwards to your Amazon S3 bucket or your custom origin. There are three
  6307. // choices:
  6308. //
  6309. // * CloudFront forwards only GET and HEAD requests.
  6310. //
  6311. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  6312. //
  6313. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  6314. // requests.
  6315. //
  6316. // If you pick the third choice, you may need to restrict access to your Amazon
  6317. // S3 bucket or to your custom origin so users can't perform operations that
  6318. // you don't want them to. For example, you might not want users to have permissions
  6319. // to delete objects from your origin.
  6320. AllowedMethods *AllowedMethods `type:"structure"`
  6321. // Whether you want CloudFront to automatically compress certain files for this
  6322. // cache behavior. If so, specify true; if not, specify false. For more information,
  6323. // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)
  6324. // in the Amazon CloudFront Developer Guide.
  6325. Compress *bool `type:"boolean"`
  6326. // The default amount of time that you want objects to stay in CloudFront caches
  6327. // before CloudFront forwards another request to your origin to determine whether
  6328. // the object has been updated. The value that you specify applies only when
  6329. // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control
  6330. // s-maxage, and Expires to objects. For more information, see Specifying How
  6331. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  6332. // in the Amazon CloudFront Developer Guide.
  6333. DefaultTTL *int64 `type:"long"`
  6334. // The value of ID for the field-level encryption configuration that you want
  6335. // CloudFront to use for encrypting specific fields of data for a cache behavior
  6336. // or for the default cache behavior in your distribution.
  6337. FieldLevelEncryptionId *string `type:"string"`
  6338. // A complex type that specifies how CloudFront handles query strings and cookies.
  6339. //
  6340. // ForwardedValues is a required field
  6341. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  6342. // A complex type that contains zero or more Lambda function associations for
  6343. // a cache behavior.
  6344. LambdaFunctionAssociations *LambdaFunctionAssociations `type:"structure"`
  6345. MaxTTL *int64 `type:"long"`
  6346. // The minimum amount of time that you want objects to stay in CloudFront caches
  6347. // before CloudFront forwards another request to your origin to determine whether
  6348. // the object has been updated. For more information, see Specifying How Long
  6349. // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  6350. // in the Amazon Amazon CloudFront Developer Guide.
  6351. //
  6352. // You must specify 0 for MinTTL if you configure CloudFront to forward all
  6353. // headers to your origin (under Headers, if you specify 1 for Quantity and
  6354. // * for Name).
  6355. //
  6356. // MinTTL is a required field
  6357. MinTTL *int64 `type:"long" required:"true"`
  6358. // Indicates whether you want to distribute media files in the Microsoft Smooth
  6359. // Streaming format using the origin that is associated with this cache behavior.
  6360. // If so, specify true; if not, specify false. If you specify true for SmoothStreaming,
  6361. // you can still distribute other content using this cache behavior if the content
  6362. // matches the value of PathPattern.
  6363. SmoothStreaming *bool `type:"boolean"`
  6364. // The value of ID for the origin that you want CloudFront to route requests
  6365. // to when a request matches the path pattern either for a cache behavior or
  6366. // for the default cache behavior in your distribution.
  6367. //
  6368. // TargetOriginId is a required field
  6369. TargetOriginId *string `type:"string" required:"true"`
  6370. // A complex type that specifies the AWS accounts, if any, that you want to
  6371. // allow to create signed URLs for private content.
  6372. //
  6373. // If you want to require signed URLs in requests for objects in the target
  6374. // origin that match the PathPattern for this cache behavior, specify true for
  6375. // Enabled, and specify the applicable values for Quantity and Items. For more
  6376. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  6377. // in the Amazon Amazon CloudFront Developer Guide.
  6378. //
  6379. // If you don't want to require signed URLs in requests for objects that match
  6380. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  6381. //
  6382. // To add, change, or remove one or more trusted signers, change Enabled to
  6383. // true (if it's currently false), change Quantity as applicable, and specify
  6384. // all of the trusted signers that you want to include in the updated distribution.
  6385. //
  6386. // TrustedSigners is a required field
  6387. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  6388. // The protocol that viewers can use to access the files in the origin specified
  6389. // by TargetOriginId when a request matches the path pattern in PathPattern.
  6390. // You can specify the following options:
  6391. //
  6392. // * allow-all: Viewers can use HTTP or HTTPS.
  6393. //
  6394. // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns
  6395. // an HTTP status code of 301 (Moved Permanently) to the viewer along with
  6396. // the HTTPS URL. The viewer then resubmits the request using the new URL.
  6397. //
  6398. // * https-only: If a viewer sends an HTTP request, CloudFront returns an
  6399. // HTTP status code of 403 (Forbidden).
  6400. //
  6401. // For more information about requiring the HTTPS protocol, see Using an HTTPS
  6402. // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  6403. // in the Amazon CloudFront Developer Guide.
  6404. //
  6405. // The only way to guarantee that viewers retrieve an object that was fetched
  6406. // from the origin using HTTPS is never to use any other protocol to fetch the
  6407. // object. If you have recently changed from HTTP to HTTPS, we recommend that
  6408. // you clear your objects' cache because cached objects are protocol agnostic.
  6409. // That means that an edge location will return an object from the cache regardless
  6410. // of whether the current request protocol matches the protocol used previously.
  6411. // For more information, see Specifying How Long Objects and Errors Stay in
  6412. // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  6413. // in the Amazon CloudFront Developer Guide.
  6414. //
  6415. // ViewerProtocolPolicy is a required field
  6416. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  6417. }
  6418. // String returns the string representation
  6419. func (s DefaultCacheBehavior) String() string {
  6420. return awsutil.Prettify(s)
  6421. }
  6422. // GoString returns the string representation
  6423. func (s DefaultCacheBehavior) GoString() string {
  6424. return s.String()
  6425. }
  6426. // Validate inspects the fields of the type to determine if they are valid.
  6427. func (s *DefaultCacheBehavior) Validate() error {
  6428. invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"}
  6429. if s.ForwardedValues == nil {
  6430. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  6431. }
  6432. if s.MinTTL == nil {
  6433. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  6434. }
  6435. if s.TargetOriginId == nil {
  6436. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  6437. }
  6438. if s.TrustedSigners == nil {
  6439. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  6440. }
  6441. if s.ViewerProtocolPolicy == nil {
  6442. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  6443. }
  6444. if s.AllowedMethods != nil {
  6445. if err := s.AllowedMethods.Validate(); err != nil {
  6446. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  6447. }
  6448. }
  6449. if s.ForwardedValues != nil {
  6450. if err := s.ForwardedValues.Validate(); err != nil {
  6451. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  6452. }
  6453. }
  6454. if s.LambdaFunctionAssociations != nil {
  6455. if err := s.LambdaFunctionAssociations.Validate(); err != nil {
  6456. invalidParams.AddNested("LambdaFunctionAssociations", err.(request.ErrInvalidParams))
  6457. }
  6458. }
  6459. if s.TrustedSigners != nil {
  6460. if err := s.TrustedSigners.Validate(); err != nil {
  6461. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  6462. }
  6463. }
  6464. if invalidParams.Len() > 0 {
  6465. return invalidParams
  6466. }
  6467. return nil
  6468. }
  6469. // SetAllowedMethods sets the AllowedMethods field's value.
  6470. func (s *DefaultCacheBehavior) SetAllowedMethods(v *AllowedMethods) *DefaultCacheBehavior {
  6471. s.AllowedMethods = v
  6472. return s
  6473. }
  6474. // SetCompress sets the Compress field's value.
  6475. func (s *DefaultCacheBehavior) SetCompress(v bool) *DefaultCacheBehavior {
  6476. s.Compress = &v
  6477. return s
  6478. }
  6479. // SetDefaultTTL sets the DefaultTTL field's value.
  6480. func (s *DefaultCacheBehavior) SetDefaultTTL(v int64) *DefaultCacheBehavior {
  6481. s.DefaultTTL = &v
  6482. return s
  6483. }
  6484. // SetFieldLevelEncryptionId sets the FieldLevelEncryptionId field's value.
  6485. func (s *DefaultCacheBehavior) SetFieldLevelEncryptionId(v string) *DefaultCacheBehavior {
  6486. s.FieldLevelEncryptionId = &v
  6487. return s
  6488. }
  6489. // SetForwardedValues sets the ForwardedValues field's value.
  6490. func (s *DefaultCacheBehavior) SetForwardedValues(v *ForwardedValues) *DefaultCacheBehavior {
  6491. s.ForwardedValues = v
  6492. return s
  6493. }
  6494. // SetLambdaFunctionAssociations sets the LambdaFunctionAssociations field's value.
  6495. func (s *DefaultCacheBehavior) SetLambdaFunctionAssociations(v *LambdaFunctionAssociations) *DefaultCacheBehavior {
  6496. s.LambdaFunctionAssociations = v
  6497. return s
  6498. }
  6499. // SetMaxTTL sets the MaxTTL field's value.
  6500. func (s *DefaultCacheBehavior) SetMaxTTL(v int64) *DefaultCacheBehavior {
  6501. s.MaxTTL = &v
  6502. return s
  6503. }
  6504. // SetMinTTL sets the MinTTL field's value.
  6505. func (s *DefaultCacheBehavior) SetMinTTL(v int64) *DefaultCacheBehavior {
  6506. s.MinTTL = &v
  6507. return s
  6508. }
  6509. // SetSmoothStreaming sets the SmoothStreaming field's value.
  6510. func (s *DefaultCacheBehavior) SetSmoothStreaming(v bool) *DefaultCacheBehavior {
  6511. s.SmoothStreaming = &v
  6512. return s
  6513. }
  6514. // SetTargetOriginId sets the TargetOriginId field's value.
  6515. func (s *DefaultCacheBehavior) SetTargetOriginId(v string) *DefaultCacheBehavior {
  6516. s.TargetOriginId = &v
  6517. return s
  6518. }
  6519. // SetTrustedSigners sets the TrustedSigners field's value.
  6520. func (s *DefaultCacheBehavior) SetTrustedSigners(v *TrustedSigners) *DefaultCacheBehavior {
  6521. s.TrustedSigners = v
  6522. return s
  6523. }
  6524. // SetViewerProtocolPolicy sets the ViewerProtocolPolicy field's value.
  6525. func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBehavior {
  6526. s.ViewerProtocolPolicy = &v
  6527. return s
  6528. }
  6529. // Deletes a origin access identity.
  6530. type DeleteCloudFrontOriginAccessIdentityInput struct {
  6531. _ struct{} `type:"structure"`
  6532. // The origin access identity's ID.
  6533. //
  6534. // Id is a required field
  6535. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6536. // The value of the ETag header you received from a previous GET or PUT request.
  6537. // For example: E2QWRUHAPOMQZL.
  6538. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6539. }
  6540. // String returns the string representation
  6541. func (s DeleteCloudFrontOriginAccessIdentityInput) String() string {
  6542. return awsutil.Prettify(s)
  6543. }
  6544. // GoString returns the string representation
  6545. func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string {
  6546. return s.String()
  6547. }
  6548. // Validate inspects the fields of the type to determine if they are valid.
  6549. func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error {
  6550. invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"}
  6551. if s.Id == nil {
  6552. invalidParams.Add(request.NewErrParamRequired("Id"))
  6553. }
  6554. if s.Id != nil && len(*s.Id) < 1 {
  6555. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6556. }
  6557. if invalidParams.Len() > 0 {
  6558. return invalidParams
  6559. }
  6560. return nil
  6561. }
  6562. // SetId sets the Id field's value.
  6563. func (s *DeleteCloudFrontOriginAccessIdentityInput) SetId(v string) *DeleteCloudFrontOriginAccessIdentityInput {
  6564. s.Id = &v
  6565. return s
  6566. }
  6567. // SetIfMatch sets the IfMatch field's value.
  6568. func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *DeleteCloudFrontOriginAccessIdentityInput {
  6569. s.IfMatch = &v
  6570. return s
  6571. }
  6572. type DeleteCloudFrontOriginAccessIdentityOutput struct {
  6573. _ struct{} `type:"structure"`
  6574. }
  6575. // String returns the string representation
  6576. func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string {
  6577. return awsutil.Prettify(s)
  6578. }
  6579. // GoString returns the string representation
  6580. func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string {
  6581. return s.String()
  6582. }
  6583. // This action deletes a web distribution. To delete a web distribution using
  6584. // the CloudFront API, perform the following steps.
  6585. //
  6586. // To delete a web distribution using the CloudFront API:
  6587. //
  6588. // Disable the web distribution
  6589. //
  6590. // Submit a GET Distribution Config request to get the current configuration
  6591. // and the Etag header for the distribution.
  6592. //
  6593. // Update the XML document that was returned in the response to your GET Distribution
  6594. // Config request to change the value of Enabled to false.
  6595. //
  6596. // Submit a PUT Distribution Config request to update the configuration for
  6597. // your distribution. In the request body, include the XML document that you
  6598. // updated in Step 3. Set the value of the HTTP If-Match header to the value
  6599. // of the ETag header that CloudFront returned when you submitted the GET Distribution
  6600. // Config request in Step 2.
  6601. //
  6602. // Review the response to the PUT Distribution Config request to confirm that
  6603. // the distribution was successfully disabled.
  6604. //
  6605. // Submit a GET Distribution request to confirm that your changes have propagated.
  6606. // When propagation is complete, the value of Status is Deployed.
  6607. //
  6608. // Submit a DELETE Distribution request. Set the value of the HTTP If-Match
  6609. // header to the value of the ETag header that CloudFront returned when you
  6610. // submitted the GET Distribution Config request in Step 6.
  6611. //
  6612. // Review the response to your DELETE Distribution request to confirm that the
  6613. // distribution was successfully deleted.
  6614. //
  6615. // For information about deleting a distribution using the CloudFront console,
  6616. // see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html)
  6617. // in the Amazon CloudFront Developer Guide.
  6618. type DeleteDistributionInput struct {
  6619. _ struct{} `type:"structure"`
  6620. // The distribution ID.
  6621. //
  6622. // Id is a required field
  6623. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6624. // The value of the ETag header that you received when you disabled the distribution.
  6625. // For example: E2QWRUHAPOMQZL.
  6626. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6627. }
  6628. // String returns the string representation
  6629. func (s DeleteDistributionInput) String() string {
  6630. return awsutil.Prettify(s)
  6631. }
  6632. // GoString returns the string representation
  6633. func (s DeleteDistributionInput) GoString() string {
  6634. return s.String()
  6635. }
  6636. // Validate inspects the fields of the type to determine if they are valid.
  6637. func (s *DeleteDistributionInput) Validate() error {
  6638. invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"}
  6639. if s.Id == nil {
  6640. invalidParams.Add(request.NewErrParamRequired("Id"))
  6641. }
  6642. if s.Id != nil && len(*s.Id) < 1 {
  6643. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6644. }
  6645. if invalidParams.Len() > 0 {
  6646. return invalidParams
  6647. }
  6648. return nil
  6649. }
  6650. // SetId sets the Id field's value.
  6651. func (s *DeleteDistributionInput) SetId(v string) *DeleteDistributionInput {
  6652. s.Id = &v
  6653. return s
  6654. }
  6655. // SetIfMatch sets the IfMatch field's value.
  6656. func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput {
  6657. s.IfMatch = &v
  6658. return s
  6659. }
  6660. type DeleteDistributionOutput struct {
  6661. _ struct{} `type:"structure"`
  6662. }
  6663. // String returns the string representation
  6664. func (s DeleteDistributionOutput) String() string {
  6665. return awsutil.Prettify(s)
  6666. }
  6667. // GoString returns the string representation
  6668. func (s DeleteDistributionOutput) GoString() string {
  6669. return s.String()
  6670. }
  6671. type DeleteFieldLevelEncryptionConfigInput struct {
  6672. _ struct{} `type:"structure"`
  6673. // The ID of the configuration you want to delete from CloudFront.
  6674. //
  6675. // Id is a required field
  6676. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6677. // The value of the ETag header that you received when retrieving the configuration
  6678. // identity to delete. For example: E2QWRUHAPOMQZL.
  6679. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6680. }
  6681. // String returns the string representation
  6682. func (s DeleteFieldLevelEncryptionConfigInput) String() string {
  6683. return awsutil.Prettify(s)
  6684. }
  6685. // GoString returns the string representation
  6686. func (s DeleteFieldLevelEncryptionConfigInput) GoString() string {
  6687. return s.String()
  6688. }
  6689. // Validate inspects the fields of the type to determine if they are valid.
  6690. func (s *DeleteFieldLevelEncryptionConfigInput) Validate() error {
  6691. invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionConfigInput"}
  6692. if s.Id == nil {
  6693. invalidParams.Add(request.NewErrParamRequired("Id"))
  6694. }
  6695. if s.Id != nil && len(*s.Id) < 1 {
  6696. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6697. }
  6698. if invalidParams.Len() > 0 {
  6699. return invalidParams
  6700. }
  6701. return nil
  6702. }
  6703. // SetId sets the Id field's value.
  6704. func (s *DeleteFieldLevelEncryptionConfigInput) SetId(v string) *DeleteFieldLevelEncryptionConfigInput {
  6705. s.Id = &v
  6706. return s
  6707. }
  6708. // SetIfMatch sets the IfMatch field's value.
  6709. func (s *DeleteFieldLevelEncryptionConfigInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionConfigInput {
  6710. s.IfMatch = &v
  6711. return s
  6712. }
  6713. type DeleteFieldLevelEncryptionConfigOutput struct {
  6714. _ struct{} `type:"structure"`
  6715. }
  6716. // String returns the string representation
  6717. func (s DeleteFieldLevelEncryptionConfigOutput) String() string {
  6718. return awsutil.Prettify(s)
  6719. }
  6720. // GoString returns the string representation
  6721. func (s DeleteFieldLevelEncryptionConfigOutput) GoString() string {
  6722. return s.String()
  6723. }
  6724. type DeleteFieldLevelEncryptionProfileInput struct {
  6725. _ struct{} `type:"structure"`
  6726. // Request the ID of the profile you want to delete from CloudFront.
  6727. //
  6728. // Id is a required field
  6729. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6730. // The value of the ETag header that you received when retrieving the profile
  6731. // to delete. For example: E2QWRUHAPOMQZL.
  6732. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6733. }
  6734. // String returns the string representation
  6735. func (s DeleteFieldLevelEncryptionProfileInput) String() string {
  6736. return awsutil.Prettify(s)
  6737. }
  6738. // GoString returns the string representation
  6739. func (s DeleteFieldLevelEncryptionProfileInput) GoString() string {
  6740. return s.String()
  6741. }
  6742. // Validate inspects the fields of the type to determine if they are valid.
  6743. func (s *DeleteFieldLevelEncryptionProfileInput) Validate() error {
  6744. invalidParams := request.ErrInvalidParams{Context: "DeleteFieldLevelEncryptionProfileInput"}
  6745. if s.Id == nil {
  6746. invalidParams.Add(request.NewErrParamRequired("Id"))
  6747. }
  6748. if s.Id != nil && len(*s.Id) < 1 {
  6749. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6750. }
  6751. if invalidParams.Len() > 0 {
  6752. return invalidParams
  6753. }
  6754. return nil
  6755. }
  6756. // SetId sets the Id field's value.
  6757. func (s *DeleteFieldLevelEncryptionProfileInput) SetId(v string) *DeleteFieldLevelEncryptionProfileInput {
  6758. s.Id = &v
  6759. return s
  6760. }
  6761. // SetIfMatch sets the IfMatch field's value.
  6762. func (s *DeleteFieldLevelEncryptionProfileInput) SetIfMatch(v string) *DeleteFieldLevelEncryptionProfileInput {
  6763. s.IfMatch = &v
  6764. return s
  6765. }
  6766. type DeleteFieldLevelEncryptionProfileOutput struct {
  6767. _ struct{} `type:"structure"`
  6768. }
  6769. // String returns the string representation
  6770. func (s DeleteFieldLevelEncryptionProfileOutput) String() string {
  6771. return awsutil.Prettify(s)
  6772. }
  6773. // GoString returns the string representation
  6774. func (s DeleteFieldLevelEncryptionProfileOutput) GoString() string {
  6775. return s.String()
  6776. }
  6777. type DeletePublicKeyInput struct {
  6778. _ struct{} `type:"structure"`
  6779. // The ID of the public key you want to remove from CloudFront.
  6780. //
  6781. // Id is a required field
  6782. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6783. // The value of the ETag header that you received when retrieving the public
  6784. // key identity to delete. For example: E2QWRUHAPOMQZL.
  6785. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6786. }
  6787. // String returns the string representation
  6788. func (s DeletePublicKeyInput) String() string {
  6789. return awsutil.Prettify(s)
  6790. }
  6791. // GoString returns the string representation
  6792. func (s DeletePublicKeyInput) GoString() string {
  6793. return s.String()
  6794. }
  6795. // Validate inspects the fields of the type to determine if they are valid.
  6796. func (s *DeletePublicKeyInput) Validate() error {
  6797. invalidParams := request.ErrInvalidParams{Context: "DeletePublicKeyInput"}
  6798. if s.Id == nil {
  6799. invalidParams.Add(request.NewErrParamRequired("Id"))
  6800. }
  6801. if s.Id != nil && len(*s.Id) < 1 {
  6802. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6803. }
  6804. if invalidParams.Len() > 0 {
  6805. return invalidParams
  6806. }
  6807. return nil
  6808. }
  6809. // SetId sets the Id field's value.
  6810. func (s *DeletePublicKeyInput) SetId(v string) *DeletePublicKeyInput {
  6811. s.Id = &v
  6812. return s
  6813. }
  6814. // SetIfMatch sets the IfMatch field's value.
  6815. func (s *DeletePublicKeyInput) SetIfMatch(v string) *DeletePublicKeyInput {
  6816. s.IfMatch = &v
  6817. return s
  6818. }
  6819. type DeletePublicKeyOutput struct {
  6820. _ struct{} `type:"structure"`
  6821. }
  6822. // String returns the string representation
  6823. func (s DeletePublicKeyOutput) String() string {
  6824. return awsutil.Prettify(s)
  6825. }
  6826. // GoString returns the string representation
  6827. func (s DeletePublicKeyOutput) GoString() string {
  6828. return s.String()
  6829. }
  6830. // The request to delete a streaming distribution.
  6831. type DeleteStreamingDistributionInput struct {
  6832. _ struct{} `type:"structure"`
  6833. // The distribution ID.
  6834. //
  6835. // Id is a required field
  6836. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6837. // The value of the ETag header that you received when you disabled the streaming
  6838. // distribution. For example: E2QWRUHAPOMQZL.
  6839. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6840. }
  6841. // String returns the string representation
  6842. func (s DeleteStreamingDistributionInput) String() string {
  6843. return awsutil.Prettify(s)
  6844. }
  6845. // GoString returns the string representation
  6846. func (s DeleteStreamingDistributionInput) GoString() string {
  6847. return s.String()
  6848. }
  6849. // Validate inspects the fields of the type to determine if they are valid.
  6850. func (s *DeleteStreamingDistributionInput) Validate() error {
  6851. invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"}
  6852. if s.Id == nil {
  6853. invalidParams.Add(request.NewErrParamRequired("Id"))
  6854. }
  6855. if s.Id != nil && len(*s.Id) < 1 {
  6856. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  6857. }
  6858. if invalidParams.Len() > 0 {
  6859. return invalidParams
  6860. }
  6861. return nil
  6862. }
  6863. // SetId sets the Id field's value.
  6864. func (s *DeleteStreamingDistributionInput) SetId(v string) *DeleteStreamingDistributionInput {
  6865. s.Id = &v
  6866. return s
  6867. }
  6868. // SetIfMatch sets the IfMatch field's value.
  6869. func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreamingDistributionInput {
  6870. s.IfMatch = &v
  6871. return s
  6872. }
  6873. type DeleteStreamingDistributionOutput struct {
  6874. _ struct{} `type:"structure"`
  6875. }
  6876. // String returns the string representation
  6877. func (s DeleteStreamingDistributionOutput) String() string {
  6878. return awsutil.Prettify(s)
  6879. }
  6880. // GoString returns the string representation
  6881. func (s DeleteStreamingDistributionOutput) GoString() string {
  6882. return s.String()
  6883. }
  6884. // The distribution's information.
  6885. type Distribution struct {
  6886. _ struct{} `type:"structure"`
  6887. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  6888. // where 123456789012 is your AWS account ID.
  6889. //
  6890. // ARN is a required field
  6891. ARN *string `type:"string" required:"true"`
  6892. // CloudFront automatically adds this element to the response only if you've
  6893. // set up the distribution to serve private content with signed URLs. The element
  6894. // lists the key pair IDs that CloudFront is aware of for each trusted signer.
  6895. // The Signer child element lists the AWS account number of the trusted signer
  6896. // (or an empty Self element if the signer is you). The Signer element also
  6897. // includes the IDs of any active key pairs associated with the trusted signer's
  6898. // AWS account. If no KeyPairId element appears for a Signer, that signer can't
  6899. // create working signed URLs.
  6900. //
  6901. // ActiveTrustedSigners is a required field
  6902. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  6903. // The current configuration information for the distribution. Send a GET request
  6904. // to the /CloudFront API version/distribution ID/config resource.
  6905. //
  6906. // DistributionConfig is a required field
  6907. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  6908. // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net.
  6909. //
  6910. // DomainName is a required field
  6911. DomainName *string `type:"string" required:"true"`
  6912. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  6913. //
  6914. // Id is a required field
  6915. Id *string `type:"string" required:"true"`
  6916. // The number of invalidation batches currently in progress.
  6917. //
  6918. // InProgressInvalidationBatches is a required field
  6919. InProgressInvalidationBatches *int64 `type:"integer" required:"true"`
  6920. // The date and time the distribution was last modified.
  6921. //
  6922. // LastModifiedTime is a required field
  6923. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  6924. // This response element indicates the current status of the distribution. When
  6925. // the status is Deployed, the distribution's information is fully propagated
  6926. // to all CloudFront edge locations.
  6927. //
  6928. // Status is a required field
  6929. Status *string `type:"string" required:"true"`
  6930. }
  6931. // String returns the string representation
  6932. func (s Distribution) String() string {
  6933. return awsutil.Prettify(s)
  6934. }
  6935. // GoString returns the string representation
  6936. func (s Distribution) GoString() string {
  6937. return s.String()
  6938. }
  6939. // SetARN sets the ARN field's value.
  6940. func (s *Distribution) SetARN(v string) *Distribution {
  6941. s.ARN = &v
  6942. return s
  6943. }
  6944. // SetActiveTrustedSigners sets the ActiveTrustedSigners field's value.
  6945. func (s *Distribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *Distribution {
  6946. s.ActiveTrustedSigners = v
  6947. return s
  6948. }
  6949. // SetDistributionConfig sets the DistributionConfig field's value.
  6950. func (s *Distribution) SetDistributionConfig(v *DistributionConfig) *Distribution {
  6951. s.DistributionConfig = v
  6952. return s
  6953. }
  6954. // SetDomainName sets the DomainName field's value.
  6955. func (s *Distribution) SetDomainName(v string) *Distribution {
  6956. s.DomainName = &v
  6957. return s
  6958. }
  6959. // SetId sets the Id field's value.
  6960. func (s *Distribution) SetId(v string) *Distribution {
  6961. s.Id = &v
  6962. return s
  6963. }
  6964. // SetInProgressInvalidationBatches sets the InProgressInvalidationBatches field's value.
  6965. func (s *Distribution) SetInProgressInvalidationBatches(v int64) *Distribution {
  6966. s.InProgressInvalidationBatches = &v
  6967. return s
  6968. }
  6969. // SetLastModifiedTime sets the LastModifiedTime field's value.
  6970. func (s *Distribution) SetLastModifiedTime(v time.Time) *Distribution {
  6971. s.LastModifiedTime = &v
  6972. return s
  6973. }
  6974. // SetStatus sets the Status field's value.
  6975. func (s *Distribution) SetStatus(v string) *Distribution {
  6976. s.Status = &v
  6977. return s
  6978. }
  6979. // A distribution configuration.
  6980. type DistributionConfig struct {
  6981. _ struct{} `type:"structure"`
  6982. // A complex type that contains information about CNAMEs (alternate domain names),
  6983. // if any, for this distribution.
  6984. Aliases *Aliases `type:"structure"`
  6985. // A complex type that contains zero or more CacheBehavior elements.
  6986. CacheBehaviors *CacheBehaviors `type:"structure"`
  6987. // A unique value (for example, a date-time stamp) that ensures that the request
  6988. // can't be replayed.
  6989. //
  6990. // If the value of CallerReference is new (regardless of the content of the
  6991. // DistributionConfig object), CloudFront creates a new distribution.
  6992. //
  6993. // If CallerReference is a value that you already sent in a previous request
  6994. // to create a distribution, CloudFront returns a DistributionAlreadyExists
  6995. // error.
  6996. //
  6997. // CallerReference is a required field
  6998. CallerReference *string `type:"string" required:"true"`
  6999. // Any comments you want to include about the distribution.
  7000. //
  7001. // If you don't want to specify a comment, include an empty Comment element.
  7002. //
  7003. // To delete an existing comment, update the distribution configuration and
  7004. // include an empty Comment element.
  7005. //
  7006. // To add or change a comment, update the distribution configuration and specify
  7007. // the new comment.
  7008. //
  7009. // Comment is a required field
  7010. Comment *string `type:"string" required:"true"`
  7011. // A complex type that controls the following:
  7012. //
  7013. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  7014. // with custom error messages before returning the response to the viewer.
  7015. //
  7016. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  7017. //
  7018. // For more information about custom error pages, see Customizing Error Responses
  7019. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  7020. // in the Amazon CloudFront Developer Guide.
  7021. CustomErrorResponses *CustomErrorResponses `type:"structure"`
  7022. // A complex type that describes the default cache behavior if you don't specify
  7023. // a CacheBehavior element or if files don't match any of the values of PathPattern
  7024. // in CacheBehavior elements. You must create exactly one default cache behavior.
  7025. //
  7026. // DefaultCacheBehavior is a required field
  7027. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  7028. // The object that you want CloudFront to request from your origin (for example,
  7029. // index.html) when a viewer requests the root URL for your distribution (http://www.example.com)
  7030. // instead of an object in your distribution (http://www.example.com/product-description.html).
  7031. // Specifying a default root object avoids exposing the contents of your distribution.
  7032. //
  7033. // Specify only the object name, for example, index.html. Don't add a / before
  7034. // the object name.
  7035. //
  7036. // If you don't want to specify a default root object when you create a distribution,
  7037. // include an empty DefaultRootObject element.
  7038. //
  7039. // To delete the default root object from an existing distribution, update the
  7040. // distribution configuration and include an empty DefaultRootObject element.
  7041. //
  7042. // To replace the default root object, update the distribution configuration
  7043. // and specify the new object.
  7044. //
  7045. // For more information about the default root object, see Creating a Default
  7046. // Root Object (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html)
  7047. // in the Amazon CloudFront Developer Guide.
  7048. DefaultRootObject *string `type:"string"`
  7049. // From this field, you can enable or disable the selected distribution.
  7050. //
  7051. // Enabled is a required field
  7052. Enabled *bool `type:"boolean" required:"true"`
  7053. // (Optional) Specify the maximum HTTP version that you want viewers to use
  7054. // to communicate with CloudFront. The default value for new web distributions
  7055. // is http2. Viewers that don't support HTTP/2 automatically use an earlier
  7056. // HTTP version.
  7057. //
  7058. // For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or
  7059. // later, and must support Server Name Identification (SNI).
  7060. //
  7061. // In general, configuring CloudFront to communicate with viewers using HTTP/2
  7062. // reduces latency. You can improve performance by optimizing for HTTP/2. For
  7063. // more information, do an Internet search for "http/2 optimization."
  7064. HttpVersion *string `type:"string" enum:"HttpVersion"`
  7065. // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address
  7066. // for your distribution, specify true. If you specify false, CloudFront responds
  7067. // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses.
  7068. // This allows viewers to submit a second request, for an IPv4 address for your
  7069. // distribution.
  7070. //
  7071. // In general, you should enable IPv6 if you have users on IPv6 networks who
  7072. // want to access your content. However, if you're using signed URLs or signed
  7073. // cookies to restrict access to your content, and if you're using a custom
  7074. // policy that includes the IpAddress parameter to restrict the IP addresses
  7075. // that can access your content, don't enable IPv6. If you want to restrict
  7076. // access to some content by IP address and not restrict access to other content
  7077. // (or restrict access but not by IP address), you can create two distributions.
  7078. // 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)
  7079. // in the Amazon CloudFront Developer Guide.
  7080. //
  7081. // If you're using an Amazon Route 53 alias resource record set to route traffic
  7082. // to your CloudFront distribution, you need to create a second alias resource
  7083. // record set when both of the following are true:
  7084. //
  7085. // * You enable IPv6 for the distribution
  7086. //
  7087. // * You're using alternate domain names in the URLs for your objects
  7088. //
  7089. // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution
  7090. // by Using Your Domain Name (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html)
  7091. // in the Amazon Route 53 Developer Guide.
  7092. //
  7093. // If you created a CNAME resource record set, either with Amazon Route 53 or
  7094. // with another DNS service, you don't need to make any changes. A CNAME record
  7095. // will route traffic to your distribution regardless of the IP address format
  7096. // of the viewer request.
  7097. IsIPV6Enabled *bool `type:"boolean"`
  7098. // A complex type that controls whether access logs are written for the distribution.
  7099. //
  7100. // For more information about logging, see Access Logs (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html)
  7101. // in the Amazon CloudFront Developer Guide.
  7102. Logging *LoggingConfig `type:"structure"`
  7103. // A complex type that contains information about origin groups for this distribution.
  7104. OriginGroups *OriginGroups `type:"structure"`
  7105. // A complex type that contains information about origins for this distribution.
  7106. //
  7107. // Origins is a required field
  7108. Origins *Origins `type:"structure" required:"true"`
  7109. // The price class that corresponds with the maximum price that you want to
  7110. // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds
  7111. // to requests for your objects from all CloudFront edge locations.
  7112. //
  7113. // If you specify a price class other than PriceClass_All, CloudFront serves
  7114. // your objects from the CloudFront edge location that has the lowest latency
  7115. // among the edge locations in your price class. Viewers who are in or near
  7116. // regions that are excluded from your specified price class may encounter slower
  7117. // performance.
  7118. //
  7119. // For more information about price classes, see Choosing the Price Class for
  7120. // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html)
  7121. // in the Amazon CloudFront Developer Guide. For information about CloudFront
  7122. // pricing, including how price classes (such as Price Class 100) map to CloudFront
  7123. // regions, see Amazon CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/).
  7124. // For price class information, scroll down to see the table at the bottom of
  7125. // the page.
  7126. PriceClass *string `type:"string" enum:"PriceClass"`
  7127. // A complex type that identifies ways in which you want to restrict distribution
  7128. // of your content.
  7129. Restrictions *Restrictions `type:"structure"`
  7130. // A complex type that specifies the following:
  7131. //
  7132. // * Whether you want viewers to use HTTP or HTTPS to request your objects.
  7133. //
  7134. // * If you want viewers to use HTTPS, whether you're using an alternate
  7135. // domain name such as example.com or the CloudFront domain name for your
  7136. // distribution, such as d111111abcdef8.cloudfront.net.
  7137. //
  7138. // * If you're using an alternate domain name, whether AWS Certificate Manager
  7139. // (ACM) provided the certificate, or you purchased a certificate from a
  7140. // third-party certificate authority and imported it into ACM or uploaded
  7141. // it to the IAM certificate store.
  7142. //
  7143. // You must specify only one of the following values:
  7144. //
  7145. // * ViewerCertificate$ACMCertificateArn
  7146. //
  7147. // * ViewerCertificate$IAMCertificateId
  7148. //
  7149. // * ViewerCertificate$CloudFrontDefaultCertificate
  7150. //
  7151. // Don't specify false for CloudFrontDefaultCertificate.
  7152. //
  7153. // If you want viewers to use HTTP instead of HTTPS to request your objects:
  7154. // Specify the following value:
  7155. //
  7156. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  7157. //
  7158. // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache
  7159. // behaviors.
  7160. //
  7161. // If you want viewers to use HTTPS to request your objects: Choose the type
  7162. // of certificate that you want to use based on whether you're using an alternate
  7163. // domain name for your objects or the CloudFront domain name:
  7164. //
  7165. // * If you're using an alternate domain name, such as example.com: Specify
  7166. // one of the following values, depending on whether ACM provided your certificate
  7167. // or you purchased your certificate from third-party certificate authority:
  7168. //
  7169. // <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where
  7170. // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate
  7171. // that you want to use for this distribution.
  7172. //
  7173. // <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate
  7174. // ID is the ID that IAM returned when you added the certificate to the IAM
  7175. // certificate store.
  7176. //
  7177. // If you specify ACMCertificateArn or IAMCertificateId, you must also specify
  7178. // a value for SSLSupportMethod.
  7179. //
  7180. // If you choose to use an ACM certificate or a certificate in the IAM certificate
  7181. // store, we recommend that you use only an alternate domain name in your
  7182. // object URLs (https://example.com/logo.jpg). If you use the domain name
  7183. // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg)
  7184. // and the viewer supports SNI, then CloudFront behaves normally. However,
  7185. // if the browser does not support SNI, the user's experience depends on
  7186. // the value that you choose for SSLSupportMethod:
  7187. //
  7188. // vip: The viewer displays a warning because there is a mismatch between the
  7189. // CloudFront domain name and the domain name in your SSL/TLS certificate.
  7190. //
  7191. // sni-only: CloudFront drops the connection with the browser without returning
  7192. // the object.
  7193. //
  7194. // * If you're using the CloudFront domain name for your distribution, such
  7195. // as d111111abcdef8.cloudfront.net: Specify the following value:
  7196. //
  7197. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  7198. //
  7199. // If you want viewers to use HTTPS, you must also specify one of the following
  7200. // values in your cache behaviors:
  7201. //
  7202. // * <ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
  7203. //
  7204. // * <ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
  7205. //
  7206. // You can also optionally require that CloudFront use HTTPS to communicate
  7207. // with your origin by specifying one of the following values for the applicable
  7208. // origins:
  7209. //
  7210. // * <OriginProtocolPolicy>https-only<OriginProtocolPolicy>
  7211. //
  7212. // * <OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
  7213. //
  7214. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS)
  7215. // in the Amazon CloudFront Developer Guide.
  7216. ViewerCertificate *ViewerCertificate `type:"structure"`
  7217. // A unique identifier that specifies the AWS WAF web ACL, if any, to associate
  7218. // with this distribution.
  7219. //
  7220. // AWS WAF is a web application firewall that lets you monitor the HTTP and
  7221. // HTTPS requests that are forwarded to CloudFront, and lets you control access
  7222. // to your content. Based on conditions that you specify, such as the IP addresses
  7223. // that requests originate from or the values of query strings, CloudFront responds
  7224. // to requests either with the requested content or with an HTTP 403 status
  7225. // code (Forbidden). You can also configure CloudFront to return a custom error
  7226. // page when a request is blocked. For more information about AWS WAF, see the
  7227. // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html).
  7228. WebACLId *string `type:"string"`
  7229. }
  7230. // String returns the string representation
  7231. func (s DistributionConfig) String() string {
  7232. return awsutil.Prettify(s)
  7233. }
  7234. // GoString returns the string representation
  7235. func (s DistributionConfig) GoString() string {
  7236. return s.String()
  7237. }
  7238. // Validate inspects the fields of the type to determine if they are valid.
  7239. func (s *DistributionConfig) Validate() error {
  7240. invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"}
  7241. if s.CallerReference == nil {
  7242. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  7243. }
  7244. if s.Comment == nil {
  7245. invalidParams.Add(request.NewErrParamRequired("Comment"))
  7246. }
  7247. if s.DefaultCacheBehavior == nil {
  7248. invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior"))
  7249. }
  7250. if s.Enabled == nil {
  7251. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  7252. }
  7253. if s.Origins == nil {
  7254. invalidParams.Add(request.NewErrParamRequired("Origins"))
  7255. }
  7256. if s.Aliases != nil {
  7257. if err := s.Aliases.Validate(); err != nil {
  7258. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  7259. }
  7260. }
  7261. if s.CacheBehaviors != nil {
  7262. if err := s.CacheBehaviors.Validate(); err != nil {
  7263. invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams))
  7264. }
  7265. }
  7266. if s.CustomErrorResponses != nil {
  7267. if err := s.CustomErrorResponses.Validate(); err != nil {
  7268. invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams))
  7269. }
  7270. }
  7271. if s.DefaultCacheBehavior != nil {
  7272. if err := s.DefaultCacheBehavior.Validate(); err != nil {
  7273. invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams))
  7274. }
  7275. }
  7276. if s.Logging != nil {
  7277. if err := s.Logging.Validate(); err != nil {
  7278. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  7279. }
  7280. }
  7281. if s.OriginGroups != nil {
  7282. if err := s.OriginGroups.Validate(); err != nil {
  7283. invalidParams.AddNested("OriginGroups", err.(request.ErrInvalidParams))
  7284. }
  7285. }
  7286. if s.Origins != nil {
  7287. if err := s.Origins.Validate(); err != nil {
  7288. invalidParams.AddNested("Origins", err.(request.ErrInvalidParams))
  7289. }
  7290. }
  7291. if s.Restrictions != nil {
  7292. if err := s.Restrictions.Validate(); err != nil {
  7293. invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams))
  7294. }
  7295. }
  7296. if invalidParams.Len() > 0 {
  7297. return invalidParams
  7298. }
  7299. return nil
  7300. }
  7301. // SetAliases sets the Aliases field's value.
  7302. func (s *DistributionConfig) SetAliases(v *Aliases) *DistributionConfig {
  7303. s.Aliases = v
  7304. return s
  7305. }
  7306. // SetCacheBehaviors sets the CacheBehaviors field's value.
  7307. func (s *DistributionConfig) SetCacheBehaviors(v *CacheBehaviors) *DistributionConfig {
  7308. s.CacheBehaviors = v
  7309. return s
  7310. }
  7311. // SetCallerReference sets the CallerReference field's value.
  7312. func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig {
  7313. s.CallerReference = &v
  7314. return s
  7315. }
  7316. // SetComment sets the Comment field's value.
  7317. func (s *DistributionConfig) SetComment(v string) *DistributionConfig {
  7318. s.Comment = &v
  7319. return s
  7320. }
  7321. // SetCustomErrorResponses sets the CustomErrorResponses field's value.
  7322. func (s *DistributionConfig) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionConfig {
  7323. s.CustomErrorResponses = v
  7324. return s
  7325. }
  7326. // SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value.
  7327. func (s *DistributionConfig) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionConfig {
  7328. s.DefaultCacheBehavior = v
  7329. return s
  7330. }
  7331. // SetDefaultRootObject sets the DefaultRootObject field's value.
  7332. func (s *DistributionConfig) SetDefaultRootObject(v string) *DistributionConfig {
  7333. s.DefaultRootObject = &v
  7334. return s
  7335. }
  7336. // SetEnabled sets the Enabled field's value.
  7337. func (s *DistributionConfig) SetEnabled(v bool) *DistributionConfig {
  7338. s.Enabled = &v
  7339. return s
  7340. }
  7341. // SetHttpVersion sets the HttpVersion field's value.
  7342. func (s *DistributionConfig) SetHttpVersion(v string) *DistributionConfig {
  7343. s.HttpVersion = &v
  7344. return s
  7345. }
  7346. // SetIsIPV6Enabled sets the IsIPV6Enabled field's value.
  7347. func (s *DistributionConfig) SetIsIPV6Enabled(v bool) *DistributionConfig {
  7348. s.IsIPV6Enabled = &v
  7349. return s
  7350. }
  7351. // SetLogging sets the Logging field's value.
  7352. func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig {
  7353. s.Logging = v
  7354. return s
  7355. }
  7356. // SetOriginGroups sets the OriginGroups field's value.
  7357. func (s *DistributionConfig) SetOriginGroups(v *OriginGroups) *DistributionConfig {
  7358. s.OriginGroups = v
  7359. return s
  7360. }
  7361. // SetOrigins sets the Origins field's value.
  7362. func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig {
  7363. s.Origins = v
  7364. return s
  7365. }
  7366. // SetPriceClass sets the PriceClass field's value.
  7367. func (s *DistributionConfig) SetPriceClass(v string) *DistributionConfig {
  7368. s.PriceClass = &v
  7369. return s
  7370. }
  7371. // SetRestrictions sets the Restrictions field's value.
  7372. func (s *DistributionConfig) SetRestrictions(v *Restrictions) *DistributionConfig {
  7373. s.Restrictions = v
  7374. return s
  7375. }
  7376. // SetViewerCertificate sets the ViewerCertificate field's value.
  7377. func (s *DistributionConfig) SetViewerCertificate(v *ViewerCertificate) *DistributionConfig {
  7378. s.ViewerCertificate = v
  7379. return s
  7380. }
  7381. // SetWebACLId sets the WebACLId field's value.
  7382. func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig {
  7383. s.WebACLId = &v
  7384. return s
  7385. }
  7386. // A distribution Configuration and a list of tags to be associated with the
  7387. // distribution.
  7388. type DistributionConfigWithTags struct {
  7389. _ struct{} `type:"structure"`
  7390. // A distribution configuration.
  7391. //
  7392. // DistributionConfig is a required field
  7393. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  7394. // A complex type that contains zero or more Tag elements.
  7395. //
  7396. // Tags is a required field
  7397. Tags *Tags `type:"structure" required:"true"`
  7398. }
  7399. // String returns the string representation
  7400. func (s DistributionConfigWithTags) String() string {
  7401. return awsutil.Prettify(s)
  7402. }
  7403. // GoString returns the string representation
  7404. func (s DistributionConfigWithTags) GoString() string {
  7405. return s.String()
  7406. }
  7407. // Validate inspects the fields of the type to determine if they are valid.
  7408. func (s *DistributionConfigWithTags) Validate() error {
  7409. invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"}
  7410. if s.DistributionConfig == nil {
  7411. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  7412. }
  7413. if s.Tags == nil {
  7414. invalidParams.Add(request.NewErrParamRequired("Tags"))
  7415. }
  7416. if s.DistributionConfig != nil {
  7417. if err := s.DistributionConfig.Validate(); err != nil {
  7418. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  7419. }
  7420. }
  7421. if s.Tags != nil {
  7422. if err := s.Tags.Validate(); err != nil {
  7423. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  7424. }
  7425. }
  7426. if invalidParams.Len() > 0 {
  7427. return invalidParams
  7428. }
  7429. return nil
  7430. }
  7431. // SetDistributionConfig sets the DistributionConfig field's value.
  7432. func (s *DistributionConfigWithTags) SetDistributionConfig(v *DistributionConfig) *DistributionConfigWithTags {
  7433. s.DistributionConfig = v
  7434. return s
  7435. }
  7436. // SetTags sets the Tags field's value.
  7437. func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTags {
  7438. s.Tags = v
  7439. return s
  7440. }
  7441. // A distribution list.
  7442. type DistributionList struct {
  7443. _ struct{} `type:"structure"`
  7444. // A flag that indicates whether more distributions remain to be listed. If
  7445. // your results were truncated, you can make a follow-up pagination request
  7446. // using the Marker request parameter to retrieve more distributions in the
  7447. // list.
  7448. //
  7449. // IsTruncated is a required field
  7450. IsTruncated *bool `type:"boolean" required:"true"`
  7451. // A complex type that contains one DistributionSummary element for each distribution
  7452. // that was created by the current AWS account.
  7453. Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"`
  7454. // The value you provided for the Marker request parameter.
  7455. //
  7456. // Marker is a required field
  7457. Marker *string `type:"string" required:"true"`
  7458. // The value you provided for the MaxItems request parameter.
  7459. //
  7460. // MaxItems is a required field
  7461. MaxItems *int64 `type:"integer" required:"true"`
  7462. // If IsTruncated is true, this element is present and contains the value you
  7463. // can use for the Marker request parameter to continue listing your distributions
  7464. // where they left off.
  7465. NextMarker *string `type:"string"`
  7466. // The number of distributions that were created by the current AWS account.
  7467. //
  7468. // Quantity is a required field
  7469. Quantity *int64 `type:"integer" required:"true"`
  7470. }
  7471. // String returns the string representation
  7472. func (s DistributionList) String() string {
  7473. return awsutil.Prettify(s)
  7474. }
  7475. // GoString returns the string representation
  7476. func (s DistributionList) GoString() string {
  7477. return s.String()
  7478. }
  7479. // SetIsTruncated sets the IsTruncated field's value.
  7480. func (s *DistributionList) SetIsTruncated(v bool) *DistributionList {
  7481. s.IsTruncated = &v
  7482. return s
  7483. }
  7484. // SetItems sets the Items field's value.
  7485. func (s *DistributionList) SetItems(v []*DistributionSummary) *DistributionList {
  7486. s.Items = v
  7487. return s
  7488. }
  7489. // SetMarker sets the Marker field's value.
  7490. func (s *DistributionList) SetMarker(v string) *DistributionList {
  7491. s.Marker = &v
  7492. return s
  7493. }
  7494. // SetMaxItems sets the MaxItems field's value.
  7495. func (s *DistributionList) SetMaxItems(v int64) *DistributionList {
  7496. s.MaxItems = &v
  7497. return s
  7498. }
  7499. // SetNextMarker sets the NextMarker field's value.
  7500. func (s *DistributionList) SetNextMarker(v string) *DistributionList {
  7501. s.NextMarker = &v
  7502. return s
  7503. }
  7504. // SetQuantity sets the Quantity field's value.
  7505. func (s *DistributionList) SetQuantity(v int64) *DistributionList {
  7506. s.Quantity = &v
  7507. return s
  7508. }
  7509. // A summary of the information about a CloudFront distribution.
  7510. type DistributionSummary struct {
  7511. _ struct{} `type:"structure"`
  7512. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  7513. // where 123456789012 is your AWS account ID.
  7514. //
  7515. // ARN is a required field
  7516. ARN *string `type:"string" required:"true"`
  7517. // A complex type that contains information about CNAMEs (alternate domain names),
  7518. // if any, for this distribution.
  7519. //
  7520. // Aliases is a required field
  7521. Aliases *Aliases `type:"structure" required:"true"`
  7522. // A complex type that contains zero or more CacheBehavior elements.
  7523. //
  7524. // CacheBehaviors is a required field
  7525. CacheBehaviors *CacheBehaviors `type:"structure" required:"true"`
  7526. // The comment originally specified when this distribution was created.
  7527. //
  7528. // Comment is a required field
  7529. Comment *string `type:"string" required:"true"`
  7530. // A complex type that contains zero or more CustomErrorResponses elements.
  7531. //
  7532. // CustomErrorResponses is a required field
  7533. CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"`
  7534. // A complex type that describes the default cache behavior if you don't specify
  7535. // a CacheBehavior element or if files don't match any of the values of PathPattern
  7536. // in CacheBehavior elements. You must create exactly one default cache behavior.
  7537. //
  7538. // DefaultCacheBehavior is a required field
  7539. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  7540. // The domain name that corresponds to the distribution, for example, d111111abcdef8.cloudfront.net.
  7541. //
  7542. // DomainName is a required field
  7543. DomainName *string `type:"string" required:"true"`
  7544. // Whether the distribution is enabled to accept user requests for content.
  7545. //
  7546. // Enabled is a required field
  7547. Enabled *bool `type:"boolean" required:"true"`
  7548. // Specify the maximum HTTP version that you want viewers to use to communicate
  7549. // with CloudFront. The default value for new web distributions is http2. Viewers
  7550. // that don't support HTTP/2 will automatically use an earlier version.
  7551. //
  7552. // HttpVersion is a required field
  7553. HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"`
  7554. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  7555. //
  7556. // Id is a required field
  7557. Id *string `type:"string" required:"true"`
  7558. // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for
  7559. // your distribution.
  7560. //
  7561. // IsIPV6Enabled is a required field
  7562. IsIPV6Enabled *bool `type:"boolean" required:"true"`
  7563. // The date and time the distribution was last modified.
  7564. //
  7565. // LastModifiedTime is a required field
  7566. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  7567. // A complex type that contains information about origin groups for this distribution.
  7568. OriginGroups *OriginGroups `type:"structure"`
  7569. // A complex type that contains information about origins for this distribution.
  7570. //
  7571. // Origins is a required field
  7572. Origins *Origins `type:"structure" required:"true"`
  7573. // A complex type that contains information about price class for this streaming
  7574. // distribution.
  7575. //
  7576. // PriceClass is a required field
  7577. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  7578. // A complex type that identifies ways in which you want to restrict distribution
  7579. // of your content.
  7580. //
  7581. // Restrictions is a required field
  7582. Restrictions *Restrictions `type:"structure" required:"true"`
  7583. // The current status of the distribution. When the status is Deployed, the
  7584. // distribution's information is propagated to all CloudFront edge locations.
  7585. //
  7586. // Status is a required field
  7587. Status *string `type:"string" required:"true"`
  7588. // A complex type that specifies the following:
  7589. //
  7590. // * Whether you want viewers to use HTTP or HTTPS to request your objects.
  7591. //
  7592. // * If you want viewers to use HTTPS, whether you're using an alternate
  7593. // domain name such as example.com or the CloudFront domain name for your
  7594. // distribution, such as d111111abcdef8.cloudfront.net.
  7595. //
  7596. // * If you're using an alternate domain name, whether AWS Certificate Manager
  7597. // (ACM) provided the certificate, or you purchased a certificate from a
  7598. // third-party certificate authority and imported it into ACM or uploaded
  7599. // it to the IAM certificate store.
  7600. //
  7601. // You must specify only one of the following values:
  7602. //
  7603. // * ViewerCertificate$ACMCertificateArn
  7604. //
  7605. // * ViewerCertificate$IAMCertificateId
  7606. //
  7607. // * ViewerCertificate$CloudFrontDefaultCertificate
  7608. //
  7609. // Don't specify false for CloudFrontDefaultCertificate.
  7610. //
  7611. // If you want viewers to use HTTP instead of HTTPS to request your objects:
  7612. // Specify the following value:
  7613. //
  7614. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  7615. //
  7616. // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache
  7617. // behaviors.
  7618. //
  7619. // If you want viewers to use HTTPS to request your objects: Choose the type
  7620. // of certificate that you want to use based on whether you're using an alternate
  7621. // domain name for your objects or the CloudFront domain name:
  7622. //
  7623. // * If you're using an alternate domain name, such as example.com: Specify
  7624. // one of the following values, depending on whether ACM provided your certificate
  7625. // or you purchased your certificate from third-party certificate authority:
  7626. //
  7627. // <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where
  7628. // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate
  7629. // that you want to use for this distribution.
  7630. //
  7631. // <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate
  7632. // ID is the ID that IAM returned when you added the certificate to the IAM
  7633. // certificate store.
  7634. //
  7635. // If you specify ACMCertificateArn or IAMCertificateId, you must also specify
  7636. // a value for SSLSupportMethod.
  7637. //
  7638. // If you choose to use an ACM certificate or a certificate in the IAM certificate
  7639. // store, we recommend that you use only an alternate domain name in your
  7640. // object URLs (https://example.com/logo.jpg). If you use the domain name
  7641. // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg)
  7642. // and the viewer supports SNI, then CloudFront behaves normally. However,
  7643. // if the browser does not support SNI, the user's experience depends on
  7644. // the value that you choose for SSLSupportMethod:
  7645. //
  7646. // vip: The viewer displays a warning because there is a mismatch between the
  7647. // CloudFront domain name and the domain name in your SSL/TLS certificate.
  7648. //
  7649. // sni-only: CloudFront drops the connection with the browser without returning
  7650. // the object.
  7651. //
  7652. // * If you're using the CloudFront domain name for your distribution, such
  7653. // as d111111abcdef8.cloudfront.net: Specify the following value:
  7654. //
  7655. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  7656. //
  7657. // If you want viewers to use HTTPS, you must also specify one of the following
  7658. // values in your cache behaviors:
  7659. //
  7660. // * <ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
  7661. //
  7662. // * <ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
  7663. //
  7664. // You can also optionally require that CloudFront use HTTPS to communicate
  7665. // with your origin by specifying one of the following values for the applicable
  7666. // origins:
  7667. //
  7668. // * <OriginProtocolPolicy>https-only<OriginProtocolPolicy>
  7669. //
  7670. // * <OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
  7671. //
  7672. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS)
  7673. // in the Amazon CloudFront Developer Guide.
  7674. //
  7675. // ViewerCertificate is a required field
  7676. ViewerCertificate *ViewerCertificate `type:"structure" required:"true"`
  7677. // The Web ACL Id (if any) associated with the distribution.
  7678. //
  7679. // WebACLId is a required field
  7680. WebACLId *string `type:"string" required:"true"`
  7681. }
  7682. // String returns the string representation
  7683. func (s DistributionSummary) String() string {
  7684. return awsutil.Prettify(s)
  7685. }
  7686. // GoString returns the string representation
  7687. func (s DistributionSummary) GoString() string {
  7688. return s.String()
  7689. }
  7690. // SetARN sets the ARN field's value.
  7691. func (s *DistributionSummary) SetARN(v string) *DistributionSummary {
  7692. s.ARN = &v
  7693. return s
  7694. }
  7695. // SetAliases sets the Aliases field's value.
  7696. func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary {
  7697. s.Aliases = v
  7698. return s
  7699. }
  7700. // SetCacheBehaviors sets the CacheBehaviors field's value.
  7701. func (s *DistributionSummary) SetCacheBehaviors(v *CacheBehaviors) *DistributionSummary {
  7702. s.CacheBehaviors = v
  7703. return s
  7704. }
  7705. // SetComment sets the Comment field's value.
  7706. func (s *DistributionSummary) SetComment(v string) *DistributionSummary {
  7707. s.Comment = &v
  7708. return s
  7709. }
  7710. // SetCustomErrorResponses sets the CustomErrorResponses field's value.
  7711. func (s *DistributionSummary) SetCustomErrorResponses(v *CustomErrorResponses) *DistributionSummary {
  7712. s.CustomErrorResponses = v
  7713. return s
  7714. }
  7715. // SetDefaultCacheBehavior sets the DefaultCacheBehavior field's value.
  7716. func (s *DistributionSummary) SetDefaultCacheBehavior(v *DefaultCacheBehavior) *DistributionSummary {
  7717. s.DefaultCacheBehavior = v
  7718. return s
  7719. }
  7720. // SetDomainName sets the DomainName field's value.
  7721. func (s *DistributionSummary) SetDomainName(v string) *DistributionSummary {
  7722. s.DomainName = &v
  7723. return s
  7724. }
  7725. // SetEnabled sets the Enabled field's value.
  7726. func (s *DistributionSummary) SetEnabled(v bool) *DistributionSummary {
  7727. s.Enabled = &v
  7728. return s
  7729. }
  7730. // SetHttpVersion sets the HttpVersion field's value.
  7731. func (s *DistributionSummary) SetHttpVersion(v string) *DistributionSummary {
  7732. s.HttpVersion = &v
  7733. return s
  7734. }
  7735. // SetId sets the Id field's value.
  7736. func (s *DistributionSummary) SetId(v string) *DistributionSummary {
  7737. s.Id = &v
  7738. return s
  7739. }
  7740. // SetIsIPV6Enabled sets the IsIPV6Enabled field's value.
  7741. func (s *DistributionSummary) SetIsIPV6Enabled(v bool) *DistributionSummary {
  7742. s.IsIPV6Enabled = &v
  7743. return s
  7744. }
  7745. // SetLastModifiedTime sets the LastModifiedTime field's value.
  7746. func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSummary {
  7747. s.LastModifiedTime = &v
  7748. return s
  7749. }
  7750. // SetOriginGroups sets the OriginGroups field's value.
  7751. func (s *DistributionSummary) SetOriginGroups(v *OriginGroups) *DistributionSummary {
  7752. s.OriginGroups = v
  7753. return s
  7754. }
  7755. // SetOrigins sets the Origins field's value.
  7756. func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary {
  7757. s.Origins = v
  7758. return s
  7759. }
  7760. // SetPriceClass sets the PriceClass field's value.
  7761. func (s *DistributionSummary) SetPriceClass(v string) *DistributionSummary {
  7762. s.PriceClass = &v
  7763. return s
  7764. }
  7765. // SetRestrictions sets the Restrictions field's value.
  7766. func (s *DistributionSummary) SetRestrictions(v *Restrictions) *DistributionSummary {
  7767. s.Restrictions = v
  7768. return s
  7769. }
  7770. // SetStatus sets the Status field's value.
  7771. func (s *DistributionSummary) SetStatus(v string) *DistributionSummary {
  7772. s.Status = &v
  7773. return s
  7774. }
  7775. // SetViewerCertificate sets the ViewerCertificate field's value.
  7776. func (s *DistributionSummary) SetViewerCertificate(v *ViewerCertificate) *DistributionSummary {
  7777. s.ViewerCertificate = v
  7778. return s
  7779. }
  7780. // SetWebACLId sets the WebACLId field's value.
  7781. func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary {
  7782. s.WebACLId = &v
  7783. return s
  7784. }
  7785. // Complex data type for field-level encryption profiles that includes all of
  7786. // the encryption entities.
  7787. type EncryptionEntities struct {
  7788. _ struct{} `type:"structure"`
  7789. // An array of field patterns in a field-level encryption content type-profile
  7790. // mapping.
  7791. Items []*EncryptionEntity `locationNameList:"EncryptionEntity" type:"list"`
  7792. // Number of field pattern items in a field-level encryption content type-profile
  7793. // mapping.
  7794. //
  7795. // Quantity is a required field
  7796. Quantity *int64 `type:"integer" required:"true"`
  7797. }
  7798. // String returns the string representation
  7799. func (s EncryptionEntities) String() string {
  7800. return awsutil.Prettify(s)
  7801. }
  7802. // GoString returns the string representation
  7803. func (s EncryptionEntities) GoString() string {
  7804. return s.String()
  7805. }
  7806. // Validate inspects the fields of the type to determine if they are valid.
  7807. func (s *EncryptionEntities) Validate() error {
  7808. invalidParams := request.ErrInvalidParams{Context: "EncryptionEntities"}
  7809. if s.Quantity == nil {
  7810. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  7811. }
  7812. if s.Items != nil {
  7813. for i, v := range s.Items {
  7814. if v == nil {
  7815. continue
  7816. }
  7817. if err := v.Validate(); err != nil {
  7818. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  7819. }
  7820. }
  7821. }
  7822. if invalidParams.Len() > 0 {
  7823. return invalidParams
  7824. }
  7825. return nil
  7826. }
  7827. // SetItems sets the Items field's value.
  7828. func (s *EncryptionEntities) SetItems(v []*EncryptionEntity) *EncryptionEntities {
  7829. s.Items = v
  7830. return s
  7831. }
  7832. // SetQuantity sets the Quantity field's value.
  7833. func (s *EncryptionEntities) SetQuantity(v int64) *EncryptionEntities {
  7834. s.Quantity = &v
  7835. return s
  7836. }
  7837. // Complex data type for field-level encryption profiles that includes the encryption
  7838. // key and field pattern specifications.
  7839. type EncryptionEntity struct {
  7840. _ struct{} `type:"structure"`
  7841. // Field patterns in a field-level encryption content type profile specify the
  7842. // fields that you want to be encrypted. You can provide the full field name,
  7843. // or any beginning characters followed by a wildcard (*). You can't overlap
  7844. // field patterns. For example, you can't have both ABC* and AB*. Note that
  7845. // field patterns are case-sensitive.
  7846. //
  7847. // FieldPatterns is a required field
  7848. FieldPatterns *FieldPatterns `type:"structure" required:"true"`
  7849. // The provider associated with the public key being used for encryption. This
  7850. // value must also be provided with the private key for applications to be able
  7851. // to decrypt data.
  7852. //
  7853. // ProviderId is a required field
  7854. ProviderId *string `type:"string" required:"true"`
  7855. // The public key associated with a set of field-level encryption patterns,
  7856. // to be used when encrypting the fields that match the patterns.
  7857. //
  7858. // PublicKeyId is a required field
  7859. PublicKeyId *string `type:"string" required:"true"`
  7860. }
  7861. // String returns the string representation
  7862. func (s EncryptionEntity) String() string {
  7863. return awsutil.Prettify(s)
  7864. }
  7865. // GoString returns the string representation
  7866. func (s EncryptionEntity) GoString() string {
  7867. return s.String()
  7868. }
  7869. // Validate inspects the fields of the type to determine if they are valid.
  7870. func (s *EncryptionEntity) Validate() error {
  7871. invalidParams := request.ErrInvalidParams{Context: "EncryptionEntity"}
  7872. if s.FieldPatterns == nil {
  7873. invalidParams.Add(request.NewErrParamRequired("FieldPatterns"))
  7874. }
  7875. if s.ProviderId == nil {
  7876. invalidParams.Add(request.NewErrParamRequired("ProviderId"))
  7877. }
  7878. if s.PublicKeyId == nil {
  7879. invalidParams.Add(request.NewErrParamRequired("PublicKeyId"))
  7880. }
  7881. if s.FieldPatterns != nil {
  7882. if err := s.FieldPatterns.Validate(); err != nil {
  7883. invalidParams.AddNested("FieldPatterns", err.(request.ErrInvalidParams))
  7884. }
  7885. }
  7886. if invalidParams.Len() > 0 {
  7887. return invalidParams
  7888. }
  7889. return nil
  7890. }
  7891. // SetFieldPatterns sets the FieldPatterns field's value.
  7892. func (s *EncryptionEntity) SetFieldPatterns(v *FieldPatterns) *EncryptionEntity {
  7893. s.FieldPatterns = v
  7894. return s
  7895. }
  7896. // SetProviderId sets the ProviderId field's value.
  7897. func (s *EncryptionEntity) SetProviderId(v string) *EncryptionEntity {
  7898. s.ProviderId = &v
  7899. return s
  7900. }
  7901. // SetPublicKeyId sets the PublicKeyId field's value.
  7902. func (s *EncryptionEntity) SetPublicKeyId(v string) *EncryptionEntity {
  7903. s.PublicKeyId = &v
  7904. return s
  7905. }
  7906. // A complex data type that includes the profile configurations and other options
  7907. // specified for field-level encryption.
  7908. type FieldLevelEncryption struct {
  7909. _ struct{} `type:"structure"`
  7910. // A complex data type that includes the profile configurations specified for
  7911. // field-level encryption.
  7912. //
  7913. // FieldLevelEncryptionConfig is a required field
  7914. FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure" required:"true"`
  7915. // The configuration ID for a field-level encryption configuration which includes
  7916. // a set of profiles that specify certain selected data fields to be encrypted
  7917. // by specific public keys.
  7918. //
  7919. // Id is a required field
  7920. Id *string `type:"string" required:"true"`
  7921. // The last time the field-level encryption configuration was changed.
  7922. //
  7923. // LastModifiedTime is a required field
  7924. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  7925. }
  7926. // String returns the string representation
  7927. func (s FieldLevelEncryption) String() string {
  7928. return awsutil.Prettify(s)
  7929. }
  7930. // GoString returns the string representation
  7931. func (s FieldLevelEncryption) GoString() string {
  7932. return s.String()
  7933. }
  7934. // SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value.
  7935. func (s *FieldLevelEncryption) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *FieldLevelEncryption {
  7936. s.FieldLevelEncryptionConfig = v
  7937. return s
  7938. }
  7939. // SetId sets the Id field's value.
  7940. func (s *FieldLevelEncryption) SetId(v string) *FieldLevelEncryption {
  7941. s.Id = &v
  7942. return s
  7943. }
  7944. // SetLastModifiedTime sets the LastModifiedTime field's value.
  7945. func (s *FieldLevelEncryption) SetLastModifiedTime(v time.Time) *FieldLevelEncryption {
  7946. s.LastModifiedTime = &v
  7947. return s
  7948. }
  7949. // A complex data type that includes the profile configurations specified for
  7950. // field-level encryption.
  7951. type FieldLevelEncryptionConfig struct {
  7952. _ struct{} `type:"structure"`
  7953. // A unique number that ensures the request can't be replayed.
  7954. //
  7955. // CallerReference is a required field
  7956. CallerReference *string `type:"string" required:"true"`
  7957. // An optional comment about the configuration.
  7958. Comment *string `type:"string"`
  7959. // A complex data type that specifies when to forward content if a content type
  7960. // isn't recognized and profiles to use as by default in a request if a query
  7961. // argument doesn't specify a profile to use.
  7962. ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"`
  7963. // A complex data type that specifies when to forward content if a profile isn't
  7964. // found and the profile that can be provided as a query argument in a request.
  7965. QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"`
  7966. }
  7967. // String returns the string representation
  7968. func (s FieldLevelEncryptionConfig) String() string {
  7969. return awsutil.Prettify(s)
  7970. }
  7971. // GoString returns the string representation
  7972. func (s FieldLevelEncryptionConfig) GoString() string {
  7973. return s.String()
  7974. }
  7975. // Validate inspects the fields of the type to determine if they are valid.
  7976. func (s *FieldLevelEncryptionConfig) Validate() error {
  7977. invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionConfig"}
  7978. if s.CallerReference == nil {
  7979. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  7980. }
  7981. if s.ContentTypeProfileConfig != nil {
  7982. if err := s.ContentTypeProfileConfig.Validate(); err != nil {
  7983. invalidParams.AddNested("ContentTypeProfileConfig", err.(request.ErrInvalidParams))
  7984. }
  7985. }
  7986. if s.QueryArgProfileConfig != nil {
  7987. if err := s.QueryArgProfileConfig.Validate(); err != nil {
  7988. invalidParams.AddNested("QueryArgProfileConfig", err.(request.ErrInvalidParams))
  7989. }
  7990. }
  7991. if invalidParams.Len() > 0 {
  7992. return invalidParams
  7993. }
  7994. return nil
  7995. }
  7996. // SetCallerReference sets the CallerReference field's value.
  7997. func (s *FieldLevelEncryptionConfig) SetCallerReference(v string) *FieldLevelEncryptionConfig {
  7998. s.CallerReference = &v
  7999. return s
  8000. }
  8001. // SetComment sets the Comment field's value.
  8002. func (s *FieldLevelEncryptionConfig) SetComment(v string) *FieldLevelEncryptionConfig {
  8003. s.Comment = &v
  8004. return s
  8005. }
  8006. // SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value.
  8007. func (s *FieldLevelEncryptionConfig) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionConfig {
  8008. s.ContentTypeProfileConfig = v
  8009. return s
  8010. }
  8011. // SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value.
  8012. func (s *FieldLevelEncryptionConfig) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionConfig {
  8013. s.QueryArgProfileConfig = v
  8014. return s
  8015. }
  8016. // List of field-level encrpytion configurations.
  8017. type FieldLevelEncryptionList struct {
  8018. _ struct{} `type:"structure"`
  8019. // An array of field-level encryption items.
  8020. Items []*FieldLevelEncryptionSummary `locationNameList:"FieldLevelEncryptionSummary" type:"list"`
  8021. // The maximum number of elements you want in the response body.
  8022. //
  8023. // MaxItems is a required field
  8024. MaxItems *int64 `type:"integer" required:"true"`
  8025. // If there are more elements to be listed, this element is present and contains
  8026. // the value that you can use for the Marker request parameter to continue listing
  8027. // your configurations where you left off.
  8028. NextMarker *string `type:"string"`
  8029. // The number of field-level encryption items.
  8030. //
  8031. // Quantity is a required field
  8032. Quantity *int64 `type:"integer" required:"true"`
  8033. }
  8034. // String returns the string representation
  8035. func (s FieldLevelEncryptionList) String() string {
  8036. return awsutil.Prettify(s)
  8037. }
  8038. // GoString returns the string representation
  8039. func (s FieldLevelEncryptionList) GoString() string {
  8040. return s.String()
  8041. }
  8042. // SetItems sets the Items field's value.
  8043. func (s *FieldLevelEncryptionList) SetItems(v []*FieldLevelEncryptionSummary) *FieldLevelEncryptionList {
  8044. s.Items = v
  8045. return s
  8046. }
  8047. // SetMaxItems sets the MaxItems field's value.
  8048. func (s *FieldLevelEncryptionList) SetMaxItems(v int64) *FieldLevelEncryptionList {
  8049. s.MaxItems = &v
  8050. return s
  8051. }
  8052. // SetNextMarker sets the NextMarker field's value.
  8053. func (s *FieldLevelEncryptionList) SetNextMarker(v string) *FieldLevelEncryptionList {
  8054. s.NextMarker = &v
  8055. return s
  8056. }
  8057. // SetQuantity sets the Quantity field's value.
  8058. func (s *FieldLevelEncryptionList) SetQuantity(v int64) *FieldLevelEncryptionList {
  8059. s.Quantity = &v
  8060. return s
  8061. }
  8062. // A complex data type for field-level encryption profiles.
  8063. type FieldLevelEncryptionProfile struct {
  8064. _ struct{} `type:"structure"`
  8065. // A complex data type that includes the profile name and the encryption entities
  8066. // for the field-level encryption profile.
  8067. //
  8068. // FieldLevelEncryptionProfileConfig is a required field
  8069. FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure" required:"true"`
  8070. // The ID for a field-level encryption profile configuration which includes
  8071. // a set of profiles that specify certain selected data fields to be encrypted
  8072. // by specific public keys.
  8073. //
  8074. // Id is a required field
  8075. Id *string `type:"string" required:"true"`
  8076. // The last time the field-level encryption profile was updated.
  8077. //
  8078. // LastModifiedTime is a required field
  8079. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  8080. }
  8081. // String returns the string representation
  8082. func (s FieldLevelEncryptionProfile) String() string {
  8083. return awsutil.Prettify(s)
  8084. }
  8085. // GoString returns the string representation
  8086. func (s FieldLevelEncryptionProfile) GoString() string {
  8087. return s.String()
  8088. }
  8089. // SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value.
  8090. func (s *FieldLevelEncryptionProfile) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *FieldLevelEncryptionProfile {
  8091. s.FieldLevelEncryptionProfileConfig = v
  8092. return s
  8093. }
  8094. // SetId sets the Id field's value.
  8095. func (s *FieldLevelEncryptionProfile) SetId(v string) *FieldLevelEncryptionProfile {
  8096. s.Id = &v
  8097. return s
  8098. }
  8099. // SetLastModifiedTime sets the LastModifiedTime field's value.
  8100. func (s *FieldLevelEncryptionProfile) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfile {
  8101. s.LastModifiedTime = &v
  8102. return s
  8103. }
  8104. // A complex data type of profiles for the field-level encryption.
  8105. type FieldLevelEncryptionProfileConfig struct {
  8106. _ struct{} `type:"structure"`
  8107. // A unique number that ensures that the request can't be replayed.
  8108. //
  8109. // CallerReference is a required field
  8110. CallerReference *string `type:"string" required:"true"`
  8111. // An optional comment for the field-level encryption profile.
  8112. Comment *string `type:"string"`
  8113. // A complex data type of encryption entities for the field-level encryption
  8114. // profile that include the public key ID, provider, and field patterns for
  8115. // specifying which fields to encrypt with this key.
  8116. //
  8117. // EncryptionEntities is a required field
  8118. EncryptionEntities *EncryptionEntities `type:"structure" required:"true"`
  8119. // Profile name for the field-level encryption profile.
  8120. //
  8121. // Name is a required field
  8122. Name *string `type:"string" required:"true"`
  8123. }
  8124. // String returns the string representation
  8125. func (s FieldLevelEncryptionProfileConfig) String() string {
  8126. return awsutil.Prettify(s)
  8127. }
  8128. // GoString returns the string representation
  8129. func (s FieldLevelEncryptionProfileConfig) GoString() string {
  8130. return s.String()
  8131. }
  8132. // Validate inspects the fields of the type to determine if they are valid.
  8133. func (s *FieldLevelEncryptionProfileConfig) Validate() error {
  8134. invalidParams := request.ErrInvalidParams{Context: "FieldLevelEncryptionProfileConfig"}
  8135. if s.CallerReference == nil {
  8136. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  8137. }
  8138. if s.EncryptionEntities == nil {
  8139. invalidParams.Add(request.NewErrParamRequired("EncryptionEntities"))
  8140. }
  8141. if s.Name == nil {
  8142. invalidParams.Add(request.NewErrParamRequired("Name"))
  8143. }
  8144. if s.EncryptionEntities != nil {
  8145. if err := s.EncryptionEntities.Validate(); err != nil {
  8146. invalidParams.AddNested("EncryptionEntities", err.(request.ErrInvalidParams))
  8147. }
  8148. }
  8149. if invalidParams.Len() > 0 {
  8150. return invalidParams
  8151. }
  8152. return nil
  8153. }
  8154. // SetCallerReference sets the CallerReference field's value.
  8155. func (s *FieldLevelEncryptionProfileConfig) SetCallerReference(v string) *FieldLevelEncryptionProfileConfig {
  8156. s.CallerReference = &v
  8157. return s
  8158. }
  8159. // SetComment sets the Comment field's value.
  8160. func (s *FieldLevelEncryptionProfileConfig) SetComment(v string) *FieldLevelEncryptionProfileConfig {
  8161. s.Comment = &v
  8162. return s
  8163. }
  8164. // SetEncryptionEntities sets the EncryptionEntities field's value.
  8165. func (s *FieldLevelEncryptionProfileConfig) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileConfig {
  8166. s.EncryptionEntities = v
  8167. return s
  8168. }
  8169. // SetName sets the Name field's value.
  8170. func (s *FieldLevelEncryptionProfileConfig) SetName(v string) *FieldLevelEncryptionProfileConfig {
  8171. s.Name = &v
  8172. return s
  8173. }
  8174. // List of field-level encryption profiles.
  8175. type FieldLevelEncryptionProfileList struct {
  8176. _ struct{} `type:"structure"`
  8177. // The field-level encryption profile items.
  8178. Items []*FieldLevelEncryptionProfileSummary `locationNameList:"FieldLevelEncryptionProfileSummary" type:"list"`
  8179. // The maximum number of field-level encryption profiles you want in the response
  8180. // body.
  8181. //
  8182. // MaxItems is a required field
  8183. MaxItems *int64 `type:"integer" required:"true"`
  8184. // If there are more elements to be listed, this element is present and contains
  8185. // the value that you can use for the Marker request parameter to continue listing
  8186. // your profiles where you left off.
  8187. NextMarker *string `type:"string"`
  8188. // The number of field-level encryption profiles.
  8189. //
  8190. // Quantity is a required field
  8191. Quantity *int64 `type:"integer" required:"true"`
  8192. }
  8193. // String returns the string representation
  8194. func (s FieldLevelEncryptionProfileList) String() string {
  8195. return awsutil.Prettify(s)
  8196. }
  8197. // GoString returns the string representation
  8198. func (s FieldLevelEncryptionProfileList) GoString() string {
  8199. return s.String()
  8200. }
  8201. // SetItems sets the Items field's value.
  8202. func (s *FieldLevelEncryptionProfileList) SetItems(v []*FieldLevelEncryptionProfileSummary) *FieldLevelEncryptionProfileList {
  8203. s.Items = v
  8204. return s
  8205. }
  8206. // SetMaxItems sets the MaxItems field's value.
  8207. func (s *FieldLevelEncryptionProfileList) SetMaxItems(v int64) *FieldLevelEncryptionProfileList {
  8208. s.MaxItems = &v
  8209. return s
  8210. }
  8211. // SetNextMarker sets the NextMarker field's value.
  8212. func (s *FieldLevelEncryptionProfileList) SetNextMarker(v string) *FieldLevelEncryptionProfileList {
  8213. s.NextMarker = &v
  8214. return s
  8215. }
  8216. // SetQuantity sets the Quantity field's value.
  8217. func (s *FieldLevelEncryptionProfileList) SetQuantity(v int64) *FieldLevelEncryptionProfileList {
  8218. s.Quantity = &v
  8219. return s
  8220. }
  8221. // The field-level encryption profile summary.
  8222. type FieldLevelEncryptionProfileSummary struct {
  8223. _ struct{} `type:"structure"`
  8224. // An optional comment for the field-level encryption profile summary.
  8225. Comment *string `type:"string"`
  8226. // A complex data type of encryption entities for the field-level encryption
  8227. // profile that include the public key ID, provider, and field patterns for
  8228. // specifying which fields to encrypt with this key.
  8229. //
  8230. // EncryptionEntities is a required field
  8231. EncryptionEntities *EncryptionEntities `type:"structure" required:"true"`
  8232. // ID for the field-level encryption profile summary.
  8233. //
  8234. // Id is a required field
  8235. Id *string `type:"string" required:"true"`
  8236. // The time when the the field-level encryption profile summary was last updated.
  8237. //
  8238. // LastModifiedTime is a required field
  8239. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  8240. // Name for the field-level encryption profile summary.
  8241. //
  8242. // Name is a required field
  8243. Name *string `type:"string" required:"true"`
  8244. }
  8245. // String returns the string representation
  8246. func (s FieldLevelEncryptionProfileSummary) String() string {
  8247. return awsutil.Prettify(s)
  8248. }
  8249. // GoString returns the string representation
  8250. func (s FieldLevelEncryptionProfileSummary) GoString() string {
  8251. return s.String()
  8252. }
  8253. // SetComment sets the Comment field's value.
  8254. func (s *FieldLevelEncryptionProfileSummary) SetComment(v string) *FieldLevelEncryptionProfileSummary {
  8255. s.Comment = &v
  8256. return s
  8257. }
  8258. // SetEncryptionEntities sets the EncryptionEntities field's value.
  8259. func (s *FieldLevelEncryptionProfileSummary) SetEncryptionEntities(v *EncryptionEntities) *FieldLevelEncryptionProfileSummary {
  8260. s.EncryptionEntities = v
  8261. return s
  8262. }
  8263. // SetId sets the Id field's value.
  8264. func (s *FieldLevelEncryptionProfileSummary) SetId(v string) *FieldLevelEncryptionProfileSummary {
  8265. s.Id = &v
  8266. return s
  8267. }
  8268. // SetLastModifiedTime sets the LastModifiedTime field's value.
  8269. func (s *FieldLevelEncryptionProfileSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionProfileSummary {
  8270. s.LastModifiedTime = &v
  8271. return s
  8272. }
  8273. // SetName sets the Name field's value.
  8274. func (s *FieldLevelEncryptionProfileSummary) SetName(v string) *FieldLevelEncryptionProfileSummary {
  8275. s.Name = &v
  8276. return s
  8277. }
  8278. // A summary of a field-level encryption item.
  8279. type FieldLevelEncryptionSummary struct {
  8280. _ struct{} `type:"structure"`
  8281. // An optional comment about the field-level encryption item.
  8282. Comment *string `type:"string"`
  8283. // A summary of a content type-profile mapping.
  8284. ContentTypeProfileConfig *ContentTypeProfileConfig `type:"structure"`
  8285. // The unique ID of a field-level encryption item.
  8286. //
  8287. // Id is a required field
  8288. Id *string `type:"string" required:"true"`
  8289. // The last time that the summary of field-level encryption items was modified.
  8290. //
  8291. // LastModifiedTime is a required field
  8292. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  8293. // A summary of a query argument-profile mapping.
  8294. QueryArgProfileConfig *QueryArgProfileConfig `type:"structure"`
  8295. }
  8296. // String returns the string representation
  8297. func (s FieldLevelEncryptionSummary) String() string {
  8298. return awsutil.Prettify(s)
  8299. }
  8300. // GoString returns the string representation
  8301. func (s FieldLevelEncryptionSummary) GoString() string {
  8302. return s.String()
  8303. }
  8304. // SetComment sets the Comment field's value.
  8305. func (s *FieldLevelEncryptionSummary) SetComment(v string) *FieldLevelEncryptionSummary {
  8306. s.Comment = &v
  8307. return s
  8308. }
  8309. // SetContentTypeProfileConfig sets the ContentTypeProfileConfig field's value.
  8310. func (s *FieldLevelEncryptionSummary) SetContentTypeProfileConfig(v *ContentTypeProfileConfig) *FieldLevelEncryptionSummary {
  8311. s.ContentTypeProfileConfig = v
  8312. return s
  8313. }
  8314. // SetId sets the Id field's value.
  8315. func (s *FieldLevelEncryptionSummary) SetId(v string) *FieldLevelEncryptionSummary {
  8316. s.Id = &v
  8317. return s
  8318. }
  8319. // SetLastModifiedTime sets the LastModifiedTime field's value.
  8320. func (s *FieldLevelEncryptionSummary) SetLastModifiedTime(v time.Time) *FieldLevelEncryptionSummary {
  8321. s.LastModifiedTime = &v
  8322. return s
  8323. }
  8324. // SetQueryArgProfileConfig sets the QueryArgProfileConfig field's value.
  8325. func (s *FieldLevelEncryptionSummary) SetQueryArgProfileConfig(v *QueryArgProfileConfig) *FieldLevelEncryptionSummary {
  8326. s.QueryArgProfileConfig = v
  8327. return s
  8328. }
  8329. // A complex data type that includes the field patterns to match for field-level
  8330. // encryption.
  8331. type FieldPatterns struct {
  8332. _ struct{} `type:"structure"`
  8333. // An array of the field-level encryption field patterns.
  8334. Items []*string `locationNameList:"FieldPattern" type:"list"`
  8335. // The number of field-level encryption field patterns.
  8336. //
  8337. // Quantity is a required field
  8338. Quantity *int64 `type:"integer" required:"true"`
  8339. }
  8340. // String returns the string representation
  8341. func (s FieldPatterns) String() string {
  8342. return awsutil.Prettify(s)
  8343. }
  8344. // GoString returns the string representation
  8345. func (s FieldPatterns) GoString() string {
  8346. return s.String()
  8347. }
  8348. // Validate inspects the fields of the type to determine if they are valid.
  8349. func (s *FieldPatterns) Validate() error {
  8350. invalidParams := request.ErrInvalidParams{Context: "FieldPatterns"}
  8351. if s.Quantity == nil {
  8352. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  8353. }
  8354. if invalidParams.Len() > 0 {
  8355. return invalidParams
  8356. }
  8357. return nil
  8358. }
  8359. // SetItems sets the Items field's value.
  8360. func (s *FieldPatterns) SetItems(v []*string) *FieldPatterns {
  8361. s.Items = v
  8362. return s
  8363. }
  8364. // SetQuantity sets the Quantity field's value.
  8365. func (s *FieldPatterns) SetQuantity(v int64) *FieldPatterns {
  8366. s.Quantity = &v
  8367. return s
  8368. }
  8369. // A complex type that specifies how CloudFront handles query strings and cookies.
  8370. type ForwardedValues struct {
  8371. _ struct{} `type:"structure"`
  8372. // A complex type that specifies whether you want CloudFront to forward cookies
  8373. // to the origin and, if so, which ones. For more information about forwarding
  8374. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  8375. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  8376. // in the Amazon CloudFront Developer Guide.
  8377. //
  8378. // Cookies is a required field
  8379. Cookies *CookiePreference `type:"structure" required:"true"`
  8380. // A complex type that specifies the Headers, if any, that you want CloudFront
  8381. // to base caching on for this cache behavior.
  8382. Headers *Headers `type:"structure"`
  8383. // Indicates whether you want CloudFront to forward query strings to the origin
  8384. // that is associated with this cache behavior and cache based on the query
  8385. // string parameters. CloudFront behavior depends on the value of QueryString
  8386. // and on the values that you specify for QueryStringCacheKeys, if any:
  8387. //
  8388. // If you specify true for QueryString and you don't specify any values for
  8389. // QueryStringCacheKeys, CloudFront forwards all query string parameters to
  8390. // the origin and caches based on all query string parameters. Depending on
  8391. // how many query string parameters and values you have, this can adversely
  8392. // affect performance because CloudFront must forward more requests to the origin.
  8393. //
  8394. // If you specify true for QueryString and you specify one or more values for
  8395. // QueryStringCacheKeys, CloudFront forwards all query string parameters to
  8396. // the origin, but it only caches based on the query string parameters that
  8397. // you specify.
  8398. //
  8399. // If you specify false for QueryString, CloudFront doesn't forward any query
  8400. // string parameters to the origin, and doesn't cache based on query string
  8401. // parameters.
  8402. //
  8403. // For more information, see Configuring CloudFront to Cache Based on Query
  8404. // String Parameters (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html)
  8405. // in the Amazon CloudFront Developer Guide.
  8406. //
  8407. // QueryString is a required field
  8408. QueryString *bool `type:"boolean" required:"true"`
  8409. // A complex type that contains information about the query string parameters
  8410. // that you want CloudFront to use for caching for this cache behavior.
  8411. QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"`
  8412. }
  8413. // String returns the string representation
  8414. func (s ForwardedValues) String() string {
  8415. return awsutil.Prettify(s)
  8416. }
  8417. // GoString returns the string representation
  8418. func (s ForwardedValues) GoString() string {
  8419. return s.String()
  8420. }
  8421. // Validate inspects the fields of the type to determine if they are valid.
  8422. func (s *ForwardedValues) Validate() error {
  8423. invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"}
  8424. if s.Cookies == nil {
  8425. invalidParams.Add(request.NewErrParamRequired("Cookies"))
  8426. }
  8427. if s.QueryString == nil {
  8428. invalidParams.Add(request.NewErrParamRequired("QueryString"))
  8429. }
  8430. if s.Cookies != nil {
  8431. if err := s.Cookies.Validate(); err != nil {
  8432. invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams))
  8433. }
  8434. }
  8435. if s.Headers != nil {
  8436. if err := s.Headers.Validate(); err != nil {
  8437. invalidParams.AddNested("Headers", err.(request.ErrInvalidParams))
  8438. }
  8439. }
  8440. if s.QueryStringCacheKeys != nil {
  8441. if err := s.QueryStringCacheKeys.Validate(); err != nil {
  8442. invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams))
  8443. }
  8444. }
  8445. if invalidParams.Len() > 0 {
  8446. return invalidParams
  8447. }
  8448. return nil
  8449. }
  8450. // SetCookies sets the Cookies field's value.
  8451. func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues {
  8452. s.Cookies = v
  8453. return s
  8454. }
  8455. // SetHeaders sets the Headers field's value.
  8456. func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues {
  8457. s.Headers = v
  8458. return s
  8459. }
  8460. // SetQueryString sets the QueryString field's value.
  8461. func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues {
  8462. s.QueryString = &v
  8463. return s
  8464. }
  8465. // SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value.
  8466. func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues {
  8467. s.QueryStringCacheKeys = v
  8468. return s
  8469. }
  8470. // A complex type that controls the countries in which your content is distributed.
  8471. // CloudFront determines the location of your users using MaxMind GeoIP databases.
  8472. type GeoRestriction struct {
  8473. _ struct{} `type:"structure"`
  8474. // A complex type that contains a Location element for each country in which
  8475. // you want CloudFront either to distribute your content (whitelist) or not
  8476. // distribute your content (blacklist).
  8477. //
  8478. // The Location element is a two-letter, uppercase country code for a country
  8479. // that you want to include in your blacklist or whitelist. Include one Location
  8480. // element for each country.
  8481. //
  8482. // CloudFront and MaxMind both use ISO 3166 country codes. For the current list
  8483. // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on
  8484. // the International Organization for Standardization website. You can also
  8485. // refer to the country list on the CloudFront console, which includes both
  8486. // country names and codes.
  8487. Items []*string `locationNameList:"Location" type:"list"`
  8488. // When geo restriction is enabled, this is the number of countries in your
  8489. // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0,
  8490. // and you can omit Items.
  8491. //
  8492. // Quantity is a required field
  8493. Quantity *int64 `type:"integer" required:"true"`
  8494. // The method that you want to use to restrict distribution of your content
  8495. // by country:
  8496. //
  8497. // * none: No geo restriction is enabled, meaning access to content is not
  8498. // restricted by client geo location.
  8499. //
  8500. // * blacklist: The Location elements specify the countries in which you
  8501. // don't want CloudFront to distribute your content.
  8502. //
  8503. // * whitelist: The Location elements specify the countries in which you
  8504. // want CloudFront to distribute your content.
  8505. //
  8506. // RestrictionType is a required field
  8507. RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"`
  8508. }
  8509. // String returns the string representation
  8510. func (s GeoRestriction) String() string {
  8511. return awsutil.Prettify(s)
  8512. }
  8513. // GoString returns the string representation
  8514. func (s GeoRestriction) GoString() string {
  8515. return s.String()
  8516. }
  8517. // Validate inspects the fields of the type to determine if they are valid.
  8518. func (s *GeoRestriction) Validate() error {
  8519. invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"}
  8520. if s.Quantity == nil {
  8521. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  8522. }
  8523. if s.RestrictionType == nil {
  8524. invalidParams.Add(request.NewErrParamRequired("RestrictionType"))
  8525. }
  8526. if invalidParams.Len() > 0 {
  8527. return invalidParams
  8528. }
  8529. return nil
  8530. }
  8531. // SetItems sets the Items field's value.
  8532. func (s *GeoRestriction) SetItems(v []*string) *GeoRestriction {
  8533. s.Items = v
  8534. return s
  8535. }
  8536. // SetQuantity sets the Quantity field's value.
  8537. func (s *GeoRestriction) SetQuantity(v int64) *GeoRestriction {
  8538. s.Quantity = &v
  8539. return s
  8540. }
  8541. // SetRestrictionType sets the RestrictionType field's value.
  8542. func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction {
  8543. s.RestrictionType = &v
  8544. return s
  8545. }
  8546. // The origin access identity's configuration information. For more information,
  8547. // see CloudFrontOriginAccessIdentityConfigComplexType.
  8548. type GetCloudFrontOriginAccessIdentityConfigInput struct {
  8549. _ struct{} `type:"structure"`
  8550. // The identity's ID.
  8551. //
  8552. // Id is a required field
  8553. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8554. }
  8555. // String returns the string representation
  8556. func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string {
  8557. return awsutil.Prettify(s)
  8558. }
  8559. // GoString returns the string representation
  8560. func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string {
  8561. return s.String()
  8562. }
  8563. // Validate inspects the fields of the type to determine if they are valid.
  8564. func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error {
  8565. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"}
  8566. if s.Id == nil {
  8567. invalidParams.Add(request.NewErrParamRequired("Id"))
  8568. }
  8569. if s.Id != nil && len(*s.Id) < 1 {
  8570. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8571. }
  8572. if invalidParams.Len() > 0 {
  8573. return invalidParams
  8574. }
  8575. return nil
  8576. }
  8577. // SetId sets the Id field's value.
  8578. func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloudFrontOriginAccessIdentityConfigInput {
  8579. s.Id = &v
  8580. return s
  8581. }
  8582. // The returned result of the corresponding request.
  8583. type GetCloudFrontOriginAccessIdentityConfigOutput struct {
  8584. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  8585. // The origin access identity's configuration information.
  8586. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  8587. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  8588. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8589. }
  8590. // String returns the string representation
  8591. func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string {
  8592. return awsutil.Prettify(s)
  8593. }
  8594. // GoString returns the string representation
  8595. func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string {
  8596. return s.String()
  8597. }
  8598. // SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value.
  8599. func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *GetCloudFrontOriginAccessIdentityConfigOutput {
  8600. s.CloudFrontOriginAccessIdentityConfig = v
  8601. return s
  8602. }
  8603. // SetETag sets the ETag field's value.
  8604. func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityConfigOutput {
  8605. s.ETag = &v
  8606. return s
  8607. }
  8608. // The request to get an origin access identity's information.
  8609. type GetCloudFrontOriginAccessIdentityInput struct {
  8610. _ struct{} `type:"structure"`
  8611. // The identity's ID.
  8612. //
  8613. // Id is a required field
  8614. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8615. }
  8616. // String returns the string representation
  8617. func (s GetCloudFrontOriginAccessIdentityInput) String() string {
  8618. return awsutil.Prettify(s)
  8619. }
  8620. // GoString returns the string representation
  8621. func (s GetCloudFrontOriginAccessIdentityInput) GoString() string {
  8622. return s.String()
  8623. }
  8624. // Validate inspects the fields of the type to determine if they are valid.
  8625. func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error {
  8626. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"}
  8627. if s.Id == nil {
  8628. invalidParams.Add(request.NewErrParamRequired("Id"))
  8629. }
  8630. if s.Id != nil && len(*s.Id) < 1 {
  8631. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8632. }
  8633. if invalidParams.Len() > 0 {
  8634. return invalidParams
  8635. }
  8636. return nil
  8637. }
  8638. // SetId sets the Id field's value.
  8639. func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontOriginAccessIdentityInput {
  8640. s.Id = &v
  8641. return s
  8642. }
  8643. // The returned result of the corresponding request.
  8644. type GetCloudFrontOriginAccessIdentityOutput struct {
  8645. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  8646. // The origin access identity's information.
  8647. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  8648. // The current version of the origin access identity's information. For example:
  8649. // E2QWRUHAPOMQZL.
  8650. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8651. }
  8652. // String returns the string representation
  8653. func (s GetCloudFrontOriginAccessIdentityOutput) String() string {
  8654. return awsutil.Prettify(s)
  8655. }
  8656. // GoString returns the string representation
  8657. func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string {
  8658. return s.String()
  8659. }
  8660. // SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value.
  8661. func (s *GetCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *GetCloudFrontOriginAccessIdentityOutput {
  8662. s.CloudFrontOriginAccessIdentity = v
  8663. return s
  8664. }
  8665. // SetETag sets the ETag field's value.
  8666. func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFrontOriginAccessIdentityOutput {
  8667. s.ETag = &v
  8668. return s
  8669. }
  8670. // The request to get a distribution configuration.
  8671. type GetDistributionConfigInput struct {
  8672. _ struct{} `type:"structure"`
  8673. // The distribution's ID.
  8674. //
  8675. // Id is a required field
  8676. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8677. }
  8678. // String returns the string representation
  8679. func (s GetDistributionConfigInput) String() string {
  8680. return awsutil.Prettify(s)
  8681. }
  8682. // GoString returns the string representation
  8683. func (s GetDistributionConfigInput) GoString() string {
  8684. return s.String()
  8685. }
  8686. // Validate inspects the fields of the type to determine if they are valid.
  8687. func (s *GetDistributionConfigInput) Validate() error {
  8688. invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"}
  8689. if s.Id == nil {
  8690. invalidParams.Add(request.NewErrParamRequired("Id"))
  8691. }
  8692. if s.Id != nil && len(*s.Id) < 1 {
  8693. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8694. }
  8695. if invalidParams.Len() > 0 {
  8696. return invalidParams
  8697. }
  8698. return nil
  8699. }
  8700. // SetId sets the Id field's value.
  8701. func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput {
  8702. s.Id = &v
  8703. return s
  8704. }
  8705. // The returned result of the corresponding request.
  8706. type GetDistributionConfigOutput struct {
  8707. _ struct{} `type:"structure" payload:"DistributionConfig"`
  8708. // The distribution's configuration information.
  8709. DistributionConfig *DistributionConfig `type:"structure"`
  8710. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  8711. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8712. }
  8713. // String returns the string representation
  8714. func (s GetDistributionConfigOutput) String() string {
  8715. return awsutil.Prettify(s)
  8716. }
  8717. // GoString returns the string representation
  8718. func (s GetDistributionConfigOutput) GoString() string {
  8719. return s.String()
  8720. }
  8721. // SetDistributionConfig sets the DistributionConfig field's value.
  8722. func (s *GetDistributionConfigOutput) SetDistributionConfig(v *DistributionConfig) *GetDistributionConfigOutput {
  8723. s.DistributionConfig = v
  8724. return s
  8725. }
  8726. // SetETag sets the ETag field's value.
  8727. func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOutput {
  8728. s.ETag = &v
  8729. return s
  8730. }
  8731. // The request to get a distribution's information.
  8732. type GetDistributionInput struct {
  8733. _ struct{} `type:"structure"`
  8734. // The distribution's ID.
  8735. //
  8736. // Id is a required field
  8737. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8738. }
  8739. // String returns the string representation
  8740. func (s GetDistributionInput) String() string {
  8741. return awsutil.Prettify(s)
  8742. }
  8743. // GoString returns the string representation
  8744. func (s GetDistributionInput) GoString() string {
  8745. return s.String()
  8746. }
  8747. // Validate inspects the fields of the type to determine if they are valid.
  8748. func (s *GetDistributionInput) Validate() error {
  8749. invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"}
  8750. if s.Id == nil {
  8751. invalidParams.Add(request.NewErrParamRequired("Id"))
  8752. }
  8753. if s.Id != nil && len(*s.Id) < 1 {
  8754. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8755. }
  8756. if invalidParams.Len() > 0 {
  8757. return invalidParams
  8758. }
  8759. return nil
  8760. }
  8761. // SetId sets the Id field's value.
  8762. func (s *GetDistributionInput) SetId(v string) *GetDistributionInput {
  8763. s.Id = &v
  8764. return s
  8765. }
  8766. // The returned result of the corresponding request.
  8767. type GetDistributionOutput struct {
  8768. _ struct{} `type:"structure" payload:"Distribution"`
  8769. // The distribution's information.
  8770. Distribution *Distribution `type:"structure"`
  8771. // The current version of the distribution's information. For example: E2QWRUHAPOMQZL.
  8772. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8773. }
  8774. // String returns the string representation
  8775. func (s GetDistributionOutput) String() string {
  8776. return awsutil.Prettify(s)
  8777. }
  8778. // GoString returns the string representation
  8779. func (s GetDistributionOutput) GoString() string {
  8780. return s.String()
  8781. }
  8782. // SetDistribution sets the Distribution field's value.
  8783. func (s *GetDistributionOutput) SetDistribution(v *Distribution) *GetDistributionOutput {
  8784. s.Distribution = v
  8785. return s
  8786. }
  8787. // SetETag sets the ETag field's value.
  8788. func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput {
  8789. s.ETag = &v
  8790. return s
  8791. }
  8792. type GetFieldLevelEncryptionConfigInput struct {
  8793. _ struct{} `type:"structure"`
  8794. // Request the ID for the field-level encryption configuration information.
  8795. //
  8796. // Id is a required field
  8797. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8798. }
  8799. // String returns the string representation
  8800. func (s GetFieldLevelEncryptionConfigInput) String() string {
  8801. return awsutil.Prettify(s)
  8802. }
  8803. // GoString returns the string representation
  8804. func (s GetFieldLevelEncryptionConfigInput) GoString() string {
  8805. return s.String()
  8806. }
  8807. // Validate inspects the fields of the type to determine if they are valid.
  8808. func (s *GetFieldLevelEncryptionConfigInput) Validate() error {
  8809. invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionConfigInput"}
  8810. if s.Id == nil {
  8811. invalidParams.Add(request.NewErrParamRequired("Id"))
  8812. }
  8813. if s.Id != nil && len(*s.Id) < 1 {
  8814. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8815. }
  8816. if invalidParams.Len() > 0 {
  8817. return invalidParams
  8818. }
  8819. return nil
  8820. }
  8821. // SetId sets the Id field's value.
  8822. func (s *GetFieldLevelEncryptionConfigInput) SetId(v string) *GetFieldLevelEncryptionConfigInput {
  8823. s.Id = &v
  8824. return s
  8825. }
  8826. type GetFieldLevelEncryptionConfigOutput struct {
  8827. _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"`
  8828. // The current version of the field level encryption configuration. For example:
  8829. // E2QWRUHAPOMQZL.
  8830. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8831. // Return the field-level encryption configuration information.
  8832. FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `type:"structure"`
  8833. }
  8834. // String returns the string representation
  8835. func (s GetFieldLevelEncryptionConfigOutput) String() string {
  8836. return awsutil.Prettify(s)
  8837. }
  8838. // GoString returns the string representation
  8839. func (s GetFieldLevelEncryptionConfigOutput) GoString() string {
  8840. return s.String()
  8841. }
  8842. // SetETag sets the ETag field's value.
  8843. func (s *GetFieldLevelEncryptionConfigOutput) SetETag(v string) *GetFieldLevelEncryptionConfigOutput {
  8844. s.ETag = &v
  8845. return s
  8846. }
  8847. // SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value.
  8848. func (s *GetFieldLevelEncryptionConfigOutput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *GetFieldLevelEncryptionConfigOutput {
  8849. s.FieldLevelEncryptionConfig = v
  8850. return s
  8851. }
  8852. type GetFieldLevelEncryptionInput struct {
  8853. _ struct{} `type:"structure"`
  8854. // Request the ID for the field-level encryption configuration information.
  8855. //
  8856. // Id is a required field
  8857. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8858. }
  8859. // String returns the string representation
  8860. func (s GetFieldLevelEncryptionInput) String() string {
  8861. return awsutil.Prettify(s)
  8862. }
  8863. // GoString returns the string representation
  8864. func (s GetFieldLevelEncryptionInput) GoString() string {
  8865. return s.String()
  8866. }
  8867. // Validate inspects the fields of the type to determine if they are valid.
  8868. func (s *GetFieldLevelEncryptionInput) Validate() error {
  8869. invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionInput"}
  8870. if s.Id == nil {
  8871. invalidParams.Add(request.NewErrParamRequired("Id"))
  8872. }
  8873. if s.Id != nil && len(*s.Id) < 1 {
  8874. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8875. }
  8876. if invalidParams.Len() > 0 {
  8877. return invalidParams
  8878. }
  8879. return nil
  8880. }
  8881. // SetId sets the Id field's value.
  8882. func (s *GetFieldLevelEncryptionInput) SetId(v string) *GetFieldLevelEncryptionInput {
  8883. s.Id = &v
  8884. return s
  8885. }
  8886. type GetFieldLevelEncryptionOutput struct {
  8887. _ struct{} `type:"structure" payload:"FieldLevelEncryption"`
  8888. // The current version of the field level encryption configuration. For example:
  8889. // E2QWRUHAPOMQZL.
  8890. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8891. // Return the field-level encryption configuration information.
  8892. FieldLevelEncryption *FieldLevelEncryption `type:"structure"`
  8893. }
  8894. // String returns the string representation
  8895. func (s GetFieldLevelEncryptionOutput) String() string {
  8896. return awsutil.Prettify(s)
  8897. }
  8898. // GoString returns the string representation
  8899. func (s GetFieldLevelEncryptionOutput) GoString() string {
  8900. return s.String()
  8901. }
  8902. // SetETag sets the ETag field's value.
  8903. func (s *GetFieldLevelEncryptionOutput) SetETag(v string) *GetFieldLevelEncryptionOutput {
  8904. s.ETag = &v
  8905. return s
  8906. }
  8907. // SetFieldLevelEncryption sets the FieldLevelEncryption field's value.
  8908. func (s *GetFieldLevelEncryptionOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *GetFieldLevelEncryptionOutput {
  8909. s.FieldLevelEncryption = v
  8910. return s
  8911. }
  8912. type GetFieldLevelEncryptionProfileConfigInput struct {
  8913. _ struct{} `type:"structure"`
  8914. // Get the ID for the field-level encryption profile configuration information.
  8915. //
  8916. // Id is a required field
  8917. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8918. }
  8919. // String returns the string representation
  8920. func (s GetFieldLevelEncryptionProfileConfigInput) String() string {
  8921. return awsutil.Prettify(s)
  8922. }
  8923. // GoString returns the string representation
  8924. func (s GetFieldLevelEncryptionProfileConfigInput) GoString() string {
  8925. return s.String()
  8926. }
  8927. // Validate inspects the fields of the type to determine if they are valid.
  8928. func (s *GetFieldLevelEncryptionProfileConfigInput) Validate() error {
  8929. invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileConfigInput"}
  8930. if s.Id == nil {
  8931. invalidParams.Add(request.NewErrParamRequired("Id"))
  8932. }
  8933. if s.Id != nil && len(*s.Id) < 1 {
  8934. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8935. }
  8936. if invalidParams.Len() > 0 {
  8937. return invalidParams
  8938. }
  8939. return nil
  8940. }
  8941. // SetId sets the Id field's value.
  8942. func (s *GetFieldLevelEncryptionProfileConfigInput) SetId(v string) *GetFieldLevelEncryptionProfileConfigInput {
  8943. s.Id = &v
  8944. return s
  8945. }
  8946. type GetFieldLevelEncryptionProfileConfigOutput struct {
  8947. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"`
  8948. // The current version of the field-level encryption profile configuration result.
  8949. // For example: E2QWRUHAPOMQZL.
  8950. ETag *string `location:"header" locationName:"ETag" type:"string"`
  8951. // Return the field-level encryption profile configuration information.
  8952. FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `type:"structure"`
  8953. }
  8954. // String returns the string representation
  8955. func (s GetFieldLevelEncryptionProfileConfigOutput) String() string {
  8956. return awsutil.Prettify(s)
  8957. }
  8958. // GoString returns the string representation
  8959. func (s GetFieldLevelEncryptionProfileConfigOutput) GoString() string {
  8960. return s.String()
  8961. }
  8962. // SetETag sets the ETag field's value.
  8963. func (s *GetFieldLevelEncryptionProfileConfigOutput) SetETag(v string) *GetFieldLevelEncryptionProfileConfigOutput {
  8964. s.ETag = &v
  8965. return s
  8966. }
  8967. // SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value.
  8968. func (s *GetFieldLevelEncryptionProfileConfigOutput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *GetFieldLevelEncryptionProfileConfigOutput {
  8969. s.FieldLevelEncryptionProfileConfig = v
  8970. return s
  8971. }
  8972. type GetFieldLevelEncryptionProfileInput struct {
  8973. _ struct{} `type:"structure"`
  8974. // Get the ID for the field-level encryption profile information.
  8975. //
  8976. // Id is a required field
  8977. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  8978. }
  8979. // String returns the string representation
  8980. func (s GetFieldLevelEncryptionProfileInput) String() string {
  8981. return awsutil.Prettify(s)
  8982. }
  8983. // GoString returns the string representation
  8984. func (s GetFieldLevelEncryptionProfileInput) GoString() string {
  8985. return s.String()
  8986. }
  8987. // Validate inspects the fields of the type to determine if they are valid.
  8988. func (s *GetFieldLevelEncryptionProfileInput) Validate() error {
  8989. invalidParams := request.ErrInvalidParams{Context: "GetFieldLevelEncryptionProfileInput"}
  8990. if s.Id == nil {
  8991. invalidParams.Add(request.NewErrParamRequired("Id"))
  8992. }
  8993. if s.Id != nil && len(*s.Id) < 1 {
  8994. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  8995. }
  8996. if invalidParams.Len() > 0 {
  8997. return invalidParams
  8998. }
  8999. return nil
  9000. }
  9001. // SetId sets the Id field's value.
  9002. func (s *GetFieldLevelEncryptionProfileInput) SetId(v string) *GetFieldLevelEncryptionProfileInput {
  9003. s.Id = &v
  9004. return s
  9005. }
  9006. type GetFieldLevelEncryptionProfileOutput struct {
  9007. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"`
  9008. // The current version of the field level encryption profile. For example: E2QWRUHAPOMQZL.
  9009. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9010. // Return the field-level encryption profile information.
  9011. FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"`
  9012. }
  9013. // String returns the string representation
  9014. func (s GetFieldLevelEncryptionProfileOutput) String() string {
  9015. return awsutil.Prettify(s)
  9016. }
  9017. // GoString returns the string representation
  9018. func (s GetFieldLevelEncryptionProfileOutput) GoString() string {
  9019. return s.String()
  9020. }
  9021. // SetETag sets the ETag field's value.
  9022. func (s *GetFieldLevelEncryptionProfileOutput) SetETag(v string) *GetFieldLevelEncryptionProfileOutput {
  9023. s.ETag = &v
  9024. return s
  9025. }
  9026. // SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value.
  9027. func (s *GetFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *GetFieldLevelEncryptionProfileOutput {
  9028. s.FieldLevelEncryptionProfile = v
  9029. return s
  9030. }
  9031. // The request to get an invalidation's information.
  9032. type GetInvalidationInput struct {
  9033. _ struct{} `type:"structure"`
  9034. // The distribution's ID.
  9035. //
  9036. // DistributionId is a required field
  9037. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  9038. // The identifier for the invalidation request, for example, IDFDVBD632BHDS5.
  9039. //
  9040. // Id is a required field
  9041. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  9042. }
  9043. // String returns the string representation
  9044. func (s GetInvalidationInput) String() string {
  9045. return awsutil.Prettify(s)
  9046. }
  9047. // GoString returns the string representation
  9048. func (s GetInvalidationInput) GoString() string {
  9049. return s.String()
  9050. }
  9051. // Validate inspects the fields of the type to determine if they are valid.
  9052. func (s *GetInvalidationInput) Validate() error {
  9053. invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"}
  9054. if s.DistributionId == nil {
  9055. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  9056. }
  9057. if s.DistributionId != nil && len(*s.DistributionId) < 1 {
  9058. invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1))
  9059. }
  9060. if s.Id == nil {
  9061. invalidParams.Add(request.NewErrParamRequired("Id"))
  9062. }
  9063. if s.Id != nil && len(*s.Id) < 1 {
  9064. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9065. }
  9066. if invalidParams.Len() > 0 {
  9067. return invalidParams
  9068. }
  9069. return nil
  9070. }
  9071. // SetDistributionId sets the DistributionId field's value.
  9072. func (s *GetInvalidationInput) SetDistributionId(v string) *GetInvalidationInput {
  9073. s.DistributionId = &v
  9074. return s
  9075. }
  9076. // SetId sets the Id field's value.
  9077. func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput {
  9078. s.Id = &v
  9079. return s
  9080. }
  9081. // The returned result of the corresponding request.
  9082. type GetInvalidationOutput struct {
  9083. _ struct{} `type:"structure" payload:"Invalidation"`
  9084. // The invalidation's information. For more information, see Invalidation Complex
  9085. // Type (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html).
  9086. Invalidation *Invalidation `type:"structure"`
  9087. }
  9088. // String returns the string representation
  9089. func (s GetInvalidationOutput) String() string {
  9090. return awsutil.Prettify(s)
  9091. }
  9092. // GoString returns the string representation
  9093. func (s GetInvalidationOutput) GoString() string {
  9094. return s.String()
  9095. }
  9096. // SetInvalidation sets the Invalidation field's value.
  9097. func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidationOutput {
  9098. s.Invalidation = v
  9099. return s
  9100. }
  9101. type GetPublicKeyConfigInput struct {
  9102. _ struct{} `type:"structure"`
  9103. // Request the ID for the public key configuration.
  9104. //
  9105. // Id is a required field
  9106. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  9107. }
  9108. // String returns the string representation
  9109. func (s GetPublicKeyConfigInput) String() string {
  9110. return awsutil.Prettify(s)
  9111. }
  9112. // GoString returns the string representation
  9113. func (s GetPublicKeyConfigInput) GoString() string {
  9114. return s.String()
  9115. }
  9116. // Validate inspects the fields of the type to determine if they are valid.
  9117. func (s *GetPublicKeyConfigInput) Validate() error {
  9118. invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyConfigInput"}
  9119. if s.Id == nil {
  9120. invalidParams.Add(request.NewErrParamRequired("Id"))
  9121. }
  9122. if s.Id != nil && len(*s.Id) < 1 {
  9123. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9124. }
  9125. if invalidParams.Len() > 0 {
  9126. return invalidParams
  9127. }
  9128. return nil
  9129. }
  9130. // SetId sets the Id field's value.
  9131. func (s *GetPublicKeyConfigInput) SetId(v string) *GetPublicKeyConfigInput {
  9132. s.Id = &v
  9133. return s
  9134. }
  9135. type GetPublicKeyConfigOutput struct {
  9136. _ struct{} `type:"structure" payload:"PublicKeyConfig"`
  9137. // The current version of the public key configuration. For example: E2QWRUHAPOMQZL.
  9138. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9139. // Return the result for the public key configuration.
  9140. PublicKeyConfig *PublicKeyConfig `type:"structure"`
  9141. }
  9142. // String returns the string representation
  9143. func (s GetPublicKeyConfigOutput) String() string {
  9144. return awsutil.Prettify(s)
  9145. }
  9146. // GoString returns the string representation
  9147. func (s GetPublicKeyConfigOutput) GoString() string {
  9148. return s.String()
  9149. }
  9150. // SetETag sets the ETag field's value.
  9151. func (s *GetPublicKeyConfigOutput) SetETag(v string) *GetPublicKeyConfigOutput {
  9152. s.ETag = &v
  9153. return s
  9154. }
  9155. // SetPublicKeyConfig sets the PublicKeyConfig field's value.
  9156. func (s *GetPublicKeyConfigOutput) SetPublicKeyConfig(v *PublicKeyConfig) *GetPublicKeyConfigOutput {
  9157. s.PublicKeyConfig = v
  9158. return s
  9159. }
  9160. type GetPublicKeyInput struct {
  9161. _ struct{} `type:"structure"`
  9162. // Request the ID for the public key.
  9163. //
  9164. // Id is a required field
  9165. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  9166. }
  9167. // String returns the string representation
  9168. func (s GetPublicKeyInput) String() string {
  9169. return awsutil.Prettify(s)
  9170. }
  9171. // GoString returns the string representation
  9172. func (s GetPublicKeyInput) GoString() string {
  9173. return s.String()
  9174. }
  9175. // Validate inspects the fields of the type to determine if they are valid.
  9176. func (s *GetPublicKeyInput) Validate() error {
  9177. invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"}
  9178. if s.Id == nil {
  9179. invalidParams.Add(request.NewErrParamRequired("Id"))
  9180. }
  9181. if s.Id != nil && len(*s.Id) < 1 {
  9182. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9183. }
  9184. if invalidParams.Len() > 0 {
  9185. return invalidParams
  9186. }
  9187. return nil
  9188. }
  9189. // SetId sets the Id field's value.
  9190. func (s *GetPublicKeyInput) SetId(v string) *GetPublicKeyInput {
  9191. s.Id = &v
  9192. return s
  9193. }
  9194. type GetPublicKeyOutput struct {
  9195. _ struct{} `type:"structure" payload:"PublicKey"`
  9196. // The current version of the public key. For example: E2QWRUHAPOMQZL.
  9197. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9198. // Return the public key.
  9199. PublicKey *PublicKey `type:"structure"`
  9200. }
  9201. // String returns the string representation
  9202. func (s GetPublicKeyOutput) String() string {
  9203. return awsutil.Prettify(s)
  9204. }
  9205. // GoString returns the string representation
  9206. func (s GetPublicKeyOutput) GoString() string {
  9207. return s.String()
  9208. }
  9209. // SetETag sets the ETag field's value.
  9210. func (s *GetPublicKeyOutput) SetETag(v string) *GetPublicKeyOutput {
  9211. s.ETag = &v
  9212. return s
  9213. }
  9214. // SetPublicKey sets the PublicKey field's value.
  9215. func (s *GetPublicKeyOutput) SetPublicKey(v *PublicKey) *GetPublicKeyOutput {
  9216. s.PublicKey = v
  9217. return s
  9218. }
  9219. // To request to get a streaming distribution configuration.
  9220. type GetStreamingDistributionConfigInput struct {
  9221. _ struct{} `type:"structure"`
  9222. // The streaming distribution's ID.
  9223. //
  9224. // Id is a required field
  9225. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  9226. }
  9227. // String returns the string representation
  9228. func (s GetStreamingDistributionConfigInput) String() string {
  9229. return awsutil.Prettify(s)
  9230. }
  9231. // GoString returns the string representation
  9232. func (s GetStreamingDistributionConfigInput) GoString() string {
  9233. return s.String()
  9234. }
  9235. // Validate inspects the fields of the type to determine if they are valid.
  9236. func (s *GetStreamingDistributionConfigInput) Validate() error {
  9237. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"}
  9238. if s.Id == nil {
  9239. invalidParams.Add(request.NewErrParamRequired("Id"))
  9240. }
  9241. if s.Id != nil && len(*s.Id) < 1 {
  9242. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9243. }
  9244. if invalidParams.Len() > 0 {
  9245. return invalidParams
  9246. }
  9247. return nil
  9248. }
  9249. // SetId sets the Id field's value.
  9250. func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistributionConfigInput {
  9251. s.Id = &v
  9252. return s
  9253. }
  9254. // The returned result of the corresponding request.
  9255. type GetStreamingDistributionConfigOutput struct {
  9256. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  9257. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  9258. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9259. // The streaming distribution's configuration information.
  9260. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"`
  9261. }
  9262. // String returns the string representation
  9263. func (s GetStreamingDistributionConfigOutput) String() string {
  9264. return awsutil.Prettify(s)
  9265. }
  9266. // GoString returns the string representation
  9267. func (s GetStreamingDistributionConfigOutput) GoString() string {
  9268. return s.String()
  9269. }
  9270. // SetETag sets the ETag field's value.
  9271. func (s *GetStreamingDistributionConfigOutput) SetETag(v string) *GetStreamingDistributionConfigOutput {
  9272. s.ETag = &v
  9273. return s
  9274. }
  9275. // SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value.
  9276. func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *GetStreamingDistributionConfigOutput {
  9277. s.StreamingDistributionConfig = v
  9278. return s
  9279. }
  9280. // The request to get a streaming distribution's information.
  9281. type GetStreamingDistributionInput struct {
  9282. _ struct{} `type:"structure"`
  9283. // The streaming distribution's ID.
  9284. //
  9285. // Id is a required field
  9286. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  9287. }
  9288. // String returns the string representation
  9289. func (s GetStreamingDistributionInput) String() string {
  9290. return awsutil.Prettify(s)
  9291. }
  9292. // GoString returns the string representation
  9293. func (s GetStreamingDistributionInput) GoString() string {
  9294. return s.String()
  9295. }
  9296. // Validate inspects the fields of the type to determine if they are valid.
  9297. func (s *GetStreamingDistributionInput) Validate() error {
  9298. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"}
  9299. if s.Id == nil {
  9300. invalidParams.Add(request.NewErrParamRequired("Id"))
  9301. }
  9302. if s.Id != nil && len(*s.Id) < 1 {
  9303. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  9304. }
  9305. if invalidParams.Len() > 0 {
  9306. return invalidParams
  9307. }
  9308. return nil
  9309. }
  9310. // SetId sets the Id field's value.
  9311. func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributionInput {
  9312. s.Id = &v
  9313. return s
  9314. }
  9315. // The returned result of the corresponding request.
  9316. type GetStreamingDistributionOutput struct {
  9317. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  9318. // The current version of the streaming distribution's information. For example:
  9319. // E2QWRUHAPOMQZL.
  9320. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9321. // The streaming distribution's information.
  9322. StreamingDistribution *StreamingDistribution `type:"structure"`
  9323. }
  9324. // String returns the string representation
  9325. func (s GetStreamingDistributionOutput) String() string {
  9326. return awsutil.Prettify(s)
  9327. }
  9328. // GoString returns the string representation
  9329. func (s GetStreamingDistributionOutput) GoString() string {
  9330. return s.String()
  9331. }
  9332. // SetETag sets the ETag field's value.
  9333. func (s *GetStreamingDistributionOutput) SetETag(v string) *GetStreamingDistributionOutput {
  9334. s.ETag = &v
  9335. return s
  9336. }
  9337. // SetStreamingDistribution sets the StreamingDistribution field's value.
  9338. func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *GetStreamingDistributionOutput {
  9339. s.StreamingDistribution = v
  9340. return s
  9341. }
  9342. // A complex type that specifies the request headers, if any, that you want
  9343. // CloudFront to base caching on for this cache behavior.
  9344. //
  9345. // For the headers that you specify, CloudFront caches separate versions of
  9346. // a specified object based on the header values in viewer requests. For example,
  9347. // suppose viewer requests for logo.jpg contain a custom product header that
  9348. // has a value of either acme or apex, and you configure CloudFront to cache
  9349. // your content based on values in the product header. CloudFront forwards the
  9350. // product header to the origin and caches the response from the origin once
  9351. // for each header value. For more information about caching based on header
  9352. // values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html)
  9353. // in the Amazon CloudFront Developer Guide.
  9354. type Headers struct {
  9355. _ struct{} `type:"structure"`
  9356. // A list that contains one Name element for each header that you want CloudFront
  9357. // to use for caching in this cache behavior. If Quantity is 0, omit Items.
  9358. Items []*string `locationNameList:"Name" type:"list"`
  9359. // The number of different headers that you want CloudFront to base caching
  9360. // on for this cache behavior. You can configure each cache behavior in a web
  9361. // distribution to do one of the following:
  9362. //
  9363. // * Forward all headers to your origin: Specify 1 for Quantity and * for
  9364. // Name.
  9365. //
  9366. // CloudFront doesn't cache the objects that are associated with this cache
  9367. // behavior. Instead, CloudFront sends every request to the origin.
  9368. //
  9369. // * Forward a whitelist of headers you specify: Specify the number of headers
  9370. // that you want CloudFront to base caching on. Then specify the header names
  9371. // in Name elements. CloudFront caches your objects based on the values in
  9372. // the specified headers.
  9373. //
  9374. // * Forward only the default headers: Specify 0 for Quantity and omit Items.
  9375. // In this configuration, CloudFront doesn't cache based on the values in
  9376. // the request headers.
  9377. //
  9378. // Regardless of which option you choose, CloudFront forwards headers to your
  9379. // origin based on whether the origin is an S3 bucket or a custom origin. See
  9380. // the following documentation:
  9381. //
  9382. // * S3 bucket: See HTTP Request Headers That CloudFront Removes or Updates
  9383. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#request-s3-removed-headers)
  9384. //
  9385. // * Custom origin: See HTTP Request Headers and CloudFront Behavior (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#request-custom-headers-behavior)
  9386. //
  9387. // Quantity is a required field
  9388. Quantity *int64 `type:"integer" required:"true"`
  9389. }
  9390. // String returns the string representation
  9391. func (s Headers) String() string {
  9392. return awsutil.Prettify(s)
  9393. }
  9394. // GoString returns the string representation
  9395. func (s Headers) GoString() string {
  9396. return s.String()
  9397. }
  9398. // Validate inspects the fields of the type to determine if they are valid.
  9399. func (s *Headers) Validate() error {
  9400. invalidParams := request.ErrInvalidParams{Context: "Headers"}
  9401. if s.Quantity == nil {
  9402. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  9403. }
  9404. if invalidParams.Len() > 0 {
  9405. return invalidParams
  9406. }
  9407. return nil
  9408. }
  9409. // SetItems sets the Items field's value.
  9410. func (s *Headers) SetItems(v []*string) *Headers {
  9411. s.Items = v
  9412. return s
  9413. }
  9414. // SetQuantity sets the Quantity field's value.
  9415. func (s *Headers) SetQuantity(v int64) *Headers {
  9416. s.Quantity = &v
  9417. return s
  9418. }
  9419. // An invalidation.
  9420. type Invalidation struct {
  9421. _ struct{} `type:"structure"`
  9422. // The date and time the invalidation request was first made.
  9423. //
  9424. // CreateTime is a required field
  9425. CreateTime *time.Time `type:"timestamp" required:"true"`
  9426. // The identifier for the invalidation request. For example: IDFDVBD632BHDS5.
  9427. //
  9428. // Id is a required field
  9429. Id *string `type:"string" required:"true"`
  9430. // The current invalidation information for the batch request.
  9431. //
  9432. // InvalidationBatch is a required field
  9433. InvalidationBatch *InvalidationBatch `type:"structure" required:"true"`
  9434. // The status of the invalidation request. When the invalidation batch is finished,
  9435. // the status is Completed.
  9436. //
  9437. // Status is a required field
  9438. Status *string `type:"string" required:"true"`
  9439. }
  9440. // String returns the string representation
  9441. func (s Invalidation) String() string {
  9442. return awsutil.Prettify(s)
  9443. }
  9444. // GoString returns the string representation
  9445. func (s Invalidation) GoString() string {
  9446. return s.String()
  9447. }
  9448. // SetCreateTime sets the CreateTime field's value.
  9449. func (s *Invalidation) SetCreateTime(v time.Time) *Invalidation {
  9450. s.CreateTime = &v
  9451. return s
  9452. }
  9453. // SetId sets the Id field's value.
  9454. func (s *Invalidation) SetId(v string) *Invalidation {
  9455. s.Id = &v
  9456. return s
  9457. }
  9458. // SetInvalidationBatch sets the InvalidationBatch field's value.
  9459. func (s *Invalidation) SetInvalidationBatch(v *InvalidationBatch) *Invalidation {
  9460. s.InvalidationBatch = v
  9461. return s
  9462. }
  9463. // SetStatus sets the Status field's value.
  9464. func (s *Invalidation) SetStatus(v string) *Invalidation {
  9465. s.Status = &v
  9466. return s
  9467. }
  9468. // An invalidation batch.
  9469. type InvalidationBatch struct {
  9470. _ struct{} `type:"structure"`
  9471. // A value that you specify to uniquely identify an invalidation request. CloudFront
  9472. // uses the value to prevent you from accidentally resubmitting an identical
  9473. // request. Whenever you create a new invalidation request, you must specify
  9474. // a new value for CallerReference and change other values in the request as
  9475. // applicable. One way to ensure that the value of CallerReference is unique
  9476. // is to use a timestamp, for example, 20120301090000.
  9477. //
  9478. // If you make a second invalidation request with the same value for CallerReference,
  9479. // and if the rest of the request is the same, CloudFront doesn't create a new
  9480. // invalidation request. Instead, CloudFront returns information about the invalidation
  9481. // request that you previously created with the same CallerReference.
  9482. //
  9483. // If CallerReference is a value you already sent in a previous invalidation
  9484. // batch request but the content of any Path is different from the original
  9485. // request, CloudFront returns an InvalidationBatchAlreadyExists error.
  9486. //
  9487. // CallerReference is a required field
  9488. CallerReference *string `type:"string" required:"true"`
  9489. // A complex type that contains information about the objects that you want
  9490. // to invalidate. For more information, see Specifying the Objects to Invalidate
  9491. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects)
  9492. // in the Amazon CloudFront Developer Guide.
  9493. //
  9494. // Paths is a required field
  9495. Paths *Paths `type:"structure" required:"true"`
  9496. }
  9497. // String returns the string representation
  9498. func (s InvalidationBatch) String() string {
  9499. return awsutil.Prettify(s)
  9500. }
  9501. // GoString returns the string representation
  9502. func (s InvalidationBatch) GoString() string {
  9503. return s.String()
  9504. }
  9505. // Validate inspects the fields of the type to determine if they are valid.
  9506. func (s *InvalidationBatch) Validate() error {
  9507. invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"}
  9508. if s.CallerReference == nil {
  9509. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  9510. }
  9511. if s.Paths == nil {
  9512. invalidParams.Add(request.NewErrParamRequired("Paths"))
  9513. }
  9514. if s.Paths != nil {
  9515. if err := s.Paths.Validate(); err != nil {
  9516. invalidParams.AddNested("Paths", err.(request.ErrInvalidParams))
  9517. }
  9518. }
  9519. if invalidParams.Len() > 0 {
  9520. return invalidParams
  9521. }
  9522. return nil
  9523. }
  9524. // SetCallerReference sets the CallerReference field's value.
  9525. func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch {
  9526. s.CallerReference = &v
  9527. return s
  9528. }
  9529. // SetPaths sets the Paths field's value.
  9530. func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch {
  9531. s.Paths = v
  9532. return s
  9533. }
  9534. // The InvalidationList complex type describes the list of invalidation objects.
  9535. // For more information about invalidation, see Invalidating Objects (Web Distributions
  9536. // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html)
  9537. // in the Amazon CloudFront Developer Guide.
  9538. type InvalidationList struct {
  9539. _ struct{} `type:"structure"`
  9540. // A flag that indicates whether more invalidation batch requests remain to
  9541. // be listed. If your results were truncated, you can make a follow-up pagination
  9542. // request using the Marker request parameter to retrieve more invalidation
  9543. // batches in the list.
  9544. //
  9545. // IsTruncated is a required field
  9546. IsTruncated *bool `type:"boolean" required:"true"`
  9547. // A complex type that contains one InvalidationSummary element for each invalidation
  9548. // batch created by the current AWS account.
  9549. Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"`
  9550. // The value that you provided for the Marker request parameter.
  9551. //
  9552. // Marker is a required field
  9553. Marker *string `type:"string" required:"true"`
  9554. // The value that you provided for the MaxItems request parameter.
  9555. //
  9556. // MaxItems is a required field
  9557. MaxItems *int64 `type:"integer" required:"true"`
  9558. // If IsTruncated is true, this element is present and contains the value that
  9559. // you can use for the Marker request parameter to continue listing your invalidation
  9560. // batches where they left off.
  9561. NextMarker *string `type:"string"`
  9562. // The number of invalidation batches that were created by the current AWS account.
  9563. //
  9564. // Quantity is a required field
  9565. Quantity *int64 `type:"integer" required:"true"`
  9566. }
  9567. // String returns the string representation
  9568. func (s InvalidationList) String() string {
  9569. return awsutil.Prettify(s)
  9570. }
  9571. // GoString returns the string representation
  9572. func (s InvalidationList) GoString() string {
  9573. return s.String()
  9574. }
  9575. // SetIsTruncated sets the IsTruncated field's value.
  9576. func (s *InvalidationList) SetIsTruncated(v bool) *InvalidationList {
  9577. s.IsTruncated = &v
  9578. return s
  9579. }
  9580. // SetItems sets the Items field's value.
  9581. func (s *InvalidationList) SetItems(v []*InvalidationSummary) *InvalidationList {
  9582. s.Items = v
  9583. return s
  9584. }
  9585. // SetMarker sets the Marker field's value.
  9586. func (s *InvalidationList) SetMarker(v string) *InvalidationList {
  9587. s.Marker = &v
  9588. return s
  9589. }
  9590. // SetMaxItems sets the MaxItems field's value.
  9591. func (s *InvalidationList) SetMaxItems(v int64) *InvalidationList {
  9592. s.MaxItems = &v
  9593. return s
  9594. }
  9595. // SetNextMarker sets the NextMarker field's value.
  9596. func (s *InvalidationList) SetNextMarker(v string) *InvalidationList {
  9597. s.NextMarker = &v
  9598. return s
  9599. }
  9600. // SetQuantity sets the Quantity field's value.
  9601. func (s *InvalidationList) SetQuantity(v int64) *InvalidationList {
  9602. s.Quantity = &v
  9603. return s
  9604. }
  9605. // A summary of an invalidation request.
  9606. type InvalidationSummary struct {
  9607. _ struct{} `type:"structure"`
  9608. // The time that an invalidation request was created.
  9609. //
  9610. // CreateTime is a required field
  9611. CreateTime *time.Time `type:"timestamp" required:"true"`
  9612. // The unique ID for an invalidation request.
  9613. //
  9614. // Id is a required field
  9615. Id *string `type:"string" required:"true"`
  9616. // The status of an invalidation request.
  9617. //
  9618. // Status is a required field
  9619. Status *string `type:"string" required:"true"`
  9620. }
  9621. // String returns the string representation
  9622. func (s InvalidationSummary) String() string {
  9623. return awsutil.Prettify(s)
  9624. }
  9625. // GoString returns the string representation
  9626. func (s InvalidationSummary) GoString() string {
  9627. return s.String()
  9628. }
  9629. // SetCreateTime sets the CreateTime field's value.
  9630. func (s *InvalidationSummary) SetCreateTime(v time.Time) *InvalidationSummary {
  9631. s.CreateTime = &v
  9632. return s
  9633. }
  9634. // SetId sets the Id field's value.
  9635. func (s *InvalidationSummary) SetId(v string) *InvalidationSummary {
  9636. s.Id = &v
  9637. return s
  9638. }
  9639. // SetStatus sets the Status field's value.
  9640. func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary {
  9641. s.Status = &v
  9642. return s
  9643. }
  9644. // A complex type that lists the active CloudFront key pairs, if any, that are
  9645. // associated with AwsAccountNumber.
  9646. //
  9647. // For more information, see ActiveTrustedSigners.
  9648. type KeyPairIds struct {
  9649. _ struct{} `type:"structure"`
  9650. // A complex type that lists the active CloudFront key pairs, if any, that are
  9651. // associated with AwsAccountNumber.
  9652. //
  9653. // For more information, see ActiveTrustedSigners.
  9654. Items []*string `locationNameList:"KeyPairId" type:"list"`
  9655. // The number of active CloudFront key pairs for AwsAccountNumber.
  9656. //
  9657. // For more information, see ActiveTrustedSigners.
  9658. //
  9659. // Quantity is a required field
  9660. Quantity *int64 `type:"integer" required:"true"`
  9661. }
  9662. // String returns the string representation
  9663. func (s KeyPairIds) String() string {
  9664. return awsutil.Prettify(s)
  9665. }
  9666. // GoString returns the string representation
  9667. func (s KeyPairIds) GoString() string {
  9668. return s.String()
  9669. }
  9670. // SetItems sets the Items field's value.
  9671. func (s *KeyPairIds) SetItems(v []*string) *KeyPairIds {
  9672. s.Items = v
  9673. return s
  9674. }
  9675. // SetQuantity sets the Quantity field's value.
  9676. func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds {
  9677. s.Quantity = &v
  9678. return s
  9679. }
  9680. // A complex type that contains a Lambda function association.
  9681. type LambdaFunctionAssociation struct {
  9682. _ struct{} `type:"structure"`
  9683. // Specifies the event type that triggers a Lambda function invocation. You
  9684. // can specify the following values:
  9685. //
  9686. // * viewer-request: The function executes when CloudFront receives a request
  9687. // from a viewer and before it checks to see whether the requested object
  9688. // is in the edge cache.
  9689. //
  9690. // * origin-request: The function executes only when CloudFront forwards
  9691. // a request to your origin. When the requested object is in the edge cache,
  9692. // the function doesn't execute.
  9693. //
  9694. // * origin-response: The function executes after CloudFront receives a response
  9695. // from the origin and before it caches the object in the response. When
  9696. // the requested object is in the edge cache, the function doesn't execute.
  9697. //
  9698. // * viewer-response: The function executes before CloudFront returns the
  9699. // requested object to the viewer. The function executes regardless of whether
  9700. // the object was already in the edge cache.
  9701. //
  9702. // If the origin returns an HTTP status code other than HTTP 200 (OK), the function
  9703. // doesn't execute.
  9704. //
  9705. // EventType is a required field
  9706. EventType *string `type:"string" required:"true" enum:"EventType"`
  9707. // A flag that allows a Lambda function to have read access to the body content.
  9708. // For more information, see Accessing the Request Body by Choosing the Include
  9709. // Body Option (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html)
  9710. // in the Amazon CloudFront Developer Guide.
  9711. IncludeBody *bool `type:"boolean"`
  9712. // The ARN of the Lambda function. You must specify the ARN of a function version;
  9713. // you can't specify a Lambda alias or $LATEST.
  9714. //
  9715. // LambdaFunctionARN is a required field
  9716. LambdaFunctionARN *string `type:"string" required:"true"`
  9717. }
  9718. // String returns the string representation
  9719. func (s LambdaFunctionAssociation) String() string {
  9720. return awsutil.Prettify(s)
  9721. }
  9722. // GoString returns the string representation
  9723. func (s LambdaFunctionAssociation) GoString() string {
  9724. return s.String()
  9725. }
  9726. // Validate inspects the fields of the type to determine if they are valid.
  9727. func (s *LambdaFunctionAssociation) Validate() error {
  9728. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociation"}
  9729. if s.EventType == nil {
  9730. invalidParams.Add(request.NewErrParamRequired("EventType"))
  9731. }
  9732. if s.LambdaFunctionARN == nil {
  9733. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionARN"))
  9734. }
  9735. if invalidParams.Len() > 0 {
  9736. return invalidParams
  9737. }
  9738. return nil
  9739. }
  9740. // SetEventType sets the EventType field's value.
  9741. func (s *LambdaFunctionAssociation) SetEventType(v string) *LambdaFunctionAssociation {
  9742. s.EventType = &v
  9743. return s
  9744. }
  9745. // SetIncludeBody sets the IncludeBody field's value.
  9746. func (s *LambdaFunctionAssociation) SetIncludeBody(v bool) *LambdaFunctionAssociation {
  9747. s.IncludeBody = &v
  9748. return s
  9749. }
  9750. // SetLambdaFunctionARN sets the LambdaFunctionARN field's value.
  9751. func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFunctionAssociation {
  9752. s.LambdaFunctionARN = &v
  9753. return s
  9754. }
  9755. // A complex type that specifies a list of Lambda functions associations for
  9756. // a cache behavior.
  9757. //
  9758. // If you want to invoke one or more Lambda functions triggered by requests
  9759. // that match the PathPattern of the cache behavior, specify the applicable
  9760. // values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation
  9761. // items in this list (one for each possible value of EventType) and each EventType
  9762. // can be associated with the Lambda function only once.
  9763. //
  9764. // If you don't want to invoke any Lambda functions for the requests that match
  9765. // PathPattern, specify 0 for Quantity and omit Items.
  9766. type LambdaFunctionAssociations struct {
  9767. _ struct{} `type:"structure"`
  9768. // Optional: A complex type that contains LambdaFunctionAssociation items for
  9769. // this cache behavior. If Quantity is 0, you can omit Items.
  9770. Items []*LambdaFunctionAssociation `locationNameList:"LambdaFunctionAssociation" type:"list"`
  9771. // The number of Lambda function associations for this cache behavior.
  9772. //
  9773. // Quantity is a required field
  9774. Quantity *int64 `type:"integer" required:"true"`
  9775. }
  9776. // String returns the string representation
  9777. func (s LambdaFunctionAssociations) String() string {
  9778. return awsutil.Prettify(s)
  9779. }
  9780. // GoString returns the string representation
  9781. func (s LambdaFunctionAssociations) GoString() string {
  9782. return s.String()
  9783. }
  9784. // Validate inspects the fields of the type to determine if they are valid.
  9785. func (s *LambdaFunctionAssociations) Validate() error {
  9786. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionAssociations"}
  9787. if s.Quantity == nil {
  9788. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  9789. }
  9790. if s.Items != nil {
  9791. for i, v := range s.Items {
  9792. if v == nil {
  9793. continue
  9794. }
  9795. if err := v.Validate(); err != nil {
  9796. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  9797. }
  9798. }
  9799. }
  9800. if invalidParams.Len() > 0 {
  9801. return invalidParams
  9802. }
  9803. return nil
  9804. }
  9805. // SetItems sets the Items field's value.
  9806. func (s *LambdaFunctionAssociations) SetItems(v []*LambdaFunctionAssociation) *LambdaFunctionAssociations {
  9807. s.Items = v
  9808. return s
  9809. }
  9810. // SetQuantity sets the Quantity field's value.
  9811. func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssociations {
  9812. s.Quantity = &v
  9813. return s
  9814. }
  9815. // The request to list origin access identities.
  9816. type ListCloudFrontOriginAccessIdentitiesInput struct {
  9817. _ struct{} `type:"structure"`
  9818. // Use this when paginating results to indicate where to begin in your list
  9819. // of origin access identities. The results include identities in the list that
  9820. // occur after the marker. To get the next page of results, set the Marker to
  9821. // the value of the NextMarker from the current page's response (which is also
  9822. // the ID of the last identity on that page).
  9823. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  9824. // The maximum number of origin access identities you want in the response body.
  9825. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  9826. }
  9827. // String returns the string representation
  9828. func (s ListCloudFrontOriginAccessIdentitiesInput) String() string {
  9829. return awsutil.Prettify(s)
  9830. }
  9831. // GoString returns the string representation
  9832. func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string {
  9833. return s.String()
  9834. }
  9835. // SetMarker sets the Marker field's value.
  9836. func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMarker(v string) *ListCloudFrontOriginAccessIdentitiesInput {
  9837. s.Marker = &v
  9838. return s
  9839. }
  9840. // SetMaxItems sets the MaxItems field's value.
  9841. func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCloudFrontOriginAccessIdentitiesInput {
  9842. s.MaxItems = &v
  9843. return s
  9844. }
  9845. // The returned result of the corresponding request.
  9846. type ListCloudFrontOriginAccessIdentitiesOutput struct {
  9847. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"`
  9848. // The CloudFrontOriginAccessIdentityList type.
  9849. CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"`
  9850. }
  9851. // String returns the string representation
  9852. func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string {
  9853. return awsutil.Prettify(s)
  9854. }
  9855. // GoString returns the string representation
  9856. func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string {
  9857. return s.String()
  9858. }
  9859. // SetCloudFrontOriginAccessIdentityList sets the CloudFrontOriginAccessIdentityList field's value.
  9860. func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessIdentityList(v *OriginAccessIdentityList) *ListCloudFrontOriginAccessIdentitiesOutput {
  9861. s.CloudFrontOriginAccessIdentityList = v
  9862. return s
  9863. }
  9864. // The request to list distributions that are associated with a specified AWS
  9865. // WAF web ACL.
  9866. type ListDistributionsByWebACLIdInput struct {
  9867. _ struct{} `type:"structure"`
  9868. // Use Marker and MaxItems to control pagination of results. If you have more
  9869. // than MaxItems distributions that satisfy the request, the response includes
  9870. // a NextMarker element. To get the next page of results, submit another request.
  9871. // For the value of Marker, specify the value of NextMarker from the last response.
  9872. // (For the first request, omit Marker.)
  9873. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  9874. // The maximum number of distributions that you want CloudFront to return in
  9875. // the response body. The maximum and default values are both 100.
  9876. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  9877. // The ID of the AWS WAF web ACL that you want to list the associated distributions.
  9878. // If you specify "null" for the ID, the request returns a list of the distributions
  9879. // that aren't associated with a web ACL.
  9880. //
  9881. // WebACLId is a required field
  9882. WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"`
  9883. }
  9884. // String returns the string representation
  9885. func (s ListDistributionsByWebACLIdInput) String() string {
  9886. return awsutil.Prettify(s)
  9887. }
  9888. // GoString returns the string representation
  9889. func (s ListDistributionsByWebACLIdInput) GoString() string {
  9890. return s.String()
  9891. }
  9892. // Validate inspects the fields of the type to determine if they are valid.
  9893. func (s *ListDistributionsByWebACLIdInput) Validate() error {
  9894. invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"}
  9895. if s.WebACLId == nil {
  9896. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  9897. }
  9898. if s.WebACLId != nil && len(*s.WebACLId) < 1 {
  9899. invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1))
  9900. }
  9901. if invalidParams.Len() > 0 {
  9902. return invalidParams
  9903. }
  9904. return nil
  9905. }
  9906. // SetMarker sets the Marker field's value.
  9907. func (s *ListDistributionsByWebACLIdInput) SetMarker(v string) *ListDistributionsByWebACLIdInput {
  9908. s.Marker = &v
  9909. return s
  9910. }
  9911. // SetMaxItems sets the MaxItems field's value.
  9912. func (s *ListDistributionsByWebACLIdInput) SetMaxItems(v int64) *ListDistributionsByWebACLIdInput {
  9913. s.MaxItems = &v
  9914. return s
  9915. }
  9916. // SetWebACLId sets the WebACLId field's value.
  9917. func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributionsByWebACLIdInput {
  9918. s.WebACLId = &v
  9919. return s
  9920. }
  9921. // The response to a request to list the distributions that are associated with
  9922. // a specified AWS WAF web ACL.
  9923. type ListDistributionsByWebACLIdOutput struct {
  9924. _ struct{} `type:"structure" payload:"DistributionList"`
  9925. // The DistributionList type.
  9926. DistributionList *DistributionList `type:"structure"`
  9927. }
  9928. // String returns the string representation
  9929. func (s ListDistributionsByWebACLIdOutput) String() string {
  9930. return awsutil.Prettify(s)
  9931. }
  9932. // GoString returns the string representation
  9933. func (s ListDistributionsByWebACLIdOutput) GoString() string {
  9934. return s.String()
  9935. }
  9936. // SetDistributionList sets the DistributionList field's value.
  9937. func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionList) *ListDistributionsByWebACLIdOutput {
  9938. s.DistributionList = v
  9939. return s
  9940. }
  9941. // The request to list your distributions.
  9942. type ListDistributionsInput struct {
  9943. _ struct{} `type:"structure"`
  9944. // Use this when paginating results to indicate where to begin in your list
  9945. // of distributions. The results include distributions in the list that occur
  9946. // after the marker. To get the next page of results, set the Marker to the
  9947. // value of the NextMarker from the current page's response (which is also the
  9948. // ID of the last distribution on that page).
  9949. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  9950. // The maximum number of distributions you want in the response body.
  9951. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  9952. }
  9953. // String returns the string representation
  9954. func (s ListDistributionsInput) String() string {
  9955. return awsutil.Prettify(s)
  9956. }
  9957. // GoString returns the string representation
  9958. func (s ListDistributionsInput) GoString() string {
  9959. return s.String()
  9960. }
  9961. // SetMarker sets the Marker field's value.
  9962. func (s *ListDistributionsInput) SetMarker(v string) *ListDistributionsInput {
  9963. s.Marker = &v
  9964. return s
  9965. }
  9966. // SetMaxItems sets the MaxItems field's value.
  9967. func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput {
  9968. s.MaxItems = &v
  9969. return s
  9970. }
  9971. // The returned result of the corresponding request.
  9972. type ListDistributionsOutput struct {
  9973. _ struct{} `type:"structure" payload:"DistributionList"`
  9974. // The DistributionList type.
  9975. DistributionList *DistributionList `type:"structure"`
  9976. }
  9977. // String returns the string representation
  9978. func (s ListDistributionsOutput) String() string {
  9979. return awsutil.Prettify(s)
  9980. }
  9981. // GoString returns the string representation
  9982. func (s ListDistributionsOutput) GoString() string {
  9983. return s.String()
  9984. }
  9985. // SetDistributionList sets the DistributionList field's value.
  9986. func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *ListDistributionsOutput {
  9987. s.DistributionList = v
  9988. return s
  9989. }
  9990. type ListFieldLevelEncryptionConfigsInput struct {
  9991. _ struct{} `type:"structure"`
  9992. // Use this when paginating results to indicate where to begin in your list
  9993. // of configurations. The results include configurations in the list that occur
  9994. // after the marker. To get the next page of results, set the Marker to the
  9995. // value of the NextMarker from the current page's response (which is also the
  9996. // ID of the last configuration on that page).
  9997. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  9998. // The maximum number of field-level encryption configurations you want in the
  9999. // response body.
  10000. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  10001. }
  10002. // String returns the string representation
  10003. func (s ListFieldLevelEncryptionConfigsInput) String() string {
  10004. return awsutil.Prettify(s)
  10005. }
  10006. // GoString returns the string representation
  10007. func (s ListFieldLevelEncryptionConfigsInput) GoString() string {
  10008. return s.String()
  10009. }
  10010. // SetMarker sets the Marker field's value.
  10011. func (s *ListFieldLevelEncryptionConfigsInput) SetMarker(v string) *ListFieldLevelEncryptionConfigsInput {
  10012. s.Marker = &v
  10013. return s
  10014. }
  10015. // SetMaxItems sets the MaxItems field's value.
  10016. func (s *ListFieldLevelEncryptionConfigsInput) SetMaxItems(v int64) *ListFieldLevelEncryptionConfigsInput {
  10017. s.MaxItems = &v
  10018. return s
  10019. }
  10020. type ListFieldLevelEncryptionConfigsOutput struct {
  10021. _ struct{} `type:"structure" payload:"FieldLevelEncryptionList"`
  10022. // Returns a list of all field-level encryption configurations that have been
  10023. // created in CloudFront for this account.
  10024. FieldLevelEncryptionList *FieldLevelEncryptionList `type:"structure"`
  10025. }
  10026. // String returns the string representation
  10027. func (s ListFieldLevelEncryptionConfigsOutput) String() string {
  10028. return awsutil.Prettify(s)
  10029. }
  10030. // GoString returns the string representation
  10031. func (s ListFieldLevelEncryptionConfigsOutput) GoString() string {
  10032. return s.String()
  10033. }
  10034. // SetFieldLevelEncryptionList sets the FieldLevelEncryptionList field's value.
  10035. func (s *ListFieldLevelEncryptionConfigsOutput) SetFieldLevelEncryptionList(v *FieldLevelEncryptionList) *ListFieldLevelEncryptionConfigsOutput {
  10036. s.FieldLevelEncryptionList = v
  10037. return s
  10038. }
  10039. type ListFieldLevelEncryptionProfilesInput struct {
  10040. _ struct{} `type:"structure"`
  10041. // Use this when paginating results to indicate where to begin in your list
  10042. // of profiles. The results include profiles in the list that occur after the
  10043. // marker. To get the next page of results, set the Marker to the value of the
  10044. // NextMarker from the current page's response (which is also the ID of the
  10045. // last profile on that page).
  10046. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  10047. // The maximum number of field-level encryption profiles you want in the response
  10048. // body.
  10049. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  10050. }
  10051. // String returns the string representation
  10052. func (s ListFieldLevelEncryptionProfilesInput) String() string {
  10053. return awsutil.Prettify(s)
  10054. }
  10055. // GoString returns the string representation
  10056. func (s ListFieldLevelEncryptionProfilesInput) GoString() string {
  10057. return s.String()
  10058. }
  10059. // SetMarker sets the Marker field's value.
  10060. func (s *ListFieldLevelEncryptionProfilesInput) SetMarker(v string) *ListFieldLevelEncryptionProfilesInput {
  10061. s.Marker = &v
  10062. return s
  10063. }
  10064. // SetMaxItems sets the MaxItems field's value.
  10065. func (s *ListFieldLevelEncryptionProfilesInput) SetMaxItems(v int64) *ListFieldLevelEncryptionProfilesInput {
  10066. s.MaxItems = &v
  10067. return s
  10068. }
  10069. type ListFieldLevelEncryptionProfilesOutput struct {
  10070. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileList"`
  10071. // Returns a list of the field-level encryption profiles that have been created
  10072. // in CloudFront for this account.
  10073. FieldLevelEncryptionProfileList *FieldLevelEncryptionProfileList `type:"structure"`
  10074. }
  10075. // String returns the string representation
  10076. func (s ListFieldLevelEncryptionProfilesOutput) String() string {
  10077. return awsutil.Prettify(s)
  10078. }
  10079. // GoString returns the string representation
  10080. func (s ListFieldLevelEncryptionProfilesOutput) GoString() string {
  10081. return s.String()
  10082. }
  10083. // SetFieldLevelEncryptionProfileList sets the FieldLevelEncryptionProfileList field's value.
  10084. func (s *ListFieldLevelEncryptionProfilesOutput) SetFieldLevelEncryptionProfileList(v *FieldLevelEncryptionProfileList) *ListFieldLevelEncryptionProfilesOutput {
  10085. s.FieldLevelEncryptionProfileList = v
  10086. return s
  10087. }
  10088. // The request to list invalidations.
  10089. type ListInvalidationsInput struct {
  10090. _ struct{} `type:"structure"`
  10091. // The distribution's ID.
  10092. //
  10093. // DistributionId is a required field
  10094. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  10095. // Use this parameter when paginating results to indicate where to begin in
  10096. // your list of invalidation batches. Because the results are returned in decreasing
  10097. // order from most recent to oldest, the most recent results are on the first
  10098. // page, the second page will contain earlier results, and so on. To get the
  10099. // next page of results, set Marker to the value of the NextMarker from the
  10100. // current page's response. This value is the same as the ID of the last invalidation
  10101. // batch on that page.
  10102. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  10103. // The maximum number of invalidation batches that you want in the response
  10104. // body.
  10105. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  10106. }
  10107. // String returns the string representation
  10108. func (s ListInvalidationsInput) String() string {
  10109. return awsutil.Prettify(s)
  10110. }
  10111. // GoString returns the string representation
  10112. func (s ListInvalidationsInput) GoString() string {
  10113. return s.String()
  10114. }
  10115. // Validate inspects the fields of the type to determine if they are valid.
  10116. func (s *ListInvalidationsInput) Validate() error {
  10117. invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"}
  10118. if s.DistributionId == nil {
  10119. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  10120. }
  10121. if s.DistributionId != nil && len(*s.DistributionId) < 1 {
  10122. invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1))
  10123. }
  10124. if invalidParams.Len() > 0 {
  10125. return invalidParams
  10126. }
  10127. return nil
  10128. }
  10129. // SetDistributionId sets the DistributionId field's value.
  10130. func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput {
  10131. s.DistributionId = &v
  10132. return s
  10133. }
  10134. // SetMarker sets the Marker field's value.
  10135. func (s *ListInvalidationsInput) SetMarker(v string) *ListInvalidationsInput {
  10136. s.Marker = &v
  10137. return s
  10138. }
  10139. // SetMaxItems sets the MaxItems field's value.
  10140. func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput {
  10141. s.MaxItems = &v
  10142. return s
  10143. }
  10144. // The returned result of the corresponding request.
  10145. type ListInvalidationsOutput struct {
  10146. _ struct{} `type:"structure" payload:"InvalidationList"`
  10147. // Information about invalidation batches.
  10148. InvalidationList *InvalidationList `type:"structure"`
  10149. }
  10150. // String returns the string representation
  10151. func (s ListInvalidationsOutput) String() string {
  10152. return awsutil.Prettify(s)
  10153. }
  10154. // GoString returns the string representation
  10155. func (s ListInvalidationsOutput) GoString() string {
  10156. return s.String()
  10157. }
  10158. // SetInvalidationList sets the InvalidationList field's value.
  10159. func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *ListInvalidationsOutput {
  10160. s.InvalidationList = v
  10161. return s
  10162. }
  10163. type ListPublicKeysInput struct {
  10164. _ struct{} `type:"structure"`
  10165. // Use this when paginating results to indicate where to begin in your list
  10166. // of public keys. The results include public keys in the list that occur after
  10167. // the marker. To get the next page of results, set the Marker to the value
  10168. // of the NextMarker from the current page's response (which is also the ID
  10169. // of the last public key on that page).
  10170. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  10171. // The maximum number of public keys you want in the response body.
  10172. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  10173. }
  10174. // String returns the string representation
  10175. func (s ListPublicKeysInput) String() string {
  10176. return awsutil.Prettify(s)
  10177. }
  10178. // GoString returns the string representation
  10179. func (s ListPublicKeysInput) GoString() string {
  10180. return s.String()
  10181. }
  10182. // SetMarker sets the Marker field's value.
  10183. func (s *ListPublicKeysInput) SetMarker(v string) *ListPublicKeysInput {
  10184. s.Marker = &v
  10185. return s
  10186. }
  10187. // SetMaxItems sets the MaxItems field's value.
  10188. func (s *ListPublicKeysInput) SetMaxItems(v int64) *ListPublicKeysInput {
  10189. s.MaxItems = &v
  10190. return s
  10191. }
  10192. type ListPublicKeysOutput struct {
  10193. _ struct{} `type:"structure" payload:"PublicKeyList"`
  10194. // Returns a list of all public keys that have been added to CloudFront for
  10195. // this account.
  10196. PublicKeyList *PublicKeyList `type:"structure"`
  10197. }
  10198. // String returns the string representation
  10199. func (s ListPublicKeysOutput) String() string {
  10200. return awsutil.Prettify(s)
  10201. }
  10202. // GoString returns the string representation
  10203. func (s ListPublicKeysOutput) GoString() string {
  10204. return s.String()
  10205. }
  10206. // SetPublicKeyList sets the PublicKeyList field's value.
  10207. func (s *ListPublicKeysOutput) SetPublicKeyList(v *PublicKeyList) *ListPublicKeysOutput {
  10208. s.PublicKeyList = v
  10209. return s
  10210. }
  10211. // The request to list your streaming distributions.
  10212. type ListStreamingDistributionsInput struct {
  10213. _ struct{} `type:"structure"`
  10214. // The value that you provided for the Marker request parameter.
  10215. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  10216. // The value that you provided for the MaxItems request parameter.
  10217. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  10218. }
  10219. // String returns the string representation
  10220. func (s ListStreamingDistributionsInput) String() string {
  10221. return awsutil.Prettify(s)
  10222. }
  10223. // GoString returns the string representation
  10224. func (s ListStreamingDistributionsInput) GoString() string {
  10225. return s.String()
  10226. }
  10227. // SetMarker sets the Marker field's value.
  10228. func (s *ListStreamingDistributionsInput) SetMarker(v string) *ListStreamingDistributionsInput {
  10229. s.Marker = &v
  10230. return s
  10231. }
  10232. // SetMaxItems sets the MaxItems field's value.
  10233. func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDistributionsInput {
  10234. s.MaxItems = &v
  10235. return s
  10236. }
  10237. // The returned result of the corresponding request.
  10238. type ListStreamingDistributionsOutput struct {
  10239. _ struct{} `type:"structure" payload:"StreamingDistributionList"`
  10240. // The StreamingDistributionList type.
  10241. StreamingDistributionList *StreamingDistributionList `type:"structure"`
  10242. }
  10243. // String returns the string representation
  10244. func (s ListStreamingDistributionsOutput) String() string {
  10245. return awsutil.Prettify(s)
  10246. }
  10247. // GoString returns the string representation
  10248. func (s ListStreamingDistributionsOutput) GoString() string {
  10249. return s.String()
  10250. }
  10251. // SetStreamingDistributionList sets the StreamingDistributionList field's value.
  10252. func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *StreamingDistributionList) *ListStreamingDistributionsOutput {
  10253. s.StreamingDistributionList = v
  10254. return s
  10255. }
  10256. // The request to list tags for a CloudFront resource.
  10257. type ListTagsForResourceInput struct {
  10258. _ struct{} `type:"structure"`
  10259. // An ARN of a CloudFront resource.
  10260. //
  10261. // Resource is a required field
  10262. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  10263. }
  10264. // String returns the string representation
  10265. func (s ListTagsForResourceInput) String() string {
  10266. return awsutil.Prettify(s)
  10267. }
  10268. // GoString returns the string representation
  10269. func (s ListTagsForResourceInput) GoString() string {
  10270. return s.String()
  10271. }
  10272. // Validate inspects the fields of the type to determine if they are valid.
  10273. func (s *ListTagsForResourceInput) Validate() error {
  10274. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  10275. if s.Resource == nil {
  10276. invalidParams.Add(request.NewErrParamRequired("Resource"))
  10277. }
  10278. if invalidParams.Len() > 0 {
  10279. return invalidParams
  10280. }
  10281. return nil
  10282. }
  10283. // SetResource sets the Resource field's value.
  10284. func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput {
  10285. s.Resource = &v
  10286. return s
  10287. }
  10288. // The returned result of the corresponding request.
  10289. type ListTagsForResourceOutput struct {
  10290. _ struct{} `type:"structure" payload:"Tags"`
  10291. // A complex type that contains zero or more Tag elements.
  10292. //
  10293. // Tags is a required field
  10294. Tags *Tags `type:"structure" required:"true"`
  10295. }
  10296. // String returns the string representation
  10297. func (s ListTagsForResourceOutput) String() string {
  10298. return awsutil.Prettify(s)
  10299. }
  10300. // GoString returns the string representation
  10301. func (s ListTagsForResourceOutput) GoString() string {
  10302. return s.String()
  10303. }
  10304. // SetTags sets the Tags field's value.
  10305. func (s *ListTagsForResourceOutput) SetTags(v *Tags) *ListTagsForResourceOutput {
  10306. s.Tags = v
  10307. return s
  10308. }
  10309. // A complex type that controls whether access logs are written for the distribution.
  10310. type LoggingConfig struct {
  10311. _ struct{} `type:"structure"`
  10312. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  10313. //
  10314. // Bucket is a required field
  10315. Bucket *string `type:"string" required:"true"`
  10316. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  10317. // bucket. If you don't want to enable logging when you create a distribution
  10318. // or if you want to disable logging for an existing distribution, specify false
  10319. // for Enabled, and specify empty Bucket and Prefix elements. If you specify
  10320. // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies,
  10321. // the values are automatically deleted.
  10322. //
  10323. // Enabled is a required field
  10324. Enabled *bool `type:"boolean" required:"true"`
  10325. // Specifies whether you want CloudFront to include cookies in access logs,
  10326. // specify true for IncludeCookies. If you choose to include cookies in logs,
  10327. // CloudFront logs all cookies regardless of how you configure the cache behaviors
  10328. // for this distribution. If you don't want to include cookies when you create
  10329. // a distribution or if you want to disable include cookies for an existing
  10330. // distribution, specify false for IncludeCookies.
  10331. //
  10332. // IncludeCookies is a required field
  10333. IncludeCookies *bool `type:"boolean" required:"true"`
  10334. // An optional string that you want CloudFront to prefix to the access log filenames
  10335. // for this distribution, for example, myprefix/. If you want to enable logging,
  10336. // but you don't want to specify a prefix, you still must include an empty Prefix
  10337. // element in the Logging element.
  10338. //
  10339. // Prefix is a required field
  10340. Prefix *string `type:"string" required:"true"`
  10341. }
  10342. // String returns the string representation
  10343. func (s LoggingConfig) String() string {
  10344. return awsutil.Prettify(s)
  10345. }
  10346. // GoString returns the string representation
  10347. func (s LoggingConfig) GoString() string {
  10348. return s.String()
  10349. }
  10350. // Validate inspects the fields of the type to determine if they are valid.
  10351. func (s *LoggingConfig) Validate() error {
  10352. invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"}
  10353. if s.Bucket == nil {
  10354. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10355. }
  10356. if s.Enabled == nil {
  10357. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  10358. }
  10359. if s.IncludeCookies == nil {
  10360. invalidParams.Add(request.NewErrParamRequired("IncludeCookies"))
  10361. }
  10362. if s.Prefix == nil {
  10363. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  10364. }
  10365. if invalidParams.Len() > 0 {
  10366. return invalidParams
  10367. }
  10368. return nil
  10369. }
  10370. // SetBucket sets the Bucket field's value.
  10371. func (s *LoggingConfig) SetBucket(v string) *LoggingConfig {
  10372. s.Bucket = &v
  10373. return s
  10374. }
  10375. // SetEnabled sets the Enabled field's value.
  10376. func (s *LoggingConfig) SetEnabled(v bool) *LoggingConfig {
  10377. s.Enabled = &v
  10378. return s
  10379. }
  10380. // SetIncludeCookies sets the IncludeCookies field's value.
  10381. func (s *LoggingConfig) SetIncludeCookies(v bool) *LoggingConfig {
  10382. s.IncludeCookies = &v
  10383. return s
  10384. }
  10385. // SetPrefix sets the Prefix field's value.
  10386. func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig {
  10387. s.Prefix = &v
  10388. return s
  10389. }
  10390. // A complex type that describes the Amazon S3 bucket, HTTP server (for example,
  10391. // a web server), Amazon MediaStore, or other server from which CloudFront gets
  10392. // your files. This can also be an origin group, if you've created an origin
  10393. // group. You must specify at least one origin or origin group.
  10394. //
  10395. // For the current limit on the number of origins or origin groups that you
  10396. // can specify for a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  10397. // in the AWS General Reference.
  10398. type Origin struct {
  10399. _ struct{} `type:"structure"`
  10400. // A complex type that contains names and values for the custom headers that
  10401. // you want.
  10402. CustomHeaders *CustomHeaders `type:"structure"`
  10403. // A complex type that contains information about a custom origin. If the origin
  10404. // is an Amazon S3 bucket, use the S3OriginConfig element instead.
  10405. CustomOriginConfig *CustomOriginConfig `type:"structure"`
  10406. // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want
  10407. // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.
  10408. // If you set up your bucket to be configured as a website endpoint, enter the
  10409. // Amazon S3 static website hosting endpoint for the bucket.
  10410. //
  10411. // For more information about specifying this value for different types of origins,
  10412. // see Origin Domain Name (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName)
  10413. // in the Amazon CloudFront Developer Guide.
  10414. //
  10415. // Constraints for Amazon S3 origins:
  10416. //
  10417. // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't
  10418. // specify the s3-accelerate endpoint for DomainName.
  10419. //
  10420. // * The bucket name must be between 3 and 63 characters long (inclusive).
  10421. //
  10422. // * The bucket name must contain only lowercase characters, numbers, periods,
  10423. // underscores, and dashes.
  10424. //
  10425. // * The bucket name must not contain adjacent periods.
  10426. //
  10427. // Custom Origins: The DNS domain name for the HTTP server from which you want
  10428. // CloudFront to get objects for this origin, for example, www.example.com.
  10429. //
  10430. // Constraints for custom origins:
  10431. //
  10432. // * DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9,
  10433. // dot (.), hyphen (-), or underscore (_) characters.
  10434. //
  10435. // * The name cannot exceed 128 characters.
  10436. //
  10437. // DomainName is a required field
  10438. DomainName *string `type:"string" required:"true"`
  10439. // A unique identifier for the origin or origin group. The value of Id must
  10440. // be unique within the distribution.
  10441. //
  10442. // When you specify the value of TargetOriginId for the default cache behavior
  10443. // or for another cache behavior, you indicate the origin to which you want
  10444. // the cache behavior to route requests by specifying the value of the Id element
  10445. // for that origin. When a request matches the path pattern for that cache behavior,
  10446. // CloudFront routes the request to the specified origin. For more information,
  10447. // see Cache Behavior Settings (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior)
  10448. // in the Amazon CloudFront Developer Guide.
  10449. //
  10450. // Id is a required field
  10451. Id *string `type:"string" required:"true"`
  10452. // An optional element that causes CloudFront to request your content from a
  10453. // directory in your Amazon S3 bucket or your custom origin. When you include
  10454. // the OriginPath element, specify the directory name, beginning with a /. CloudFront
  10455. // appends the directory name to the value of DomainName, for example, example.com/production.
  10456. // Do not include a / at the end of the directory name.
  10457. //
  10458. // For example, suppose you've specified the following values for your distribution:
  10459. //
  10460. // * DomainName: An Amazon S3 bucket named myawsbucket.
  10461. //
  10462. // * OriginPath: /production
  10463. //
  10464. // * CNAME: example.com
  10465. //
  10466. // When a user enters example.com/index.html in a browser, CloudFront sends
  10467. // a request to Amazon S3 for myawsbucket/production/index.html.
  10468. //
  10469. // When a user enters example.com/acme/index.html in a browser, CloudFront sends
  10470. // a request to Amazon S3 for myawsbucket/production/acme/index.html.
  10471. OriginPath *string `type:"string"`
  10472. // A complex type that contains information about the Amazon S3 origin. If the
  10473. // origin is a custom origin, use the CustomOriginConfig element instead.
  10474. S3OriginConfig *S3OriginConfig `type:"structure"`
  10475. }
  10476. // String returns the string representation
  10477. func (s Origin) String() string {
  10478. return awsutil.Prettify(s)
  10479. }
  10480. // GoString returns the string representation
  10481. func (s Origin) GoString() string {
  10482. return s.String()
  10483. }
  10484. // Validate inspects the fields of the type to determine if they are valid.
  10485. func (s *Origin) Validate() error {
  10486. invalidParams := request.ErrInvalidParams{Context: "Origin"}
  10487. if s.DomainName == nil {
  10488. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  10489. }
  10490. if s.Id == nil {
  10491. invalidParams.Add(request.NewErrParamRequired("Id"))
  10492. }
  10493. if s.CustomHeaders != nil {
  10494. if err := s.CustomHeaders.Validate(); err != nil {
  10495. invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams))
  10496. }
  10497. }
  10498. if s.CustomOriginConfig != nil {
  10499. if err := s.CustomOriginConfig.Validate(); err != nil {
  10500. invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams))
  10501. }
  10502. }
  10503. if s.S3OriginConfig != nil {
  10504. if err := s.S3OriginConfig.Validate(); err != nil {
  10505. invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams))
  10506. }
  10507. }
  10508. if invalidParams.Len() > 0 {
  10509. return invalidParams
  10510. }
  10511. return nil
  10512. }
  10513. // SetCustomHeaders sets the CustomHeaders field's value.
  10514. func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin {
  10515. s.CustomHeaders = v
  10516. return s
  10517. }
  10518. // SetCustomOriginConfig sets the CustomOriginConfig field's value.
  10519. func (s *Origin) SetCustomOriginConfig(v *CustomOriginConfig) *Origin {
  10520. s.CustomOriginConfig = v
  10521. return s
  10522. }
  10523. // SetDomainName sets the DomainName field's value.
  10524. func (s *Origin) SetDomainName(v string) *Origin {
  10525. s.DomainName = &v
  10526. return s
  10527. }
  10528. // SetId sets the Id field's value.
  10529. func (s *Origin) SetId(v string) *Origin {
  10530. s.Id = &v
  10531. return s
  10532. }
  10533. // SetOriginPath sets the OriginPath field's value.
  10534. func (s *Origin) SetOriginPath(v string) *Origin {
  10535. s.OriginPath = &v
  10536. return s
  10537. }
  10538. // SetS3OriginConfig sets the S3OriginConfig field's value.
  10539. func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin {
  10540. s.S3OriginConfig = v
  10541. return s
  10542. }
  10543. // CloudFront origin access identity.
  10544. type OriginAccessIdentity struct {
  10545. _ struct{} `type:"structure"`
  10546. // The current configuration information for the identity.
  10547. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  10548. // The ID for the origin access identity, for example, E74FTE3AJFJ256A.
  10549. //
  10550. // Id is a required field
  10551. Id *string `type:"string" required:"true"`
  10552. // The Amazon S3 canonical user ID for the origin access identity, used when
  10553. // giving the origin access identity read permission to an object in Amazon
  10554. // S3.
  10555. //
  10556. // S3CanonicalUserId is a required field
  10557. S3CanonicalUserId *string `type:"string" required:"true"`
  10558. }
  10559. // String returns the string representation
  10560. func (s OriginAccessIdentity) String() string {
  10561. return awsutil.Prettify(s)
  10562. }
  10563. // GoString returns the string representation
  10564. func (s OriginAccessIdentity) GoString() string {
  10565. return s.String()
  10566. }
  10567. // SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value.
  10568. func (s *OriginAccessIdentity) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *OriginAccessIdentity {
  10569. s.CloudFrontOriginAccessIdentityConfig = v
  10570. return s
  10571. }
  10572. // SetId sets the Id field's value.
  10573. func (s *OriginAccessIdentity) SetId(v string) *OriginAccessIdentity {
  10574. s.Id = &v
  10575. return s
  10576. }
  10577. // SetS3CanonicalUserId sets the S3CanonicalUserId field's value.
  10578. func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdentity {
  10579. s.S3CanonicalUserId = &v
  10580. return s
  10581. }
  10582. // Origin access identity configuration. Send a GET request to the /CloudFront
  10583. // API version/CloudFront/identity ID/config resource.
  10584. type OriginAccessIdentityConfig struct {
  10585. _ struct{} `type:"structure"`
  10586. // A unique value (for example, a date-time stamp) that ensures that the request
  10587. // can't be replayed.
  10588. //
  10589. // If the value of CallerReference is new (regardless of the content of the
  10590. // CloudFrontOriginAccessIdentityConfig object), a new origin access identity
  10591. // is created.
  10592. //
  10593. // If the CallerReference is a value already sent in a previous identity request,
  10594. // and the content of the CloudFrontOriginAccessIdentityConfig is identical
  10595. // to the original request (ignoring white space), the response includes the
  10596. // same information returned to the original request.
  10597. //
  10598. // If the CallerReference is a value you already sent in a previous request
  10599. // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig
  10600. // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
  10601. // error.
  10602. //
  10603. // CallerReference is a required field
  10604. CallerReference *string `type:"string" required:"true"`
  10605. // Any comments you want to include about the origin access identity.
  10606. //
  10607. // Comment is a required field
  10608. Comment *string `type:"string" required:"true"`
  10609. }
  10610. // String returns the string representation
  10611. func (s OriginAccessIdentityConfig) String() string {
  10612. return awsutil.Prettify(s)
  10613. }
  10614. // GoString returns the string representation
  10615. func (s OriginAccessIdentityConfig) GoString() string {
  10616. return s.String()
  10617. }
  10618. // Validate inspects the fields of the type to determine if they are valid.
  10619. func (s *OriginAccessIdentityConfig) Validate() error {
  10620. invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"}
  10621. if s.CallerReference == nil {
  10622. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  10623. }
  10624. if s.Comment == nil {
  10625. invalidParams.Add(request.NewErrParamRequired("Comment"))
  10626. }
  10627. if invalidParams.Len() > 0 {
  10628. return invalidParams
  10629. }
  10630. return nil
  10631. }
  10632. // SetCallerReference sets the CallerReference field's value.
  10633. func (s *OriginAccessIdentityConfig) SetCallerReference(v string) *OriginAccessIdentityConfig {
  10634. s.CallerReference = &v
  10635. return s
  10636. }
  10637. // SetComment sets the Comment field's value.
  10638. func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityConfig {
  10639. s.Comment = &v
  10640. return s
  10641. }
  10642. // Lists the origin access identities for CloudFront.Send a GET request to the
  10643. // /CloudFront API version/origin-access-identity/cloudfront resource. The response
  10644. // includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary
  10645. // child elements. By default, your entire list of origin access identities
  10646. // is returned in one single page. If the list is long, you can paginate it
  10647. // using the MaxItems and Marker parameters.
  10648. type OriginAccessIdentityList struct {
  10649. _ struct{} `type:"structure"`
  10650. // A flag that indicates whether more origin access identities remain to be
  10651. // listed. If your results were truncated, you can make a follow-up pagination
  10652. // request using the Marker request parameter to retrieve more items in the
  10653. // list.
  10654. //
  10655. // IsTruncated is a required field
  10656. IsTruncated *bool `type:"boolean" required:"true"`
  10657. // A complex type that contains one CloudFrontOriginAccessIdentitySummary element
  10658. // for each origin access identity that was created by the current AWS account.
  10659. Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"`
  10660. // Use this when paginating results to indicate where to begin in your list
  10661. // of origin access identities. The results include identities in the list that
  10662. // occur after the marker. To get the next page of results, set the Marker to
  10663. // the value of the NextMarker from the current page's response (which is also
  10664. // the ID of the last identity on that page).
  10665. //
  10666. // Marker is a required field
  10667. Marker *string `type:"string" required:"true"`
  10668. // The maximum number of origin access identities you want in the response body.
  10669. //
  10670. // MaxItems is a required field
  10671. MaxItems *int64 `type:"integer" required:"true"`
  10672. // If IsTruncated is true, this element is present and contains the value you
  10673. // can use for the Marker request parameter to continue listing your origin
  10674. // access identities where they left off.
  10675. NextMarker *string `type:"string"`
  10676. // The number of CloudFront origin access identities that were created by the
  10677. // current AWS account.
  10678. //
  10679. // Quantity is a required field
  10680. Quantity *int64 `type:"integer" required:"true"`
  10681. }
  10682. // String returns the string representation
  10683. func (s OriginAccessIdentityList) String() string {
  10684. return awsutil.Prettify(s)
  10685. }
  10686. // GoString returns the string representation
  10687. func (s OriginAccessIdentityList) GoString() string {
  10688. return s.String()
  10689. }
  10690. // SetIsTruncated sets the IsTruncated field's value.
  10691. func (s *OriginAccessIdentityList) SetIsTruncated(v bool) *OriginAccessIdentityList {
  10692. s.IsTruncated = &v
  10693. return s
  10694. }
  10695. // SetItems sets the Items field's value.
  10696. func (s *OriginAccessIdentityList) SetItems(v []*OriginAccessIdentitySummary) *OriginAccessIdentityList {
  10697. s.Items = v
  10698. return s
  10699. }
  10700. // SetMarker sets the Marker field's value.
  10701. func (s *OriginAccessIdentityList) SetMarker(v string) *OriginAccessIdentityList {
  10702. s.Marker = &v
  10703. return s
  10704. }
  10705. // SetMaxItems sets the MaxItems field's value.
  10706. func (s *OriginAccessIdentityList) SetMaxItems(v int64) *OriginAccessIdentityList {
  10707. s.MaxItems = &v
  10708. return s
  10709. }
  10710. // SetNextMarker sets the NextMarker field's value.
  10711. func (s *OriginAccessIdentityList) SetNextMarker(v string) *OriginAccessIdentityList {
  10712. s.NextMarker = &v
  10713. return s
  10714. }
  10715. // SetQuantity sets the Quantity field's value.
  10716. func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityList {
  10717. s.Quantity = &v
  10718. return s
  10719. }
  10720. // Summary of the information about a CloudFront origin access identity.
  10721. type OriginAccessIdentitySummary struct {
  10722. _ struct{} `type:"structure"`
  10723. // The comment for this origin access identity, as originally specified when
  10724. // created.
  10725. //
  10726. // Comment is a required field
  10727. Comment *string `type:"string" required:"true"`
  10728. // The ID for the origin access identity. For example: E74FTE3AJFJ256A.
  10729. //
  10730. // Id is a required field
  10731. Id *string `type:"string" required:"true"`
  10732. // The Amazon S3 canonical user ID for the origin access identity, which you
  10733. // use when giving the origin access identity read permission to an object in
  10734. // Amazon S3.
  10735. //
  10736. // S3CanonicalUserId is a required field
  10737. S3CanonicalUserId *string `type:"string" required:"true"`
  10738. }
  10739. // String returns the string representation
  10740. func (s OriginAccessIdentitySummary) String() string {
  10741. return awsutil.Prettify(s)
  10742. }
  10743. // GoString returns the string representation
  10744. func (s OriginAccessIdentitySummary) GoString() string {
  10745. return s.String()
  10746. }
  10747. // SetComment sets the Comment field's value.
  10748. func (s *OriginAccessIdentitySummary) SetComment(v string) *OriginAccessIdentitySummary {
  10749. s.Comment = &v
  10750. return s
  10751. }
  10752. // SetId sets the Id field's value.
  10753. func (s *OriginAccessIdentitySummary) SetId(v string) *OriginAccessIdentitySummary {
  10754. s.Id = &v
  10755. return s
  10756. }
  10757. // SetS3CanonicalUserId sets the S3CanonicalUserId field's value.
  10758. func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAccessIdentitySummary {
  10759. s.S3CanonicalUserId = &v
  10760. return s
  10761. }
  10762. // A complex type that contains HeaderName and HeaderValue elements, if any,
  10763. // for this distribution.
  10764. type OriginCustomHeader struct {
  10765. _ struct{} `type:"structure"`
  10766. // The name of a header that you want CloudFront to forward to your origin.
  10767. // For more information, see Forwarding Custom Headers to Your Origin (Web Distributions
  10768. // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html)
  10769. // in the Amazon Amazon CloudFront Developer Guide.
  10770. //
  10771. // HeaderName is a required field
  10772. HeaderName *string `type:"string" required:"true"`
  10773. // The value for the header that you specified in the HeaderName field.
  10774. //
  10775. // HeaderValue is a required field
  10776. HeaderValue *string `type:"string" required:"true"`
  10777. }
  10778. // String returns the string representation
  10779. func (s OriginCustomHeader) String() string {
  10780. return awsutil.Prettify(s)
  10781. }
  10782. // GoString returns the string representation
  10783. func (s OriginCustomHeader) GoString() string {
  10784. return s.String()
  10785. }
  10786. // Validate inspects the fields of the type to determine if they are valid.
  10787. func (s *OriginCustomHeader) Validate() error {
  10788. invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"}
  10789. if s.HeaderName == nil {
  10790. invalidParams.Add(request.NewErrParamRequired("HeaderName"))
  10791. }
  10792. if s.HeaderValue == nil {
  10793. invalidParams.Add(request.NewErrParamRequired("HeaderValue"))
  10794. }
  10795. if invalidParams.Len() > 0 {
  10796. return invalidParams
  10797. }
  10798. return nil
  10799. }
  10800. // SetHeaderName sets the HeaderName field's value.
  10801. func (s *OriginCustomHeader) SetHeaderName(v string) *OriginCustomHeader {
  10802. s.HeaderName = &v
  10803. return s
  10804. }
  10805. // SetHeaderValue sets the HeaderValue field's value.
  10806. func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader {
  10807. s.HeaderValue = &v
  10808. return s
  10809. }
  10810. // An origin group includes two origins (a primary origin and a second origin
  10811. // to failover to) and a failover criteria that you specify. You create an origin
  10812. // group to support origin failover in CloudFront. When you create or update
  10813. // a distribution, you can specifiy the origin group instead of a single origin,
  10814. // and CloudFront will failover from the primary origin to the second origin
  10815. // under the failover conditions that you've chosen.
  10816. type OriginGroup struct {
  10817. _ struct{} `type:"structure"`
  10818. // A complex type that contains information about the failover criteria for
  10819. // an origin group.
  10820. //
  10821. // FailoverCriteria is a required field
  10822. FailoverCriteria *OriginGroupFailoverCriteria `type:"structure" required:"true"`
  10823. // The origin group's ID.
  10824. //
  10825. // Id is a required field
  10826. Id *string `type:"string" required:"true"`
  10827. // A complex type that contains information about the origins in an origin group.
  10828. //
  10829. // Members is a required field
  10830. Members *OriginGroupMembers `type:"structure" required:"true"`
  10831. }
  10832. // String returns the string representation
  10833. func (s OriginGroup) String() string {
  10834. return awsutil.Prettify(s)
  10835. }
  10836. // GoString returns the string representation
  10837. func (s OriginGroup) GoString() string {
  10838. return s.String()
  10839. }
  10840. // Validate inspects the fields of the type to determine if they are valid.
  10841. func (s *OriginGroup) Validate() error {
  10842. invalidParams := request.ErrInvalidParams{Context: "OriginGroup"}
  10843. if s.FailoverCriteria == nil {
  10844. invalidParams.Add(request.NewErrParamRequired("FailoverCriteria"))
  10845. }
  10846. if s.Id == nil {
  10847. invalidParams.Add(request.NewErrParamRequired("Id"))
  10848. }
  10849. if s.Members == nil {
  10850. invalidParams.Add(request.NewErrParamRequired("Members"))
  10851. }
  10852. if s.FailoverCriteria != nil {
  10853. if err := s.FailoverCriteria.Validate(); err != nil {
  10854. invalidParams.AddNested("FailoverCriteria", err.(request.ErrInvalidParams))
  10855. }
  10856. }
  10857. if s.Members != nil {
  10858. if err := s.Members.Validate(); err != nil {
  10859. invalidParams.AddNested("Members", err.(request.ErrInvalidParams))
  10860. }
  10861. }
  10862. if invalidParams.Len() > 0 {
  10863. return invalidParams
  10864. }
  10865. return nil
  10866. }
  10867. // SetFailoverCriteria sets the FailoverCriteria field's value.
  10868. func (s *OriginGroup) SetFailoverCriteria(v *OriginGroupFailoverCriteria) *OriginGroup {
  10869. s.FailoverCriteria = v
  10870. return s
  10871. }
  10872. // SetId sets the Id field's value.
  10873. func (s *OriginGroup) SetId(v string) *OriginGroup {
  10874. s.Id = &v
  10875. return s
  10876. }
  10877. // SetMembers sets the Members field's value.
  10878. func (s *OriginGroup) SetMembers(v *OriginGroupMembers) *OriginGroup {
  10879. s.Members = v
  10880. return s
  10881. }
  10882. // A complex data type that includes information about the failover criteria
  10883. // for an origin group, including the status codes for which CloudFront will
  10884. // failover from the primary origin to the second origin.
  10885. type OriginGroupFailoverCriteria struct {
  10886. _ struct{} `type:"structure"`
  10887. // The status codes that, when returned from the primary origin, will trigger
  10888. // CloudFront to failover to the second origin.
  10889. //
  10890. // StatusCodes is a required field
  10891. StatusCodes *StatusCodes `type:"structure" required:"true"`
  10892. }
  10893. // String returns the string representation
  10894. func (s OriginGroupFailoverCriteria) String() string {
  10895. return awsutil.Prettify(s)
  10896. }
  10897. // GoString returns the string representation
  10898. func (s OriginGroupFailoverCriteria) GoString() string {
  10899. return s.String()
  10900. }
  10901. // Validate inspects the fields of the type to determine if they are valid.
  10902. func (s *OriginGroupFailoverCriteria) Validate() error {
  10903. invalidParams := request.ErrInvalidParams{Context: "OriginGroupFailoverCriteria"}
  10904. if s.StatusCodes == nil {
  10905. invalidParams.Add(request.NewErrParamRequired("StatusCodes"))
  10906. }
  10907. if s.StatusCodes != nil {
  10908. if err := s.StatusCodes.Validate(); err != nil {
  10909. invalidParams.AddNested("StatusCodes", err.(request.ErrInvalidParams))
  10910. }
  10911. }
  10912. if invalidParams.Len() > 0 {
  10913. return invalidParams
  10914. }
  10915. return nil
  10916. }
  10917. // SetStatusCodes sets the StatusCodes field's value.
  10918. func (s *OriginGroupFailoverCriteria) SetStatusCodes(v *StatusCodes) *OriginGroupFailoverCriteria {
  10919. s.StatusCodes = v
  10920. return s
  10921. }
  10922. // An origin in an origin group.
  10923. type OriginGroupMember struct {
  10924. _ struct{} `type:"structure"`
  10925. // The ID for an origin in an origin group.
  10926. //
  10927. // OriginId is a required field
  10928. OriginId *string `type:"string" required:"true"`
  10929. }
  10930. // String returns the string representation
  10931. func (s OriginGroupMember) String() string {
  10932. return awsutil.Prettify(s)
  10933. }
  10934. // GoString returns the string representation
  10935. func (s OriginGroupMember) GoString() string {
  10936. return s.String()
  10937. }
  10938. // Validate inspects the fields of the type to determine if they are valid.
  10939. func (s *OriginGroupMember) Validate() error {
  10940. invalidParams := request.ErrInvalidParams{Context: "OriginGroupMember"}
  10941. if s.OriginId == nil {
  10942. invalidParams.Add(request.NewErrParamRequired("OriginId"))
  10943. }
  10944. if invalidParams.Len() > 0 {
  10945. return invalidParams
  10946. }
  10947. return nil
  10948. }
  10949. // SetOriginId sets the OriginId field's value.
  10950. func (s *OriginGroupMember) SetOriginId(v string) *OriginGroupMember {
  10951. s.OriginId = &v
  10952. return s
  10953. }
  10954. // A complex data type for the origins included in an origin group.
  10955. type OriginGroupMembers struct {
  10956. _ struct{} `type:"structure"`
  10957. // Items (origins) in an origin group.
  10958. //
  10959. // Items is a required field
  10960. Items []*OriginGroupMember `locationNameList:"OriginGroupMember" min:"2" type:"list" required:"true"`
  10961. // The number of origins in an origin group.
  10962. //
  10963. // Quantity is a required field
  10964. Quantity *int64 `type:"integer" required:"true"`
  10965. }
  10966. // String returns the string representation
  10967. func (s OriginGroupMembers) String() string {
  10968. return awsutil.Prettify(s)
  10969. }
  10970. // GoString returns the string representation
  10971. func (s OriginGroupMembers) GoString() string {
  10972. return s.String()
  10973. }
  10974. // Validate inspects the fields of the type to determine if they are valid.
  10975. func (s *OriginGroupMembers) Validate() error {
  10976. invalidParams := request.ErrInvalidParams{Context: "OriginGroupMembers"}
  10977. if s.Items == nil {
  10978. invalidParams.Add(request.NewErrParamRequired("Items"))
  10979. }
  10980. if s.Items != nil && len(s.Items) < 2 {
  10981. invalidParams.Add(request.NewErrParamMinLen("Items", 2))
  10982. }
  10983. if s.Quantity == nil {
  10984. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  10985. }
  10986. if s.Items != nil {
  10987. for i, v := range s.Items {
  10988. if v == nil {
  10989. continue
  10990. }
  10991. if err := v.Validate(); err != nil {
  10992. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  10993. }
  10994. }
  10995. }
  10996. if invalidParams.Len() > 0 {
  10997. return invalidParams
  10998. }
  10999. return nil
  11000. }
  11001. // SetItems sets the Items field's value.
  11002. func (s *OriginGroupMembers) SetItems(v []*OriginGroupMember) *OriginGroupMembers {
  11003. s.Items = v
  11004. return s
  11005. }
  11006. // SetQuantity sets the Quantity field's value.
  11007. func (s *OriginGroupMembers) SetQuantity(v int64) *OriginGroupMembers {
  11008. s.Quantity = &v
  11009. return s
  11010. }
  11011. // A complex data type for the origin groups specified for a distribution.
  11012. type OriginGroups struct {
  11013. _ struct{} `type:"structure"`
  11014. // The items (origin groups) in a distribution.
  11015. Items []*OriginGroup `locationNameList:"OriginGroup" type:"list"`
  11016. // The number of origin groups.
  11017. //
  11018. // Quantity is a required field
  11019. Quantity *int64 `type:"integer" required:"true"`
  11020. }
  11021. // String returns the string representation
  11022. func (s OriginGroups) String() string {
  11023. return awsutil.Prettify(s)
  11024. }
  11025. // GoString returns the string representation
  11026. func (s OriginGroups) GoString() string {
  11027. return s.String()
  11028. }
  11029. // Validate inspects the fields of the type to determine if they are valid.
  11030. func (s *OriginGroups) Validate() error {
  11031. invalidParams := request.ErrInvalidParams{Context: "OriginGroups"}
  11032. if s.Quantity == nil {
  11033. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11034. }
  11035. if s.Items != nil {
  11036. for i, v := range s.Items {
  11037. if v == nil {
  11038. continue
  11039. }
  11040. if err := v.Validate(); err != nil {
  11041. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  11042. }
  11043. }
  11044. }
  11045. if invalidParams.Len() > 0 {
  11046. return invalidParams
  11047. }
  11048. return nil
  11049. }
  11050. // SetItems sets the Items field's value.
  11051. func (s *OriginGroups) SetItems(v []*OriginGroup) *OriginGroups {
  11052. s.Items = v
  11053. return s
  11054. }
  11055. // SetQuantity sets the Quantity field's value.
  11056. func (s *OriginGroups) SetQuantity(v int64) *OriginGroups {
  11057. s.Quantity = &v
  11058. return s
  11059. }
  11060. // A complex type that contains information about the SSL/TLS protocols that
  11061. // CloudFront can use when establishing an HTTPS connection with your origin.
  11062. type OriginSslProtocols struct {
  11063. _ struct{} `type:"structure"`
  11064. // A list that contains allowed SSL/TLS protocols for this distribution.
  11065. //
  11066. // Items is a required field
  11067. Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"`
  11068. // The number of SSL/TLS protocols that you want to allow CloudFront to use
  11069. // when establishing an HTTPS connection with this origin.
  11070. //
  11071. // Quantity is a required field
  11072. Quantity *int64 `type:"integer" required:"true"`
  11073. }
  11074. // String returns the string representation
  11075. func (s OriginSslProtocols) String() string {
  11076. return awsutil.Prettify(s)
  11077. }
  11078. // GoString returns the string representation
  11079. func (s OriginSslProtocols) GoString() string {
  11080. return s.String()
  11081. }
  11082. // Validate inspects the fields of the type to determine if they are valid.
  11083. func (s *OriginSslProtocols) Validate() error {
  11084. invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"}
  11085. if s.Items == nil {
  11086. invalidParams.Add(request.NewErrParamRequired("Items"))
  11087. }
  11088. if s.Quantity == nil {
  11089. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11090. }
  11091. if invalidParams.Len() > 0 {
  11092. return invalidParams
  11093. }
  11094. return nil
  11095. }
  11096. // SetItems sets the Items field's value.
  11097. func (s *OriginSslProtocols) SetItems(v []*string) *OriginSslProtocols {
  11098. s.Items = v
  11099. return s
  11100. }
  11101. // SetQuantity sets the Quantity field's value.
  11102. func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols {
  11103. s.Quantity = &v
  11104. return s
  11105. }
  11106. // A complex type that contains information about origins and origin groups
  11107. // for this distribution.
  11108. type Origins struct {
  11109. _ struct{} `type:"structure"`
  11110. // A complex type that contains origins or origin groups for this distribution.
  11111. //
  11112. // Items is a required field
  11113. Items []*Origin `locationNameList:"Origin" min:"1" type:"list" required:"true"`
  11114. // The number of origins or origin groups for this distribution.
  11115. //
  11116. // Quantity is a required field
  11117. Quantity *int64 `type:"integer" required:"true"`
  11118. }
  11119. // String returns the string representation
  11120. func (s Origins) String() string {
  11121. return awsutil.Prettify(s)
  11122. }
  11123. // GoString returns the string representation
  11124. func (s Origins) GoString() string {
  11125. return s.String()
  11126. }
  11127. // Validate inspects the fields of the type to determine if they are valid.
  11128. func (s *Origins) Validate() error {
  11129. invalidParams := request.ErrInvalidParams{Context: "Origins"}
  11130. if s.Items == nil {
  11131. invalidParams.Add(request.NewErrParamRequired("Items"))
  11132. }
  11133. if s.Items != nil && len(s.Items) < 1 {
  11134. invalidParams.Add(request.NewErrParamMinLen("Items", 1))
  11135. }
  11136. if s.Quantity == nil {
  11137. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11138. }
  11139. if s.Items != nil {
  11140. for i, v := range s.Items {
  11141. if v == nil {
  11142. continue
  11143. }
  11144. if err := v.Validate(); err != nil {
  11145. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  11146. }
  11147. }
  11148. }
  11149. if invalidParams.Len() > 0 {
  11150. return invalidParams
  11151. }
  11152. return nil
  11153. }
  11154. // SetItems sets the Items field's value.
  11155. func (s *Origins) SetItems(v []*Origin) *Origins {
  11156. s.Items = v
  11157. return s
  11158. }
  11159. // SetQuantity sets the Quantity field's value.
  11160. func (s *Origins) SetQuantity(v int64) *Origins {
  11161. s.Quantity = &v
  11162. return s
  11163. }
  11164. // A complex type that contains information about the objects that you want
  11165. // to invalidate. For more information, see Specifying the Objects to Invalidate
  11166. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects)
  11167. // in the Amazon CloudFront Developer Guide.
  11168. type Paths struct {
  11169. _ struct{} `type:"structure"`
  11170. // A complex type that contains a list of the paths that you want to invalidate.
  11171. Items []*string `locationNameList:"Path" type:"list"`
  11172. // The number of objects that you want to invalidate.
  11173. //
  11174. // Quantity is a required field
  11175. Quantity *int64 `type:"integer" required:"true"`
  11176. }
  11177. // String returns the string representation
  11178. func (s Paths) String() string {
  11179. return awsutil.Prettify(s)
  11180. }
  11181. // GoString returns the string representation
  11182. func (s Paths) GoString() string {
  11183. return s.String()
  11184. }
  11185. // Validate inspects the fields of the type to determine if they are valid.
  11186. func (s *Paths) Validate() error {
  11187. invalidParams := request.ErrInvalidParams{Context: "Paths"}
  11188. if s.Quantity == nil {
  11189. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11190. }
  11191. if invalidParams.Len() > 0 {
  11192. return invalidParams
  11193. }
  11194. return nil
  11195. }
  11196. // SetItems sets the Items field's value.
  11197. func (s *Paths) SetItems(v []*string) *Paths {
  11198. s.Items = v
  11199. return s
  11200. }
  11201. // SetQuantity sets the Quantity field's value.
  11202. func (s *Paths) SetQuantity(v int64) *Paths {
  11203. s.Quantity = &v
  11204. return s
  11205. }
  11206. // A complex data type of public keys you add to CloudFront to use with features
  11207. // like field-level encryption.
  11208. type PublicKey struct {
  11209. _ struct{} `type:"structure"`
  11210. // A time you added a public key to CloudFront.
  11211. //
  11212. // CreatedTime is a required field
  11213. CreatedTime *time.Time `type:"timestamp" required:"true"`
  11214. // A unique ID assigned to a public key you've added to CloudFront.
  11215. //
  11216. // Id is a required field
  11217. Id *string `type:"string" required:"true"`
  11218. // A complex data type for a public key you add to CloudFront to use with features
  11219. // like field-level encryption.
  11220. //
  11221. // PublicKeyConfig is a required field
  11222. PublicKeyConfig *PublicKeyConfig `type:"structure" required:"true"`
  11223. }
  11224. // String returns the string representation
  11225. func (s PublicKey) String() string {
  11226. return awsutil.Prettify(s)
  11227. }
  11228. // GoString returns the string representation
  11229. func (s PublicKey) GoString() string {
  11230. return s.String()
  11231. }
  11232. // SetCreatedTime sets the CreatedTime field's value.
  11233. func (s *PublicKey) SetCreatedTime(v time.Time) *PublicKey {
  11234. s.CreatedTime = &v
  11235. return s
  11236. }
  11237. // SetId sets the Id field's value.
  11238. func (s *PublicKey) SetId(v string) *PublicKey {
  11239. s.Id = &v
  11240. return s
  11241. }
  11242. // SetPublicKeyConfig sets the PublicKeyConfig field's value.
  11243. func (s *PublicKey) SetPublicKeyConfig(v *PublicKeyConfig) *PublicKey {
  11244. s.PublicKeyConfig = v
  11245. return s
  11246. }
  11247. // Information about a public key you add to CloudFront to use with features
  11248. // like field-level encryption.
  11249. type PublicKeyConfig struct {
  11250. _ struct{} `type:"structure"`
  11251. // A unique number that ensures that the request can't be replayed.
  11252. //
  11253. // CallerReference is a required field
  11254. CallerReference *string `type:"string" required:"true"`
  11255. // An optional comment about a public key.
  11256. Comment *string `type:"string"`
  11257. // The encoded public key that you want to add to CloudFront to use with features
  11258. // like field-level encryption.
  11259. //
  11260. // EncodedKey is a required field
  11261. EncodedKey *string `type:"string" required:"true"`
  11262. // The name for a public key you add to CloudFront to use with features like
  11263. // field-level encryption.
  11264. //
  11265. // Name is a required field
  11266. Name *string `type:"string" required:"true"`
  11267. }
  11268. // String returns the string representation
  11269. func (s PublicKeyConfig) String() string {
  11270. return awsutil.Prettify(s)
  11271. }
  11272. // GoString returns the string representation
  11273. func (s PublicKeyConfig) GoString() string {
  11274. return s.String()
  11275. }
  11276. // Validate inspects the fields of the type to determine if they are valid.
  11277. func (s *PublicKeyConfig) Validate() error {
  11278. invalidParams := request.ErrInvalidParams{Context: "PublicKeyConfig"}
  11279. if s.CallerReference == nil {
  11280. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  11281. }
  11282. if s.EncodedKey == nil {
  11283. invalidParams.Add(request.NewErrParamRequired("EncodedKey"))
  11284. }
  11285. if s.Name == nil {
  11286. invalidParams.Add(request.NewErrParamRequired("Name"))
  11287. }
  11288. if invalidParams.Len() > 0 {
  11289. return invalidParams
  11290. }
  11291. return nil
  11292. }
  11293. // SetCallerReference sets the CallerReference field's value.
  11294. func (s *PublicKeyConfig) SetCallerReference(v string) *PublicKeyConfig {
  11295. s.CallerReference = &v
  11296. return s
  11297. }
  11298. // SetComment sets the Comment field's value.
  11299. func (s *PublicKeyConfig) SetComment(v string) *PublicKeyConfig {
  11300. s.Comment = &v
  11301. return s
  11302. }
  11303. // SetEncodedKey sets the EncodedKey field's value.
  11304. func (s *PublicKeyConfig) SetEncodedKey(v string) *PublicKeyConfig {
  11305. s.EncodedKey = &v
  11306. return s
  11307. }
  11308. // SetName sets the Name field's value.
  11309. func (s *PublicKeyConfig) SetName(v string) *PublicKeyConfig {
  11310. s.Name = &v
  11311. return s
  11312. }
  11313. // A list of public keys you've added to CloudFront to use with features like
  11314. // field-level encryption.
  11315. type PublicKeyList struct {
  11316. _ struct{} `type:"structure"`
  11317. // An array of information about a public key you add to CloudFront to use with
  11318. // features like field-level encryption.
  11319. Items []*PublicKeySummary `locationNameList:"PublicKeySummary" type:"list"`
  11320. // The maximum number of public keys you want in the response body.
  11321. //
  11322. // MaxItems is a required field
  11323. MaxItems *int64 `type:"integer" required:"true"`
  11324. // If there are more elements to be listed, this element is present and contains
  11325. // the value that you can use for the Marker request parameter to continue listing
  11326. // your public keys where you left off.
  11327. NextMarker *string `type:"string"`
  11328. // The number of public keys you added to CloudFront to use with features like
  11329. // field-level encryption.
  11330. //
  11331. // Quantity is a required field
  11332. Quantity *int64 `type:"integer" required:"true"`
  11333. }
  11334. // String returns the string representation
  11335. func (s PublicKeyList) String() string {
  11336. return awsutil.Prettify(s)
  11337. }
  11338. // GoString returns the string representation
  11339. func (s PublicKeyList) GoString() string {
  11340. return s.String()
  11341. }
  11342. // SetItems sets the Items field's value.
  11343. func (s *PublicKeyList) SetItems(v []*PublicKeySummary) *PublicKeyList {
  11344. s.Items = v
  11345. return s
  11346. }
  11347. // SetMaxItems sets the MaxItems field's value.
  11348. func (s *PublicKeyList) SetMaxItems(v int64) *PublicKeyList {
  11349. s.MaxItems = &v
  11350. return s
  11351. }
  11352. // SetNextMarker sets the NextMarker field's value.
  11353. func (s *PublicKeyList) SetNextMarker(v string) *PublicKeyList {
  11354. s.NextMarker = &v
  11355. return s
  11356. }
  11357. // SetQuantity sets the Quantity field's value.
  11358. func (s *PublicKeyList) SetQuantity(v int64) *PublicKeyList {
  11359. s.Quantity = &v
  11360. return s
  11361. }
  11362. // A complex data type for public key information.
  11363. type PublicKeySummary struct {
  11364. _ struct{} `type:"structure"`
  11365. // Comment for public key information summary.
  11366. Comment *string `type:"string"`
  11367. // Creation time for public key information summary.
  11368. //
  11369. // CreatedTime is a required field
  11370. CreatedTime *time.Time `type:"timestamp" required:"true"`
  11371. // Encoded key for public key information summary.
  11372. //
  11373. // EncodedKey is a required field
  11374. EncodedKey *string `type:"string" required:"true"`
  11375. // ID for public key information summary.
  11376. //
  11377. // Id is a required field
  11378. Id *string `type:"string" required:"true"`
  11379. // Name for public key information summary.
  11380. //
  11381. // Name is a required field
  11382. Name *string `type:"string" required:"true"`
  11383. }
  11384. // String returns the string representation
  11385. func (s PublicKeySummary) String() string {
  11386. return awsutil.Prettify(s)
  11387. }
  11388. // GoString returns the string representation
  11389. func (s PublicKeySummary) GoString() string {
  11390. return s.String()
  11391. }
  11392. // SetComment sets the Comment field's value.
  11393. func (s *PublicKeySummary) SetComment(v string) *PublicKeySummary {
  11394. s.Comment = &v
  11395. return s
  11396. }
  11397. // SetCreatedTime sets the CreatedTime field's value.
  11398. func (s *PublicKeySummary) SetCreatedTime(v time.Time) *PublicKeySummary {
  11399. s.CreatedTime = &v
  11400. return s
  11401. }
  11402. // SetEncodedKey sets the EncodedKey field's value.
  11403. func (s *PublicKeySummary) SetEncodedKey(v string) *PublicKeySummary {
  11404. s.EncodedKey = &v
  11405. return s
  11406. }
  11407. // SetId sets the Id field's value.
  11408. func (s *PublicKeySummary) SetId(v string) *PublicKeySummary {
  11409. s.Id = &v
  11410. return s
  11411. }
  11412. // SetName sets the Name field's value.
  11413. func (s *PublicKeySummary) SetName(v string) *PublicKeySummary {
  11414. s.Name = &v
  11415. return s
  11416. }
  11417. // Query argument-profile mapping for field-level encryption.
  11418. type QueryArgProfile struct {
  11419. _ struct{} `type:"structure"`
  11420. // ID of profile to use for field-level encryption query argument-profile mapping
  11421. //
  11422. // ProfileId is a required field
  11423. ProfileId *string `type:"string" required:"true"`
  11424. // Query argument for field-level encryption query argument-profile mapping.
  11425. //
  11426. // QueryArg is a required field
  11427. QueryArg *string `type:"string" required:"true"`
  11428. }
  11429. // String returns the string representation
  11430. func (s QueryArgProfile) String() string {
  11431. return awsutil.Prettify(s)
  11432. }
  11433. // GoString returns the string representation
  11434. func (s QueryArgProfile) GoString() string {
  11435. return s.String()
  11436. }
  11437. // Validate inspects the fields of the type to determine if they are valid.
  11438. func (s *QueryArgProfile) Validate() error {
  11439. invalidParams := request.ErrInvalidParams{Context: "QueryArgProfile"}
  11440. if s.ProfileId == nil {
  11441. invalidParams.Add(request.NewErrParamRequired("ProfileId"))
  11442. }
  11443. if s.QueryArg == nil {
  11444. invalidParams.Add(request.NewErrParamRequired("QueryArg"))
  11445. }
  11446. if invalidParams.Len() > 0 {
  11447. return invalidParams
  11448. }
  11449. return nil
  11450. }
  11451. // SetProfileId sets the ProfileId field's value.
  11452. func (s *QueryArgProfile) SetProfileId(v string) *QueryArgProfile {
  11453. s.ProfileId = &v
  11454. return s
  11455. }
  11456. // SetQueryArg sets the QueryArg field's value.
  11457. func (s *QueryArgProfile) SetQueryArg(v string) *QueryArgProfile {
  11458. s.QueryArg = &v
  11459. return s
  11460. }
  11461. // Configuration for query argument-profile mapping for field-level encryption.
  11462. type QueryArgProfileConfig struct {
  11463. _ struct{} `type:"structure"`
  11464. // Flag to set if you want a request to be forwarded to the origin even if the
  11465. // profile specified by the field-level encryption query argument, fle-profile,
  11466. // is unknown.
  11467. //
  11468. // ForwardWhenQueryArgProfileIsUnknown is a required field
  11469. ForwardWhenQueryArgProfileIsUnknown *bool `type:"boolean" required:"true"`
  11470. // Profiles specified for query argument-profile mapping for field-level encryption.
  11471. QueryArgProfiles *QueryArgProfiles `type:"structure"`
  11472. }
  11473. // String returns the string representation
  11474. func (s QueryArgProfileConfig) String() string {
  11475. return awsutil.Prettify(s)
  11476. }
  11477. // GoString returns the string representation
  11478. func (s QueryArgProfileConfig) GoString() string {
  11479. return s.String()
  11480. }
  11481. // Validate inspects the fields of the type to determine if they are valid.
  11482. func (s *QueryArgProfileConfig) Validate() error {
  11483. invalidParams := request.ErrInvalidParams{Context: "QueryArgProfileConfig"}
  11484. if s.ForwardWhenQueryArgProfileIsUnknown == nil {
  11485. invalidParams.Add(request.NewErrParamRequired("ForwardWhenQueryArgProfileIsUnknown"))
  11486. }
  11487. if s.QueryArgProfiles != nil {
  11488. if err := s.QueryArgProfiles.Validate(); err != nil {
  11489. invalidParams.AddNested("QueryArgProfiles", err.(request.ErrInvalidParams))
  11490. }
  11491. }
  11492. if invalidParams.Len() > 0 {
  11493. return invalidParams
  11494. }
  11495. return nil
  11496. }
  11497. // SetForwardWhenQueryArgProfileIsUnknown sets the ForwardWhenQueryArgProfileIsUnknown field's value.
  11498. func (s *QueryArgProfileConfig) SetForwardWhenQueryArgProfileIsUnknown(v bool) *QueryArgProfileConfig {
  11499. s.ForwardWhenQueryArgProfileIsUnknown = &v
  11500. return s
  11501. }
  11502. // SetQueryArgProfiles sets the QueryArgProfiles field's value.
  11503. func (s *QueryArgProfileConfig) SetQueryArgProfiles(v *QueryArgProfiles) *QueryArgProfileConfig {
  11504. s.QueryArgProfiles = v
  11505. return s
  11506. }
  11507. // Query argument-profile mapping for field-level encryption.
  11508. type QueryArgProfiles struct {
  11509. _ struct{} `type:"structure"`
  11510. // Number of items for query argument-profile mapping for field-level encryption.
  11511. Items []*QueryArgProfile `locationNameList:"QueryArgProfile" type:"list"`
  11512. // Number of profiles for query argument-profile mapping for field-level encryption.
  11513. //
  11514. // Quantity is a required field
  11515. Quantity *int64 `type:"integer" required:"true"`
  11516. }
  11517. // String returns the string representation
  11518. func (s QueryArgProfiles) String() string {
  11519. return awsutil.Prettify(s)
  11520. }
  11521. // GoString returns the string representation
  11522. func (s QueryArgProfiles) GoString() string {
  11523. return s.String()
  11524. }
  11525. // Validate inspects the fields of the type to determine if they are valid.
  11526. func (s *QueryArgProfiles) Validate() error {
  11527. invalidParams := request.ErrInvalidParams{Context: "QueryArgProfiles"}
  11528. if s.Quantity == nil {
  11529. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11530. }
  11531. if s.Items != nil {
  11532. for i, v := range s.Items {
  11533. if v == nil {
  11534. continue
  11535. }
  11536. if err := v.Validate(); err != nil {
  11537. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  11538. }
  11539. }
  11540. }
  11541. if invalidParams.Len() > 0 {
  11542. return invalidParams
  11543. }
  11544. return nil
  11545. }
  11546. // SetItems sets the Items field's value.
  11547. func (s *QueryArgProfiles) SetItems(v []*QueryArgProfile) *QueryArgProfiles {
  11548. s.Items = v
  11549. return s
  11550. }
  11551. // SetQuantity sets the Quantity field's value.
  11552. func (s *QueryArgProfiles) SetQuantity(v int64) *QueryArgProfiles {
  11553. s.Quantity = &v
  11554. return s
  11555. }
  11556. type QueryStringCacheKeys struct {
  11557. _ struct{} `type:"structure"`
  11558. // (Optional) A list that contains the query string parameters that you want
  11559. // CloudFront to use as a basis for caching for this cache behavior. If Quantity
  11560. // is 0, you can omit Items.
  11561. Items []*string `locationNameList:"Name" type:"list"`
  11562. // The number of whitelisted query string parameters for this cache behavior.
  11563. //
  11564. // Quantity is a required field
  11565. Quantity *int64 `type:"integer" required:"true"`
  11566. }
  11567. // String returns the string representation
  11568. func (s QueryStringCacheKeys) String() string {
  11569. return awsutil.Prettify(s)
  11570. }
  11571. // GoString returns the string representation
  11572. func (s QueryStringCacheKeys) GoString() string {
  11573. return s.String()
  11574. }
  11575. // Validate inspects the fields of the type to determine if they are valid.
  11576. func (s *QueryStringCacheKeys) Validate() error {
  11577. invalidParams := request.ErrInvalidParams{Context: "QueryStringCacheKeys"}
  11578. if s.Quantity == nil {
  11579. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11580. }
  11581. if invalidParams.Len() > 0 {
  11582. return invalidParams
  11583. }
  11584. return nil
  11585. }
  11586. // SetItems sets the Items field's value.
  11587. func (s *QueryStringCacheKeys) SetItems(v []*string) *QueryStringCacheKeys {
  11588. s.Items = v
  11589. return s
  11590. }
  11591. // SetQuantity sets the Quantity field's value.
  11592. func (s *QueryStringCacheKeys) SetQuantity(v int64) *QueryStringCacheKeys {
  11593. s.Quantity = &v
  11594. return s
  11595. }
  11596. // A complex type that identifies ways in which you want to restrict distribution
  11597. // of your content.
  11598. type Restrictions struct {
  11599. _ struct{} `type:"structure"`
  11600. // A complex type that controls the countries in which your content is distributed.
  11601. // CloudFront determines the location of your users using MaxMind GeoIP databases.
  11602. //
  11603. // GeoRestriction is a required field
  11604. GeoRestriction *GeoRestriction `type:"structure" required:"true"`
  11605. }
  11606. // String returns the string representation
  11607. func (s Restrictions) String() string {
  11608. return awsutil.Prettify(s)
  11609. }
  11610. // GoString returns the string representation
  11611. func (s Restrictions) GoString() string {
  11612. return s.String()
  11613. }
  11614. // Validate inspects the fields of the type to determine if they are valid.
  11615. func (s *Restrictions) Validate() error {
  11616. invalidParams := request.ErrInvalidParams{Context: "Restrictions"}
  11617. if s.GeoRestriction == nil {
  11618. invalidParams.Add(request.NewErrParamRequired("GeoRestriction"))
  11619. }
  11620. if s.GeoRestriction != nil {
  11621. if err := s.GeoRestriction.Validate(); err != nil {
  11622. invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams))
  11623. }
  11624. }
  11625. if invalidParams.Len() > 0 {
  11626. return invalidParams
  11627. }
  11628. return nil
  11629. }
  11630. // SetGeoRestriction sets the GeoRestriction field's value.
  11631. func (s *Restrictions) SetGeoRestriction(v *GeoRestriction) *Restrictions {
  11632. s.GeoRestriction = v
  11633. return s
  11634. }
  11635. // A complex type that contains information about the Amazon S3 bucket from
  11636. // which you want CloudFront to get your media files for distribution.
  11637. type S3Origin struct {
  11638. _ struct{} `type:"structure"`
  11639. // The DNS name of the Amazon S3 origin.
  11640. //
  11641. // DomainName is a required field
  11642. DomainName *string `type:"string" required:"true"`
  11643. // The CloudFront origin access identity to associate with the RTMP distribution.
  11644. // Use an origin access identity to configure the distribution so that end users
  11645. // can only access objects in an Amazon S3 bucket through CloudFront.
  11646. //
  11647. // If you want end users to be able to access objects using either the CloudFront
  11648. // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.
  11649. //
  11650. // To delete the origin access identity from an existing distribution, update
  11651. // the distribution configuration and include an empty OriginAccessIdentity
  11652. // element.
  11653. //
  11654. // To replace the origin access identity, update the distribution configuration
  11655. // and specify the new origin access identity.
  11656. //
  11657. // For more information, see Using an Origin Access Identity to Restrict Access
  11658. // to Your Amazon S3 Content (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html)
  11659. // in the Amazon Amazon CloudFront Developer Guide.
  11660. //
  11661. // OriginAccessIdentity is a required field
  11662. OriginAccessIdentity *string `type:"string" required:"true"`
  11663. }
  11664. // String returns the string representation
  11665. func (s S3Origin) String() string {
  11666. return awsutil.Prettify(s)
  11667. }
  11668. // GoString returns the string representation
  11669. func (s S3Origin) GoString() string {
  11670. return s.String()
  11671. }
  11672. // Validate inspects the fields of the type to determine if they are valid.
  11673. func (s *S3Origin) Validate() error {
  11674. invalidParams := request.ErrInvalidParams{Context: "S3Origin"}
  11675. if s.DomainName == nil {
  11676. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  11677. }
  11678. if s.OriginAccessIdentity == nil {
  11679. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  11680. }
  11681. if invalidParams.Len() > 0 {
  11682. return invalidParams
  11683. }
  11684. return nil
  11685. }
  11686. // SetDomainName sets the DomainName field's value.
  11687. func (s *S3Origin) SetDomainName(v string) *S3Origin {
  11688. s.DomainName = &v
  11689. return s
  11690. }
  11691. // SetOriginAccessIdentity sets the OriginAccessIdentity field's value.
  11692. func (s *S3Origin) SetOriginAccessIdentity(v string) *S3Origin {
  11693. s.OriginAccessIdentity = &v
  11694. return s
  11695. }
  11696. // A complex type that contains information about the Amazon S3 origin. If the
  11697. // origin is a custom origin, use the CustomOriginConfig element instead.
  11698. type S3OriginConfig struct {
  11699. _ struct{} `type:"structure"`
  11700. // The CloudFront origin access identity to associate with the origin. Use an
  11701. // origin access identity to configure the origin so that viewers can only access
  11702. // objects in an Amazon S3 bucket through CloudFront. The format of the value
  11703. // is:
  11704. //
  11705. // origin-access-identity/cloudfront/ID-of-origin-access-identity
  11706. //
  11707. // where ID-of-origin-access-identity is the value that CloudFront returned
  11708. // in the ID element when you created the origin access identity.
  11709. //
  11710. // If you want viewers to be able to access objects using either the CloudFront
  11711. // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.
  11712. //
  11713. // To delete the origin access identity from an existing distribution, update
  11714. // the distribution configuration and include an empty OriginAccessIdentity
  11715. // element.
  11716. //
  11717. // To replace the origin access identity, update the distribution configuration
  11718. // and specify the new origin access identity.
  11719. //
  11720. // For more information about the origin access identity, see Serving Private
  11721. // Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  11722. // in the Amazon CloudFront Developer Guide.
  11723. //
  11724. // OriginAccessIdentity is a required field
  11725. OriginAccessIdentity *string `type:"string" required:"true"`
  11726. }
  11727. // String returns the string representation
  11728. func (s S3OriginConfig) String() string {
  11729. return awsutil.Prettify(s)
  11730. }
  11731. // GoString returns the string representation
  11732. func (s S3OriginConfig) GoString() string {
  11733. return s.String()
  11734. }
  11735. // Validate inspects the fields of the type to determine if they are valid.
  11736. func (s *S3OriginConfig) Validate() error {
  11737. invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"}
  11738. if s.OriginAccessIdentity == nil {
  11739. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  11740. }
  11741. if invalidParams.Len() > 0 {
  11742. return invalidParams
  11743. }
  11744. return nil
  11745. }
  11746. // SetOriginAccessIdentity sets the OriginAccessIdentity field's value.
  11747. func (s *S3OriginConfig) SetOriginAccessIdentity(v string) *S3OriginConfig {
  11748. s.OriginAccessIdentity = &v
  11749. return s
  11750. }
  11751. // A complex type that lists the AWS accounts that were included in the TrustedSigners
  11752. // complex type, as well as their active CloudFront key pair IDs, if any.
  11753. type Signer struct {
  11754. _ struct{} `type:"structure"`
  11755. // An AWS account that is included in the TrustedSigners complex type for this
  11756. // RTMP distribution. Valid values include:
  11757. //
  11758. // * self, which is the AWS account used to create the distribution.
  11759. //
  11760. // * An AWS account number.
  11761. AwsAccountNumber *string `type:"string"`
  11762. // A complex type that lists the active CloudFront key pairs, if any, that are
  11763. // associated with AwsAccountNumber.
  11764. KeyPairIds *KeyPairIds `type:"structure"`
  11765. }
  11766. // String returns the string representation
  11767. func (s Signer) String() string {
  11768. return awsutil.Prettify(s)
  11769. }
  11770. // GoString returns the string representation
  11771. func (s Signer) GoString() string {
  11772. return s.String()
  11773. }
  11774. // SetAwsAccountNumber sets the AwsAccountNumber field's value.
  11775. func (s *Signer) SetAwsAccountNumber(v string) *Signer {
  11776. s.AwsAccountNumber = &v
  11777. return s
  11778. }
  11779. // SetKeyPairIds sets the KeyPairIds field's value.
  11780. func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer {
  11781. s.KeyPairIds = v
  11782. return s
  11783. }
  11784. // A complex data type for the status codes that you specify that, when returned
  11785. // by a primary origin, trigger CloudFront to failover to a second origin.
  11786. type StatusCodes struct {
  11787. _ struct{} `type:"structure"`
  11788. // The items (status codes) for an origin group.
  11789. //
  11790. // Items is a required field
  11791. Items []*int64 `locationNameList:"StatusCode" min:"1" type:"list" required:"true"`
  11792. // The number of status codes.
  11793. //
  11794. // Quantity is a required field
  11795. Quantity *int64 `type:"integer" required:"true"`
  11796. }
  11797. // String returns the string representation
  11798. func (s StatusCodes) String() string {
  11799. return awsutil.Prettify(s)
  11800. }
  11801. // GoString returns the string representation
  11802. func (s StatusCodes) GoString() string {
  11803. return s.String()
  11804. }
  11805. // Validate inspects the fields of the type to determine if they are valid.
  11806. func (s *StatusCodes) Validate() error {
  11807. invalidParams := request.ErrInvalidParams{Context: "StatusCodes"}
  11808. if s.Items == nil {
  11809. invalidParams.Add(request.NewErrParamRequired("Items"))
  11810. }
  11811. if s.Items != nil && len(s.Items) < 1 {
  11812. invalidParams.Add(request.NewErrParamMinLen("Items", 1))
  11813. }
  11814. if s.Quantity == nil {
  11815. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  11816. }
  11817. if invalidParams.Len() > 0 {
  11818. return invalidParams
  11819. }
  11820. return nil
  11821. }
  11822. // SetItems sets the Items field's value.
  11823. func (s *StatusCodes) SetItems(v []*int64) *StatusCodes {
  11824. s.Items = v
  11825. return s
  11826. }
  11827. // SetQuantity sets the Quantity field's value.
  11828. func (s *StatusCodes) SetQuantity(v int64) *StatusCodes {
  11829. s.Quantity = &v
  11830. return s
  11831. }
  11832. // A streaming distribution.
  11833. type StreamingDistribution struct {
  11834. _ struct{} `type:"structure"`
  11835. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  11836. // where 123456789012 is your AWS account ID.
  11837. //
  11838. // ARN is a required field
  11839. ARN *string `type:"string" required:"true"`
  11840. // A complex type that lists the AWS accounts, if any, that you included in
  11841. // the TrustedSigners complex type for this distribution. These are the accounts
  11842. // that you want to allow to create signed URLs for private content.
  11843. //
  11844. // The Signer complex type lists the AWS account number of the trusted signer
  11845. // or self if the signer is the AWS account that created the distribution. The
  11846. // Signer element also includes the IDs of any active CloudFront key pairs that
  11847. // are associated with the trusted signer's AWS account. If no KeyPairId element
  11848. // appears for a Signer, that signer can't create signed URLs.
  11849. //
  11850. // For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  11851. // in the Amazon CloudFront Developer Guide.
  11852. //
  11853. // ActiveTrustedSigners is a required field
  11854. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  11855. // The domain name that corresponds to the streaming distribution, for example,
  11856. // s5c39gqb8ow64r.cloudfront.net.
  11857. //
  11858. // DomainName is a required field
  11859. DomainName *string `type:"string" required:"true"`
  11860. // The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.
  11861. //
  11862. // Id is a required field
  11863. Id *string `type:"string" required:"true"`
  11864. // The date and time that the distribution was last modified.
  11865. LastModifiedTime *time.Time `type:"timestamp"`
  11866. // The current status of the RTMP distribution. When the status is Deployed,
  11867. // the distribution's information is propagated to all CloudFront edge locations.
  11868. //
  11869. // Status is a required field
  11870. Status *string `type:"string" required:"true"`
  11871. // The current configuration information for the RTMP distribution.
  11872. //
  11873. // StreamingDistributionConfig is a required field
  11874. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  11875. }
  11876. // String returns the string representation
  11877. func (s StreamingDistribution) String() string {
  11878. return awsutil.Prettify(s)
  11879. }
  11880. // GoString returns the string representation
  11881. func (s StreamingDistribution) GoString() string {
  11882. return s.String()
  11883. }
  11884. // SetARN sets the ARN field's value.
  11885. func (s *StreamingDistribution) SetARN(v string) *StreamingDistribution {
  11886. s.ARN = &v
  11887. return s
  11888. }
  11889. // SetActiveTrustedSigners sets the ActiveTrustedSigners field's value.
  11890. func (s *StreamingDistribution) SetActiveTrustedSigners(v *ActiveTrustedSigners) *StreamingDistribution {
  11891. s.ActiveTrustedSigners = v
  11892. return s
  11893. }
  11894. // SetDomainName sets the DomainName field's value.
  11895. func (s *StreamingDistribution) SetDomainName(v string) *StreamingDistribution {
  11896. s.DomainName = &v
  11897. return s
  11898. }
  11899. // SetId sets the Id field's value.
  11900. func (s *StreamingDistribution) SetId(v string) *StreamingDistribution {
  11901. s.Id = &v
  11902. return s
  11903. }
  11904. // SetLastModifiedTime sets the LastModifiedTime field's value.
  11905. func (s *StreamingDistribution) SetLastModifiedTime(v time.Time) *StreamingDistribution {
  11906. s.LastModifiedTime = &v
  11907. return s
  11908. }
  11909. // SetStatus sets the Status field's value.
  11910. func (s *StreamingDistribution) SetStatus(v string) *StreamingDistribution {
  11911. s.Status = &v
  11912. return s
  11913. }
  11914. // SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value.
  11915. func (s *StreamingDistribution) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistribution {
  11916. s.StreamingDistributionConfig = v
  11917. return s
  11918. }
  11919. // The RTMP distribution's configuration information.
  11920. type StreamingDistributionConfig struct {
  11921. _ struct{} `type:"structure"`
  11922. // A complex type that contains information about CNAMEs (alternate domain names),
  11923. // if any, for this streaming distribution.
  11924. Aliases *Aliases `type:"structure"`
  11925. // A unique value (for example, a date-time stamp) that ensures that the request
  11926. // can't be replayed.
  11927. //
  11928. // If the value of CallerReference is new (regardless of the content of the
  11929. // StreamingDistributionConfig object), CloudFront creates a new distribution.
  11930. //
  11931. // If CallerReference is a value that you already sent in a previous request
  11932. // to create a distribution, CloudFront returns a DistributionAlreadyExists
  11933. // error.
  11934. //
  11935. // CallerReference is a required field
  11936. CallerReference *string `type:"string" required:"true"`
  11937. // Any comments you want to include about the streaming distribution.
  11938. //
  11939. // Comment is a required field
  11940. Comment *string `type:"string" required:"true"`
  11941. // Whether the streaming distribution is enabled to accept user requests for
  11942. // content.
  11943. //
  11944. // Enabled is a required field
  11945. Enabled *bool `type:"boolean" required:"true"`
  11946. // A complex type that controls whether access logs are written for the streaming
  11947. // distribution.
  11948. Logging *StreamingLoggingConfig `type:"structure"`
  11949. // A complex type that contains information about price class for this streaming
  11950. // distribution.
  11951. PriceClass *string `type:"string" enum:"PriceClass"`
  11952. // A complex type that contains information about the Amazon S3 bucket from
  11953. // which you want CloudFront to get your media files for distribution.
  11954. //
  11955. // S3Origin is a required field
  11956. S3Origin *S3Origin `type:"structure" required:"true"`
  11957. // A complex type that specifies any AWS accounts that you want to permit to
  11958. // create signed URLs for private content. If you want the distribution to use
  11959. // signed URLs, include this element; if you want the distribution to use public
  11960. // URLs, remove this element. For more information, see Serving Private Content
  11961. // through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  11962. // in the Amazon CloudFront Developer Guide.
  11963. //
  11964. // TrustedSigners is a required field
  11965. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  11966. }
  11967. // String returns the string representation
  11968. func (s StreamingDistributionConfig) String() string {
  11969. return awsutil.Prettify(s)
  11970. }
  11971. // GoString returns the string representation
  11972. func (s StreamingDistributionConfig) GoString() string {
  11973. return s.String()
  11974. }
  11975. // Validate inspects the fields of the type to determine if they are valid.
  11976. func (s *StreamingDistributionConfig) Validate() error {
  11977. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"}
  11978. if s.CallerReference == nil {
  11979. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  11980. }
  11981. if s.Comment == nil {
  11982. invalidParams.Add(request.NewErrParamRequired("Comment"))
  11983. }
  11984. if s.Enabled == nil {
  11985. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  11986. }
  11987. if s.S3Origin == nil {
  11988. invalidParams.Add(request.NewErrParamRequired("S3Origin"))
  11989. }
  11990. if s.TrustedSigners == nil {
  11991. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  11992. }
  11993. if s.Aliases != nil {
  11994. if err := s.Aliases.Validate(); err != nil {
  11995. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  11996. }
  11997. }
  11998. if s.Logging != nil {
  11999. if err := s.Logging.Validate(); err != nil {
  12000. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  12001. }
  12002. }
  12003. if s.S3Origin != nil {
  12004. if err := s.S3Origin.Validate(); err != nil {
  12005. invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams))
  12006. }
  12007. }
  12008. if s.TrustedSigners != nil {
  12009. if err := s.TrustedSigners.Validate(); err != nil {
  12010. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  12011. }
  12012. }
  12013. if invalidParams.Len() > 0 {
  12014. return invalidParams
  12015. }
  12016. return nil
  12017. }
  12018. // SetAliases sets the Aliases field's value.
  12019. func (s *StreamingDistributionConfig) SetAliases(v *Aliases) *StreamingDistributionConfig {
  12020. s.Aliases = v
  12021. return s
  12022. }
  12023. // SetCallerReference sets the CallerReference field's value.
  12024. func (s *StreamingDistributionConfig) SetCallerReference(v string) *StreamingDistributionConfig {
  12025. s.CallerReference = &v
  12026. return s
  12027. }
  12028. // SetComment sets the Comment field's value.
  12029. func (s *StreamingDistributionConfig) SetComment(v string) *StreamingDistributionConfig {
  12030. s.Comment = &v
  12031. return s
  12032. }
  12033. // SetEnabled sets the Enabled field's value.
  12034. func (s *StreamingDistributionConfig) SetEnabled(v bool) *StreamingDistributionConfig {
  12035. s.Enabled = &v
  12036. return s
  12037. }
  12038. // SetLogging sets the Logging field's value.
  12039. func (s *StreamingDistributionConfig) SetLogging(v *StreamingLoggingConfig) *StreamingDistributionConfig {
  12040. s.Logging = v
  12041. return s
  12042. }
  12043. // SetPriceClass sets the PriceClass field's value.
  12044. func (s *StreamingDistributionConfig) SetPriceClass(v string) *StreamingDistributionConfig {
  12045. s.PriceClass = &v
  12046. return s
  12047. }
  12048. // SetS3Origin sets the S3Origin field's value.
  12049. func (s *StreamingDistributionConfig) SetS3Origin(v *S3Origin) *StreamingDistributionConfig {
  12050. s.S3Origin = v
  12051. return s
  12052. }
  12053. // SetTrustedSigners sets the TrustedSigners field's value.
  12054. func (s *StreamingDistributionConfig) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionConfig {
  12055. s.TrustedSigners = v
  12056. return s
  12057. }
  12058. // A streaming distribution Configuration and a list of tags to be associated
  12059. // with the streaming distribution.
  12060. type StreamingDistributionConfigWithTags struct {
  12061. _ struct{} `type:"structure"`
  12062. // A streaming distribution Configuration.
  12063. //
  12064. // StreamingDistributionConfig is a required field
  12065. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  12066. // A complex type that contains zero or more Tag elements.
  12067. //
  12068. // Tags is a required field
  12069. Tags *Tags `type:"structure" required:"true"`
  12070. }
  12071. // String returns the string representation
  12072. func (s StreamingDistributionConfigWithTags) String() string {
  12073. return awsutil.Prettify(s)
  12074. }
  12075. // GoString returns the string representation
  12076. func (s StreamingDistributionConfigWithTags) GoString() string {
  12077. return s.String()
  12078. }
  12079. // Validate inspects the fields of the type to determine if they are valid.
  12080. func (s *StreamingDistributionConfigWithTags) Validate() error {
  12081. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfigWithTags"}
  12082. if s.StreamingDistributionConfig == nil {
  12083. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  12084. }
  12085. if s.Tags == nil {
  12086. invalidParams.Add(request.NewErrParamRequired("Tags"))
  12087. }
  12088. if s.StreamingDistributionConfig != nil {
  12089. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  12090. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  12091. }
  12092. }
  12093. if s.Tags != nil {
  12094. if err := s.Tags.Validate(); err != nil {
  12095. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  12096. }
  12097. }
  12098. if invalidParams.Len() > 0 {
  12099. return invalidParams
  12100. }
  12101. return nil
  12102. }
  12103. // SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value.
  12104. func (s *StreamingDistributionConfigWithTags) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *StreamingDistributionConfigWithTags {
  12105. s.StreamingDistributionConfig = v
  12106. return s
  12107. }
  12108. // SetTags sets the Tags field's value.
  12109. func (s *StreamingDistributionConfigWithTags) SetTags(v *Tags) *StreamingDistributionConfigWithTags {
  12110. s.Tags = v
  12111. return s
  12112. }
  12113. // A streaming distribution list.
  12114. type StreamingDistributionList struct {
  12115. _ struct{} `type:"structure"`
  12116. // A flag that indicates whether more streaming distributions remain to be listed.
  12117. // If your results were truncated, you can make a follow-up pagination request
  12118. // using the Marker request parameter to retrieve more distributions in the
  12119. // list.
  12120. //
  12121. // IsTruncated is a required field
  12122. IsTruncated *bool `type:"boolean" required:"true"`
  12123. // A complex type that contains one StreamingDistributionSummary element for
  12124. // each distribution that was created by the current AWS account.
  12125. Items []*StreamingDistributionSummary `locationNameList:"StreamingDistributionSummary" type:"list"`
  12126. // The value you provided for the Marker request parameter.
  12127. //
  12128. // Marker is a required field
  12129. Marker *string `type:"string" required:"true"`
  12130. // The value you provided for the MaxItems request parameter.
  12131. //
  12132. // MaxItems is a required field
  12133. MaxItems *int64 `type:"integer" required:"true"`
  12134. // If IsTruncated is true, this element is present and contains the value you
  12135. // can use for the Marker request parameter to continue listing your RTMP distributions
  12136. // where they left off.
  12137. NextMarker *string `type:"string"`
  12138. // The number of streaming distributions that were created by the current AWS
  12139. // account.
  12140. //
  12141. // Quantity is a required field
  12142. Quantity *int64 `type:"integer" required:"true"`
  12143. }
  12144. // String returns the string representation
  12145. func (s StreamingDistributionList) String() string {
  12146. return awsutil.Prettify(s)
  12147. }
  12148. // GoString returns the string representation
  12149. func (s StreamingDistributionList) GoString() string {
  12150. return s.String()
  12151. }
  12152. // SetIsTruncated sets the IsTruncated field's value.
  12153. func (s *StreamingDistributionList) SetIsTruncated(v bool) *StreamingDistributionList {
  12154. s.IsTruncated = &v
  12155. return s
  12156. }
  12157. // SetItems sets the Items field's value.
  12158. func (s *StreamingDistributionList) SetItems(v []*StreamingDistributionSummary) *StreamingDistributionList {
  12159. s.Items = v
  12160. return s
  12161. }
  12162. // SetMarker sets the Marker field's value.
  12163. func (s *StreamingDistributionList) SetMarker(v string) *StreamingDistributionList {
  12164. s.Marker = &v
  12165. return s
  12166. }
  12167. // SetMaxItems sets the MaxItems field's value.
  12168. func (s *StreamingDistributionList) SetMaxItems(v int64) *StreamingDistributionList {
  12169. s.MaxItems = &v
  12170. return s
  12171. }
  12172. // SetNextMarker sets the NextMarker field's value.
  12173. func (s *StreamingDistributionList) SetNextMarker(v string) *StreamingDistributionList {
  12174. s.NextMarker = &v
  12175. return s
  12176. }
  12177. // SetQuantity sets the Quantity field's value.
  12178. func (s *StreamingDistributionList) SetQuantity(v int64) *StreamingDistributionList {
  12179. s.Quantity = &v
  12180. return s
  12181. }
  12182. // A summary of the information for an Amazon CloudFront streaming distribution.
  12183. type StreamingDistributionSummary struct {
  12184. _ struct{} `type:"structure"`
  12185. // The ARN (Amazon Resource Name) for the streaming distribution. For example:
  12186. // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5,
  12187. // where 123456789012 is your AWS account ID.
  12188. //
  12189. // ARN is a required field
  12190. ARN *string `type:"string" required:"true"`
  12191. // A complex type that contains information about CNAMEs (alternate domain names),
  12192. // if any, for this streaming distribution.
  12193. //
  12194. // Aliases is a required field
  12195. Aliases *Aliases `type:"structure" required:"true"`
  12196. // The comment originally specified when this distribution was created.
  12197. //
  12198. // Comment is a required field
  12199. Comment *string `type:"string" required:"true"`
  12200. // The domain name corresponding to the distribution, for example, d111111abcdef8.cloudfront.net.
  12201. //
  12202. // DomainName is a required field
  12203. DomainName *string `type:"string" required:"true"`
  12204. // Whether the distribution is enabled to accept end user requests for content.
  12205. //
  12206. // Enabled is a required field
  12207. Enabled *bool `type:"boolean" required:"true"`
  12208. // The identifier for the distribution, for example, EDFDVBD632BHDS5.
  12209. //
  12210. // Id is a required field
  12211. Id *string `type:"string" required:"true"`
  12212. // The date and time the distribution was last modified.
  12213. //
  12214. // LastModifiedTime is a required field
  12215. LastModifiedTime *time.Time `type:"timestamp" required:"true"`
  12216. // PriceClass is a required field
  12217. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  12218. // A complex type that contains information about the Amazon S3 bucket from
  12219. // which you want CloudFront to get your media files for distribution.
  12220. //
  12221. // S3Origin is a required field
  12222. S3Origin *S3Origin `type:"structure" required:"true"`
  12223. // Indicates the current status of the distribution. When the status is Deployed,
  12224. // the distribution's information is fully propagated throughout the Amazon
  12225. // CloudFront system.
  12226. //
  12227. // Status is a required field
  12228. Status *string `type:"string" required:"true"`
  12229. // A complex type that specifies the AWS accounts, if any, that you want to
  12230. // allow to create signed URLs for private content. If you want to require signed
  12231. // URLs in requests for objects in the target origin that match the PathPattern
  12232. // for this cache behavior, specify true for Enabled, and specify the applicable
  12233. // values for Quantity and Items.If you don't want to require signed URLs in
  12234. // requests for objects that match PathPattern, specify false for Enabled and
  12235. // 0 for Quantity. Omit Items. To add, change, or remove one or more trusted
  12236. // signers, change Enabled to true (if it's currently false), change Quantity
  12237. // as applicable, and specify all of the trusted signers that you want to include
  12238. // in the updated distribution.
  12239. //
  12240. // TrustedSigners is a required field
  12241. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  12242. }
  12243. // String returns the string representation
  12244. func (s StreamingDistributionSummary) String() string {
  12245. return awsutil.Prettify(s)
  12246. }
  12247. // GoString returns the string representation
  12248. func (s StreamingDistributionSummary) GoString() string {
  12249. return s.String()
  12250. }
  12251. // SetARN sets the ARN field's value.
  12252. func (s *StreamingDistributionSummary) SetARN(v string) *StreamingDistributionSummary {
  12253. s.ARN = &v
  12254. return s
  12255. }
  12256. // SetAliases sets the Aliases field's value.
  12257. func (s *StreamingDistributionSummary) SetAliases(v *Aliases) *StreamingDistributionSummary {
  12258. s.Aliases = v
  12259. return s
  12260. }
  12261. // SetComment sets the Comment field's value.
  12262. func (s *StreamingDistributionSummary) SetComment(v string) *StreamingDistributionSummary {
  12263. s.Comment = &v
  12264. return s
  12265. }
  12266. // SetDomainName sets the DomainName field's value.
  12267. func (s *StreamingDistributionSummary) SetDomainName(v string) *StreamingDistributionSummary {
  12268. s.DomainName = &v
  12269. return s
  12270. }
  12271. // SetEnabled sets the Enabled field's value.
  12272. func (s *StreamingDistributionSummary) SetEnabled(v bool) *StreamingDistributionSummary {
  12273. s.Enabled = &v
  12274. return s
  12275. }
  12276. // SetId sets the Id field's value.
  12277. func (s *StreamingDistributionSummary) SetId(v string) *StreamingDistributionSummary {
  12278. s.Id = &v
  12279. return s
  12280. }
  12281. // SetLastModifiedTime sets the LastModifiedTime field's value.
  12282. func (s *StreamingDistributionSummary) SetLastModifiedTime(v time.Time) *StreamingDistributionSummary {
  12283. s.LastModifiedTime = &v
  12284. return s
  12285. }
  12286. // SetPriceClass sets the PriceClass field's value.
  12287. func (s *StreamingDistributionSummary) SetPriceClass(v string) *StreamingDistributionSummary {
  12288. s.PriceClass = &v
  12289. return s
  12290. }
  12291. // SetS3Origin sets the S3Origin field's value.
  12292. func (s *StreamingDistributionSummary) SetS3Origin(v *S3Origin) *StreamingDistributionSummary {
  12293. s.S3Origin = v
  12294. return s
  12295. }
  12296. // SetStatus sets the Status field's value.
  12297. func (s *StreamingDistributionSummary) SetStatus(v string) *StreamingDistributionSummary {
  12298. s.Status = &v
  12299. return s
  12300. }
  12301. // SetTrustedSigners sets the TrustedSigners field's value.
  12302. func (s *StreamingDistributionSummary) SetTrustedSigners(v *TrustedSigners) *StreamingDistributionSummary {
  12303. s.TrustedSigners = v
  12304. return s
  12305. }
  12306. // A complex type that controls whether access logs are written for this streaming
  12307. // distribution.
  12308. type StreamingLoggingConfig struct {
  12309. _ struct{} `type:"structure"`
  12310. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  12311. //
  12312. // Bucket is a required field
  12313. Bucket *string `type:"string" required:"true"`
  12314. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  12315. // bucket. If you don't want to enable logging when you create a streaming distribution
  12316. // or if you want to disable logging for an existing streaming distribution,
  12317. // specify false for Enabled, and specify empty Bucket and Prefix elements.
  12318. // If you specify false for Enabled but you specify values for Bucket and Prefix,
  12319. // the values are automatically deleted.
  12320. //
  12321. // Enabled is a required field
  12322. Enabled *bool `type:"boolean" required:"true"`
  12323. // An optional string that you want CloudFront to prefix to the access log filenames
  12324. // for this streaming distribution, for example, myprefix/. If you want to enable
  12325. // logging, but you don't want to specify a prefix, you still must include an
  12326. // empty Prefix element in the Logging element.
  12327. //
  12328. // Prefix is a required field
  12329. Prefix *string `type:"string" required:"true"`
  12330. }
  12331. // String returns the string representation
  12332. func (s StreamingLoggingConfig) String() string {
  12333. return awsutil.Prettify(s)
  12334. }
  12335. // GoString returns the string representation
  12336. func (s StreamingLoggingConfig) GoString() string {
  12337. return s.String()
  12338. }
  12339. // Validate inspects the fields of the type to determine if they are valid.
  12340. func (s *StreamingLoggingConfig) Validate() error {
  12341. invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"}
  12342. if s.Bucket == nil {
  12343. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12344. }
  12345. if s.Enabled == nil {
  12346. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  12347. }
  12348. if s.Prefix == nil {
  12349. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  12350. }
  12351. if invalidParams.Len() > 0 {
  12352. return invalidParams
  12353. }
  12354. return nil
  12355. }
  12356. // SetBucket sets the Bucket field's value.
  12357. func (s *StreamingLoggingConfig) SetBucket(v string) *StreamingLoggingConfig {
  12358. s.Bucket = &v
  12359. return s
  12360. }
  12361. // SetEnabled sets the Enabled field's value.
  12362. func (s *StreamingLoggingConfig) SetEnabled(v bool) *StreamingLoggingConfig {
  12363. s.Enabled = &v
  12364. return s
  12365. }
  12366. // SetPrefix sets the Prefix field's value.
  12367. func (s *StreamingLoggingConfig) SetPrefix(v string) *StreamingLoggingConfig {
  12368. s.Prefix = &v
  12369. return s
  12370. }
  12371. // A complex type that contains Tag key and Tag value.
  12372. type Tag struct {
  12373. _ struct{} `type:"structure"`
  12374. // A string that contains Tag key.
  12375. //
  12376. // The string length should be between 1 and 128 characters. Valid characters
  12377. // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.
  12378. //
  12379. // Key is a required field
  12380. Key *string `min:"1" type:"string" required:"true"`
  12381. // A string that contains an optional Tag value.
  12382. //
  12383. // The string length should be between 0 and 256 characters. Valid characters
  12384. // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.
  12385. Value *string `type:"string"`
  12386. }
  12387. // String returns the string representation
  12388. func (s Tag) String() string {
  12389. return awsutil.Prettify(s)
  12390. }
  12391. // GoString returns the string representation
  12392. func (s Tag) GoString() string {
  12393. return s.String()
  12394. }
  12395. // Validate inspects the fields of the type to determine if they are valid.
  12396. func (s *Tag) Validate() error {
  12397. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  12398. if s.Key == nil {
  12399. invalidParams.Add(request.NewErrParamRequired("Key"))
  12400. }
  12401. if s.Key != nil && len(*s.Key) < 1 {
  12402. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12403. }
  12404. if invalidParams.Len() > 0 {
  12405. return invalidParams
  12406. }
  12407. return nil
  12408. }
  12409. // SetKey sets the Key field's value.
  12410. func (s *Tag) SetKey(v string) *Tag {
  12411. s.Key = &v
  12412. return s
  12413. }
  12414. // SetValue sets the Value field's value.
  12415. func (s *Tag) SetValue(v string) *Tag {
  12416. s.Value = &v
  12417. return s
  12418. }
  12419. // A complex type that contains zero or more Tag elements.
  12420. type TagKeys struct {
  12421. _ struct{} `type:"structure"`
  12422. // A complex type that contains Tag key elements.
  12423. Items []*string `locationNameList:"Key" type:"list"`
  12424. }
  12425. // String returns the string representation
  12426. func (s TagKeys) String() string {
  12427. return awsutil.Prettify(s)
  12428. }
  12429. // GoString returns the string representation
  12430. func (s TagKeys) GoString() string {
  12431. return s.String()
  12432. }
  12433. // SetItems sets the Items field's value.
  12434. func (s *TagKeys) SetItems(v []*string) *TagKeys {
  12435. s.Items = v
  12436. return s
  12437. }
  12438. // The request to add tags to a CloudFront resource.
  12439. type TagResourceInput struct {
  12440. _ struct{} `type:"structure" payload:"Tags"`
  12441. // An ARN of a CloudFront resource.
  12442. //
  12443. // Resource is a required field
  12444. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  12445. // A complex type that contains zero or more Tag elements.
  12446. //
  12447. // Tags is a required field
  12448. Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12449. }
  12450. // String returns the string representation
  12451. func (s TagResourceInput) String() string {
  12452. return awsutil.Prettify(s)
  12453. }
  12454. // GoString returns the string representation
  12455. func (s TagResourceInput) GoString() string {
  12456. return s.String()
  12457. }
  12458. // Validate inspects the fields of the type to determine if they are valid.
  12459. func (s *TagResourceInput) Validate() error {
  12460. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  12461. if s.Resource == nil {
  12462. invalidParams.Add(request.NewErrParamRequired("Resource"))
  12463. }
  12464. if s.Tags == nil {
  12465. invalidParams.Add(request.NewErrParamRequired("Tags"))
  12466. }
  12467. if s.Tags != nil {
  12468. if err := s.Tags.Validate(); err != nil {
  12469. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  12470. }
  12471. }
  12472. if invalidParams.Len() > 0 {
  12473. return invalidParams
  12474. }
  12475. return nil
  12476. }
  12477. // SetResource sets the Resource field's value.
  12478. func (s *TagResourceInput) SetResource(v string) *TagResourceInput {
  12479. s.Resource = &v
  12480. return s
  12481. }
  12482. // SetTags sets the Tags field's value.
  12483. func (s *TagResourceInput) SetTags(v *Tags) *TagResourceInput {
  12484. s.Tags = v
  12485. return s
  12486. }
  12487. type TagResourceOutput struct {
  12488. _ struct{} `type:"structure"`
  12489. }
  12490. // String returns the string representation
  12491. func (s TagResourceOutput) String() string {
  12492. return awsutil.Prettify(s)
  12493. }
  12494. // GoString returns the string representation
  12495. func (s TagResourceOutput) GoString() string {
  12496. return s.String()
  12497. }
  12498. // A complex type that contains zero or more Tag elements.
  12499. type Tags struct {
  12500. _ struct{} `type:"structure"`
  12501. // A complex type that contains Tag elements.
  12502. Items []*Tag `locationNameList:"Tag" type:"list"`
  12503. }
  12504. // String returns the string representation
  12505. func (s Tags) String() string {
  12506. return awsutil.Prettify(s)
  12507. }
  12508. // GoString returns the string representation
  12509. func (s Tags) GoString() string {
  12510. return s.String()
  12511. }
  12512. // Validate inspects the fields of the type to determine if they are valid.
  12513. func (s *Tags) Validate() error {
  12514. invalidParams := request.ErrInvalidParams{Context: "Tags"}
  12515. if s.Items != nil {
  12516. for i, v := range s.Items {
  12517. if v == nil {
  12518. continue
  12519. }
  12520. if err := v.Validate(); err != nil {
  12521. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  12522. }
  12523. }
  12524. }
  12525. if invalidParams.Len() > 0 {
  12526. return invalidParams
  12527. }
  12528. return nil
  12529. }
  12530. // SetItems sets the Items field's value.
  12531. func (s *Tags) SetItems(v []*Tag) *Tags {
  12532. s.Items = v
  12533. return s
  12534. }
  12535. // A complex type that specifies the AWS accounts, if any, that you want to
  12536. // allow to create signed URLs for private content.
  12537. //
  12538. // If you want to require signed URLs in requests for objects in the target
  12539. // origin that match the PathPattern for this cache behavior, specify true for
  12540. // Enabled, and specify the applicable values for Quantity and Items. For more
  12541. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  12542. // in the Amazon Amazon CloudFront Developer Guide.
  12543. //
  12544. // If you don't want to require signed URLs in requests for objects that match
  12545. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  12546. //
  12547. // To add, change, or remove one or more trusted signers, change Enabled to
  12548. // true (if it's currently false), change Quantity as applicable, and specify
  12549. // all of the trusted signers that you want to include in the updated distribution.
  12550. //
  12551. // For more information about updating the distribution configuration, see DistributionConfig
  12552. // .
  12553. type TrustedSigners struct {
  12554. _ struct{} `type:"structure"`
  12555. // Specifies whether you want to require viewers to use signed URLs to access
  12556. // the files specified by PathPattern and TargetOriginId.
  12557. //
  12558. // Enabled is a required field
  12559. Enabled *bool `type:"boolean" required:"true"`
  12560. // Optional: A complex type that contains trusted signers for this cache behavior.
  12561. // If Quantity is 0, you can omit Items.
  12562. Items []*string `locationNameList:"AwsAccountNumber" type:"list"`
  12563. // The number of trusted signers for this cache behavior.
  12564. //
  12565. // Quantity is a required field
  12566. Quantity *int64 `type:"integer" required:"true"`
  12567. }
  12568. // String returns the string representation
  12569. func (s TrustedSigners) String() string {
  12570. return awsutil.Prettify(s)
  12571. }
  12572. // GoString returns the string representation
  12573. func (s TrustedSigners) GoString() string {
  12574. return s.String()
  12575. }
  12576. // Validate inspects the fields of the type to determine if they are valid.
  12577. func (s *TrustedSigners) Validate() error {
  12578. invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"}
  12579. if s.Enabled == nil {
  12580. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  12581. }
  12582. if s.Quantity == nil {
  12583. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  12584. }
  12585. if invalidParams.Len() > 0 {
  12586. return invalidParams
  12587. }
  12588. return nil
  12589. }
  12590. // SetEnabled sets the Enabled field's value.
  12591. func (s *TrustedSigners) SetEnabled(v bool) *TrustedSigners {
  12592. s.Enabled = &v
  12593. return s
  12594. }
  12595. // SetItems sets the Items field's value.
  12596. func (s *TrustedSigners) SetItems(v []*string) *TrustedSigners {
  12597. s.Items = v
  12598. return s
  12599. }
  12600. // SetQuantity sets the Quantity field's value.
  12601. func (s *TrustedSigners) SetQuantity(v int64) *TrustedSigners {
  12602. s.Quantity = &v
  12603. return s
  12604. }
  12605. // The request to remove tags from a CloudFront resource.
  12606. type UntagResourceInput struct {
  12607. _ struct{} `type:"structure" payload:"TagKeys"`
  12608. // An ARN of a CloudFront resource.
  12609. //
  12610. // Resource is a required field
  12611. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  12612. // A complex type that contains zero or more Tag key elements.
  12613. //
  12614. // TagKeys is a required field
  12615. TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12616. }
  12617. // String returns the string representation
  12618. func (s UntagResourceInput) String() string {
  12619. return awsutil.Prettify(s)
  12620. }
  12621. // GoString returns the string representation
  12622. func (s UntagResourceInput) GoString() string {
  12623. return s.String()
  12624. }
  12625. // Validate inspects the fields of the type to determine if they are valid.
  12626. func (s *UntagResourceInput) Validate() error {
  12627. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  12628. if s.Resource == nil {
  12629. invalidParams.Add(request.NewErrParamRequired("Resource"))
  12630. }
  12631. if s.TagKeys == nil {
  12632. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  12633. }
  12634. if invalidParams.Len() > 0 {
  12635. return invalidParams
  12636. }
  12637. return nil
  12638. }
  12639. // SetResource sets the Resource field's value.
  12640. func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput {
  12641. s.Resource = &v
  12642. return s
  12643. }
  12644. // SetTagKeys sets the TagKeys field's value.
  12645. func (s *UntagResourceInput) SetTagKeys(v *TagKeys) *UntagResourceInput {
  12646. s.TagKeys = v
  12647. return s
  12648. }
  12649. type UntagResourceOutput struct {
  12650. _ struct{} `type:"structure"`
  12651. }
  12652. // String returns the string representation
  12653. func (s UntagResourceOutput) String() string {
  12654. return awsutil.Prettify(s)
  12655. }
  12656. // GoString returns the string representation
  12657. func (s UntagResourceOutput) GoString() string {
  12658. return s.String()
  12659. }
  12660. // The request to update an origin access identity.
  12661. type UpdateCloudFrontOriginAccessIdentityInput struct {
  12662. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  12663. // The identity's configuration information.
  12664. //
  12665. // CloudFrontOriginAccessIdentityConfig is a required field
  12666. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12667. // The identity's id.
  12668. //
  12669. // Id is a required field
  12670. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  12671. // The value of the ETag header that you received when retrieving the identity's
  12672. // configuration. For example: E2QWRUHAPOMQZL.
  12673. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12674. }
  12675. // String returns the string representation
  12676. func (s UpdateCloudFrontOriginAccessIdentityInput) String() string {
  12677. return awsutil.Prettify(s)
  12678. }
  12679. // GoString returns the string representation
  12680. func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string {
  12681. return s.String()
  12682. }
  12683. // Validate inspects the fields of the type to determine if they are valid.
  12684. func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error {
  12685. invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"}
  12686. if s.CloudFrontOriginAccessIdentityConfig == nil {
  12687. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  12688. }
  12689. if s.Id == nil {
  12690. invalidParams.Add(request.NewErrParamRequired("Id"))
  12691. }
  12692. if s.Id != nil && len(*s.Id) < 1 {
  12693. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  12694. }
  12695. if s.CloudFrontOriginAccessIdentityConfig != nil {
  12696. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  12697. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  12698. }
  12699. }
  12700. if invalidParams.Len() > 0 {
  12701. return invalidParams
  12702. }
  12703. return nil
  12704. }
  12705. // SetCloudFrontOriginAccessIdentityConfig sets the CloudFrontOriginAccessIdentityConfig field's value.
  12706. func (s *UpdateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIdentityConfig(v *OriginAccessIdentityConfig) *UpdateCloudFrontOriginAccessIdentityInput {
  12707. s.CloudFrontOriginAccessIdentityConfig = v
  12708. return s
  12709. }
  12710. // SetId sets the Id field's value.
  12711. func (s *UpdateCloudFrontOriginAccessIdentityInput) SetId(v string) *UpdateCloudFrontOriginAccessIdentityInput {
  12712. s.Id = &v
  12713. return s
  12714. }
  12715. // SetIfMatch sets the IfMatch field's value.
  12716. func (s *UpdateCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *UpdateCloudFrontOriginAccessIdentityInput {
  12717. s.IfMatch = &v
  12718. return s
  12719. }
  12720. // The returned result of the corresponding request.
  12721. type UpdateCloudFrontOriginAccessIdentityOutput struct {
  12722. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  12723. // The origin access identity's information.
  12724. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  12725. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  12726. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12727. }
  12728. // String returns the string representation
  12729. func (s UpdateCloudFrontOriginAccessIdentityOutput) String() string {
  12730. return awsutil.Prettify(s)
  12731. }
  12732. // GoString returns the string representation
  12733. func (s UpdateCloudFrontOriginAccessIdentityOutput) GoString() string {
  12734. return s.String()
  12735. }
  12736. // SetCloudFrontOriginAccessIdentity sets the CloudFrontOriginAccessIdentity field's value.
  12737. func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetCloudFrontOriginAccessIdentity(v *OriginAccessIdentity) *UpdateCloudFrontOriginAccessIdentityOutput {
  12738. s.CloudFrontOriginAccessIdentity = v
  12739. return s
  12740. }
  12741. // SetETag sets the ETag field's value.
  12742. func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *UpdateCloudFrontOriginAccessIdentityOutput {
  12743. s.ETag = &v
  12744. return s
  12745. }
  12746. // The request to update a distribution.
  12747. type UpdateDistributionInput struct {
  12748. _ struct{} `type:"structure" payload:"DistributionConfig"`
  12749. // The distribution's configuration information.
  12750. //
  12751. // DistributionConfig is a required field
  12752. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12753. // The distribution's id.
  12754. //
  12755. // Id is a required field
  12756. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  12757. // The value of the ETag header that you received when retrieving the distribution's
  12758. // configuration. For example: E2QWRUHAPOMQZL.
  12759. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12760. }
  12761. // String returns the string representation
  12762. func (s UpdateDistributionInput) String() string {
  12763. return awsutil.Prettify(s)
  12764. }
  12765. // GoString returns the string representation
  12766. func (s UpdateDistributionInput) GoString() string {
  12767. return s.String()
  12768. }
  12769. // Validate inspects the fields of the type to determine if they are valid.
  12770. func (s *UpdateDistributionInput) Validate() error {
  12771. invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"}
  12772. if s.DistributionConfig == nil {
  12773. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  12774. }
  12775. if s.Id == nil {
  12776. invalidParams.Add(request.NewErrParamRequired("Id"))
  12777. }
  12778. if s.Id != nil && len(*s.Id) < 1 {
  12779. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  12780. }
  12781. if s.DistributionConfig != nil {
  12782. if err := s.DistributionConfig.Validate(); err != nil {
  12783. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  12784. }
  12785. }
  12786. if invalidParams.Len() > 0 {
  12787. return invalidParams
  12788. }
  12789. return nil
  12790. }
  12791. // SetDistributionConfig sets the DistributionConfig field's value.
  12792. func (s *UpdateDistributionInput) SetDistributionConfig(v *DistributionConfig) *UpdateDistributionInput {
  12793. s.DistributionConfig = v
  12794. return s
  12795. }
  12796. // SetId sets the Id field's value.
  12797. func (s *UpdateDistributionInput) SetId(v string) *UpdateDistributionInput {
  12798. s.Id = &v
  12799. return s
  12800. }
  12801. // SetIfMatch sets the IfMatch field's value.
  12802. func (s *UpdateDistributionInput) SetIfMatch(v string) *UpdateDistributionInput {
  12803. s.IfMatch = &v
  12804. return s
  12805. }
  12806. // The returned result of the corresponding request.
  12807. type UpdateDistributionOutput struct {
  12808. _ struct{} `type:"structure" payload:"Distribution"`
  12809. // The distribution's information.
  12810. Distribution *Distribution `type:"structure"`
  12811. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  12812. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12813. }
  12814. // String returns the string representation
  12815. func (s UpdateDistributionOutput) String() string {
  12816. return awsutil.Prettify(s)
  12817. }
  12818. // GoString returns the string representation
  12819. func (s UpdateDistributionOutput) GoString() string {
  12820. return s.String()
  12821. }
  12822. // SetDistribution sets the Distribution field's value.
  12823. func (s *UpdateDistributionOutput) SetDistribution(v *Distribution) *UpdateDistributionOutput {
  12824. s.Distribution = v
  12825. return s
  12826. }
  12827. // SetETag sets the ETag field's value.
  12828. func (s *UpdateDistributionOutput) SetETag(v string) *UpdateDistributionOutput {
  12829. s.ETag = &v
  12830. return s
  12831. }
  12832. type UpdateFieldLevelEncryptionConfigInput struct {
  12833. _ struct{} `type:"structure" payload:"FieldLevelEncryptionConfig"`
  12834. // Request to update a field-level encryption configuration.
  12835. //
  12836. // FieldLevelEncryptionConfig is a required field
  12837. FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12838. // The ID of the configuration you want to update.
  12839. //
  12840. // Id is a required field
  12841. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  12842. // The value of the ETag header that you received when retrieving the configuration
  12843. // identity to update. For example: E2QWRUHAPOMQZL.
  12844. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12845. }
  12846. // String returns the string representation
  12847. func (s UpdateFieldLevelEncryptionConfigInput) String() string {
  12848. return awsutil.Prettify(s)
  12849. }
  12850. // GoString returns the string representation
  12851. func (s UpdateFieldLevelEncryptionConfigInput) GoString() string {
  12852. return s.String()
  12853. }
  12854. // Validate inspects the fields of the type to determine if they are valid.
  12855. func (s *UpdateFieldLevelEncryptionConfigInput) Validate() error {
  12856. invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionConfigInput"}
  12857. if s.FieldLevelEncryptionConfig == nil {
  12858. invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionConfig"))
  12859. }
  12860. if s.Id == nil {
  12861. invalidParams.Add(request.NewErrParamRequired("Id"))
  12862. }
  12863. if s.Id != nil && len(*s.Id) < 1 {
  12864. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  12865. }
  12866. if s.FieldLevelEncryptionConfig != nil {
  12867. if err := s.FieldLevelEncryptionConfig.Validate(); err != nil {
  12868. invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams))
  12869. }
  12870. }
  12871. if invalidParams.Len() > 0 {
  12872. return invalidParams
  12873. }
  12874. return nil
  12875. }
  12876. // SetFieldLevelEncryptionConfig sets the FieldLevelEncryptionConfig field's value.
  12877. func (s *UpdateFieldLevelEncryptionConfigInput) SetFieldLevelEncryptionConfig(v *FieldLevelEncryptionConfig) *UpdateFieldLevelEncryptionConfigInput {
  12878. s.FieldLevelEncryptionConfig = v
  12879. return s
  12880. }
  12881. // SetId sets the Id field's value.
  12882. func (s *UpdateFieldLevelEncryptionConfigInput) SetId(v string) *UpdateFieldLevelEncryptionConfigInput {
  12883. s.Id = &v
  12884. return s
  12885. }
  12886. // SetIfMatch sets the IfMatch field's value.
  12887. func (s *UpdateFieldLevelEncryptionConfigInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionConfigInput {
  12888. s.IfMatch = &v
  12889. return s
  12890. }
  12891. type UpdateFieldLevelEncryptionConfigOutput struct {
  12892. _ struct{} `type:"structure" payload:"FieldLevelEncryption"`
  12893. // The value of the ETag header that you received when updating the configuration.
  12894. // For example: E2QWRUHAPOMQZL.
  12895. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12896. // Return the results of updating the configuration.
  12897. FieldLevelEncryption *FieldLevelEncryption `type:"structure"`
  12898. }
  12899. // String returns the string representation
  12900. func (s UpdateFieldLevelEncryptionConfigOutput) String() string {
  12901. return awsutil.Prettify(s)
  12902. }
  12903. // GoString returns the string representation
  12904. func (s UpdateFieldLevelEncryptionConfigOutput) GoString() string {
  12905. return s.String()
  12906. }
  12907. // SetETag sets the ETag field's value.
  12908. func (s *UpdateFieldLevelEncryptionConfigOutput) SetETag(v string) *UpdateFieldLevelEncryptionConfigOutput {
  12909. s.ETag = &v
  12910. return s
  12911. }
  12912. // SetFieldLevelEncryption sets the FieldLevelEncryption field's value.
  12913. func (s *UpdateFieldLevelEncryptionConfigOutput) SetFieldLevelEncryption(v *FieldLevelEncryption) *UpdateFieldLevelEncryptionConfigOutput {
  12914. s.FieldLevelEncryption = v
  12915. return s
  12916. }
  12917. type UpdateFieldLevelEncryptionProfileInput struct {
  12918. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfileConfig"`
  12919. // Request to update a field-level encryption profile.
  12920. //
  12921. // FieldLevelEncryptionProfileConfig is a required field
  12922. FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  12923. // The ID of the field-level encryption profile request.
  12924. //
  12925. // Id is a required field
  12926. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  12927. // The value of the ETag header that you received when retrieving the profile
  12928. // identity to update. For example: E2QWRUHAPOMQZL.
  12929. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12930. }
  12931. // String returns the string representation
  12932. func (s UpdateFieldLevelEncryptionProfileInput) String() string {
  12933. return awsutil.Prettify(s)
  12934. }
  12935. // GoString returns the string representation
  12936. func (s UpdateFieldLevelEncryptionProfileInput) GoString() string {
  12937. return s.String()
  12938. }
  12939. // Validate inspects the fields of the type to determine if they are valid.
  12940. func (s *UpdateFieldLevelEncryptionProfileInput) Validate() error {
  12941. invalidParams := request.ErrInvalidParams{Context: "UpdateFieldLevelEncryptionProfileInput"}
  12942. if s.FieldLevelEncryptionProfileConfig == nil {
  12943. invalidParams.Add(request.NewErrParamRequired("FieldLevelEncryptionProfileConfig"))
  12944. }
  12945. if s.Id == nil {
  12946. invalidParams.Add(request.NewErrParamRequired("Id"))
  12947. }
  12948. if s.Id != nil && len(*s.Id) < 1 {
  12949. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  12950. }
  12951. if s.FieldLevelEncryptionProfileConfig != nil {
  12952. if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil {
  12953. invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams))
  12954. }
  12955. }
  12956. if invalidParams.Len() > 0 {
  12957. return invalidParams
  12958. }
  12959. return nil
  12960. }
  12961. // SetFieldLevelEncryptionProfileConfig sets the FieldLevelEncryptionProfileConfig field's value.
  12962. func (s *UpdateFieldLevelEncryptionProfileInput) SetFieldLevelEncryptionProfileConfig(v *FieldLevelEncryptionProfileConfig) *UpdateFieldLevelEncryptionProfileInput {
  12963. s.FieldLevelEncryptionProfileConfig = v
  12964. return s
  12965. }
  12966. // SetId sets the Id field's value.
  12967. func (s *UpdateFieldLevelEncryptionProfileInput) SetId(v string) *UpdateFieldLevelEncryptionProfileInput {
  12968. s.Id = &v
  12969. return s
  12970. }
  12971. // SetIfMatch sets the IfMatch field's value.
  12972. func (s *UpdateFieldLevelEncryptionProfileInput) SetIfMatch(v string) *UpdateFieldLevelEncryptionProfileInput {
  12973. s.IfMatch = &v
  12974. return s
  12975. }
  12976. type UpdateFieldLevelEncryptionProfileOutput struct {
  12977. _ struct{} `type:"structure" payload:"FieldLevelEncryptionProfile"`
  12978. // The result of the field-level encryption profile request.
  12979. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12980. // Return the results of updating the profile.
  12981. FieldLevelEncryptionProfile *FieldLevelEncryptionProfile `type:"structure"`
  12982. }
  12983. // String returns the string representation
  12984. func (s UpdateFieldLevelEncryptionProfileOutput) String() string {
  12985. return awsutil.Prettify(s)
  12986. }
  12987. // GoString returns the string representation
  12988. func (s UpdateFieldLevelEncryptionProfileOutput) GoString() string {
  12989. return s.String()
  12990. }
  12991. // SetETag sets the ETag field's value.
  12992. func (s *UpdateFieldLevelEncryptionProfileOutput) SetETag(v string) *UpdateFieldLevelEncryptionProfileOutput {
  12993. s.ETag = &v
  12994. return s
  12995. }
  12996. // SetFieldLevelEncryptionProfile sets the FieldLevelEncryptionProfile field's value.
  12997. func (s *UpdateFieldLevelEncryptionProfileOutput) SetFieldLevelEncryptionProfile(v *FieldLevelEncryptionProfile) *UpdateFieldLevelEncryptionProfileOutput {
  12998. s.FieldLevelEncryptionProfile = v
  12999. return s
  13000. }
  13001. type UpdatePublicKeyInput struct {
  13002. _ struct{} `type:"structure" payload:"PublicKeyConfig"`
  13003. // ID of the public key to be updated.
  13004. //
  13005. // Id is a required field
  13006. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  13007. // The value of the ETag header that you received when retrieving the public
  13008. // key to update. For example: E2QWRUHAPOMQZL.
  13009. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  13010. // Request to update public key information.
  13011. //
  13012. // PublicKeyConfig is a required field
  13013. PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  13014. }
  13015. // String returns the string representation
  13016. func (s UpdatePublicKeyInput) String() string {
  13017. return awsutil.Prettify(s)
  13018. }
  13019. // GoString returns the string representation
  13020. func (s UpdatePublicKeyInput) GoString() string {
  13021. return s.String()
  13022. }
  13023. // Validate inspects the fields of the type to determine if they are valid.
  13024. func (s *UpdatePublicKeyInput) Validate() error {
  13025. invalidParams := request.ErrInvalidParams{Context: "UpdatePublicKeyInput"}
  13026. if s.Id == nil {
  13027. invalidParams.Add(request.NewErrParamRequired("Id"))
  13028. }
  13029. if s.Id != nil && len(*s.Id) < 1 {
  13030. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  13031. }
  13032. if s.PublicKeyConfig == nil {
  13033. invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig"))
  13034. }
  13035. if s.PublicKeyConfig != nil {
  13036. if err := s.PublicKeyConfig.Validate(); err != nil {
  13037. invalidParams.AddNested("PublicKeyConfig", err.(request.ErrInvalidParams))
  13038. }
  13039. }
  13040. if invalidParams.Len() > 0 {
  13041. return invalidParams
  13042. }
  13043. return nil
  13044. }
  13045. // SetId sets the Id field's value.
  13046. func (s *UpdatePublicKeyInput) SetId(v string) *UpdatePublicKeyInput {
  13047. s.Id = &v
  13048. return s
  13049. }
  13050. // SetIfMatch sets the IfMatch field's value.
  13051. func (s *UpdatePublicKeyInput) SetIfMatch(v string) *UpdatePublicKeyInput {
  13052. s.IfMatch = &v
  13053. return s
  13054. }
  13055. // SetPublicKeyConfig sets the PublicKeyConfig field's value.
  13056. func (s *UpdatePublicKeyInput) SetPublicKeyConfig(v *PublicKeyConfig) *UpdatePublicKeyInput {
  13057. s.PublicKeyConfig = v
  13058. return s
  13059. }
  13060. type UpdatePublicKeyOutput struct {
  13061. _ struct{} `type:"structure" payload:"PublicKey"`
  13062. // The current version of the update public key result. For example: E2QWRUHAPOMQZL.
  13063. ETag *string `location:"header" locationName:"ETag" type:"string"`
  13064. // Return the results of updating the public key.
  13065. PublicKey *PublicKey `type:"structure"`
  13066. }
  13067. // String returns the string representation
  13068. func (s UpdatePublicKeyOutput) String() string {
  13069. return awsutil.Prettify(s)
  13070. }
  13071. // GoString returns the string representation
  13072. func (s UpdatePublicKeyOutput) GoString() string {
  13073. return s.String()
  13074. }
  13075. // SetETag sets the ETag field's value.
  13076. func (s *UpdatePublicKeyOutput) SetETag(v string) *UpdatePublicKeyOutput {
  13077. s.ETag = &v
  13078. return s
  13079. }
  13080. // SetPublicKey sets the PublicKey field's value.
  13081. func (s *UpdatePublicKeyOutput) SetPublicKey(v *PublicKey) *UpdatePublicKeyOutput {
  13082. s.PublicKey = v
  13083. return s
  13084. }
  13085. // The request to update a streaming distribution.
  13086. type UpdateStreamingDistributionInput struct {
  13087. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  13088. // The streaming distribution's id.
  13089. //
  13090. // Id is a required field
  13091. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  13092. // The value of the ETag header that you received when retrieving the streaming
  13093. // distribution's configuration. For example: E2QWRUHAPOMQZL.
  13094. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  13095. // The streaming distribution's configuration information.
  13096. //
  13097. // StreamingDistributionConfig is a required field
  13098. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"`
  13099. }
  13100. // String returns the string representation
  13101. func (s UpdateStreamingDistributionInput) String() string {
  13102. return awsutil.Prettify(s)
  13103. }
  13104. // GoString returns the string representation
  13105. func (s UpdateStreamingDistributionInput) GoString() string {
  13106. return s.String()
  13107. }
  13108. // Validate inspects the fields of the type to determine if they are valid.
  13109. func (s *UpdateStreamingDistributionInput) Validate() error {
  13110. invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"}
  13111. if s.Id == nil {
  13112. invalidParams.Add(request.NewErrParamRequired("Id"))
  13113. }
  13114. if s.Id != nil && len(*s.Id) < 1 {
  13115. invalidParams.Add(request.NewErrParamMinLen("Id", 1))
  13116. }
  13117. if s.StreamingDistributionConfig == nil {
  13118. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  13119. }
  13120. if s.StreamingDistributionConfig != nil {
  13121. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  13122. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  13123. }
  13124. }
  13125. if invalidParams.Len() > 0 {
  13126. return invalidParams
  13127. }
  13128. return nil
  13129. }
  13130. // SetId sets the Id field's value.
  13131. func (s *UpdateStreamingDistributionInput) SetId(v string) *UpdateStreamingDistributionInput {
  13132. s.Id = &v
  13133. return s
  13134. }
  13135. // SetIfMatch sets the IfMatch field's value.
  13136. func (s *UpdateStreamingDistributionInput) SetIfMatch(v string) *UpdateStreamingDistributionInput {
  13137. s.IfMatch = &v
  13138. return s
  13139. }
  13140. // SetStreamingDistributionConfig sets the StreamingDistributionConfig field's value.
  13141. func (s *UpdateStreamingDistributionInput) SetStreamingDistributionConfig(v *StreamingDistributionConfig) *UpdateStreamingDistributionInput {
  13142. s.StreamingDistributionConfig = v
  13143. return s
  13144. }
  13145. // The returned result of the corresponding request.
  13146. type UpdateStreamingDistributionOutput struct {
  13147. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  13148. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  13149. ETag *string `location:"header" locationName:"ETag" type:"string"`
  13150. // The streaming distribution's information.
  13151. StreamingDistribution *StreamingDistribution `type:"structure"`
  13152. }
  13153. // String returns the string representation
  13154. func (s UpdateStreamingDistributionOutput) String() string {
  13155. return awsutil.Prettify(s)
  13156. }
  13157. // GoString returns the string representation
  13158. func (s UpdateStreamingDistributionOutput) GoString() string {
  13159. return s.String()
  13160. }
  13161. // SetETag sets the ETag field's value.
  13162. func (s *UpdateStreamingDistributionOutput) SetETag(v string) *UpdateStreamingDistributionOutput {
  13163. s.ETag = &v
  13164. return s
  13165. }
  13166. // SetStreamingDistribution sets the StreamingDistribution field's value.
  13167. func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDistribution) *UpdateStreamingDistributionOutput {
  13168. s.StreamingDistribution = v
  13169. return s
  13170. }
  13171. // A complex type that specifies the following:
  13172. //
  13173. // * Whether you want viewers to use HTTP or HTTPS to request your objects.
  13174. //
  13175. // * If you want viewers to use HTTPS, whether you're using an alternate
  13176. // domain name such as example.com or the CloudFront domain name for your
  13177. // distribution, such as d111111abcdef8.cloudfront.net.
  13178. //
  13179. // * If you're using an alternate domain name, whether AWS Certificate Manager
  13180. // (ACM) provided the certificate, or you purchased a certificate from a
  13181. // third-party certificate authority and imported it into ACM or uploaded
  13182. // it to the IAM certificate store.
  13183. //
  13184. // You must specify only one of the following values:
  13185. //
  13186. // * ViewerCertificate$ACMCertificateArn
  13187. //
  13188. // * ViewerCertificate$IAMCertificateId
  13189. //
  13190. // * ViewerCertificate$CloudFrontDefaultCertificate
  13191. //
  13192. // Don't specify false for CloudFrontDefaultCertificate.
  13193. //
  13194. // If you want viewers to use HTTP instead of HTTPS to request your objects:
  13195. // Specify the following value:
  13196. //
  13197. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  13198. //
  13199. // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache
  13200. // behaviors.
  13201. //
  13202. // If you want viewers to use HTTPS to request your objects: Choose the type
  13203. // of certificate that you want to use based on whether you're using an alternate
  13204. // domain name for your objects or the CloudFront domain name:
  13205. //
  13206. // * If you're using an alternate domain name, such as example.com: Specify
  13207. // one of the following values, depending on whether ACM provided your certificate
  13208. // or you purchased your certificate from third-party certificate authority:
  13209. //
  13210. // <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where
  13211. // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate
  13212. // that you want to use for this distribution.
  13213. //
  13214. // <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate
  13215. // ID is the ID that IAM returned when you added the certificate to the IAM
  13216. // certificate store.
  13217. //
  13218. // If you specify ACMCertificateArn or IAMCertificateId, you must also specify
  13219. // a value for SSLSupportMethod.
  13220. //
  13221. // If you choose to use an ACM certificate or a certificate in the IAM certificate
  13222. // store, we recommend that you use only an alternate domain name in your
  13223. // object URLs (https://example.com/logo.jpg). If you use the domain name
  13224. // that is associated with your CloudFront distribution (such as https://d111111abcdef8.cloudfront.net/logo.jpg)
  13225. // and the viewer supports SNI, then CloudFront behaves normally. However,
  13226. // if the browser does not support SNI, the user's experience depends on
  13227. // the value that you choose for SSLSupportMethod:
  13228. //
  13229. // vip: The viewer displays a warning because there is a mismatch between the
  13230. // CloudFront domain name and the domain name in your SSL/TLS certificate.
  13231. //
  13232. // sni-only: CloudFront drops the connection with the browser without returning
  13233. // the object.
  13234. //
  13235. // * If you're using the CloudFront domain name for your distribution, such
  13236. // as d111111abcdef8.cloudfront.net: Specify the following value:
  13237. //
  13238. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  13239. //
  13240. // If you want viewers to use HTTPS, you must also specify one of the following
  13241. // values in your cache behaviors:
  13242. //
  13243. // * <ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
  13244. //
  13245. // * <ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
  13246. //
  13247. // You can also optionally require that CloudFront use HTTPS to communicate
  13248. // with your origin by specifying one of the following values for the applicable
  13249. // origins:
  13250. //
  13251. // * <OriginProtocolPolicy>https-only<OriginProtocolPolicy>
  13252. //
  13253. // * <OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
  13254. //
  13255. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS)
  13256. // in the Amazon CloudFront Developer Guide.
  13257. type ViewerCertificate struct {
  13258. _ struct{} `type:"structure"`
  13259. // For information about how and when to use ACMCertificateArn, see ViewerCertificate.
  13260. ACMCertificateArn *string `type:"string"`
  13261. // This field has been deprecated. Use one of the following fields instead:
  13262. //
  13263. // * ViewerCertificate$ACMCertificateArn
  13264. //
  13265. // * ViewerCertificate$IAMCertificateId
  13266. //
  13267. // * ViewerCertificate$CloudFrontDefaultCertificate
  13268. //
  13269. // Deprecated: Certificate has been deprecated
  13270. Certificate *string `deprecated:"true" type:"string"`
  13271. // This field has been deprecated. Use one of the following fields instead:
  13272. //
  13273. // * ViewerCertificate$ACMCertificateArn
  13274. //
  13275. // * ViewerCertificate$IAMCertificateId
  13276. //
  13277. // * ViewerCertificate$CloudFrontDefaultCertificate
  13278. //
  13279. // Deprecated: CertificateSource has been deprecated
  13280. CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"`
  13281. // For information about how and when to use CloudFrontDefaultCertificate, see
  13282. // ViewerCertificate.
  13283. CloudFrontDefaultCertificate *bool `type:"boolean"`
  13284. // For information about how and when to use IAMCertificateId, see ViewerCertificate.
  13285. IAMCertificateId *string `type:"string"`
  13286. // Specify the security policy that you want CloudFront to use for HTTPS connections.
  13287. // A security policy determines two settings:
  13288. //
  13289. // * The minimum SSL/TLS protocol that CloudFront uses to communicate with
  13290. // viewers
  13291. //
  13292. // * The cipher that CloudFront uses to encrypt the content that it returns
  13293. // to viewers
  13294. //
  13295. // On the CloudFront console, this setting is called Security policy.
  13296. //
  13297. // We recommend that you specify TLSv1.1_2016 unless your users are using browsers
  13298. // or devices that do not support TLSv1.1 or later.
  13299. //
  13300. // When both of the following are true, you must specify TLSv1 or later for
  13301. // the security policy:
  13302. //
  13303. // * You're using a custom certificate: you specified a value for ACMCertificateArn
  13304. // or for IAMCertificateId
  13305. //
  13306. // * You're using SNI: you specified sni-only for SSLSupportMethod
  13307. //
  13308. // If you specify true for CloudFrontDefaultCertificate, CloudFront automatically
  13309. // sets the security policy to TLSv1 regardless of the value that you specify
  13310. // for MinimumProtocolVersion.
  13311. //
  13312. // For information about the relationship between the security policy that you
  13313. // choose and the protocols and ciphers that CloudFront uses to communicate
  13314. // with viewers, see Supported SSL/TLS Protocols and Ciphers for Communication
  13315. // Between Viewers and CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers)
  13316. // in the Amazon CloudFront Developer Guide.
  13317. MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"`
  13318. // If you specify a value for ViewerCertificate$ACMCertificateArn or for ViewerCertificate$IAMCertificateId,
  13319. // you must also specify how you want CloudFront to serve HTTPS requests: using
  13320. // a method that works for all clients or one that works for most clients:
  13321. //
  13322. // * vip: CloudFront uses dedicated IP addresses for your content and can
  13323. // respond to HTTPS requests from any viewer. However, you will incur additional
  13324. // monthly charges.
  13325. //
  13326. // * sni-only: CloudFront can respond to HTTPS requests from viewers that
  13327. // support Server Name Indication (SNI). All modern browsers support SNI,
  13328. // but some browsers still in use don't support SNI. If some of your users'
  13329. // browsers don't support SNI, we recommend that you do one of the following:
  13330. //
  13331. // Use the vip option (dedicated IP addresses) instead of sni-only.
  13332. //
  13333. // Use the CloudFront SSL/TLS certificate instead of a custom certificate. This
  13334. // requires that you use the CloudFront domain name of your distribution
  13335. // in the URLs for your objects, for example, https://d111111abcdef8.cloudfront.net/logo.png.
  13336. //
  13337. // If you can control which browser your users use, upgrade the browser to one
  13338. // that supports SNI.
  13339. //
  13340. // Use HTTP instead of HTTPS.
  13341. //
  13342. // Don't specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>.
  13343. //
  13344. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS.html)
  13345. // in the Amazon CloudFront Developer Guide.
  13346. SSLSupportMethod *string `type:"string" enum:"SSLSupportMethod"`
  13347. }
  13348. // String returns the string representation
  13349. func (s ViewerCertificate) String() string {
  13350. return awsutil.Prettify(s)
  13351. }
  13352. // GoString returns the string representation
  13353. func (s ViewerCertificate) GoString() string {
  13354. return s.String()
  13355. }
  13356. // SetACMCertificateArn sets the ACMCertificateArn field's value.
  13357. func (s *ViewerCertificate) SetACMCertificateArn(v string) *ViewerCertificate {
  13358. s.ACMCertificateArn = &v
  13359. return s
  13360. }
  13361. // SetCertificate sets the Certificate field's value.
  13362. func (s *ViewerCertificate) SetCertificate(v string) *ViewerCertificate {
  13363. s.Certificate = &v
  13364. return s
  13365. }
  13366. // SetCertificateSource sets the CertificateSource field's value.
  13367. func (s *ViewerCertificate) SetCertificateSource(v string) *ViewerCertificate {
  13368. s.CertificateSource = &v
  13369. return s
  13370. }
  13371. // SetCloudFrontDefaultCertificate sets the CloudFrontDefaultCertificate field's value.
  13372. func (s *ViewerCertificate) SetCloudFrontDefaultCertificate(v bool) *ViewerCertificate {
  13373. s.CloudFrontDefaultCertificate = &v
  13374. return s
  13375. }
  13376. // SetIAMCertificateId sets the IAMCertificateId field's value.
  13377. func (s *ViewerCertificate) SetIAMCertificateId(v string) *ViewerCertificate {
  13378. s.IAMCertificateId = &v
  13379. return s
  13380. }
  13381. // SetMinimumProtocolVersion sets the MinimumProtocolVersion field's value.
  13382. func (s *ViewerCertificate) SetMinimumProtocolVersion(v string) *ViewerCertificate {
  13383. s.MinimumProtocolVersion = &v
  13384. return s
  13385. }
  13386. // SetSSLSupportMethod sets the SSLSupportMethod field's value.
  13387. func (s *ViewerCertificate) SetSSLSupportMethod(v string) *ViewerCertificate {
  13388. s.SSLSupportMethod = &v
  13389. return s
  13390. }
  13391. const (
  13392. // CertificateSourceCloudfront is a CertificateSource enum value
  13393. CertificateSourceCloudfront = "cloudfront"
  13394. // CertificateSourceIam is a CertificateSource enum value
  13395. CertificateSourceIam = "iam"
  13396. // CertificateSourceAcm is a CertificateSource enum value
  13397. CertificateSourceAcm = "acm"
  13398. )
  13399. const (
  13400. // EventTypeViewerRequest is a EventType enum value
  13401. EventTypeViewerRequest = "viewer-request"
  13402. // EventTypeViewerResponse is a EventType enum value
  13403. EventTypeViewerResponse = "viewer-response"
  13404. // EventTypeOriginRequest is a EventType enum value
  13405. EventTypeOriginRequest = "origin-request"
  13406. // EventTypeOriginResponse is a EventType enum value
  13407. EventTypeOriginResponse = "origin-response"
  13408. )
  13409. const (
  13410. // FormatUrlencoded is a Format enum value
  13411. FormatUrlencoded = "URLEncoded"
  13412. )
  13413. const (
  13414. // GeoRestrictionTypeBlacklist is a GeoRestrictionType enum value
  13415. GeoRestrictionTypeBlacklist = "blacklist"
  13416. // GeoRestrictionTypeWhitelist is a GeoRestrictionType enum value
  13417. GeoRestrictionTypeWhitelist = "whitelist"
  13418. // GeoRestrictionTypeNone is a GeoRestrictionType enum value
  13419. GeoRestrictionTypeNone = "none"
  13420. )
  13421. const (
  13422. // HttpVersionHttp11 is a HttpVersion enum value
  13423. HttpVersionHttp11 = "http1.1"
  13424. // HttpVersionHttp2 is a HttpVersion enum value
  13425. HttpVersionHttp2 = "http2"
  13426. )
  13427. const (
  13428. // ItemSelectionNone is a ItemSelection enum value
  13429. ItemSelectionNone = "none"
  13430. // ItemSelectionWhitelist is a ItemSelection enum value
  13431. ItemSelectionWhitelist = "whitelist"
  13432. // ItemSelectionAll is a ItemSelection enum value
  13433. ItemSelectionAll = "all"
  13434. )
  13435. const (
  13436. // MethodGet is a Method enum value
  13437. MethodGet = "GET"
  13438. // MethodHead is a Method enum value
  13439. MethodHead = "HEAD"
  13440. // MethodPost is a Method enum value
  13441. MethodPost = "POST"
  13442. // MethodPut is a Method enum value
  13443. MethodPut = "PUT"
  13444. // MethodPatch is a Method enum value
  13445. MethodPatch = "PATCH"
  13446. // MethodOptions is a Method enum value
  13447. MethodOptions = "OPTIONS"
  13448. // MethodDelete is a Method enum value
  13449. MethodDelete = "DELETE"
  13450. )
  13451. const (
  13452. // MinimumProtocolVersionSslv3 is a MinimumProtocolVersion enum value
  13453. MinimumProtocolVersionSslv3 = "SSLv3"
  13454. // MinimumProtocolVersionTlsv1 is a MinimumProtocolVersion enum value
  13455. MinimumProtocolVersionTlsv1 = "TLSv1"
  13456. // MinimumProtocolVersionTlsv12016 is a MinimumProtocolVersion enum value
  13457. MinimumProtocolVersionTlsv12016 = "TLSv1_2016"
  13458. // MinimumProtocolVersionTlsv112016 is a MinimumProtocolVersion enum value
  13459. MinimumProtocolVersionTlsv112016 = "TLSv1.1_2016"
  13460. // MinimumProtocolVersionTlsv122018 is a MinimumProtocolVersion enum value
  13461. MinimumProtocolVersionTlsv122018 = "TLSv1.2_2018"
  13462. )
  13463. const (
  13464. // OriginProtocolPolicyHttpOnly is a OriginProtocolPolicy enum value
  13465. OriginProtocolPolicyHttpOnly = "http-only"
  13466. // OriginProtocolPolicyMatchViewer is a OriginProtocolPolicy enum value
  13467. OriginProtocolPolicyMatchViewer = "match-viewer"
  13468. // OriginProtocolPolicyHttpsOnly is a OriginProtocolPolicy enum value
  13469. OriginProtocolPolicyHttpsOnly = "https-only"
  13470. )
  13471. const (
  13472. // PriceClassPriceClass100 is a PriceClass enum value
  13473. PriceClassPriceClass100 = "PriceClass_100"
  13474. // PriceClassPriceClass200 is a PriceClass enum value
  13475. PriceClassPriceClass200 = "PriceClass_200"
  13476. // PriceClassPriceClassAll is a PriceClass enum value
  13477. PriceClassPriceClassAll = "PriceClass_All"
  13478. )
  13479. const (
  13480. // SSLSupportMethodSniOnly is a SSLSupportMethod enum value
  13481. SSLSupportMethodSniOnly = "sni-only"
  13482. // SSLSupportMethodVip is a SSLSupportMethod enum value
  13483. SSLSupportMethodVip = "vip"
  13484. )
  13485. const (
  13486. // SslProtocolSslv3 is a SslProtocol enum value
  13487. SslProtocolSslv3 = "SSLv3"
  13488. // SslProtocolTlsv1 is a SslProtocol enum value
  13489. SslProtocolTlsv1 = "TLSv1"
  13490. // SslProtocolTlsv11 is a SslProtocol enum value
  13491. SslProtocolTlsv11 = "TLSv1.1"
  13492. // SslProtocolTlsv12 is a SslProtocol enum value
  13493. SslProtocolTlsv12 = "TLSv1.2"
  13494. )
  13495. const (
  13496. // ViewerProtocolPolicyAllowAll is a ViewerProtocolPolicy enum value
  13497. ViewerProtocolPolicyAllowAll = "allow-all"
  13498. // ViewerProtocolPolicyHttpsOnly is a ViewerProtocolPolicy enum value
  13499. ViewerProtocolPolicyHttpsOnly = "https-only"
  13500. // ViewerProtocolPolicyRedirectToHttps is a ViewerProtocolPolicy enum value
  13501. ViewerProtocolPolicyRedirectToHttps = "redirect-to-https"
  13502. )