api.go 1.6 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943379443794537946379473794837949379503795137952379533795437955379563795737958379593796037961379623796337964379653796637967379683796937970379713797237973379743797537976379773797837979379803798137982379833798437985379863798737988379893799037991379923799337994379953799637997379983799938000380013800238003380043800538006380073800838009380103801138012380133801438015380163801738018380193802038021380223802338024380253802638027380283802938030380313803238033380343803538036380373803838039380403804138042380433804438045380463804738048380493805038051380523805338054380553805638057380583805938060380613806238063380643806538066380673806838069380703807138072380733807438075380763807738078380793808038081380823808338084380853808638087380883808938090380913809238093380943809538096380973809838099381003810138102381033810438105381063810738108381093811038111381123811338114381153811638117381183811938120381213812238123381243812538126381273812838129381303813138132381333813438135381363813738138381393814038141381423814338144381453814638147381483814938150381513815238153381543815538156381573815838159381603816138162381633816438165381663816738168381693817038171381723817338174381753817638177381783817938180381813818238183381843818538186381873818838189381903819138192381933819438195381963819738198381993820038201382023820338204382053820638207382083820938210382113821238213382143821538216382173821838219382203822138222382233822438225382263822738228382293823038231382323823338234382353823638237382383823938240382413824238243382443824538246382473824838249382503825138252382533825438255382563825738258382593826038261382623826338264382653826638267382683826938270382713827238273382743827538276382773827838279382803828138282382833828438285382863828738288382893829038291382923829338294382953829638297382983829938300383013830238303383043830538306383073830838309383103831138312383133831438315383163831738318383193832038321383223832338324383253832638327383283832938330383313833238333383343833538336383373833838339383403834138342383433834438345383463834738348383493835038351383523835338354383553835638357383583835938360383613836238363383643836538366383673836838369383703837138372383733837438375383763837738378383793838038381383823838338384383853838638387383883838938390383913839238393383943839538396383973839838399384003840138402384033840438405384063840738408384093841038411384123841338414384153841638417384183841938420384213842238423384243842538426384273842838429384303843138432384333843438435384363843738438384393844038441384423844338444384453844638447384483844938450384513845238453384543845538456384573845838459384603846138462384633846438465384663846738468384693847038471384723847338474384753847638477384783847938480384813848238483384843848538486384873848838489384903849138492384933849438495384963849738498384993850038501385023850338504385053850638507385083850938510385113851238513385143851538516385173851838519385203852138522385233852438525385263852738528385293853038531385323853338534385353853638537385383853938540385413854238543385443854538546385473854838549385503855138552385533855438555385563855738558385593856038561385623856338564385653856638567385683856938570385713857238573385743857538576385773857838579385803858138582385833858438585385863858738588385893859038591385923859338594385953859638597385983859938600386013860238603386043860538606386073860838609386103861138612386133861438615386163861738618386193862038621386223862338624386253862638627386283862938630386313863238633386343863538636386373863838639386403864138642386433864438645386463864738648386493865038651386523865338654386553865638657386583865938660386613866238663386643866538666386673866838669386703867138672386733867438675386763867738678386793868038681386823868338684386853868638687386883868938690386913869238693386943869538696386973869838699387003870138702387033870438705387063870738708387093871038711387123871338714387153871638717387183871938720387213872238723387243872538726387273872838729387303873138732387333873438735387363873738738387393874038741387423874338744387453874638747387483874938750387513875238753387543875538756387573875838759387603876138762387633876438765387663876738768387693877038771387723877338774387753877638777387783877938780387813878238783387843878538786387873878838789387903879138792387933879438795387963879738798387993880038801388023880338804388053880638807388083880938810388113881238813388143881538816388173881838819388203882138822388233882438825388263882738828388293883038831388323883338834388353883638837388383883938840388413884238843388443884538846388473884838849388503885138852388533885438855388563885738858388593886038861388623886338864388653886638867388683886938870388713887238873388743887538876388773887838879388803888138882388833888438885388863888738888388893889038891388923889338894388953889638897388983889938900389013890238903389043890538906389073890838909389103891138912389133891438915389163891738918389193892038921389223892338924389253892638927389283892938930389313893238933389343893538936389373893838939389403894138942389433894438945389463894738948389493895038951389523895338954389553895638957389583895938960389613896238963389643896538966389673896838969389703897138972389733897438975389763897738978389793898038981389823898338984389853898638987389883898938990389913899238993389943899538996389973899838999390003900139002390033900439005390063900739008390093901039011390123901339014390153901639017390183901939020390213902239023390243902539026390273902839029390303903139032390333903439035390363903739038390393904039041390423904339044390453904639047390483904939050390513905239053390543905539056390573905839059390603906139062390633906439065390663906739068390693907039071390723907339074390753907639077390783907939080390813908239083390843908539086390873908839089390903909139092390933909439095390963909739098390993910039101391023910339104391053910639107391083910939110391113911239113391143911539116391173911839119391203912139122391233912439125391263912739128391293913039131391323913339134391353913639137391383913939140391413914239143391443914539146391473914839149391503915139152391533915439155391563915739158391593916039161391623916339164391653916639167391683916939170391713917239173391743917539176391773917839179391803918139182391833918439185391863918739188391893919039191391923919339194391953919639197391983919939200392013920239203392043920539206392073920839209392103921139212392133921439215392163921739218392193922039221392223922339224392253922639227392283922939230392313923239233392343923539236392373923839239392403924139242392433924439245392463924739248392493925039251392523925339254392553925639257392583925939260392613926239263392643926539266392673926839269392703927139272392733927439275392763927739278392793928039281392823928339284392853928639287392883928939290392913929239293392943929539296392973929839299393003930139302393033930439305393063930739308393093931039311393123931339314393153931639317393183931939320393213932239323393243932539326393273932839329393303933139332393333933439335393363933739338393393934039341393423934339344393453934639347393483934939350393513935239353393543935539356393573935839359393603936139362393633936439365393663936739368393693937039371393723937339374393753937639377393783937939380393813938239383393843938539386393873938839389393903939139392393933939439395393963939739398393993940039401394023940339404394053940639407394083940939410394113941239413394143941539416394173941839419394203942139422394233942439425394263942739428394293943039431394323943339434394353943639437394383943939440394413944239443394443944539446394473944839449394503945139452394533945439455394563945739458394593946039461394623946339464394653946639467394683946939470394713947239473394743947539476394773947839479394803948139482394833948439485394863948739488394893949039491394923949339494394953949639497394983949939500395013950239503395043950539506395073950839509395103951139512395133951439515395163951739518395193952039521395223952339524395253952639527395283952939530395313953239533395343953539536395373953839539395403954139542395433954439545395463954739548395493955039551395523955339554395553955639557395583955939560395613956239563395643956539566395673956839569395703957139572395733957439575395763957739578395793958039581395823958339584395853958639587395883958939590395913959239593395943959539596395973959839599396003960139602396033960439605396063960739608396093961039611396123961339614396153961639617396183961939620396213962239623396243962539626396273962839629396303963139632396333963439635396363963739638396393964039641396423964339644396453964639647396483964939650396513965239653396543965539656396573965839659396603966139662396633966439665396663966739668396693967039671396723967339674396753967639677396783967939680396813968239683396843968539686396873968839689396903969139692396933969439695396963969739698396993970039701397023970339704397053970639707397083970939710397113971239713397143971539716397173971839719397203972139722397233972439725397263972739728397293973039731397323973339734397353973639737397383973939740397413974239743397443974539746397473974839749397503975139752397533975439755397563975739758397593976039761397623976339764397653976639767397683976939770397713977239773397743977539776397773977839779397803978139782397833978439785397863978739788397893979039791397923979339794397953979639797397983979939800398013980239803398043980539806398073980839809398103981139812398133981439815398163981739818398193982039821398223982339824398253982639827398283982939830398313983239833398343983539836398373983839839398403984139842398433984439845398463984739848398493985039851398523985339854398553985639857398583985939860398613986239863398643986539866398673986839869398703987139872398733987439875398763987739878398793988039881398823988339884398853988639887398883988939890398913989239893398943989539896398973989839899399003990139902399033990439905399063990739908399093991039911399123991339914399153991639917399183991939920399213992239923399243992539926399273992839929399303993139932399333993439935399363993739938399393994039941399423994339944399453994639947399483994939950399513995239953399543995539956399573995839959399603996139962399633996439965399663996739968399693997039971399723997339974399753997639977399783997939980399813998239983399843998539986399873998839989399903999139992399933999439995399963999739998399994000040001400024000340004400054000640007400084000940010400114001240013400144001540016400174001840019400204002140022400234002440025400264002740028400294003040031400324003340034400354003640037400384003940040400414004240043400444004540046400474004840049400504005140052400534005440055400564005740058400594006040061400624006340064400654006640067400684006940070400714007240073400744007540076400774007840079400804008140082400834008440085400864008740088400894009040091400924009340094400954009640097400984009940100401014010240103401044010540106401074010840109401104011140112401134011440115401164011740118401194012040121401224012340124401254012640127401284012940130401314013240133401344013540136401374013840139401404014140142401434014440145401464014740148401494015040151401524015340154401554015640157401584015940160401614016240163401644016540166401674016840169401704017140172401734017440175401764017740178401794018040181401824018340184401854018640187401884018940190401914019240193401944019540196401974019840199402004020140202402034020440205402064020740208402094021040211402124021340214402154021640217402184021940220402214022240223402244022540226402274022840229402304023140232402334023440235402364023740238402394024040241402424024340244402454024640247402484024940250402514025240253402544025540256402574025840259402604026140262402634026440265402664026740268402694027040271402724027340274402754027640277402784027940280402814028240283402844028540286402874028840289402904029140292402934029440295402964029740298402994030040301403024030340304403054030640307403084030940310403114031240313403144031540316403174031840319403204032140322403234032440325403264032740328403294033040331403324033340334403354033640337403384033940340403414034240343403444034540346403474034840349403504035140352403534035440355403564035740358403594036040361403624036340364403654036640367403684036940370403714037240373403744037540376403774037840379403804038140382403834038440385403864038740388403894039040391403924039340394403954039640397403984039940400404014040240403404044040540406404074040840409404104041140412404134041440415404164041740418404194042040421404224042340424404254042640427404284042940430404314043240433404344043540436404374043840439404404044140442404434044440445404464044740448404494045040451404524045340454404554045640457404584045940460404614046240463404644046540466404674046840469404704047140472404734047440475404764047740478404794048040481404824048340484404854048640487404884048940490404914049240493404944049540496404974049840499405004050140502405034050440505405064050740508405094051040511405124051340514405154051640517405184051940520405214052240523405244052540526405274052840529405304053140532405334053440535405364053740538405394054040541405424054340544405454054640547405484054940550405514055240553405544055540556405574055840559405604056140562405634056440565405664056740568405694057040571405724057340574405754057640577405784057940580405814058240583405844058540586405874058840589405904059140592405934059440595405964059740598405994060040601406024060340604406054060640607406084060940610406114061240613406144061540616406174061840619406204062140622406234062440625406264062740628406294063040631406324063340634406354063640637406384063940640406414064240643406444064540646406474064840649406504065140652406534065440655406564065740658406594066040661406624066340664406654066640667406684066940670406714067240673406744067540676406774067840679406804068140682406834068440685406864068740688406894069040691406924069340694406954069640697406984069940700407014070240703407044070540706407074070840709407104071140712407134071440715407164071740718407194072040721407224072340724407254072640727407284072940730407314073240733407344073540736407374073840739407404074140742407434074440745407464074740748407494075040751407524075340754407554075640757407584075940760407614076240763407644076540766407674076840769407704077140772407734077440775407764077740778407794078040781407824078340784407854078640787407884078940790407914079240793407944079540796407974079840799408004080140802408034080440805408064080740808408094081040811408124081340814408154081640817408184081940820408214082240823408244082540826408274082840829408304083140832408334083440835408364083740838408394084040841408424084340844408454084640847408484084940850408514085240853408544085540856408574085840859408604086140862408634086440865408664086740868408694087040871408724087340874408754087640877408784087940880408814088240883408844088540886408874088840889408904089140892408934089440895408964089740898408994090040901409024090340904409054090640907409084090940910409114091240913409144091540916409174091840919409204092140922409234092440925409264092740928409294093040931409324093340934409354093640937409384093940940409414094240943409444094540946409474094840949409504095140952409534095440955409564095740958409594096040961409624096340964409654096640967409684096940970409714097240973409744097540976409774097840979409804098140982409834098440985409864098740988409894099040991409924099340994409954099640997409984099941000410014100241003410044100541006410074100841009410104101141012410134101441015410164101741018410194102041021410224102341024410254102641027410284102941030410314103241033410344103541036410374103841039410404104141042410434104441045410464104741048410494105041051410524105341054410554105641057410584105941060410614106241063410644106541066410674106841069410704107141072410734107441075410764107741078410794108041081410824108341084410854108641087410884108941090410914109241093410944109541096410974109841099411004110141102411034110441105411064110741108411094111041111411124111341114411154111641117411184111941120411214112241123411244112541126411274112841129411304113141132411334113441135411364113741138411394114041141411424114341144411454114641147411484114941150411514115241153411544115541156411574115841159411604116141162411634116441165411664116741168411694117041171411724117341174411754117641177411784117941180411814118241183411844118541186411874118841189411904119141192411934119441195411964119741198411994120041201412024120341204412054120641207412084120941210412114121241213412144121541216412174121841219412204122141222412234122441225412264122741228412294123041231412324123341234412354123641237412384123941240412414124241243412444124541246412474124841249412504125141252412534125441255412564125741258412594126041261412624126341264412654126641267412684126941270412714127241273412744127541276412774127841279412804128141282412834128441285412864128741288412894129041291412924129341294412954129641297412984129941300413014130241303413044130541306413074130841309413104131141312413134131441315413164131741318413194132041321413224132341324413254132641327413284132941330413314133241333413344133541336413374133841339413404134141342413434134441345413464134741348413494135041351413524135341354413554135641357413584135941360413614136241363413644136541366413674136841369413704137141372413734137441375413764137741378413794138041381413824138341384413854138641387413884138941390413914139241393413944139541396413974139841399414004140141402414034140441405414064140741408414094141041411414124141341414414154141641417414184141941420414214142241423414244142541426414274142841429414304143141432414334143441435414364143741438414394144041441414424144341444414454144641447414484144941450414514145241453414544145541456414574145841459414604146141462414634146441465414664146741468414694147041471414724147341474414754147641477414784147941480414814148241483414844148541486414874148841489414904149141492414934149441495414964149741498414994150041501415024150341504415054150641507415084150941510415114151241513415144151541516415174151841519415204152141522415234152441525415264152741528415294153041531415324153341534415354153641537415384153941540415414154241543415444154541546415474154841549415504155141552415534155441555415564155741558415594156041561415624156341564415654156641567415684156941570415714157241573415744157541576415774157841579415804158141582415834158441585415864158741588415894159041591415924159341594415954159641597415984159941600416014160241603416044160541606416074160841609416104161141612416134161441615416164161741618416194162041621416224162341624416254162641627416284162941630416314163241633416344163541636416374163841639416404164141642416434164441645416464164741648416494165041651416524165341654416554165641657416584165941660416614166241663416644166541666416674166841669416704167141672416734167441675416764167741678416794168041681416824168341684416854168641687416884168941690416914169241693416944169541696416974169841699417004170141702417034170441705417064170741708417094171041711417124171341714417154171641717417184171941720417214172241723417244172541726417274172841729417304173141732417334173441735417364173741738417394174041741417424174341744417454174641747417484174941750417514175241753417544175541756417574175841759417604176141762417634176441765417664176741768417694177041771417724177341774417754177641777417784177941780417814178241783417844178541786417874178841789417904179141792417934179441795417964179741798417994180041801418024180341804418054180641807418084180941810418114181241813418144181541816418174181841819418204182141822418234182441825418264182741828418294183041831418324183341834418354183641837418384183941840418414184241843418444184541846418474184841849418504185141852418534185441855418564185741858418594186041861418624186341864418654186641867418684186941870418714187241873418744187541876418774187841879418804188141882418834188441885418864188741888418894189041891418924189341894418954189641897418984189941900419014190241903419044190541906419074190841909419104191141912419134191441915419164191741918419194192041921419224192341924419254192641927419284192941930419314193241933419344193541936419374193841939419404194141942419434194441945419464194741948419494195041951419524195341954419554195641957419584195941960419614196241963419644196541966419674196841969419704197141972419734197441975419764197741978419794198041981419824198341984419854198641987419884198941990419914199241993419944199541996419974199841999420004200142002420034200442005420064200742008420094201042011420124201342014420154201642017420184201942020420214202242023420244202542026420274202842029420304203142032420334203442035420364203742038420394204042041420424204342044420454204642047420484204942050420514205242053420544205542056420574205842059420604206142062420634206442065420664206742068420694207042071420724207342074420754207642077420784207942080420814208242083420844208542086420874208842089420904209142092420934209442095420964209742098420994210042101421024210342104421054210642107421084210942110421114211242113
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "bytes"
  5. "fmt"
  6. "io"
  7. "sync"
  8. "time"
  9. "github.com/aws/aws-sdk-go/aws"
  10. "github.com/aws/aws-sdk-go/aws/awserr"
  11. "github.com/aws/aws-sdk-go/aws/awsutil"
  12. "github.com/aws/aws-sdk-go/aws/client"
  13. "github.com/aws/aws-sdk-go/aws/request"
  14. "github.com/aws/aws-sdk-go/aws/signer/v4"
  15. "github.com/aws/aws-sdk-go/internal/s3shared/arn"
  16. "github.com/aws/aws-sdk-go/private/checksum"
  17. "github.com/aws/aws-sdk-go/private/protocol"
  18. "github.com/aws/aws-sdk-go/private/protocol/eventstream"
  19. "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
  20. "github.com/aws/aws-sdk-go/private/protocol/rest"
  21. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  22. )
  23. const opAbortMultipartUpload = "AbortMultipartUpload"
  24. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  25. // client's request for the AbortMultipartUpload operation. The "output" return
  26. // value will be populated with the request's response once the request completes
  27. // successfully.
  28. //
  29. // Use "Send" method on the returned Request to send the API call to the service.
  30. // the "output" return value is not valid until after Send returns without error.
  31. //
  32. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  33. // API call, and error handling.
  34. //
  35. // This method is useful when you want to inject custom logic or configuration
  36. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  37. //
  38. // // Example sending a request using the AbortMultipartUploadRequest method.
  39. // req, resp := client.AbortMultipartUploadRequest(params)
  40. //
  41. // err := req.Send()
  42. // if err == nil { // resp is now filled
  43. // fmt.Println(resp)
  44. // }
  45. //
  46. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  47. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  48. op := &request.Operation{
  49. Name: opAbortMultipartUpload,
  50. HTTPMethod: "DELETE",
  51. HTTPPath: "/{Bucket}/{Key+}",
  52. }
  53. if input == nil {
  54. input = &AbortMultipartUploadInput{}
  55. }
  56. output = &AbortMultipartUploadOutput{}
  57. req = c.newRequest(op, input, output)
  58. return
  59. }
  60. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  61. //
  62. // This action aborts a multipart upload. After a multipart upload is aborted,
  63. // no additional parts can be uploaded using that upload ID. The storage consumed
  64. // by any previously uploaded parts will be freed. However, if any part uploads
  65. // are currently in progress, those part uploads might or might not succeed.
  66. // As a result, it might be necessary to abort a given multipart upload multiple
  67. // times in order to completely free all storage consumed by all parts.
  68. //
  69. // To verify that all parts have been removed, so you don't get charged for
  70. // the part storage, you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  71. // action and ensure that the parts list is empty.
  72. //
  73. // For information about permissions required to use the multipart upload, see
  74. // Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
  75. //
  76. // The following operations are related to AbortMultipartUpload:
  77. //
  78. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  79. //
  80. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  81. //
  82. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  83. //
  84. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  85. //
  86. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  87. //
  88. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  89. // with awserr.Error's Code and Message methods to get detailed information about
  90. // the error.
  91. //
  92. // See the AWS API reference guide for Amazon Simple Storage Service's
  93. // API operation AbortMultipartUpload for usage and error information.
  94. //
  95. // Returned Error Codes:
  96. // - ErrCodeNoSuchUpload "NoSuchUpload"
  97. // The specified multipart upload does not exist.
  98. //
  99. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  100. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  101. req, out := c.AbortMultipartUploadRequest(input)
  102. return out, req.Send()
  103. }
  104. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  105. // the ability to pass a context and additional request options.
  106. //
  107. // See AbortMultipartUpload for details on how to use this API operation.
  108. //
  109. // The context must be non-nil and will be used for request cancellation. If
  110. // the context is nil a panic will occur. In the future the SDK may create
  111. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  112. // for more information on using Contexts.
  113. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  114. req, out := c.AbortMultipartUploadRequest(input)
  115. req.SetContext(ctx)
  116. req.ApplyOptions(opts...)
  117. return out, req.Send()
  118. }
  119. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  120. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  121. // client's request for the CompleteMultipartUpload operation. The "output" return
  122. // value will be populated with the request's response once the request completes
  123. // successfully.
  124. //
  125. // Use "Send" method on the returned Request to send the API call to the service.
  126. // the "output" return value is not valid until after Send returns without error.
  127. //
  128. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  129. // API call, and error handling.
  130. //
  131. // This method is useful when you want to inject custom logic or configuration
  132. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  133. //
  134. // // Example sending a request using the CompleteMultipartUploadRequest method.
  135. // req, resp := client.CompleteMultipartUploadRequest(params)
  136. //
  137. // err := req.Send()
  138. // if err == nil { // resp is now filled
  139. // fmt.Println(resp)
  140. // }
  141. //
  142. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  143. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  144. op := &request.Operation{
  145. Name: opCompleteMultipartUpload,
  146. HTTPMethod: "POST",
  147. HTTPPath: "/{Bucket}/{Key+}",
  148. }
  149. if input == nil {
  150. input = &CompleteMultipartUploadInput{}
  151. }
  152. output = &CompleteMultipartUploadOutput{}
  153. req = c.newRequest(op, input, output)
  154. return
  155. }
  156. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  157. //
  158. // Completes a multipart upload by assembling previously uploaded parts.
  159. //
  160. // You first initiate the multipart upload and then upload all parts using the
  161. // UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  162. // operation. After successfully uploading all relevant parts of an upload,
  163. // you call this action to complete the upload. Upon receiving this request,
  164. // Amazon S3 concatenates all the parts in ascending order by part number to
  165. // create a new object. In the Complete Multipart Upload request, you must provide
  166. // the parts list. You must ensure that the parts list is complete. This action
  167. // concatenates the parts that you provide in the list. For each part in the
  168. // list, you must provide the part number and the ETag value, returned after
  169. // that part was uploaded.
  170. //
  171. // Processing of a Complete Multipart Upload request could take several minutes
  172. // to complete. After Amazon S3 begins processing the request, it sends an HTTP
  173. // response header that specifies a 200 OK response. While processing is in
  174. // progress, Amazon S3 periodically sends white space characters to keep the
  175. // connection from timing out. Because a request could fail after the initial
  176. // 200 OK response has been sent, it is important that you check the response
  177. // body to determine whether the request succeeded.
  178. //
  179. // Note that if CompleteMultipartUpload fails, applications should be prepared
  180. // to retry the failed requests. For more information, see Amazon S3 Error Best
  181. // Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html).
  182. //
  183. // You cannot use Content-Type: application/x-www-form-urlencoded with Complete
  184. // Multipart Upload requests. Also, if you do not provide a Content-Type header,
  185. // CompleteMultipartUpload returns a 200 OK response.
  186. //
  187. // For more information about multipart uploads, see Uploading Objects Using
  188. // Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
  189. //
  190. // For information about permissions required to use the multipart upload API,
  191. // see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
  192. //
  193. // CompleteMultipartUpload has the following special errors:
  194. //
  195. // - Error code: EntityTooSmall Description: Your proposed upload is smaller
  196. // than the minimum allowed object size. Each part must be at least 5 MB
  197. // in size, except the last part. 400 Bad Request
  198. //
  199. // - Error code: InvalidPart Description: One or more of the specified parts
  200. // could not be found. The part might not have been uploaded, or the specified
  201. // entity tag might not have matched the part's entity tag. 400 Bad Request
  202. //
  203. // - Error code: InvalidPartOrder Description: The list of parts was not
  204. // in ascending order. The parts list must be specified in order by part
  205. // number. 400 Bad Request
  206. //
  207. // - Error code: NoSuchUpload Description: The specified multipart upload
  208. // does not exist. The upload ID might be invalid, or the multipart upload
  209. // might have been aborted or completed. 404 Not Found
  210. //
  211. // The following operations are related to CompleteMultipartUpload:
  212. //
  213. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  214. //
  215. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  216. //
  217. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  218. //
  219. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  220. //
  221. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  222. //
  223. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  224. // with awserr.Error's Code and Message methods to get detailed information about
  225. // the error.
  226. //
  227. // See the AWS API reference guide for Amazon Simple Storage Service's
  228. // API operation CompleteMultipartUpload for usage and error information.
  229. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  230. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  231. req, out := c.CompleteMultipartUploadRequest(input)
  232. return out, req.Send()
  233. }
  234. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  235. // the ability to pass a context and additional request options.
  236. //
  237. // See CompleteMultipartUpload for details on how to use this API operation.
  238. //
  239. // The context must be non-nil and will be used for request cancellation. If
  240. // the context is nil a panic will occur. In the future the SDK may create
  241. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  242. // for more information on using Contexts.
  243. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  244. req, out := c.CompleteMultipartUploadRequest(input)
  245. req.SetContext(ctx)
  246. req.ApplyOptions(opts...)
  247. return out, req.Send()
  248. }
  249. const opCopyObject = "CopyObject"
  250. // CopyObjectRequest generates a "aws/request.Request" representing the
  251. // client's request for the CopyObject operation. The "output" return
  252. // value will be populated with the request's response once the request completes
  253. // successfully.
  254. //
  255. // Use "Send" method on the returned Request to send the API call to the service.
  256. // the "output" return value is not valid until after Send returns without error.
  257. //
  258. // See CopyObject for more information on using the CopyObject
  259. // API call, and error handling.
  260. //
  261. // This method is useful when you want to inject custom logic or configuration
  262. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  263. //
  264. // // Example sending a request using the CopyObjectRequest method.
  265. // req, resp := client.CopyObjectRequest(params)
  266. //
  267. // err := req.Send()
  268. // if err == nil { // resp is now filled
  269. // fmt.Println(resp)
  270. // }
  271. //
  272. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  273. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  274. op := &request.Operation{
  275. Name: opCopyObject,
  276. HTTPMethod: "PUT",
  277. HTTPPath: "/{Bucket}/{Key+}",
  278. }
  279. if input == nil {
  280. input = &CopyObjectInput{}
  281. }
  282. output = &CopyObjectOutput{}
  283. req = c.newRequest(op, input, output)
  284. return
  285. }
  286. // CopyObject API operation for Amazon Simple Storage Service.
  287. //
  288. // Creates a copy of an object that is already stored in Amazon S3.
  289. //
  290. // You can store individual objects of up to 5 TB in Amazon S3. You create a
  291. // copy of your object up to 5 GB in size in a single atomic action using this
  292. // API. However, to copy an object greater than 5 GB, you must use the multipart
  293. // upload Upload Part - Copy (UploadPartCopy) API. For more information, see
  294. // Copy Object Using the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
  295. //
  296. // All copy requests must be authenticated. Additionally, you must have read
  297. // access to the source object and write access to the destination bucket. For
  298. // more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
  299. // Both the Region that you want to copy the object from and the Region that
  300. // you want to copy the object to must be enabled for your account.
  301. //
  302. // A copy request might return an error when Amazon S3 receives the copy request
  303. // or while Amazon S3 is copying the files. If the error occurs before the copy
  304. // action starts, you receive a standard Amazon S3 error. If the error occurs
  305. // during the copy operation, the error response is embedded in the 200 OK response.
  306. // This means that a 200 OK response can contain either a success or an error.
  307. // Design your application to parse the contents of the response and handle
  308. // it appropriately.
  309. //
  310. // If the copy is successful, you receive a response with information about
  311. // the copied object.
  312. //
  313. // If the request is an HTTP 1.1 request, the response is chunk encoded. If
  314. // it were not, it would not contain the content-length, and you would need
  315. // to read the entire body.
  316. //
  317. // The copy request charge is based on the storage class and Region that you
  318. // specify for the destination object. For pricing information, see Amazon S3
  319. // pricing (http://aws.amazon.com/s3/pricing/).
  320. //
  321. // Amazon S3 transfer acceleration does not support cross-Region copies. If
  322. // you request a cross-Region copy using a transfer acceleration endpoint, you
  323. // get a 400 Bad Request error. For more information, see Transfer Acceleration
  324. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
  325. //
  326. // # Metadata
  327. //
  328. // When copying an object, you can preserve all metadata (default) or specify
  329. // new metadata. However, the ACL is not preserved and is set to private for
  330. // the user making the request. To override the default ACL setting, specify
  331. // a new ACL when generating a copy request. For more information, see Using
  332. // ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
  333. //
  334. // To specify whether you want the object metadata copied from the source object
  335. // or replaced with metadata provided in the request, you can optionally add
  336. // the x-amz-metadata-directive header. When you grant permissions, you can
  337. // use the s3:x-amz-metadata-directive condition key to enforce certain metadata
  338. // behavior when objects are uploaded. For more information, see Specifying
  339. // Conditions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
  340. // in the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition
  341. // keys, see Actions, Resources, and Condition Keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
  342. //
  343. // x-amz-copy-source-if Headers
  344. //
  345. // To only copy an object under certain conditions, such as whether the Etag
  346. // matches or whether the object was modified before or after a specified date,
  347. // use the following request parameters:
  348. //
  349. // - x-amz-copy-source-if-match
  350. //
  351. // - x-amz-copy-source-if-none-match
  352. //
  353. // - x-amz-copy-source-if-unmodified-since
  354. //
  355. // - x-amz-copy-source-if-modified-since
  356. //
  357. // If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
  358. // headers are present in the request and evaluate as follows, Amazon S3 returns
  359. // 200 OK and copies the data:
  360. //
  361. // - x-amz-copy-source-if-match condition evaluates to true
  362. //
  363. // - x-amz-copy-source-if-unmodified-since condition evaluates to false
  364. //
  365. // If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
  366. // headers are present in the request and evaluate as follows, Amazon S3 returns
  367. // the 412 Precondition Failed response code:
  368. //
  369. // - x-amz-copy-source-if-none-match condition evaluates to false
  370. //
  371. // - x-amz-copy-source-if-modified-since condition evaluates to true
  372. //
  373. // All headers with the x-amz- prefix, including x-amz-copy-source, must be
  374. // signed.
  375. //
  376. // # Server-side encryption
  377. //
  378. // When you perform a CopyObject operation, you can optionally use the appropriate
  379. // encryption-related headers to encrypt the object using server-side encryption
  380. // with Amazon Web Services managed encryption keys (SSE-S3 or SSE-KMS) or a
  381. // customer-provided encryption key. With server-side encryption, Amazon S3
  382. // encrypts your data as it writes it to disks in its data centers and decrypts
  383. // the data when you access it. For more information about server-side encryption,
  384. // see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
  385. //
  386. // If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
  387. // object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
  388. // in the Amazon S3 User Guide.
  389. //
  390. // # Access Control List (ACL)-Specific Request Headers
  391. //
  392. // When copying an object, you can optionally use headers to grant ACL-based
  393. // permissions. By default, all objects are private. Only the owner has full
  394. // access control. When adding a new object, you can grant permissions to individual
  395. // Amazon Web Services accounts or to predefined groups defined by Amazon S3.
  396. // These permissions are then added to the ACL on the object. For more information,
  397. // see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
  398. // and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
  399. //
  400. // If the bucket that you're copying objects to uses the bucket owner enforced
  401. // setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
  402. // Buckets that use this setting only accept PUT requests that don't specify
  403. // an ACL or PUT requests that specify bucket owner full control ACLs, such
  404. // as the bucket-owner-full-control canned ACL or an equivalent form of this
  405. // ACL expressed in the XML format.
  406. //
  407. // For more information, see Controlling ownership of objects and disabling
  408. // ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  409. // in the Amazon S3 User Guide.
  410. //
  411. // If your bucket uses the bucket owner enforced setting for Object Ownership,
  412. // all objects written to the bucket by any account will be owned by the bucket
  413. // owner.
  414. //
  415. // # Checksums
  416. //
  417. // When copying an object, if it has a checksum, that checksum will be copied
  418. // to the new object by default. When you copy the object over, you may optionally
  419. // specify a different checksum algorithm to use with the x-amz-checksum-algorithm
  420. // header.
  421. //
  422. // # Storage Class Options
  423. //
  424. // You can use the CopyObject action to change the storage class of an object
  425. // that is already stored in Amazon S3 using the StorageClass parameter. For
  426. // more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
  427. // in the Amazon S3 User Guide.
  428. //
  429. // # Versioning
  430. //
  431. // By default, x-amz-copy-source identifies the current version of an object
  432. // to copy. If the current version is a delete marker, Amazon S3 behaves as
  433. // if the object was deleted. To copy a different version, use the versionId
  434. // subresource.
  435. //
  436. // If you enable versioning on the target bucket, Amazon S3 generates a unique
  437. // version ID for the object being copied. This version ID is different from
  438. // the version ID of the source object. Amazon S3 returns the version ID of
  439. // the copied object in the x-amz-version-id response header in the response.
  440. //
  441. // If you do not enable versioning or suspend it on the target bucket, the version
  442. // ID that Amazon S3 generates is always null.
  443. //
  444. // If the source object's storage class is GLACIER, you must restore a copy
  445. // of this object before you can use it as a source object for the copy operation.
  446. // For more information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
  447. //
  448. // The following operations are related to CopyObject:
  449. //
  450. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  451. //
  452. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  453. //
  454. // For more information, see Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
  455. //
  456. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  457. // with awserr.Error's Code and Message methods to get detailed information about
  458. // the error.
  459. //
  460. // See the AWS API reference guide for Amazon Simple Storage Service's
  461. // API operation CopyObject for usage and error information.
  462. //
  463. // Returned Error Codes:
  464. // - ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  465. // The source object of the COPY action is not in the active tier and is only
  466. // stored in Amazon S3 Glacier.
  467. //
  468. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  469. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  470. req, out := c.CopyObjectRequest(input)
  471. return out, req.Send()
  472. }
  473. // CopyObjectWithContext is the same as CopyObject with the addition of
  474. // the ability to pass a context and additional request options.
  475. //
  476. // See CopyObject for details on how to use this API operation.
  477. //
  478. // The context must be non-nil and will be used for request cancellation. If
  479. // the context is nil a panic will occur. In the future the SDK may create
  480. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  481. // for more information on using Contexts.
  482. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  483. req, out := c.CopyObjectRequest(input)
  484. req.SetContext(ctx)
  485. req.ApplyOptions(opts...)
  486. return out, req.Send()
  487. }
  488. const opCreateBucket = "CreateBucket"
  489. // CreateBucketRequest generates a "aws/request.Request" representing the
  490. // client's request for the CreateBucket operation. The "output" return
  491. // value will be populated with the request's response once the request completes
  492. // successfully.
  493. //
  494. // Use "Send" method on the returned Request to send the API call to the service.
  495. // the "output" return value is not valid until after Send returns without error.
  496. //
  497. // See CreateBucket for more information on using the CreateBucket
  498. // API call, and error handling.
  499. //
  500. // This method is useful when you want to inject custom logic or configuration
  501. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  502. //
  503. // // Example sending a request using the CreateBucketRequest method.
  504. // req, resp := client.CreateBucketRequest(params)
  505. //
  506. // err := req.Send()
  507. // if err == nil { // resp is now filled
  508. // fmt.Println(resp)
  509. // }
  510. //
  511. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  512. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  513. op := &request.Operation{
  514. Name: opCreateBucket,
  515. HTTPMethod: "PUT",
  516. HTTPPath: "/{Bucket}",
  517. }
  518. if input == nil {
  519. input = &CreateBucketInput{}
  520. }
  521. output = &CreateBucketOutput{}
  522. req = c.newRequest(op, input, output)
  523. return
  524. }
  525. // CreateBucket API operation for Amazon Simple Storage Service.
  526. //
  527. // Creates a new S3 bucket. To create a bucket, you must register with Amazon
  528. // S3 and have a valid Amazon Web Services Access Key ID to authenticate requests.
  529. // Anonymous requests are never allowed to create buckets. By creating the bucket,
  530. // you become the bucket owner.
  531. //
  532. // Not every string is an acceptable bucket name. For information about bucket
  533. // naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
  534. //
  535. // If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
  536. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html).
  537. //
  538. // By default, the bucket is created in the US East (N. Virginia) Region. You
  539. // can optionally specify a Region in the request body. You might choose a Region
  540. // to optimize latency, minimize costs, or address regulatory requirements.
  541. // For example, if you reside in Europe, you will probably find it advantageous
  542. // to create buckets in the Europe (Ireland) Region. For more information, see
  543. // Accessing a bucket (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
  544. //
  545. // If you send your create bucket request to the s3.amazonaws.com endpoint,
  546. // the request goes to the us-east-1 Region. Accordingly, the signature calculations
  547. // in Signature Version 4 must use us-east-1 as the Region, even if the location
  548. // constraint in the request specifies another Region where the bucket is to
  549. // be created. If you create a bucket in a Region other than US East (N. Virginia),
  550. // your application must be able to handle 307 redirect. For more information,
  551. // see Virtual hosting of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html).
  552. //
  553. // Access control lists (ACLs)
  554. //
  555. // When creating a bucket using this operation, you can optionally configure
  556. // the bucket ACL to specify the accounts or groups that should be granted specific
  557. // permissions on the bucket.
  558. //
  559. // If your CreateBucket request sets bucket owner enforced for S3 Object Ownership
  560. // and specifies a bucket ACL that provides access to an external Amazon Web
  561. // Services account, your request fails with a 400 error and returns the InvalidBucketAclWithObjectOwnership
  562. // error code. For more information, see Controlling object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  563. // in the Amazon S3 User Guide.
  564. //
  565. // There are two ways to grant the appropriate permissions using the request
  566. // headers.
  567. //
  568. // - Specify a canned ACL using the x-amz-acl request header. Amazon S3 supports
  569. // a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
  570. // predefined set of grantees and permissions. For more information, see
  571. // Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  572. //
  573. // - Specify access permissions explicitly using the x-amz-grant-read, x-amz-grant-write,
  574. // x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
  575. // headers. These headers map to the set of permissions Amazon S3 supports
  576. // in an ACL. For more information, see Access control list (ACL) overview
  577. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html).
  578. // You specify each grantee as a type=value pair, where the type is one of
  579. // the following: id – if the value specified is the canonical user ID
  580. // of an Amazon Web Services account uri – if you are granting permissions
  581. // to a predefined group emailAddress – if the value specified is the email
  582. // address of an Amazon Web Services account Using email addresses to specify
  583. // a grantee is only supported in the following Amazon Web Services Regions:
  584. // US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
  585. // (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
  586. // South America (São Paulo) For a list of all the Amazon S3 supported Regions
  587. // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  588. // in the Amazon Web Services General Reference. For example, the following
  589. // x-amz-grant-read header grants the Amazon Web Services accounts identified
  590. // by account IDs permissions to read object data and its metadata: x-amz-grant-read:
  591. // id="11112222333", id="444455556666"
  592. //
  593. // You can use either a canned ACL or specify access permissions explicitly.
  594. // You cannot do both.
  595. //
  596. // # Permissions
  597. //
  598. // In addition to s3:CreateBucket, the following permissions are required when
  599. // your CreateBucket includes specific headers:
  600. //
  601. // - ACLs - If your CreateBucket request specifies ACL permissions and the
  602. // ACL is public-read, public-read-write, authenticated-read, or if you specify
  603. // access permissions explicitly through any other ACL, both s3:CreateBucket
  604. // and s3:PutBucketAcl permissions are needed. If the ACL the CreateBucket
  605. // request is private or doesn't specify any ACLs, only s3:CreateBucket permission
  606. // is needed.
  607. //
  608. // - Object Lock - If ObjectLockEnabledForBucket is set to true in your CreateBucket
  609. // request, s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning
  610. // permissions are required.
  611. //
  612. // - S3 Object Ownership - If your CreateBucket request includes the the
  613. // x-amz-object-ownership header, s3:PutBucketOwnershipControls permission
  614. // is required.
  615. //
  616. // The following operations are related to CreateBucket:
  617. //
  618. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  619. //
  620. // - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
  621. //
  622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  623. // with awserr.Error's Code and Message methods to get detailed information about
  624. // the error.
  625. //
  626. // See the AWS API reference guide for Amazon Simple Storage Service's
  627. // API operation CreateBucket for usage and error information.
  628. //
  629. // Returned Error Codes:
  630. //
  631. // - ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  632. // The requested bucket name is not available. The bucket namespace is shared
  633. // by all users of the system. Select a different name and try again.
  634. //
  635. // - ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  636. // The bucket you tried to create already exists, and you own it. Amazon S3
  637. // returns this error in all Amazon Web Services Regions except in the North
  638. // Virginia Region. For legacy compatibility, if you re-create an existing bucket
  639. // that you already own in the North Virginia Region, Amazon S3 returns 200
  640. // OK and resets the bucket access control lists (ACLs).
  641. //
  642. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  643. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  644. req, out := c.CreateBucketRequest(input)
  645. return out, req.Send()
  646. }
  647. // CreateBucketWithContext is the same as CreateBucket with the addition of
  648. // the ability to pass a context and additional request options.
  649. //
  650. // See CreateBucket for details on how to use this API operation.
  651. //
  652. // The context must be non-nil and will be used for request cancellation. If
  653. // the context is nil a panic will occur. In the future the SDK may create
  654. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  655. // for more information on using Contexts.
  656. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  657. req, out := c.CreateBucketRequest(input)
  658. req.SetContext(ctx)
  659. req.ApplyOptions(opts...)
  660. return out, req.Send()
  661. }
  662. const opCreateMultipartUpload = "CreateMultipartUpload"
  663. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  664. // client's request for the CreateMultipartUpload operation. The "output" return
  665. // value will be populated with the request's response once the request completes
  666. // successfully.
  667. //
  668. // Use "Send" method on the returned Request to send the API call to the service.
  669. // the "output" return value is not valid until after Send returns without error.
  670. //
  671. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  672. // API call, and error handling.
  673. //
  674. // This method is useful when you want to inject custom logic or configuration
  675. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  676. //
  677. // // Example sending a request using the CreateMultipartUploadRequest method.
  678. // req, resp := client.CreateMultipartUploadRequest(params)
  679. //
  680. // err := req.Send()
  681. // if err == nil { // resp is now filled
  682. // fmt.Println(resp)
  683. // }
  684. //
  685. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  686. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  687. op := &request.Operation{
  688. Name: opCreateMultipartUpload,
  689. HTTPMethod: "POST",
  690. HTTPPath: "/{Bucket}/{Key+}?uploads",
  691. }
  692. if input == nil {
  693. input = &CreateMultipartUploadInput{}
  694. }
  695. output = &CreateMultipartUploadOutput{}
  696. req = c.newRequest(op, input, output)
  697. return
  698. }
  699. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  700. //
  701. // This action initiates a multipart upload and returns an upload ID. This upload
  702. // ID is used to associate all of the parts in the specific multipart upload.
  703. // You specify this upload ID in each of your subsequent upload part requests
  704. // (see UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)).
  705. // You also include this upload ID in the final request to either complete or
  706. // abort the multipart upload request.
  707. //
  708. // For more information about multipart uploads, see Multipart Upload Overview
  709. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html).
  710. //
  711. // If you have configured a lifecycle rule to abort incomplete multipart uploads,
  712. // the upload must complete within the number of days specified in the bucket
  713. // lifecycle configuration. Otherwise, the incomplete multipart upload becomes
  714. // eligible for an abort action and Amazon S3 aborts the multipart upload. For
  715. // more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  716. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
  717. //
  718. // For information about the permissions required to use the multipart upload
  719. // API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
  720. //
  721. // For request signing, multipart upload is just a series of regular requests.
  722. // You initiate a multipart upload, send one or more requests to upload parts,
  723. // and then complete the multipart upload process. You sign each request individually.
  724. // There is nothing special about signing multipart upload requests. For more
  725. // information about signing, see Authenticating Requests (Amazon Web Services
  726. // Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
  727. //
  728. // After you initiate a multipart upload and upload one or more parts, to stop
  729. // being charged for storing the uploaded parts, you must either complete or
  730. // abort the multipart upload. Amazon S3 frees up the space used to store the
  731. // parts and stop charging you for storing them only after you either complete
  732. // or abort a multipart upload.
  733. //
  734. // You can optionally request server-side encryption. For server-side encryption,
  735. // Amazon S3 encrypts your data as it writes it to disks in its data centers
  736. // and decrypts it when you access it. You can provide your own encryption key,
  737. // or use Amazon Web Services KMS keys or Amazon S3-managed encryption keys.
  738. // If you choose to provide your own encryption key, the request headers you
  739. // provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  740. // and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
  741. // requests must match the headers you used in the request to initiate the upload
  742. // by using CreateMultipartUpload.
  743. //
  744. // To perform a multipart upload with encryption using an Amazon Web Services
  745. // KMS key, the requester must have permission to the kms:Decrypt and kms:GenerateDataKey*
  746. // actions on the key. These permissions are required because Amazon S3 must
  747. // decrypt and read data from the encrypted file parts before it completes the
  748. // multipart upload. For more information, see Multipart upload API and permissions
  749. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
  750. // in the Amazon S3 User Guide.
  751. //
  752. // If your Identity and Access Management (IAM) user or role is in the same
  753. // Amazon Web Services account as the KMS key, then you must have these permissions
  754. // on the key policy. If your IAM user or role belongs to a different account
  755. // than the key, then you must have the permissions on both the key policy and
  756. // your IAM user or role.
  757. //
  758. // For more information, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
  759. //
  760. // # Access Permissions
  761. //
  762. // When copying an object, you can optionally specify the accounts or groups
  763. // that should be granted specific permissions on the new object. There are
  764. // two ways to grant the permissions using the request headers:
  765. //
  766. // - Specify a canned ACL with the x-amz-acl request header. For more information,
  767. // see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  768. //
  769. // - Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
  770. // x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters
  771. // map to the set of permissions that Amazon S3 supports in an ACL. For more
  772. // information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
  773. //
  774. // You can use either a canned ACL or specify access permissions explicitly.
  775. // You cannot do both.
  776. //
  777. // # Server-Side- Encryption-Specific Request Headers
  778. //
  779. // You can optionally tell Amazon S3 to encrypt data at rest using server-side
  780. // encryption. Server-side encryption is for data encryption at rest. Amazon
  781. // S3 encrypts your data as it writes it to disks in its data centers and decrypts
  782. // it when you access it. The option you use depends on whether you want to
  783. // use Amazon Web Services managed encryption keys or provide your own encryption
  784. // key.
  785. //
  786. // - Use encryption keys managed by Amazon S3 or customer managed key stored
  787. // in Amazon Web Services Key Management Service (Amazon Web Services KMS)
  788. // – If you want Amazon Web Services to manage the keys used to encrypt
  789. // data, specify the following headers in the request. x-amz-server-side-encryption
  790. // x-amz-server-side-encryption-aws-kms-key-id x-amz-server-side-encryption-context
  791. // If you specify x-amz-server-side-encryption:aws:kms, but don't provide
  792. // x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon
  793. // Web Services managed key in Amazon Web Services KMS to protect the data.
  794. // All GET and PUT requests for an object protected by Amazon Web Services
  795. // KMS fail if you don't make them with SSL or by using SigV4. For more information
  796. // about server-side encryption with KMS key (SSE-KMS), see Protecting Data
  797. // Using Server-Side Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
  798. //
  799. // - Use customer-provided encryption keys – If you want to manage your
  800. // own encryption keys, provide all the following headers in the request.
  801. // x-amz-server-side-encryption-customer-algorithm x-amz-server-side-encryption-customer-key
  802. // x-amz-server-side-encryption-customer-key-MD5 For more information about
  803. // server-side encryption with KMS keys (SSE-KMS), see Protecting Data Using
  804. // Server-Side Encryption with KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
  805. //
  806. // # Access-Control-List (ACL)-Specific Request Headers
  807. //
  808. // You also can use the following access control–related headers with this
  809. // operation. By default, all objects are private. Only the owner has full access
  810. // control. When adding a new object, you can grant permissions to individual
  811. // Amazon Web Services accounts or to predefined groups defined by Amazon S3.
  812. // These permissions are then added to the access control list (ACL) on the
  813. // object. For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
  814. // With this operation, you can grant access permissions using one of the following
  815. // two methods:
  816. //
  817. // - Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined
  818. // ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees
  819. // and permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  820. //
  821. // - Specify access permissions explicitly — To explicitly grant access
  822. // permissions to specific Amazon Web Services accounts or groups, use the
  823. // following headers. Each header maps to specific permissions that Amazon
  824. // S3 supports in an ACL. For more information, see Access Control List (ACL)
  825. // Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
  826. // In the header, you specify a list of grantees who get the specific permission.
  827. // To grant permissions explicitly, use: x-amz-grant-read x-amz-grant-write
  828. // x-amz-grant-read-acp x-amz-grant-write-acp x-amz-grant-full-control You
  829. // specify each grantee as a type=value pair, where the type is one of the
  830. // following: id – if the value specified is the canonical user ID of an
  831. // Amazon Web Services account uri – if you are granting permissions to
  832. // a predefined group emailAddress – if the value specified is the email
  833. // address of an Amazon Web Services account Using email addresses to specify
  834. // a grantee is only supported in the following Amazon Web Services Regions:
  835. // US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
  836. // (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
  837. // South America (São Paulo) For a list of all the Amazon S3 supported Regions
  838. // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  839. // in the Amazon Web Services General Reference. For example, the following
  840. // x-amz-grant-read header grants the Amazon Web Services accounts identified
  841. // by account IDs permissions to read object data and its metadata: x-amz-grant-read:
  842. // id="11112222333", id="444455556666"
  843. //
  844. // The following operations are related to CreateMultipartUpload:
  845. //
  846. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  847. //
  848. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  849. //
  850. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  851. //
  852. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  853. //
  854. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  855. //
  856. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  857. // with awserr.Error's Code and Message methods to get detailed information about
  858. // the error.
  859. //
  860. // See the AWS API reference guide for Amazon Simple Storage Service's
  861. // API operation CreateMultipartUpload for usage and error information.
  862. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  863. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  864. req, out := c.CreateMultipartUploadRequest(input)
  865. return out, req.Send()
  866. }
  867. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  868. // the ability to pass a context and additional request options.
  869. //
  870. // See CreateMultipartUpload for details on how to use this API operation.
  871. //
  872. // The context must be non-nil and will be used for request cancellation. If
  873. // the context is nil a panic will occur. In the future the SDK may create
  874. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  875. // for more information on using Contexts.
  876. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  877. req, out := c.CreateMultipartUploadRequest(input)
  878. req.SetContext(ctx)
  879. req.ApplyOptions(opts...)
  880. return out, req.Send()
  881. }
  882. const opDeleteBucket = "DeleteBucket"
  883. // DeleteBucketRequest generates a "aws/request.Request" representing the
  884. // client's request for the DeleteBucket operation. The "output" return
  885. // value will be populated with the request's response once the request completes
  886. // successfully.
  887. //
  888. // Use "Send" method on the returned Request to send the API call to the service.
  889. // the "output" return value is not valid until after Send returns without error.
  890. //
  891. // See DeleteBucket for more information on using the DeleteBucket
  892. // API call, and error handling.
  893. //
  894. // This method is useful when you want to inject custom logic or configuration
  895. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  896. //
  897. // // Example sending a request using the DeleteBucketRequest method.
  898. // req, resp := client.DeleteBucketRequest(params)
  899. //
  900. // err := req.Send()
  901. // if err == nil { // resp is now filled
  902. // fmt.Println(resp)
  903. // }
  904. //
  905. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  906. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  907. op := &request.Operation{
  908. Name: opDeleteBucket,
  909. HTTPMethod: "DELETE",
  910. HTTPPath: "/{Bucket}",
  911. }
  912. if input == nil {
  913. input = &DeleteBucketInput{}
  914. }
  915. output = &DeleteBucketOutput{}
  916. req = c.newRequest(op, input, output)
  917. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  918. return
  919. }
  920. // DeleteBucket API operation for Amazon Simple Storage Service.
  921. //
  922. // Deletes the S3 bucket. All objects (including all object versions and delete
  923. // markers) in the bucket must be deleted before the bucket itself can be deleted.
  924. //
  925. // Related Resources
  926. //
  927. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  928. //
  929. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  930. //
  931. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  932. // with awserr.Error's Code and Message methods to get detailed information about
  933. // the error.
  934. //
  935. // See the AWS API reference guide for Amazon Simple Storage Service's
  936. // API operation DeleteBucket for usage and error information.
  937. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  938. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  939. req, out := c.DeleteBucketRequest(input)
  940. return out, req.Send()
  941. }
  942. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  943. // the ability to pass a context and additional request options.
  944. //
  945. // See DeleteBucket for details on how to use this API operation.
  946. //
  947. // The context must be non-nil and will be used for request cancellation. If
  948. // the context is nil a panic will occur. In the future the SDK may create
  949. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  950. // for more information on using Contexts.
  951. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  952. req, out := c.DeleteBucketRequest(input)
  953. req.SetContext(ctx)
  954. req.ApplyOptions(opts...)
  955. return out, req.Send()
  956. }
  957. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  958. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  959. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  960. // value will be populated with the request's response once the request completes
  961. // successfully.
  962. //
  963. // Use "Send" method on the returned Request to send the API call to the service.
  964. // the "output" return value is not valid until after Send returns without error.
  965. //
  966. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  967. // API call, and error handling.
  968. //
  969. // This method is useful when you want to inject custom logic or configuration
  970. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  971. //
  972. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  973. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  974. //
  975. // err := req.Send()
  976. // if err == nil { // resp is now filled
  977. // fmt.Println(resp)
  978. // }
  979. //
  980. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  981. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  982. op := &request.Operation{
  983. Name: opDeleteBucketAnalyticsConfiguration,
  984. HTTPMethod: "DELETE",
  985. HTTPPath: "/{Bucket}?analytics",
  986. }
  987. if input == nil {
  988. input = &DeleteBucketAnalyticsConfigurationInput{}
  989. }
  990. output = &DeleteBucketAnalyticsConfigurationOutput{}
  991. req = c.newRequest(op, input, output)
  992. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  993. return
  994. }
  995. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  996. //
  997. // Deletes an analytics configuration for the bucket (specified by the analytics
  998. // configuration ID).
  999. //
  1000. // To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
  1001. // action. The bucket owner has this permission by default. The bucket owner
  1002. // can grant this permission to others. For more information about permissions,
  1003. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  1004. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  1005. //
  1006. // For information about the Amazon S3 analytics feature, see Amazon S3 Analytics
  1007. // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
  1008. //
  1009. // The following operations are related to DeleteBucketAnalyticsConfiguration:
  1010. //
  1011. // - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
  1012. //
  1013. // - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
  1014. //
  1015. // - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
  1016. //
  1017. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1018. // with awserr.Error's Code and Message methods to get detailed information about
  1019. // the error.
  1020. //
  1021. // See the AWS API reference guide for Amazon Simple Storage Service's
  1022. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  1023. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  1024. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  1025. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  1026. return out, req.Send()
  1027. }
  1028. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  1029. // the ability to pass a context and additional request options.
  1030. //
  1031. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  1032. //
  1033. // The context must be non-nil and will be used for request cancellation. If
  1034. // the context is nil a panic will occur. In the future the SDK may create
  1035. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1036. // for more information on using Contexts.
  1037. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  1038. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  1039. req.SetContext(ctx)
  1040. req.ApplyOptions(opts...)
  1041. return out, req.Send()
  1042. }
  1043. const opDeleteBucketCors = "DeleteBucketCors"
  1044. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  1045. // client's request for the DeleteBucketCors operation. The "output" return
  1046. // value will be populated with the request's response once the request completes
  1047. // successfully.
  1048. //
  1049. // Use "Send" method on the returned Request to send the API call to the service.
  1050. // the "output" return value is not valid until after Send returns without error.
  1051. //
  1052. // See DeleteBucketCors for more information on using the DeleteBucketCors
  1053. // API call, and error handling.
  1054. //
  1055. // This method is useful when you want to inject custom logic or configuration
  1056. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1057. //
  1058. // // Example sending a request using the DeleteBucketCorsRequest method.
  1059. // req, resp := client.DeleteBucketCorsRequest(params)
  1060. //
  1061. // err := req.Send()
  1062. // if err == nil { // resp is now filled
  1063. // fmt.Println(resp)
  1064. // }
  1065. //
  1066. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  1067. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  1068. op := &request.Operation{
  1069. Name: opDeleteBucketCors,
  1070. HTTPMethod: "DELETE",
  1071. HTTPPath: "/{Bucket}?cors",
  1072. }
  1073. if input == nil {
  1074. input = &DeleteBucketCorsInput{}
  1075. }
  1076. output = &DeleteBucketCorsOutput{}
  1077. req = c.newRequest(op, input, output)
  1078. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1079. return
  1080. }
  1081. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  1082. //
  1083. // Deletes the cors configuration information set for the bucket.
  1084. //
  1085. // To use this operation, you must have permission to perform the s3:PutBucketCORS
  1086. // action. The bucket owner has this permission by default and can grant this
  1087. // permission to others.
  1088. //
  1089. // For information about cors, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
  1090. // in the Amazon S3 User Guide.
  1091. //
  1092. // Related Resources:
  1093. //
  1094. // - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
  1095. //
  1096. // - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
  1097. //
  1098. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1099. // with awserr.Error's Code and Message methods to get detailed information about
  1100. // the error.
  1101. //
  1102. // See the AWS API reference guide for Amazon Simple Storage Service's
  1103. // API operation DeleteBucketCors for usage and error information.
  1104. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  1105. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  1106. req, out := c.DeleteBucketCorsRequest(input)
  1107. return out, req.Send()
  1108. }
  1109. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  1110. // the ability to pass a context and additional request options.
  1111. //
  1112. // See DeleteBucketCors for details on how to use this API operation.
  1113. //
  1114. // The context must be non-nil and will be used for request cancellation. If
  1115. // the context is nil a panic will occur. In the future the SDK may create
  1116. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1117. // for more information on using Contexts.
  1118. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  1119. req, out := c.DeleteBucketCorsRequest(input)
  1120. req.SetContext(ctx)
  1121. req.ApplyOptions(opts...)
  1122. return out, req.Send()
  1123. }
  1124. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  1125. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  1126. // client's request for the DeleteBucketEncryption operation. The "output" return
  1127. // value will be populated with the request's response once the request completes
  1128. // successfully.
  1129. //
  1130. // Use "Send" method on the returned Request to send the API call to the service.
  1131. // the "output" return value is not valid until after Send returns without error.
  1132. //
  1133. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  1134. // API call, and error handling.
  1135. //
  1136. // This method is useful when you want to inject custom logic or configuration
  1137. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1138. //
  1139. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  1140. // req, resp := client.DeleteBucketEncryptionRequest(params)
  1141. //
  1142. // err := req.Send()
  1143. // if err == nil { // resp is now filled
  1144. // fmt.Println(resp)
  1145. // }
  1146. //
  1147. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  1148. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  1149. op := &request.Operation{
  1150. Name: opDeleteBucketEncryption,
  1151. HTTPMethod: "DELETE",
  1152. HTTPPath: "/{Bucket}?encryption",
  1153. }
  1154. if input == nil {
  1155. input = &DeleteBucketEncryptionInput{}
  1156. }
  1157. output = &DeleteBucketEncryptionOutput{}
  1158. req = c.newRequest(op, input, output)
  1159. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1160. return
  1161. }
  1162. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  1163. //
  1164. // This implementation of the DELETE action removes default encryption from
  1165. // the bucket. For information about the Amazon S3 default encryption feature,
  1166. // see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
  1167. // in the Amazon S3 User Guide.
  1168. //
  1169. // To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
  1170. // action. The bucket owner has this permission by default. The bucket owner
  1171. // can grant this permission to others. For more information about permissions,
  1172. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  1173. // and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  1174. // in the Amazon S3 User Guide.
  1175. //
  1176. // Related Resources
  1177. //
  1178. // - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
  1179. //
  1180. // - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
  1181. //
  1182. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1183. // with awserr.Error's Code and Message methods to get detailed information about
  1184. // the error.
  1185. //
  1186. // See the AWS API reference guide for Amazon Simple Storage Service's
  1187. // API operation DeleteBucketEncryption for usage and error information.
  1188. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  1189. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  1190. req, out := c.DeleteBucketEncryptionRequest(input)
  1191. return out, req.Send()
  1192. }
  1193. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  1194. // the ability to pass a context and additional request options.
  1195. //
  1196. // See DeleteBucketEncryption for details on how to use this API operation.
  1197. //
  1198. // The context must be non-nil and will be used for request cancellation. If
  1199. // the context is nil a panic will occur. In the future the SDK may create
  1200. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1201. // for more information on using Contexts.
  1202. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  1203. req, out := c.DeleteBucketEncryptionRequest(input)
  1204. req.SetContext(ctx)
  1205. req.ApplyOptions(opts...)
  1206. return out, req.Send()
  1207. }
  1208. const opDeleteBucketIntelligentTieringConfiguration = "DeleteBucketIntelligentTieringConfiguration"
  1209. // DeleteBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
  1210. // client's request for the DeleteBucketIntelligentTieringConfiguration operation. The "output" return
  1211. // value will be populated with the request's response once the request completes
  1212. // successfully.
  1213. //
  1214. // Use "Send" method on the returned Request to send the API call to the service.
  1215. // the "output" return value is not valid until after Send returns without error.
  1216. //
  1217. // See DeleteBucketIntelligentTieringConfiguration for more information on using the DeleteBucketIntelligentTieringConfiguration
  1218. // API call, and error handling.
  1219. //
  1220. // This method is useful when you want to inject custom logic or configuration
  1221. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1222. //
  1223. // // Example sending a request using the DeleteBucketIntelligentTieringConfigurationRequest method.
  1224. // req, resp := client.DeleteBucketIntelligentTieringConfigurationRequest(params)
  1225. //
  1226. // err := req.Send()
  1227. // if err == nil { // resp is now filled
  1228. // fmt.Println(resp)
  1229. // }
  1230. //
  1231. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
  1232. func (c *S3) DeleteBucketIntelligentTieringConfigurationRequest(input *DeleteBucketIntelligentTieringConfigurationInput) (req *request.Request, output *DeleteBucketIntelligentTieringConfigurationOutput) {
  1233. op := &request.Operation{
  1234. Name: opDeleteBucketIntelligentTieringConfiguration,
  1235. HTTPMethod: "DELETE",
  1236. HTTPPath: "/{Bucket}?intelligent-tiering",
  1237. }
  1238. if input == nil {
  1239. input = &DeleteBucketIntelligentTieringConfigurationInput{}
  1240. }
  1241. output = &DeleteBucketIntelligentTieringConfigurationOutput{}
  1242. req = c.newRequest(op, input, output)
  1243. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1244. return
  1245. }
  1246. // DeleteBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
  1247. //
  1248. // Deletes the S3 Intelligent-Tiering configuration from the specified bucket.
  1249. //
  1250. // The S3 Intelligent-Tiering storage class is designed to optimize storage
  1251. // costs by automatically moving data to the most cost-effective storage access
  1252. // tier, without performance impact or operational overhead. S3 Intelligent-Tiering
  1253. // delivers automatic cost savings in three low latency and high throughput
  1254. // access tiers. To get the lowest storage cost on data that can be accessed
  1255. // in minutes to hours, you can choose to activate additional archiving capabilities.
  1256. //
  1257. // The S3 Intelligent-Tiering storage class is the ideal storage class for data
  1258. // with unknown, changing, or unpredictable access patterns, independent of
  1259. // object size or retention period. If the size of an object is less than 128
  1260. // KB, it is not monitored and not eligible for auto-tiering. Smaller objects
  1261. // can be stored, but they are always charged at the Frequent Access tier rates
  1262. // in the S3 Intelligent-Tiering storage class.
  1263. //
  1264. // For more information, see Storage class for automatically optimizing frequently
  1265. // and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
  1266. //
  1267. // Operations related to DeleteBucketIntelligentTieringConfiguration include:
  1268. //
  1269. // - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
  1270. //
  1271. // - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
  1272. //
  1273. // - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
  1274. //
  1275. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1276. // with awserr.Error's Code and Message methods to get detailed information about
  1277. // the error.
  1278. //
  1279. // See the AWS API reference guide for Amazon Simple Storage Service's
  1280. // API operation DeleteBucketIntelligentTieringConfiguration for usage and error information.
  1281. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
  1282. func (c *S3) DeleteBucketIntelligentTieringConfiguration(input *DeleteBucketIntelligentTieringConfigurationInput) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
  1283. req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
  1284. return out, req.Send()
  1285. }
  1286. // DeleteBucketIntelligentTieringConfigurationWithContext is the same as DeleteBucketIntelligentTieringConfiguration with the addition of
  1287. // the ability to pass a context and additional request options.
  1288. //
  1289. // See DeleteBucketIntelligentTieringConfiguration for details on how to use this API operation.
  1290. //
  1291. // The context must be non-nil and will be used for request cancellation. If
  1292. // the context is nil a panic will occur. In the future the SDK may create
  1293. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1294. // for more information on using Contexts.
  1295. func (c *S3) DeleteBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *DeleteBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
  1296. req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
  1297. req.SetContext(ctx)
  1298. req.ApplyOptions(opts...)
  1299. return out, req.Send()
  1300. }
  1301. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  1302. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1303. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  1304. // value will be populated with the request's response once the request completes
  1305. // successfully.
  1306. //
  1307. // Use "Send" method on the returned Request to send the API call to the service.
  1308. // the "output" return value is not valid until after Send returns without error.
  1309. //
  1310. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  1311. // API call, and error handling.
  1312. //
  1313. // This method is useful when you want to inject custom logic or configuration
  1314. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1315. //
  1316. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  1317. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  1318. //
  1319. // err := req.Send()
  1320. // if err == nil { // resp is now filled
  1321. // fmt.Println(resp)
  1322. // }
  1323. //
  1324. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  1325. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  1326. op := &request.Operation{
  1327. Name: opDeleteBucketInventoryConfiguration,
  1328. HTTPMethod: "DELETE",
  1329. HTTPPath: "/{Bucket}?inventory",
  1330. }
  1331. if input == nil {
  1332. input = &DeleteBucketInventoryConfigurationInput{}
  1333. }
  1334. output = &DeleteBucketInventoryConfigurationOutput{}
  1335. req = c.newRequest(op, input, output)
  1336. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1337. return
  1338. }
  1339. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1340. //
  1341. // Deletes an inventory configuration (identified by the inventory ID) from
  1342. // the bucket.
  1343. //
  1344. // To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
  1345. // action. The bucket owner has this permission by default. The bucket owner
  1346. // can grant this permission to others. For more information about permissions,
  1347. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  1348. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  1349. //
  1350. // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
  1351. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
  1352. //
  1353. // Operations related to DeleteBucketInventoryConfiguration include:
  1354. //
  1355. // - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
  1356. //
  1357. // - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
  1358. //
  1359. // - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
  1360. //
  1361. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1362. // with awserr.Error's Code and Message methods to get detailed information about
  1363. // the error.
  1364. //
  1365. // See the AWS API reference guide for Amazon Simple Storage Service's
  1366. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  1367. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  1368. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  1369. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  1370. return out, req.Send()
  1371. }
  1372. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  1373. // the ability to pass a context and additional request options.
  1374. //
  1375. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  1376. //
  1377. // The context must be non-nil and will be used for request cancellation. If
  1378. // the context is nil a panic will occur. In the future the SDK may create
  1379. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1380. // for more information on using Contexts.
  1381. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  1382. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  1383. req.SetContext(ctx)
  1384. req.ApplyOptions(opts...)
  1385. return out, req.Send()
  1386. }
  1387. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  1388. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  1389. // client's request for the DeleteBucketLifecycle operation. The "output" return
  1390. // value will be populated with the request's response once the request completes
  1391. // successfully.
  1392. //
  1393. // Use "Send" method on the returned Request to send the API call to the service.
  1394. // the "output" return value is not valid until after Send returns without error.
  1395. //
  1396. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  1397. // API call, and error handling.
  1398. //
  1399. // This method is useful when you want to inject custom logic or configuration
  1400. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1401. //
  1402. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  1403. // req, resp := client.DeleteBucketLifecycleRequest(params)
  1404. //
  1405. // err := req.Send()
  1406. // if err == nil { // resp is now filled
  1407. // fmt.Println(resp)
  1408. // }
  1409. //
  1410. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  1411. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  1412. op := &request.Operation{
  1413. Name: opDeleteBucketLifecycle,
  1414. HTTPMethod: "DELETE",
  1415. HTTPPath: "/{Bucket}?lifecycle",
  1416. }
  1417. if input == nil {
  1418. input = &DeleteBucketLifecycleInput{}
  1419. }
  1420. output = &DeleteBucketLifecycleOutput{}
  1421. req = c.newRequest(op, input, output)
  1422. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1423. return
  1424. }
  1425. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  1426. //
  1427. // Deletes the lifecycle configuration from the specified bucket. Amazon S3
  1428. // removes all the lifecycle configuration rules in the lifecycle subresource
  1429. // associated with the bucket. Your objects never expire, and Amazon S3 no longer
  1430. // automatically deletes any objects on the basis of rules contained in the
  1431. // deleted lifecycle configuration.
  1432. //
  1433. // To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration
  1434. // action. By default, the bucket owner has this permission and the bucket owner
  1435. // can grant this permission to others.
  1436. //
  1437. // There is usually some time lag before lifecycle configuration deletion is
  1438. // fully propagated to all the Amazon S3 systems.
  1439. //
  1440. // For more information about the object expiration, see Elements to Describe
  1441. // Lifecycle Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
  1442. //
  1443. // Related actions include:
  1444. //
  1445. // - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
  1446. //
  1447. // - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
  1448. //
  1449. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1450. // with awserr.Error's Code and Message methods to get detailed information about
  1451. // the error.
  1452. //
  1453. // See the AWS API reference guide for Amazon Simple Storage Service's
  1454. // API operation DeleteBucketLifecycle for usage and error information.
  1455. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  1456. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  1457. req, out := c.DeleteBucketLifecycleRequest(input)
  1458. return out, req.Send()
  1459. }
  1460. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  1461. // the ability to pass a context and additional request options.
  1462. //
  1463. // See DeleteBucketLifecycle for details on how to use this API operation.
  1464. //
  1465. // The context must be non-nil and will be used for request cancellation. If
  1466. // the context is nil a panic will occur. In the future the SDK may create
  1467. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1468. // for more information on using Contexts.
  1469. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  1470. req, out := c.DeleteBucketLifecycleRequest(input)
  1471. req.SetContext(ctx)
  1472. req.ApplyOptions(opts...)
  1473. return out, req.Send()
  1474. }
  1475. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  1476. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  1477. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  1478. // value will be populated with the request's response once the request completes
  1479. // successfully.
  1480. //
  1481. // Use "Send" method on the returned Request to send the API call to the service.
  1482. // the "output" return value is not valid until after Send returns without error.
  1483. //
  1484. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  1485. // API call, and error handling.
  1486. //
  1487. // This method is useful when you want to inject custom logic or configuration
  1488. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1489. //
  1490. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  1491. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  1492. //
  1493. // err := req.Send()
  1494. // if err == nil { // resp is now filled
  1495. // fmt.Println(resp)
  1496. // }
  1497. //
  1498. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  1499. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  1500. op := &request.Operation{
  1501. Name: opDeleteBucketMetricsConfiguration,
  1502. HTTPMethod: "DELETE",
  1503. HTTPPath: "/{Bucket}?metrics",
  1504. }
  1505. if input == nil {
  1506. input = &DeleteBucketMetricsConfigurationInput{}
  1507. }
  1508. output = &DeleteBucketMetricsConfigurationOutput{}
  1509. req = c.newRequest(op, input, output)
  1510. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1511. return
  1512. }
  1513. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  1514. //
  1515. // Deletes a metrics configuration for the Amazon CloudWatch request metrics
  1516. // (specified by the metrics configuration ID) from the bucket. Note that this
  1517. // doesn't include the daily storage metrics.
  1518. //
  1519. // To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
  1520. // action. The bucket owner has this permission by default. The bucket owner
  1521. // can grant this permission to others. For more information about permissions,
  1522. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  1523. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  1524. //
  1525. // For information about CloudWatch request metrics for Amazon S3, see Monitoring
  1526. // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
  1527. //
  1528. // The following operations are related to DeleteBucketMetricsConfiguration:
  1529. //
  1530. // - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
  1531. //
  1532. // - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
  1533. //
  1534. // - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
  1535. //
  1536. // - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
  1537. //
  1538. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1539. // with awserr.Error's Code and Message methods to get detailed information about
  1540. // the error.
  1541. //
  1542. // See the AWS API reference guide for Amazon Simple Storage Service's
  1543. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  1544. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  1545. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  1546. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  1547. return out, req.Send()
  1548. }
  1549. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  1550. // the ability to pass a context and additional request options.
  1551. //
  1552. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  1553. //
  1554. // The context must be non-nil and will be used for request cancellation. If
  1555. // the context is nil a panic will occur. In the future the SDK may create
  1556. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1557. // for more information on using Contexts.
  1558. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  1559. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  1560. req.SetContext(ctx)
  1561. req.ApplyOptions(opts...)
  1562. return out, req.Send()
  1563. }
  1564. const opDeleteBucketOwnershipControls = "DeleteBucketOwnershipControls"
  1565. // DeleteBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
  1566. // client's request for the DeleteBucketOwnershipControls operation. The "output" return
  1567. // value will be populated with the request's response once the request completes
  1568. // successfully.
  1569. //
  1570. // Use "Send" method on the returned Request to send the API call to the service.
  1571. // the "output" return value is not valid until after Send returns without error.
  1572. //
  1573. // See DeleteBucketOwnershipControls for more information on using the DeleteBucketOwnershipControls
  1574. // API call, and error handling.
  1575. //
  1576. // This method is useful when you want to inject custom logic or configuration
  1577. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1578. //
  1579. // // Example sending a request using the DeleteBucketOwnershipControlsRequest method.
  1580. // req, resp := client.DeleteBucketOwnershipControlsRequest(params)
  1581. //
  1582. // err := req.Send()
  1583. // if err == nil { // resp is now filled
  1584. // fmt.Println(resp)
  1585. // }
  1586. //
  1587. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
  1588. func (c *S3) DeleteBucketOwnershipControlsRequest(input *DeleteBucketOwnershipControlsInput) (req *request.Request, output *DeleteBucketOwnershipControlsOutput) {
  1589. op := &request.Operation{
  1590. Name: opDeleteBucketOwnershipControls,
  1591. HTTPMethod: "DELETE",
  1592. HTTPPath: "/{Bucket}?ownershipControls",
  1593. }
  1594. if input == nil {
  1595. input = &DeleteBucketOwnershipControlsInput{}
  1596. }
  1597. output = &DeleteBucketOwnershipControlsOutput{}
  1598. req = c.newRequest(op, input, output)
  1599. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1600. return
  1601. }
  1602. // DeleteBucketOwnershipControls API operation for Amazon Simple Storage Service.
  1603. //
  1604. // Removes OwnershipControls for an Amazon S3 bucket. To use this operation,
  1605. // you must have the s3:PutBucketOwnershipControls permission. For more information
  1606. // about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  1607. //
  1608. // For information about Amazon S3 Object Ownership, see Using Object Ownership
  1609. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
  1610. //
  1611. // The following operations are related to DeleteBucketOwnershipControls:
  1612. //
  1613. // - GetBucketOwnershipControls
  1614. //
  1615. // - PutBucketOwnershipControls
  1616. //
  1617. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1618. // with awserr.Error's Code and Message methods to get detailed information about
  1619. // the error.
  1620. //
  1621. // See the AWS API reference guide for Amazon Simple Storage Service's
  1622. // API operation DeleteBucketOwnershipControls for usage and error information.
  1623. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
  1624. func (c *S3) DeleteBucketOwnershipControls(input *DeleteBucketOwnershipControlsInput) (*DeleteBucketOwnershipControlsOutput, error) {
  1625. req, out := c.DeleteBucketOwnershipControlsRequest(input)
  1626. return out, req.Send()
  1627. }
  1628. // DeleteBucketOwnershipControlsWithContext is the same as DeleteBucketOwnershipControls with the addition of
  1629. // the ability to pass a context and additional request options.
  1630. //
  1631. // See DeleteBucketOwnershipControls for details on how to use this API operation.
  1632. //
  1633. // The context must be non-nil and will be used for request cancellation. If
  1634. // the context is nil a panic will occur. In the future the SDK may create
  1635. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1636. // for more information on using Contexts.
  1637. func (c *S3) DeleteBucketOwnershipControlsWithContext(ctx aws.Context, input *DeleteBucketOwnershipControlsInput, opts ...request.Option) (*DeleteBucketOwnershipControlsOutput, error) {
  1638. req, out := c.DeleteBucketOwnershipControlsRequest(input)
  1639. req.SetContext(ctx)
  1640. req.ApplyOptions(opts...)
  1641. return out, req.Send()
  1642. }
  1643. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  1644. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  1645. // client's request for the DeleteBucketPolicy operation. The "output" return
  1646. // value will be populated with the request's response once the request completes
  1647. // successfully.
  1648. //
  1649. // Use "Send" method on the returned Request to send the API call to the service.
  1650. // the "output" return value is not valid until after Send returns without error.
  1651. //
  1652. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  1653. // API call, and error handling.
  1654. //
  1655. // This method is useful when you want to inject custom logic or configuration
  1656. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1657. //
  1658. // // Example sending a request using the DeleteBucketPolicyRequest method.
  1659. // req, resp := client.DeleteBucketPolicyRequest(params)
  1660. //
  1661. // err := req.Send()
  1662. // if err == nil { // resp is now filled
  1663. // fmt.Println(resp)
  1664. // }
  1665. //
  1666. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  1667. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  1668. op := &request.Operation{
  1669. Name: opDeleteBucketPolicy,
  1670. HTTPMethod: "DELETE",
  1671. HTTPPath: "/{Bucket}?policy",
  1672. }
  1673. if input == nil {
  1674. input = &DeleteBucketPolicyInput{}
  1675. }
  1676. output = &DeleteBucketPolicyOutput{}
  1677. req = c.newRequest(op, input, output)
  1678. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1679. return
  1680. }
  1681. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  1682. //
  1683. // This implementation of the DELETE action uses the policy subresource to delete
  1684. // the policy of a specified bucket. If you are using an identity other than
  1685. // the root user of the Amazon Web Services account that owns the bucket, the
  1686. // calling identity must have the DeleteBucketPolicy permissions on the specified
  1687. // bucket and belong to the bucket owner's account to use this operation.
  1688. //
  1689. // If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403
  1690. // Access Denied error. If you have the correct permissions, but you're not
  1691. // using an identity that belongs to the bucket owner's account, Amazon S3 returns
  1692. // a 405 Method Not Allowed error.
  1693. //
  1694. // As a security precaution, the root user of the Amazon Web Services account
  1695. // that owns a bucket can always use this operation, even if the policy explicitly
  1696. // denies the root user the ability to perform this action.
  1697. //
  1698. // For more information about bucket policies, see Using Bucket Policies and
  1699. // UserPolicies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
  1700. //
  1701. // The following operations are related to DeleteBucketPolicy
  1702. //
  1703. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  1704. //
  1705. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  1706. //
  1707. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1708. // with awserr.Error's Code and Message methods to get detailed information about
  1709. // the error.
  1710. //
  1711. // See the AWS API reference guide for Amazon Simple Storage Service's
  1712. // API operation DeleteBucketPolicy for usage and error information.
  1713. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  1714. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  1715. req, out := c.DeleteBucketPolicyRequest(input)
  1716. return out, req.Send()
  1717. }
  1718. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  1719. // the ability to pass a context and additional request options.
  1720. //
  1721. // See DeleteBucketPolicy for details on how to use this API operation.
  1722. //
  1723. // The context must be non-nil and will be used for request cancellation. If
  1724. // the context is nil a panic will occur. In the future the SDK may create
  1725. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1726. // for more information on using Contexts.
  1727. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  1728. req, out := c.DeleteBucketPolicyRequest(input)
  1729. req.SetContext(ctx)
  1730. req.ApplyOptions(opts...)
  1731. return out, req.Send()
  1732. }
  1733. const opDeleteBucketReplication = "DeleteBucketReplication"
  1734. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  1735. // client's request for the DeleteBucketReplication operation. The "output" return
  1736. // value will be populated with the request's response once the request completes
  1737. // successfully.
  1738. //
  1739. // Use "Send" method on the returned Request to send the API call to the service.
  1740. // the "output" return value is not valid until after Send returns without error.
  1741. //
  1742. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  1743. // API call, and error handling.
  1744. //
  1745. // This method is useful when you want to inject custom logic or configuration
  1746. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1747. //
  1748. // // Example sending a request using the DeleteBucketReplicationRequest method.
  1749. // req, resp := client.DeleteBucketReplicationRequest(params)
  1750. //
  1751. // err := req.Send()
  1752. // if err == nil { // resp is now filled
  1753. // fmt.Println(resp)
  1754. // }
  1755. //
  1756. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  1757. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  1758. op := &request.Operation{
  1759. Name: opDeleteBucketReplication,
  1760. HTTPMethod: "DELETE",
  1761. HTTPPath: "/{Bucket}?replication",
  1762. }
  1763. if input == nil {
  1764. input = &DeleteBucketReplicationInput{}
  1765. }
  1766. output = &DeleteBucketReplicationOutput{}
  1767. req = c.newRequest(op, input, output)
  1768. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1769. return
  1770. }
  1771. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  1772. //
  1773. // Deletes the replication configuration from the bucket.
  1774. //
  1775. // To use this operation, you must have permissions to perform the s3:PutReplicationConfiguration
  1776. // action. The bucket owner has these permissions by default and can grant it
  1777. // to others. For more information about permissions, see Permissions Related
  1778. // to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  1779. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  1780. //
  1781. // It can take a while for the deletion of a replication configuration to fully
  1782. // propagate.
  1783. //
  1784. // For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
  1785. // in the Amazon S3 User Guide.
  1786. //
  1787. // The following operations are related to DeleteBucketReplication:
  1788. //
  1789. // - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
  1790. //
  1791. // - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
  1792. //
  1793. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1794. // with awserr.Error's Code and Message methods to get detailed information about
  1795. // the error.
  1796. //
  1797. // See the AWS API reference guide for Amazon Simple Storage Service's
  1798. // API operation DeleteBucketReplication for usage and error information.
  1799. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  1800. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  1801. req, out := c.DeleteBucketReplicationRequest(input)
  1802. return out, req.Send()
  1803. }
  1804. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1805. // the ability to pass a context and additional request options.
  1806. //
  1807. // See DeleteBucketReplication for details on how to use this API operation.
  1808. //
  1809. // The context must be non-nil and will be used for request cancellation. If
  1810. // the context is nil a panic will occur. In the future the SDK may create
  1811. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1812. // for more information on using Contexts.
  1813. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1814. req, out := c.DeleteBucketReplicationRequest(input)
  1815. req.SetContext(ctx)
  1816. req.ApplyOptions(opts...)
  1817. return out, req.Send()
  1818. }
  1819. const opDeleteBucketTagging = "DeleteBucketTagging"
  1820. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1821. // client's request for the DeleteBucketTagging operation. The "output" return
  1822. // value will be populated with the request's response once the request completes
  1823. // successfully.
  1824. //
  1825. // Use "Send" method on the returned Request to send the API call to the service.
  1826. // the "output" return value is not valid until after Send returns without error.
  1827. //
  1828. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1829. // API call, and error handling.
  1830. //
  1831. // This method is useful when you want to inject custom logic or configuration
  1832. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1833. //
  1834. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1835. // req, resp := client.DeleteBucketTaggingRequest(params)
  1836. //
  1837. // err := req.Send()
  1838. // if err == nil { // resp is now filled
  1839. // fmt.Println(resp)
  1840. // }
  1841. //
  1842. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1843. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1844. op := &request.Operation{
  1845. Name: opDeleteBucketTagging,
  1846. HTTPMethod: "DELETE",
  1847. HTTPPath: "/{Bucket}?tagging",
  1848. }
  1849. if input == nil {
  1850. input = &DeleteBucketTaggingInput{}
  1851. }
  1852. output = &DeleteBucketTaggingOutput{}
  1853. req = c.newRequest(op, input, output)
  1854. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1855. return
  1856. }
  1857. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1858. //
  1859. // Deletes the tags from the bucket.
  1860. //
  1861. // To use this operation, you must have permission to perform the s3:PutBucketTagging
  1862. // action. By default, the bucket owner has this permission and can grant this
  1863. // permission to others.
  1864. //
  1865. // The following operations are related to DeleteBucketTagging:
  1866. //
  1867. // - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
  1868. //
  1869. // - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
  1870. //
  1871. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1872. // with awserr.Error's Code and Message methods to get detailed information about
  1873. // the error.
  1874. //
  1875. // See the AWS API reference guide for Amazon Simple Storage Service's
  1876. // API operation DeleteBucketTagging for usage and error information.
  1877. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1878. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1879. req, out := c.DeleteBucketTaggingRequest(input)
  1880. return out, req.Send()
  1881. }
  1882. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1883. // the ability to pass a context and additional request options.
  1884. //
  1885. // See DeleteBucketTagging for details on how to use this API operation.
  1886. //
  1887. // The context must be non-nil and will be used for request cancellation. If
  1888. // the context is nil a panic will occur. In the future the SDK may create
  1889. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1890. // for more information on using Contexts.
  1891. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1892. req, out := c.DeleteBucketTaggingRequest(input)
  1893. req.SetContext(ctx)
  1894. req.ApplyOptions(opts...)
  1895. return out, req.Send()
  1896. }
  1897. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1898. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1899. // client's request for the DeleteBucketWebsite operation. The "output" return
  1900. // value will be populated with the request's response once the request completes
  1901. // successfully.
  1902. //
  1903. // Use "Send" method on the returned Request to send the API call to the service.
  1904. // the "output" return value is not valid until after Send returns without error.
  1905. //
  1906. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1907. // API call, and error handling.
  1908. //
  1909. // This method is useful when you want to inject custom logic or configuration
  1910. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1911. //
  1912. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1913. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1914. //
  1915. // err := req.Send()
  1916. // if err == nil { // resp is now filled
  1917. // fmt.Println(resp)
  1918. // }
  1919. //
  1920. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1921. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1922. op := &request.Operation{
  1923. Name: opDeleteBucketWebsite,
  1924. HTTPMethod: "DELETE",
  1925. HTTPPath: "/{Bucket}?website",
  1926. }
  1927. if input == nil {
  1928. input = &DeleteBucketWebsiteInput{}
  1929. }
  1930. output = &DeleteBucketWebsiteOutput{}
  1931. req = c.newRequest(op, input, output)
  1932. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1933. return
  1934. }
  1935. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1936. //
  1937. // This action removes the website configuration for a bucket. Amazon S3 returns
  1938. // a 200 OK response upon successfully deleting a website configuration on the
  1939. // specified bucket. You will get a 200 OK response if the website configuration
  1940. // you are trying to delete does not exist on the bucket. Amazon S3 returns
  1941. // a 404 response if the bucket specified in the request does not exist.
  1942. //
  1943. // This DELETE action requires the S3:DeleteBucketWebsite permission. By default,
  1944. // only the bucket owner can delete the website configuration attached to a
  1945. // bucket. However, bucket owners can grant other users permission to delete
  1946. // the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite
  1947. // permission.
  1948. //
  1949. // For more information about hosting websites, see Hosting Websites on Amazon
  1950. // S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
  1951. //
  1952. // The following operations are related to DeleteBucketWebsite:
  1953. //
  1954. // - GetBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
  1955. //
  1956. // - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
  1957. //
  1958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1959. // with awserr.Error's Code and Message methods to get detailed information about
  1960. // the error.
  1961. //
  1962. // See the AWS API reference guide for Amazon Simple Storage Service's
  1963. // API operation DeleteBucketWebsite for usage and error information.
  1964. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1965. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1966. req, out := c.DeleteBucketWebsiteRequest(input)
  1967. return out, req.Send()
  1968. }
  1969. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1970. // the ability to pass a context and additional request options.
  1971. //
  1972. // See DeleteBucketWebsite for details on how to use this API operation.
  1973. //
  1974. // The context must be non-nil and will be used for request cancellation. If
  1975. // the context is nil a panic will occur. In the future the SDK may create
  1976. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1977. // for more information on using Contexts.
  1978. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1979. req, out := c.DeleteBucketWebsiteRequest(input)
  1980. req.SetContext(ctx)
  1981. req.ApplyOptions(opts...)
  1982. return out, req.Send()
  1983. }
  1984. const opDeleteObject = "DeleteObject"
  1985. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1986. // client's request for the DeleteObject operation. The "output" return
  1987. // value will be populated with the request's response once the request completes
  1988. // successfully.
  1989. //
  1990. // Use "Send" method on the returned Request to send the API call to the service.
  1991. // the "output" return value is not valid until after Send returns without error.
  1992. //
  1993. // See DeleteObject for more information on using the DeleteObject
  1994. // API call, and error handling.
  1995. //
  1996. // This method is useful when you want to inject custom logic or configuration
  1997. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1998. //
  1999. // // Example sending a request using the DeleteObjectRequest method.
  2000. // req, resp := client.DeleteObjectRequest(params)
  2001. //
  2002. // err := req.Send()
  2003. // if err == nil { // resp is now filled
  2004. // fmt.Println(resp)
  2005. // }
  2006. //
  2007. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  2008. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  2009. op := &request.Operation{
  2010. Name: opDeleteObject,
  2011. HTTPMethod: "DELETE",
  2012. HTTPPath: "/{Bucket}/{Key+}",
  2013. }
  2014. if input == nil {
  2015. input = &DeleteObjectInput{}
  2016. }
  2017. output = &DeleteObjectOutput{}
  2018. req = c.newRequest(op, input, output)
  2019. return
  2020. }
  2021. // DeleteObject API operation for Amazon Simple Storage Service.
  2022. //
  2023. // Removes the null version (if there is one) of an object and inserts a delete
  2024. // marker, which becomes the latest version of the object. If there isn't a
  2025. // null version, Amazon S3 does not remove any objects but will still respond
  2026. // that the command was successful.
  2027. //
  2028. // To remove a specific version, you must be the bucket owner and you must use
  2029. // the version Id subresource. Using this subresource permanently deletes the
  2030. // version. If the object deleted is a delete marker, Amazon S3 sets the response
  2031. // header, x-amz-delete-marker, to true.
  2032. //
  2033. // If the object you want to delete is in a bucket where the bucket versioning
  2034. // configuration is MFA Delete enabled, you must include the x-amz-mfa request
  2035. // header in the DELETE versionId request. Requests that include x-amz-mfa must
  2036. // use HTTPS.
  2037. //
  2038. // For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html).
  2039. // To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
  2040. //
  2041. // You can delete objects by explicitly calling DELETE Object or configure its
  2042. // lifecycle (PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
  2043. // to enable Amazon S3 to remove them for you. If you want to block users or
  2044. // accounts from removing or deleting objects from your bucket, you must deny
  2045. // them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration
  2046. // actions.
  2047. //
  2048. // The following action is related to DeleteObject:
  2049. //
  2050. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  2051. //
  2052. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2053. // with awserr.Error's Code and Message methods to get detailed information about
  2054. // the error.
  2055. //
  2056. // See the AWS API reference guide for Amazon Simple Storage Service's
  2057. // API operation DeleteObject for usage and error information.
  2058. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  2059. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  2060. req, out := c.DeleteObjectRequest(input)
  2061. return out, req.Send()
  2062. }
  2063. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  2064. // the ability to pass a context and additional request options.
  2065. //
  2066. // See DeleteObject for details on how to use this API operation.
  2067. //
  2068. // The context must be non-nil and will be used for request cancellation. If
  2069. // the context is nil a panic will occur. In the future the SDK may create
  2070. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2071. // for more information on using Contexts.
  2072. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  2073. req, out := c.DeleteObjectRequest(input)
  2074. req.SetContext(ctx)
  2075. req.ApplyOptions(opts...)
  2076. return out, req.Send()
  2077. }
  2078. const opDeleteObjectTagging = "DeleteObjectTagging"
  2079. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  2080. // client's request for the DeleteObjectTagging operation. The "output" return
  2081. // value will be populated with the request's response once the request completes
  2082. // successfully.
  2083. //
  2084. // Use "Send" method on the returned Request to send the API call to the service.
  2085. // the "output" return value is not valid until after Send returns without error.
  2086. //
  2087. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  2088. // API call, and error handling.
  2089. //
  2090. // This method is useful when you want to inject custom logic or configuration
  2091. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2092. //
  2093. // // Example sending a request using the DeleteObjectTaggingRequest method.
  2094. // req, resp := client.DeleteObjectTaggingRequest(params)
  2095. //
  2096. // err := req.Send()
  2097. // if err == nil { // resp is now filled
  2098. // fmt.Println(resp)
  2099. // }
  2100. //
  2101. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  2102. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  2103. op := &request.Operation{
  2104. Name: opDeleteObjectTagging,
  2105. HTTPMethod: "DELETE",
  2106. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2107. }
  2108. if input == nil {
  2109. input = &DeleteObjectTaggingInput{}
  2110. }
  2111. output = &DeleteObjectTaggingOutput{}
  2112. req = c.newRequest(op, input, output)
  2113. return
  2114. }
  2115. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  2116. //
  2117. // Removes the entire tag set from the specified object. For more information
  2118. // about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
  2119. //
  2120. // To use this operation, you must have permission to perform the s3:DeleteObjectTagging
  2121. // action.
  2122. //
  2123. // To delete tags of a specific object version, add the versionId query parameter
  2124. // in the request. You will need permission for the s3:DeleteObjectVersionTagging
  2125. // action.
  2126. //
  2127. // The following operations are related to DeleteBucketMetricsConfiguration:
  2128. //
  2129. // - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
  2130. //
  2131. // - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
  2132. //
  2133. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2134. // with awserr.Error's Code and Message methods to get detailed information about
  2135. // the error.
  2136. //
  2137. // See the AWS API reference guide for Amazon Simple Storage Service's
  2138. // API operation DeleteObjectTagging for usage and error information.
  2139. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  2140. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  2141. req, out := c.DeleteObjectTaggingRequest(input)
  2142. return out, req.Send()
  2143. }
  2144. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  2145. // the ability to pass a context and additional request options.
  2146. //
  2147. // See DeleteObjectTagging for details on how to use this API operation.
  2148. //
  2149. // The context must be non-nil and will be used for request cancellation. If
  2150. // the context is nil a panic will occur. In the future the SDK may create
  2151. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2152. // for more information on using Contexts.
  2153. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  2154. req, out := c.DeleteObjectTaggingRequest(input)
  2155. req.SetContext(ctx)
  2156. req.ApplyOptions(opts...)
  2157. return out, req.Send()
  2158. }
  2159. const opDeleteObjects = "DeleteObjects"
  2160. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  2161. // client's request for the DeleteObjects operation. The "output" return
  2162. // value will be populated with the request's response once the request completes
  2163. // successfully.
  2164. //
  2165. // Use "Send" method on the returned Request to send the API call to the service.
  2166. // the "output" return value is not valid until after Send returns without error.
  2167. //
  2168. // See DeleteObjects for more information on using the DeleteObjects
  2169. // API call, and error handling.
  2170. //
  2171. // This method is useful when you want to inject custom logic or configuration
  2172. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2173. //
  2174. // // Example sending a request using the DeleteObjectsRequest method.
  2175. // req, resp := client.DeleteObjectsRequest(params)
  2176. //
  2177. // err := req.Send()
  2178. // if err == nil { // resp is now filled
  2179. // fmt.Println(resp)
  2180. // }
  2181. //
  2182. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  2183. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  2184. op := &request.Operation{
  2185. Name: opDeleteObjects,
  2186. HTTPMethod: "POST",
  2187. HTTPPath: "/{Bucket}?delete",
  2188. }
  2189. if input == nil {
  2190. input = &DeleteObjectsInput{}
  2191. }
  2192. output = &DeleteObjectsOutput{}
  2193. req = c.newRequest(op, input, output)
  2194. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  2195. Name: "contentMd5Handler",
  2196. Fn: checksum.AddBodyContentMD5Handler,
  2197. })
  2198. return
  2199. }
  2200. // DeleteObjects API operation for Amazon Simple Storage Service.
  2201. //
  2202. // This action enables you to delete multiple objects from a bucket using a
  2203. // single HTTP request. If you know the object keys that you want to delete,
  2204. // then this action provides a suitable alternative to sending individual delete
  2205. // requests, reducing per-request overhead.
  2206. //
  2207. // The request contains a list of up to 1000 keys that you want to delete. In
  2208. // the XML, you provide the object key names, and optionally, version IDs if
  2209. // you want to delete a specific version of the object from a versioning-enabled
  2210. // bucket. For each key, Amazon S3 performs a delete action and returns the
  2211. // result of that delete, success, or failure, in the response. Note that if
  2212. // the object specified in the request is not found, Amazon S3 returns the result
  2213. // as deleted.
  2214. //
  2215. // The action supports two modes for the response: verbose and quiet. By default,
  2216. // the action uses verbose mode in which the response includes the result of
  2217. // deletion of each key in your request. In quiet mode the response includes
  2218. // only keys where the delete action encountered an error. For a successful
  2219. // deletion, the action does not return any information about the delete in
  2220. // the response body.
  2221. //
  2222. // When performing this action on an MFA Delete enabled bucket, that attempts
  2223. // to delete any versioned objects, you must include an MFA token. If you do
  2224. // not provide one, the entire request will fail, even if there are non-versioned
  2225. // objects you are trying to delete. If you provide an invalid token, whether
  2226. // there are versioned keys in the request or not, the entire Multi-Object Delete
  2227. // request will fail. For information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
  2228. //
  2229. // Finally, the Content-MD5 header is required for all Multi-Object Delete requests.
  2230. // Amazon S3 uses the header value to ensure that your request body has not
  2231. // been altered in transit.
  2232. //
  2233. // The following operations are related to DeleteObjects:
  2234. //
  2235. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  2236. //
  2237. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  2238. //
  2239. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  2240. //
  2241. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  2242. //
  2243. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  2244. //
  2245. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2246. // with awserr.Error's Code and Message methods to get detailed information about
  2247. // the error.
  2248. //
  2249. // See the AWS API reference guide for Amazon Simple Storage Service's
  2250. // API operation DeleteObjects for usage and error information.
  2251. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  2252. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  2253. req, out := c.DeleteObjectsRequest(input)
  2254. return out, req.Send()
  2255. }
  2256. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  2257. // the ability to pass a context and additional request options.
  2258. //
  2259. // See DeleteObjects for details on how to use this API operation.
  2260. //
  2261. // The context must be non-nil and will be used for request cancellation. If
  2262. // the context is nil a panic will occur. In the future the SDK may create
  2263. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2264. // for more information on using Contexts.
  2265. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  2266. req, out := c.DeleteObjectsRequest(input)
  2267. req.SetContext(ctx)
  2268. req.ApplyOptions(opts...)
  2269. return out, req.Send()
  2270. }
  2271. const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
  2272. // DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
  2273. // client's request for the DeletePublicAccessBlock operation. The "output" return
  2274. // value will be populated with the request's response once the request completes
  2275. // successfully.
  2276. //
  2277. // Use "Send" method on the returned Request to send the API call to the service.
  2278. // the "output" return value is not valid until after Send returns without error.
  2279. //
  2280. // See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
  2281. // API call, and error handling.
  2282. //
  2283. // This method is useful when you want to inject custom logic or configuration
  2284. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2285. //
  2286. // // Example sending a request using the DeletePublicAccessBlockRequest method.
  2287. // req, resp := client.DeletePublicAccessBlockRequest(params)
  2288. //
  2289. // err := req.Send()
  2290. // if err == nil { // resp is now filled
  2291. // fmt.Println(resp)
  2292. // }
  2293. //
  2294. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  2295. func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
  2296. op := &request.Operation{
  2297. Name: opDeletePublicAccessBlock,
  2298. HTTPMethod: "DELETE",
  2299. HTTPPath: "/{Bucket}?publicAccessBlock",
  2300. }
  2301. if input == nil {
  2302. input = &DeletePublicAccessBlockInput{}
  2303. }
  2304. output = &DeletePublicAccessBlockOutput{}
  2305. req = c.newRequest(op, input, output)
  2306. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2307. return
  2308. }
  2309. // DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
  2310. //
  2311. // Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use
  2312. // this operation, you must have the s3:PutBucketPublicAccessBlock permission.
  2313. // For more information about permissions, see Permissions Related to Bucket
  2314. // Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  2315. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  2316. //
  2317. // The following operations are related to DeletePublicAccessBlock:
  2318. //
  2319. // - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
  2320. //
  2321. // - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
  2322. //
  2323. // - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
  2324. //
  2325. // - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
  2326. //
  2327. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2328. // with awserr.Error's Code and Message methods to get detailed information about
  2329. // the error.
  2330. //
  2331. // See the AWS API reference guide for Amazon Simple Storage Service's
  2332. // API operation DeletePublicAccessBlock for usage and error information.
  2333. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  2334. func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
  2335. req, out := c.DeletePublicAccessBlockRequest(input)
  2336. return out, req.Send()
  2337. }
  2338. // DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
  2339. // the ability to pass a context and additional request options.
  2340. //
  2341. // See DeletePublicAccessBlock for details on how to use this API operation.
  2342. //
  2343. // The context must be non-nil and will be used for request cancellation. If
  2344. // the context is nil a panic will occur. In the future the SDK may create
  2345. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2346. // for more information on using Contexts.
  2347. func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
  2348. req, out := c.DeletePublicAccessBlockRequest(input)
  2349. req.SetContext(ctx)
  2350. req.ApplyOptions(opts...)
  2351. return out, req.Send()
  2352. }
  2353. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  2354. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  2355. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  2356. // value will be populated with the request's response once the request completes
  2357. // successfully.
  2358. //
  2359. // Use "Send" method on the returned Request to send the API call to the service.
  2360. // the "output" return value is not valid until after Send returns without error.
  2361. //
  2362. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  2363. // API call, and error handling.
  2364. //
  2365. // This method is useful when you want to inject custom logic or configuration
  2366. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2367. //
  2368. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  2369. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  2370. //
  2371. // err := req.Send()
  2372. // if err == nil { // resp is now filled
  2373. // fmt.Println(resp)
  2374. // }
  2375. //
  2376. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  2377. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  2378. op := &request.Operation{
  2379. Name: opGetBucketAccelerateConfiguration,
  2380. HTTPMethod: "GET",
  2381. HTTPPath: "/{Bucket}?accelerate",
  2382. }
  2383. if input == nil {
  2384. input = &GetBucketAccelerateConfigurationInput{}
  2385. }
  2386. output = &GetBucketAccelerateConfigurationOutput{}
  2387. req = c.newRequest(op, input, output)
  2388. return
  2389. }
  2390. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  2391. //
  2392. // This implementation of the GET action uses the accelerate subresource to
  2393. // return the Transfer Acceleration state of a bucket, which is either Enabled
  2394. // or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that
  2395. // enables you to perform faster data transfers to and from Amazon S3.
  2396. //
  2397. // To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration
  2398. // action. The bucket owner has this permission by default. The bucket owner
  2399. // can grant this permission to others. For more information about permissions,
  2400. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  2401. // and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  2402. // in the Amazon S3 User Guide.
  2403. //
  2404. // You set the Transfer Acceleration state of an existing bucket to Enabled
  2405. // or Suspended by using the PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
  2406. // operation.
  2407. //
  2408. // A GET accelerate request does not return a state value for a bucket that
  2409. // has no transfer acceleration state. A bucket has no Transfer Acceleration
  2410. // state if a state has never been set on the bucket.
  2411. //
  2412. // For more information about transfer acceleration, see Transfer Acceleration
  2413. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
  2414. // in the Amazon S3 User Guide.
  2415. //
  2416. // Related Resources
  2417. //
  2418. // - PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
  2419. //
  2420. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2421. // with awserr.Error's Code and Message methods to get detailed information about
  2422. // the error.
  2423. //
  2424. // See the AWS API reference guide for Amazon Simple Storage Service's
  2425. // API operation GetBucketAccelerateConfiguration for usage and error information.
  2426. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  2427. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  2428. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  2429. return out, req.Send()
  2430. }
  2431. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  2432. // the ability to pass a context and additional request options.
  2433. //
  2434. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  2435. //
  2436. // The context must be non-nil and will be used for request cancellation. If
  2437. // the context is nil a panic will occur. In the future the SDK may create
  2438. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2439. // for more information on using Contexts.
  2440. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  2441. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  2442. req.SetContext(ctx)
  2443. req.ApplyOptions(opts...)
  2444. return out, req.Send()
  2445. }
  2446. const opGetBucketAcl = "GetBucketAcl"
  2447. // GetBucketAclRequest generates a "aws/request.Request" representing the
  2448. // client's request for the GetBucketAcl operation. The "output" return
  2449. // value will be populated with the request's response once the request completes
  2450. // successfully.
  2451. //
  2452. // Use "Send" method on the returned Request to send the API call to the service.
  2453. // the "output" return value is not valid until after Send returns without error.
  2454. //
  2455. // See GetBucketAcl for more information on using the GetBucketAcl
  2456. // API call, and error handling.
  2457. //
  2458. // This method is useful when you want to inject custom logic or configuration
  2459. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2460. //
  2461. // // Example sending a request using the GetBucketAclRequest method.
  2462. // req, resp := client.GetBucketAclRequest(params)
  2463. //
  2464. // err := req.Send()
  2465. // if err == nil { // resp is now filled
  2466. // fmt.Println(resp)
  2467. // }
  2468. //
  2469. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  2470. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  2471. op := &request.Operation{
  2472. Name: opGetBucketAcl,
  2473. HTTPMethod: "GET",
  2474. HTTPPath: "/{Bucket}?acl",
  2475. }
  2476. if input == nil {
  2477. input = &GetBucketAclInput{}
  2478. }
  2479. output = &GetBucketAclOutput{}
  2480. req = c.newRequest(op, input, output)
  2481. return
  2482. }
  2483. // GetBucketAcl API operation for Amazon Simple Storage Service.
  2484. //
  2485. // This implementation of the GET action uses the acl subresource to return
  2486. // the access control list (ACL) of a bucket. To use GET to return the ACL of
  2487. // the bucket, you must have READ_ACP access to the bucket. If READ_ACP permission
  2488. // is granted to the anonymous user, you can return the ACL of the bucket without
  2489. // using an authorization header.
  2490. //
  2491. // If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
  2492. // requests to read ACLs are still supported and return the bucket-owner-full-control
  2493. // ACL with the owner being the account that created the bucket. For more information,
  2494. // see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  2495. // in the Amazon S3 User Guide.
  2496. //
  2497. // Related Resources
  2498. //
  2499. // - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
  2500. //
  2501. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2502. // with awserr.Error's Code and Message methods to get detailed information about
  2503. // the error.
  2504. //
  2505. // See the AWS API reference guide for Amazon Simple Storage Service's
  2506. // API operation GetBucketAcl for usage and error information.
  2507. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  2508. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  2509. req, out := c.GetBucketAclRequest(input)
  2510. return out, req.Send()
  2511. }
  2512. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  2513. // the ability to pass a context and additional request options.
  2514. //
  2515. // See GetBucketAcl for details on how to use this API operation.
  2516. //
  2517. // The context must be non-nil and will be used for request cancellation. If
  2518. // the context is nil a panic will occur. In the future the SDK may create
  2519. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2520. // for more information on using Contexts.
  2521. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  2522. req, out := c.GetBucketAclRequest(input)
  2523. req.SetContext(ctx)
  2524. req.ApplyOptions(opts...)
  2525. return out, req.Send()
  2526. }
  2527. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  2528. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  2529. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  2530. // value will be populated with the request's response once the request completes
  2531. // successfully.
  2532. //
  2533. // Use "Send" method on the returned Request to send the API call to the service.
  2534. // the "output" return value is not valid until after Send returns without error.
  2535. //
  2536. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  2537. // API call, and error handling.
  2538. //
  2539. // This method is useful when you want to inject custom logic or configuration
  2540. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2541. //
  2542. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  2543. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  2544. //
  2545. // err := req.Send()
  2546. // if err == nil { // resp is now filled
  2547. // fmt.Println(resp)
  2548. // }
  2549. //
  2550. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  2551. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  2552. op := &request.Operation{
  2553. Name: opGetBucketAnalyticsConfiguration,
  2554. HTTPMethod: "GET",
  2555. HTTPPath: "/{Bucket}?analytics",
  2556. }
  2557. if input == nil {
  2558. input = &GetBucketAnalyticsConfigurationInput{}
  2559. }
  2560. output = &GetBucketAnalyticsConfigurationOutput{}
  2561. req = c.newRequest(op, input, output)
  2562. return
  2563. }
  2564. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  2565. //
  2566. // This implementation of the GET action returns an analytics configuration
  2567. // (identified by the analytics configuration ID) from the bucket.
  2568. //
  2569. // To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
  2570. // action. The bucket owner has this permission by default. The bucket owner
  2571. // can grant this permission to others. For more information about permissions,
  2572. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  2573. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  2574. // in the Amazon S3 User Guide.
  2575. //
  2576. // For information about Amazon S3 analytics feature, see Amazon S3 Analytics
  2577. // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
  2578. // in the Amazon S3 User Guide.
  2579. //
  2580. // Related Resources
  2581. //
  2582. // - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
  2583. //
  2584. // - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
  2585. //
  2586. // - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
  2587. //
  2588. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2589. // with awserr.Error's Code and Message methods to get detailed information about
  2590. // the error.
  2591. //
  2592. // See the AWS API reference guide for Amazon Simple Storage Service's
  2593. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  2594. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  2595. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  2596. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  2597. return out, req.Send()
  2598. }
  2599. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  2600. // the ability to pass a context and additional request options.
  2601. //
  2602. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  2603. //
  2604. // The context must be non-nil and will be used for request cancellation. If
  2605. // the context is nil a panic will occur. In the future the SDK may create
  2606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2607. // for more information on using Contexts.
  2608. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  2609. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  2610. req.SetContext(ctx)
  2611. req.ApplyOptions(opts...)
  2612. return out, req.Send()
  2613. }
  2614. const opGetBucketCors = "GetBucketCors"
  2615. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  2616. // client's request for the GetBucketCors operation. The "output" return
  2617. // value will be populated with the request's response once the request completes
  2618. // successfully.
  2619. //
  2620. // Use "Send" method on the returned Request to send the API call to the service.
  2621. // the "output" return value is not valid until after Send returns without error.
  2622. //
  2623. // See GetBucketCors for more information on using the GetBucketCors
  2624. // API call, and error handling.
  2625. //
  2626. // This method is useful when you want to inject custom logic or configuration
  2627. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2628. //
  2629. // // Example sending a request using the GetBucketCorsRequest method.
  2630. // req, resp := client.GetBucketCorsRequest(params)
  2631. //
  2632. // err := req.Send()
  2633. // if err == nil { // resp is now filled
  2634. // fmt.Println(resp)
  2635. // }
  2636. //
  2637. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  2638. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  2639. op := &request.Operation{
  2640. Name: opGetBucketCors,
  2641. HTTPMethod: "GET",
  2642. HTTPPath: "/{Bucket}?cors",
  2643. }
  2644. if input == nil {
  2645. input = &GetBucketCorsInput{}
  2646. }
  2647. output = &GetBucketCorsOutput{}
  2648. req = c.newRequest(op, input, output)
  2649. return
  2650. }
  2651. // GetBucketCors API operation for Amazon Simple Storage Service.
  2652. //
  2653. // Returns the Cross-Origin Resource Sharing (CORS) configuration information
  2654. // set for the bucket.
  2655. //
  2656. // To use this operation, you must have permission to perform the s3:GetBucketCORS
  2657. // action. By default, the bucket owner has this permission and can grant it
  2658. // to others.
  2659. //
  2660. // For more information about CORS, see Enabling Cross-Origin Resource Sharing
  2661. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).
  2662. //
  2663. // The following operations are related to GetBucketCors:
  2664. //
  2665. // - PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
  2666. //
  2667. // - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
  2668. //
  2669. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2670. // with awserr.Error's Code and Message methods to get detailed information about
  2671. // the error.
  2672. //
  2673. // See the AWS API reference guide for Amazon Simple Storage Service's
  2674. // API operation GetBucketCors for usage and error information.
  2675. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  2676. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  2677. req, out := c.GetBucketCorsRequest(input)
  2678. return out, req.Send()
  2679. }
  2680. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  2681. // the ability to pass a context and additional request options.
  2682. //
  2683. // See GetBucketCors for details on how to use this API operation.
  2684. //
  2685. // The context must be non-nil and will be used for request cancellation. If
  2686. // the context is nil a panic will occur. In the future the SDK may create
  2687. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2688. // for more information on using Contexts.
  2689. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  2690. req, out := c.GetBucketCorsRequest(input)
  2691. req.SetContext(ctx)
  2692. req.ApplyOptions(opts...)
  2693. return out, req.Send()
  2694. }
  2695. const opGetBucketEncryption = "GetBucketEncryption"
  2696. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  2697. // client's request for the GetBucketEncryption operation. The "output" return
  2698. // value will be populated with the request's response once the request completes
  2699. // successfully.
  2700. //
  2701. // Use "Send" method on the returned Request to send the API call to the service.
  2702. // the "output" return value is not valid until after Send returns without error.
  2703. //
  2704. // See GetBucketEncryption for more information on using the GetBucketEncryption
  2705. // API call, and error handling.
  2706. //
  2707. // This method is useful when you want to inject custom logic or configuration
  2708. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2709. //
  2710. // // Example sending a request using the GetBucketEncryptionRequest method.
  2711. // req, resp := client.GetBucketEncryptionRequest(params)
  2712. //
  2713. // err := req.Send()
  2714. // if err == nil { // resp is now filled
  2715. // fmt.Println(resp)
  2716. // }
  2717. //
  2718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  2719. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  2720. op := &request.Operation{
  2721. Name: opGetBucketEncryption,
  2722. HTTPMethod: "GET",
  2723. HTTPPath: "/{Bucket}?encryption",
  2724. }
  2725. if input == nil {
  2726. input = &GetBucketEncryptionInput{}
  2727. }
  2728. output = &GetBucketEncryptionOutput{}
  2729. req = c.newRequest(op, input, output)
  2730. return
  2731. }
  2732. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  2733. //
  2734. // Returns the default encryption configuration for an Amazon S3 bucket. If
  2735. // the bucket does not have a default encryption configuration, GetBucketEncryption
  2736. // returns ServerSideEncryptionConfigurationNotFoundError.
  2737. //
  2738. // For information about the Amazon S3 default encryption feature, see Amazon
  2739. // S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html).
  2740. //
  2741. // To use this operation, you must have permission to perform the s3:GetEncryptionConfiguration
  2742. // action. The bucket owner has this permission by default. The bucket owner
  2743. // can grant this permission to others. For more information about permissions,
  2744. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  2745. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  2746. //
  2747. // The following operations are related to GetBucketEncryption:
  2748. //
  2749. // - PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
  2750. //
  2751. // - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
  2752. //
  2753. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2754. // with awserr.Error's Code and Message methods to get detailed information about
  2755. // the error.
  2756. //
  2757. // See the AWS API reference guide for Amazon Simple Storage Service's
  2758. // API operation GetBucketEncryption for usage and error information.
  2759. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  2760. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  2761. req, out := c.GetBucketEncryptionRequest(input)
  2762. return out, req.Send()
  2763. }
  2764. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  2765. // the ability to pass a context and additional request options.
  2766. //
  2767. // See GetBucketEncryption for details on how to use this API operation.
  2768. //
  2769. // The context must be non-nil and will be used for request cancellation. If
  2770. // the context is nil a panic will occur. In the future the SDK may create
  2771. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2772. // for more information on using Contexts.
  2773. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  2774. req, out := c.GetBucketEncryptionRequest(input)
  2775. req.SetContext(ctx)
  2776. req.ApplyOptions(opts...)
  2777. return out, req.Send()
  2778. }
  2779. const opGetBucketIntelligentTieringConfiguration = "GetBucketIntelligentTieringConfiguration"
  2780. // GetBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
  2781. // client's request for the GetBucketIntelligentTieringConfiguration operation. The "output" return
  2782. // value will be populated with the request's response once the request completes
  2783. // successfully.
  2784. //
  2785. // Use "Send" method on the returned Request to send the API call to the service.
  2786. // the "output" return value is not valid until after Send returns without error.
  2787. //
  2788. // See GetBucketIntelligentTieringConfiguration for more information on using the GetBucketIntelligentTieringConfiguration
  2789. // API call, and error handling.
  2790. //
  2791. // This method is useful when you want to inject custom logic or configuration
  2792. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2793. //
  2794. // // Example sending a request using the GetBucketIntelligentTieringConfigurationRequest method.
  2795. // req, resp := client.GetBucketIntelligentTieringConfigurationRequest(params)
  2796. //
  2797. // err := req.Send()
  2798. // if err == nil { // resp is now filled
  2799. // fmt.Println(resp)
  2800. // }
  2801. //
  2802. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
  2803. func (c *S3) GetBucketIntelligentTieringConfigurationRequest(input *GetBucketIntelligentTieringConfigurationInput) (req *request.Request, output *GetBucketIntelligentTieringConfigurationOutput) {
  2804. op := &request.Operation{
  2805. Name: opGetBucketIntelligentTieringConfiguration,
  2806. HTTPMethod: "GET",
  2807. HTTPPath: "/{Bucket}?intelligent-tiering",
  2808. }
  2809. if input == nil {
  2810. input = &GetBucketIntelligentTieringConfigurationInput{}
  2811. }
  2812. output = &GetBucketIntelligentTieringConfigurationOutput{}
  2813. req = c.newRequest(op, input, output)
  2814. return
  2815. }
  2816. // GetBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
  2817. //
  2818. // Gets the S3 Intelligent-Tiering configuration from the specified bucket.
  2819. //
  2820. // The S3 Intelligent-Tiering storage class is designed to optimize storage
  2821. // costs by automatically moving data to the most cost-effective storage access
  2822. // tier, without performance impact or operational overhead. S3 Intelligent-Tiering
  2823. // delivers automatic cost savings in three low latency and high throughput
  2824. // access tiers. To get the lowest storage cost on data that can be accessed
  2825. // in minutes to hours, you can choose to activate additional archiving capabilities.
  2826. //
  2827. // The S3 Intelligent-Tiering storage class is the ideal storage class for data
  2828. // with unknown, changing, or unpredictable access patterns, independent of
  2829. // object size or retention period. If the size of an object is less than 128
  2830. // KB, it is not monitored and not eligible for auto-tiering. Smaller objects
  2831. // can be stored, but they are always charged at the Frequent Access tier rates
  2832. // in the S3 Intelligent-Tiering storage class.
  2833. //
  2834. // For more information, see Storage class for automatically optimizing frequently
  2835. // and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
  2836. //
  2837. // Operations related to GetBucketIntelligentTieringConfiguration include:
  2838. //
  2839. // - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
  2840. //
  2841. // - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
  2842. //
  2843. // - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
  2844. //
  2845. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2846. // with awserr.Error's Code and Message methods to get detailed information about
  2847. // the error.
  2848. //
  2849. // See the AWS API reference guide for Amazon Simple Storage Service's
  2850. // API operation GetBucketIntelligentTieringConfiguration for usage and error information.
  2851. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
  2852. func (c *S3) GetBucketIntelligentTieringConfiguration(input *GetBucketIntelligentTieringConfigurationInput) (*GetBucketIntelligentTieringConfigurationOutput, error) {
  2853. req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
  2854. return out, req.Send()
  2855. }
  2856. // GetBucketIntelligentTieringConfigurationWithContext is the same as GetBucketIntelligentTieringConfiguration with the addition of
  2857. // the ability to pass a context and additional request options.
  2858. //
  2859. // See GetBucketIntelligentTieringConfiguration for details on how to use this API operation.
  2860. //
  2861. // The context must be non-nil and will be used for request cancellation. If
  2862. // the context is nil a panic will occur. In the future the SDK may create
  2863. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2864. // for more information on using Contexts.
  2865. func (c *S3) GetBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *GetBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*GetBucketIntelligentTieringConfigurationOutput, error) {
  2866. req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
  2867. req.SetContext(ctx)
  2868. req.ApplyOptions(opts...)
  2869. return out, req.Send()
  2870. }
  2871. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  2872. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  2873. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  2874. // value will be populated with the request's response once the request completes
  2875. // successfully.
  2876. //
  2877. // Use "Send" method on the returned Request to send the API call to the service.
  2878. // the "output" return value is not valid until after Send returns without error.
  2879. //
  2880. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  2881. // API call, and error handling.
  2882. //
  2883. // This method is useful when you want to inject custom logic or configuration
  2884. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2885. //
  2886. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  2887. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  2888. //
  2889. // err := req.Send()
  2890. // if err == nil { // resp is now filled
  2891. // fmt.Println(resp)
  2892. // }
  2893. //
  2894. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  2895. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  2896. op := &request.Operation{
  2897. Name: opGetBucketInventoryConfiguration,
  2898. HTTPMethod: "GET",
  2899. HTTPPath: "/{Bucket}?inventory",
  2900. }
  2901. if input == nil {
  2902. input = &GetBucketInventoryConfigurationInput{}
  2903. }
  2904. output = &GetBucketInventoryConfigurationOutput{}
  2905. req = c.newRequest(op, input, output)
  2906. return
  2907. }
  2908. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  2909. //
  2910. // Returns an inventory configuration (identified by the inventory configuration
  2911. // ID) from the bucket.
  2912. //
  2913. // To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
  2914. // action. The bucket owner has this permission by default and can grant this
  2915. // permission to others. For more information about permissions, see Permissions
  2916. // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  2917. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  2918. //
  2919. // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
  2920. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
  2921. //
  2922. // The following operations are related to GetBucketInventoryConfiguration:
  2923. //
  2924. // - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
  2925. //
  2926. // - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
  2927. //
  2928. // - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
  2929. //
  2930. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2931. // with awserr.Error's Code and Message methods to get detailed information about
  2932. // the error.
  2933. //
  2934. // See the AWS API reference guide for Amazon Simple Storage Service's
  2935. // API operation GetBucketInventoryConfiguration for usage and error information.
  2936. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  2937. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  2938. req, out := c.GetBucketInventoryConfigurationRequest(input)
  2939. return out, req.Send()
  2940. }
  2941. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  2942. // the ability to pass a context and additional request options.
  2943. //
  2944. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  2945. //
  2946. // The context must be non-nil and will be used for request cancellation. If
  2947. // the context is nil a panic will occur. In the future the SDK may create
  2948. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2949. // for more information on using Contexts.
  2950. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  2951. req, out := c.GetBucketInventoryConfigurationRequest(input)
  2952. req.SetContext(ctx)
  2953. req.ApplyOptions(opts...)
  2954. return out, req.Send()
  2955. }
  2956. const opGetBucketLifecycle = "GetBucketLifecycle"
  2957. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  2958. // client's request for the GetBucketLifecycle operation. The "output" return
  2959. // value will be populated with the request's response once the request completes
  2960. // successfully.
  2961. //
  2962. // Use "Send" method on the returned Request to send the API call to the service.
  2963. // the "output" return value is not valid until after Send returns without error.
  2964. //
  2965. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  2966. // API call, and error handling.
  2967. //
  2968. // This method is useful when you want to inject custom logic or configuration
  2969. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2970. //
  2971. // // Example sending a request using the GetBucketLifecycleRequest method.
  2972. // req, resp := client.GetBucketLifecycleRequest(params)
  2973. //
  2974. // err := req.Send()
  2975. // if err == nil { // resp is now filled
  2976. // fmt.Println(resp)
  2977. // }
  2978. //
  2979. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  2980. //
  2981. // Deprecated: GetBucketLifecycle has been deprecated
  2982. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  2983. if c.Client.Config.Logger != nil {
  2984. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  2985. }
  2986. op := &request.Operation{
  2987. Name: opGetBucketLifecycle,
  2988. HTTPMethod: "GET",
  2989. HTTPPath: "/{Bucket}?lifecycle",
  2990. }
  2991. if input == nil {
  2992. input = &GetBucketLifecycleInput{}
  2993. }
  2994. output = &GetBucketLifecycleOutput{}
  2995. req = c.newRequest(op, input, output)
  2996. return
  2997. }
  2998. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  2999. //
  3000. // For an updated version of this API, see GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html).
  3001. // If you configured a bucket lifecycle using the filter element, you should
  3002. // see the updated version of this topic. This topic is provided for backward
  3003. // compatibility.
  3004. //
  3005. // Returns the lifecycle configuration information set on the bucket. For information
  3006. // about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
  3007. //
  3008. // To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
  3009. // action. The bucket owner has this permission by default. The bucket owner
  3010. // can grant this permission to others. For more information about permissions,
  3011. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  3012. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  3013. //
  3014. // GetBucketLifecycle has the following special error:
  3015. //
  3016. // - Error code: NoSuchLifecycleConfiguration Description: The lifecycle
  3017. // configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
  3018. // Code Prefix: Client
  3019. //
  3020. // The following operations are related to GetBucketLifecycle:
  3021. //
  3022. // - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
  3023. //
  3024. // - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
  3025. //
  3026. // - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
  3027. //
  3028. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3029. // with awserr.Error's Code and Message methods to get detailed information about
  3030. // the error.
  3031. //
  3032. // See the AWS API reference guide for Amazon Simple Storage Service's
  3033. // API operation GetBucketLifecycle for usage and error information.
  3034. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  3035. //
  3036. // Deprecated: GetBucketLifecycle has been deprecated
  3037. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  3038. req, out := c.GetBucketLifecycleRequest(input)
  3039. return out, req.Send()
  3040. }
  3041. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  3042. // the ability to pass a context and additional request options.
  3043. //
  3044. // See GetBucketLifecycle for details on how to use this API operation.
  3045. //
  3046. // The context must be non-nil and will be used for request cancellation. If
  3047. // the context is nil a panic will occur. In the future the SDK may create
  3048. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3049. // for more information on using Contexts.
  3050. //
  3051. // Deprecated: GetBucketLifecycleWithContext has been deprecated
  3052. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  3053. req, out := c.GetBucketLifecycleRequest(input)
  3054. req.SetContext(ctx)
  3055. req.ApplyOptions(opts...)
  3056. return out, req.Send()
  3057. }
  3058. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  3059. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  3060. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  3061. // value will be populated with the request's response once the request completes
  3062. // successfully.
  3063. //
  3064. // Use "Send" method on the returned Request to send the API call to the service.
  3065. // the "output" return value is not valid until after Send returns without error.
  3066. //
  3067. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  3068. // API call, and error handling.
  3069. //
  3070. // This method is useful when you want to inject custom logic or configuration
  3071. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3072. //
  3073. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  3074. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  3075. //
  3076. // err := req.Send()
  3077. // if err == nil { // resp is now filled
  3078. // fmt.Println(resp)
  3079. // }
  3080. //
  3081. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  3082. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  3083. op := &request.Operation{
  3084. Name: opGetBucketLifecycleConfiguration,
  3085. HTTPMethod: "GET",
  3086. HTTPPath: "/{Bucket}?lifecycle",
  3087. }
  3088. if input == nil {
  3089. input = &GetBucketLifecycleConfigurationInput{}
  3090. }
  3091. output = &GetBucketLifecycleConfigurationOutput{}
  3092. req = c.newRequest(op, input, output)
  3093. return
  3094. }
  3095. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  3096. //
  3097. // Bucket lifecycle configuration now supports specifying a lifecycle rule using
  3098. // an object key name prefix, one or more object tags, or a combination of both.
  3099. // Accordingly, this section describes the latest API. The response describes
  3100. // the new filter element that you can use to specify a filter to select a subset
  3101. // of objects to which the rule applies. If you are using a previous version
  3102. // of the lifecycle configuration, it still works. For the earlier action, see
  3103. // GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
  3104. //
  3105. // Returns the lifecycle configuration information set on the bucket. For information
  3106. // about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
  3107. //
  3108. // To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
  3109. // action. The bucket owner has this permission, by default. The bucket owner
  3110. // can grant this permission to others. For more information about permissions,
  3111. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  3112. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  3113. //
  3114. // GetBucketLifecycleConfiguration has the following special error:
  3115. //
  3116. // - Error code: NoSuchLifecycleConfiguration Description: The lifecycle
  3117. // configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
  3118. // Code Prefix: Client
  3119. //
  3120. // The following operations are related to GetBucketLifecycleConfiguration:
  3121. //
  3122. // - GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
  3123. //
  3124. // - PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
  3125. //
  3126. // - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
  3127. //
  3128. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3129. // with awserr.Error's Code and Message methods to get detailed information about
  3130. // the error.
  3131. //
  3132. // See the AWS API reference guide for Amazon Simple Storage Service's
  3133. // API operation GetBucketLifecycleConfiguration for usage and error information.
  3134. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  3135. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  3136. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  3137. return out, req.Send()
  3138. }
  3139. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  3140. // the ability to pass a context and additional request options.
  3141. //
  3142. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  3143. //
  3144. // The context must be non-nil and will be used for request cancellation. If
  3145. // the context is nil a panic will occur. In the future the SDK may create
  3146. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3147. // for more information on using Contexts.
  3148. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  3149. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  3150. req.SetContext(ctx)
  3151. req.ApplyOptions(opts...)
  3152. return out, req.Send()
  3153. }
  3154. const opGetBucketLocation = "GetBucketLocation"
  3155. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  3156. // client's request for the GetBucketLocation operation. The "output" return
  3157. // value will be populated with the request's response once the request completes
  3158. // successfully.
  3159. //
  3160. // Use "Send" method on the returned Request to send the API call to the service.
  3161. // the "output" return value is not valid until after Send returns without error.
  3162. //
  3163. // See GetBucketLocation for more information on using the GetBucketLocation
  3164. // API call, and error handling.
  3165. //
  3166. // This method is useful when you want to inject custom logic or configuration
  3167. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3168. //
  3169. // // Example sending a request using the GetBucketLocationRequest method.
  3170. // req, resp := client.GetBucketLocationRequest(params)
  3171. //
  3172. // err := req.Send()
  3173. // if err == nil { // resp is now filled
  3174. // fmt.Println(resp)
  3175. // }
  3176. //
  3177. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  3178. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  3179. op := &request.Operation{
  3180. Name: opGetBucketLocation,
  3181. HTTPMethod: "GET",
  3182. HTTPPath: "/{Bucket}?location",
  3183. }
  3184. if input == nil {
  3185. input = &GetBucketLocationInput{}
  3186. }
  3187. output = &GetBucketLocationOutput{}
  3188. req = c.newRequest(op, input, output)
  3189. return
  3190. }
  3191. // GetBucketLocation API operation for Amazon Simple Storage Service.
  3192. //
  3193. // Returns the Region the bucket resides in. You set the bucket's Region using
  3194. // the LocationConstraint request parameter in a CreateBucket request. For more
  3195. // information, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
  3196. //
  3197. // To use this implementation of the operation, you must be the bucket owner.
  3198. //
  3199. // To use this API against an access point, provide the alias of the access
  3200. // point in place of the bucket name.
  3201. //
  3202. // The following operations are related to GetBucketLocation:
  3203. //
  3204. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  3205. //
  3206. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  3207. //
  3208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3209. // with awserr.Error's Code and Message methods to get detailed information about
  3210. // the error.
  3211. //
  3212. // See the AWS API reference guide for Amazon Simple Storage Service's
  3213. // API operation GetBucketLocation for usage and error information.
  3214. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  3215. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  3216. req, out := c.GetBucketLocationRequest(input)
  3217. return out, req.Send()
  3218. }
  3219. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  3220. // the ability to pass a context and additional request options.
  3221. //
  3222. // See GetBucketLocation for details on how to use this API operation.
  3223. //
  3224. // The context must be non-nil and will be used for request cancellation. If
  3225. // the context is nil a panic will occur. In the future the SDK may create
  3226. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3227. // for more information on using Contexts.
  3228. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  3229. req, out := c.GetBucketLocationRequest(input)
  3230. req.SetContext(ctx)
  3231. req.ApplyOptions(opts...)
  3232. return out, req.Send()
  3233. }
  3234. const opGetBucketLogging = "GetBucketLogging"
  3235. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  3236. // client's request for the GetBucketLogging operation. The "output" return
  3237. // value will be populated with the request's response once the request completes
  3238. // successfully.
  3239. //
  3240. // Use "Send" method on the returned Request to send the API call to the service.
  3241. // the "output" return value is not valid until after Send returns without error.
  3242. //
  3243. // See GetBucketLogging for more information on using the GetBucketLogging
  3244. // API call, and error handling.
  3245. //
  3246. // This method is useful when you want to inject custom logic or configuration
  3247. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3248. //
  3249. // // Example sending a request using the GetBucketLoggingRequest method.
  3250. // req, resp := client.GetBucketLoggingRequest(params)
  3251. //
  3252. // err := req.Send()
  3253. // if err == nil { // resp is now filled
  3254. // fmt.Println(resp)
  3255. // }
  3256. //
  3257. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  3258. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  3259. op := &request.Operation{
  3260. Name: opGetBucketLogging,
  3261. HTTPMethod: "GET",
  3262. HTTPPath: "/{Bucket}?logging",
  3263. }
  3264. if input == nil {
  3265. input = &GetBucketLoggingInput{}
  3266. }
  3267. output = &GetBucketLoggingOutput{}
  3268. req = c.newRequest(op, input, output)
  3269. return
  3270. }
  3271. // GetBucketLogging API operation for Amazon Simple Storage Service.
  3272. //
  3273. // Returns the logging status of a bucket and the permissions users have to
  3274. // view and modify that status. To use GET, you must be the bucket owner.
  3275. //
  3276. // The following operations are related to GetBucketLogging:
  3277. //
  3278. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  3279. //
  3280. // - PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
  3281. //
  3282. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3283. // with awserr.Error's Code and Message methods to get detailed information about
  3284. // the error.
  3285. //
  3286. // See the AWS API reference guide for Amazon Simple Storage Service's
  3287. // API operation GetBucketLogging for usage and error information.
  3288. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  3289. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  3290. req, out := c.GetBucketLoggingRequest(input)
  3291. return out, req.Send()
  3292. }
  3293. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  3294. // the ability to pass a context and additional request options.
  3295. //
  3296. // See GetBucketLogging for details on how to use this API operation.
  3297. //
  3298. // The context must be non-nil and will be used for request cancellation. If
  3299. // the context is nil a panic will occur. In the future the SDK may create
  3300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3301. // for more information on using Contexts.
  3302. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  3303. req, out := c.GetBucketLoggingRequest(input)
  3304. req.SetContext(ctx)
  3305. req.ApplyOptions(opts...)
  3306. return out, req.Send()
  3307. }
  3308. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  3309. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  3310. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  3311. // value will be populated with the request's response once the request completes
  3312. // successfully.
  3313. //
  3314. // Use "Send" method on the returned Request to send the API call to the service.
  3315. // the "output" return value is not valid until after Send returns without error.
  3316. //
  3317. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  3318. // API call, and error handling.
  3319. //
  3320. // This method is useful when you want to inject custom logic or configuration
  3321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3322. //
  3323. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  3324. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  3325. //
  3326. // err := req.Send()
  3327. // if err == nil { // resp is now filled
  3328. // fmt.Println(resp)
  3329. // }
  3330. //
  3331. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  3332. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  3333. op := &request.Operation{
  3334. Name: opGetBucketMetricsConfiguration,
  3335. HTTPMethod: "GET",
  3336. HTTPPath: "/{Bucket}?metrics",
  3337. }
  3338. if input == nil {
  3339. input = &GetBucketMetricsConfigurationInput{}
  3340. }
  3341. output = &GetBucketMetricsConfigurationOutput{}
  3342. req = c.newRequest(op, input, output)
  3343. return
  3344. }
  3345. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  3346. //
  3347. // Gets a metrics configuration (specified by the metrics configuration ID)
  3348. // from the bucket. Note that this doesn't include the daily storage metrics.
  3349. //
  3350. // To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
  3351. // action. The bucket owner has this permission by default. The bucket owner
  3352. // can grant this permission to others. For more information about permissions,
  3353. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  3354. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  3355. //
  3356. // For information about CloudWatch request metrics for Amazon S3, see Monitoring
  3357. // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
  3358. //
  3359. // The following operations are related to GetBucketMetricsConfiguration:
  3360. //
  3361. // - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
  3362. //
  3363. // - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
  3364. //
  3365. // - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
  3366. //
  3367. // - Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
  3368. //
  3369. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3370. // with awserr.Error's Code and Message methods to get detailed information about
  3371. // the error.
  3372. //
  3373. // See the AWS API reference guide for Amazon Simple Storage Service's
  3374. // API operation GetBucketMetricsConfiguration for usage and error information.
  3375. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  3376. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  3377. req, out := c.GetBucketMetricsConfigurationRequest(input)
  3378. return out, req.Send()
  3379. }
  3380. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  3381. // the ability to pass a context and additional request options.
  3382. //
  3383. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  3384. //
  3385. // The context must be non-nil and will be used for request cancellation. If
  3386. // the context is nil a panic will occur. In the future the SDK may create
  3387. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3388. // for more information on using Contexts.
  3389. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  3390. req, out := c.GetBucketMetricsConfigurationRequest(input)
  3391. req.SetContext(ctx)
  3392. req.ApplyOptions(opts...)
  3393. return out, req.Send()
  3394. }
  3395. const opGetBucketNotification = "GetBucketNotification"
  3396. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  3397. // client's request for the GetBucketNotification operation. The "output" return
  3398. // value will be populated with the request's response once the request completes
  3399. // successfully.
  3400. //
  3401. // Use "Send" method on the returned Request to send the API call to the service.
  3402. // the "output" return value is not valid until after Send returns without error.
  3403. //
  3404. // See GetBucketNotification for more information on using the GetBucketNotification
  3405. // API call, and error handling.
  3406. //
  3407. // This method is useful when you want to inject custom logic or configuration
  3408. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3409. //
  3410. // // Example sending a request using the GetBucketNotificationRequest method.
  3411. // req, resp := client.GetBucketNotificationRequest(params)
  3412. //
  3413. // err := req.Send()
  3414. // if err == nil { // resp is now filled
  3415. // fmt.Println(resp)
  3416. // }
  3417. //
  3418. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  3419. //
  3420. // Deprecated: GetBucketNotification has been deprecated
  3421. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  3422. if c.Client.Config.Logger != nil {
  3423. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  3424. }
  3425. op := &request.Operation{
  3426. Name: opGetBucketNotification,
  3427. HTTPMethod: "GET",
  3428. HTTPPath: "/{Bucket}?notification",
  3429. }
  3430. if input == nil {
  3431. input = &GetBucketNotificationConfigurationRequest{}
  3432. }
  3433. output = &NotificationConfigurationDeprecated{}
  3434. req = c.newRequest(op, input, output)
  3435. return
  3436. }
  3437. // GetBucketNotification API operation for Amazon Simple Storage Service.
  3438. //
  3439. // No longer used, see GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html).
  3440. //
  3441. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3442. // with awserr.Error's Code and Message methods to get detailed information about
  3443. // the error.
  3444. //
  3445. // See the AWS API reference guide for Amazon Simple Storage Service's
  3446. // API operation GetBucketNotification for usage and error information.
  3447. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  3448. //
  3449. // Deprecated: GetBucketNotification has been deprecated
  3450. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  3451. req, out := c.GetBucketNotificationRequest(input)
  3452. return out, req.Send()
  3453. }
  3454. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  3455. // the ability to pass a context and additional request options.
  3456. //
  3457. // See GetBucketNotification for details on how to use this API operation.
  3458. //
  3459. // The context must be non-nil and will be used for request cancellation. If
  3460. // the context is nil a panic will occur. In the future the SDK may create
  3461. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3462. // for more information on using Contexts.
  3463. //
  3464. // Deprecated: GetBucketNotificationWithContext has been deprecated
  3465. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  3466. req, out := c.GetBucketNotificationRequest(input)
  3467. req.SetContext(ctx)
  3468. req.ApplyOptions(opts...)
  3469. return out, req.Send()
  3470. }
  3471. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  3472. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  3473. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  3474. // value will be populated with the request's response once the request completes
  3475. // successfully.
  3476. //
  3477. // Use "Send" method on the returned Request to send the API call to the service.
  3478. // the "output" return value is not valid until after Send returns without error.
  3479. //
  3480. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  3481. // API call, and error handling.
  3482. //
  3483. // This method is useful when you want to inject custom logic or configuration
  3484. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3485. //
  3486. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  3487. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  3488. //
  3489. // err := req.Send()
  3490. // if err == nil { // resp is now filled
  3491. // fmt.Println(resp)
  3492. // }
  3493. //
  3494. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  3495. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  3496. op := &request.Operation{
  3497. Name: opGetBucketNotificationConfiguration,
  3498. HTTPMethod: "GET",
  3499. HTTPPath: "/{Bucket}?notification",
  3500. }
  3501. if input == nil {
  3502. input = &GetBucketNotificationConfigurationRequest{}
  3503. }
  3504. output = &NotificationConfiguration{}
  3505. req = c.newRequest(op, input, output)
  3506. return
  3507. }
  3508. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  3509. //
  3510. // Returns the notification configuration of a bucket.
  3511. //
  3512. // If notifications are not enabled on the bucket, the action returns an empty
  3513. // NotificationConfiguration element.
  3514. //
  3515. // By default, you must be the bucket owner to read the notification configuration
  3516. // of a bucket. However, the bucket owner can use a bucket policy to grant permission
  3517. // to other users to read this configuration with the s3:GetBucketNotification
  3518. // permission.
  3519. //
  3520. // For more information about setting and reading the notification configuration
  3521. // on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
  3522. // For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
  3523. //
  3524. // The following action is related to GetBucketNotification:
  3525. //
  3526. // - PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
  3527. //
  3528. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3529. // with awserr.Error's Code and Message methods to get detailed information about
  3530. // the error.
  3531. //
  3532. // See the AWS API reference guide for Amazon Simple Storage Service's
  3533. // API operation GetBucketNotificationConfiguration for usage and error information.
  3534. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  3535. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  3536. req, out := c.GetBucketNotificationConfigurationRequest(input)
  3537. return out, req.Send()
  3538. }
  3539. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  3540. // the ability to pass a context and additional request options.
  3541. //
  3542. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  3543. //
  3544. // The context must be non-nil and will be used for request cancellation. If
  3545. // the context is nil a panic will occur. In the future the SDK may create
  3546. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3547. // for more information on using Contexts.
  3548. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  3549. req, out := c.GetBucketNotificationConfigurationRequest(input)
  3550. req.SetContext(ctx)
  3551. req.ApplyOptions(opts...)
  3552. return out, req.Send()
  3553. }
  3554. const opGetBucketOwnershipControls = "GetBucketOwnershipControls"
  3555. // GetBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
  3556. // client's request for the GetBucketOwnershipControls operation. The "output" return
  3557. // value will be populated with the request's response once the request completes
  3558. // successfully.
  3559. //
  3560. // Use "Send" method on the returned Request to send the API call to the service.
  3561. // the "output" return value is not valid until after Send returns without error.
  3562. //
  3563. // See GetBucketOwnershipControls for more information on using the GetBucketOwnershipControls
  3564. // API call, and error handling.
  3565. //
  3566. // This method is useful when you want to inject custom logic or configuration
  3567. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3568. //
  3569. // // Example sending a request using the GetBucketOwnershipControlsRequest method.
  3570. // req, resp := client.GetBucketOwnershipControlsRequest(params)
  3571. //
  3572. // err := req.Send()
  3573. // if err == nil { // resp is now filled
  3574. // fmt.Println(resp)
  3575. // }
  3576. //
  3577. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
  3578. func (c *S3) GetBucketOwnershipControlsRequest(input *GetBucketOwnershipControlsInput) (req *request.Request, output *GetBucketOwnershipControlsOutput) {
  3579. op := &request.Operation{
  3580. Name: opGetBucketOwnershipControls,
  3581. HTTPMethod: "GET",
  3582. HTTPPath: "/{Bucket}?ownershipControls",
  3583. }
  3584. if input == nil {
  3585. input = &GetBucketOwnershipControlsInput{}
  3586. }
  3587. output = &GetBucketOwnershipControlsOutput{}
  3588. req = c.newRequest(op, input, output)
  3589. return
  3590. }
  3591. // GetBucketOwnershipControls API operation for Amazon Simple Storage Service.
  3592. //
  3593. // Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation,
  3594. // you must have the s3:GetBucketOwnershipControls permission. For more information
  3595. // about Amazon S3 permissions, see Specifying permissions in a policy (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html).
  3596. //
  3597. // For information about Amazon S3 Object Ownership, see Using Object Ownership
  3598. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
  3599. //
  3600. // The following operations are related to GetBucketOwnershipControls:
  3601. //
  3602. // - PutBucketOwnershipControls
  3603. //
  3604. // - DeleteBucketOwnershipControls
  3605. //
  3606. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3607. // with awserr.Error's Code and Message methods to get detailed information about
  3608. // the error.
  3609. //
  3610. // See the AWS API reference guide for Amazon Simple Storage Service's
  3611. // API operation GetBucketOwnershipControls for usage and error information.
  3612. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
  3613. func (c *S3) GetBucketOwnershipControls(input *GetBucketOwnershipControlsInput) (*GetBucketOwnershipControlsOutput, error) {
  3614. req, out := c.GetBucketOwnershipControlsRequest(input)
  3615. return out, req.Send()
  3616. }
  3617. // GetBucketOwnershipControlsWithContext is the same as GetBucketOwnershipControls with the addition of
  3618. // the ability to pass a context and additional request options.
  3619. //
  3620. // See GetBucketOwnershipControls for details on how to use this API operation.
  3621. //
  3622. // The context must be non-nil and will be used for request cancellation. If
  3623. // the context is nil a panic will occur. In the future the SDK may create
  3624. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3625. // for more information on using Contexts.
  3626. func (c *S3) GetBucketOwnershipControlsWithContext(ctx aws.Context, input *GetBucketOwnershipControlsInput, opts ...request.Option) (*GetBucketOwnershipControlsOutput, error) {
  3627. req, out := c.GetBucketOwnershipControlsRequest(input)
  3628. req.SetContext(ctx)
  3629. req.ApplyOptions(opts...)
  3630. return out, req.Send()
  3631. }
  3632. const opGetBucketPolicy = "GetBucketPolicy"
  3633. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  3634. // client's request for the GetBucketPolicy operation. The "output" return
  3635. // value will be populated with the request's response once the request completes
  3636. // successfully.
  3637. //
  3638. // Use "Send" method on the returned Request to send the API call to the service.
  3639. // the "output" return value is not valid until after Send returns without error.
  3640. //
  3641. // See GetBucketPolicy for more information on using the GetBucketPolicy
  3642. // API call, and error handling.
  3643. //
  3644. // This method is useful when you want to inject custom logic or configuration
  3645. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3646. //
  3647. // // Example sending a request using the GetBucketPolicyRequest method.
  3648. // req, resp := client.GetBucketPolicyRequest(params)
  3649. //
  3650. // err := req.Send()
  3651. // if err == nil { // resp is now filled
  3652. // fmt.Println(resp)
  3653. // }
  3654. //
  3655. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  3656. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  3657. op := &request.Operation{
  3658. Name: opGetBucketPolicy,
  3659. HTTPMethod: "GET",
  3660. HTTPPath: "/{Bucket}?policy",
  3661. }
  3662. if input == nil {
  3663. input = &GetBucketPolicyInput{}
  3664. }
  3665. output = &GetBucketPolicyOutput{}
  3666. req = c.newRequest(op, input, output)
  3667. return
  3668. }
  3669. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  3670. //
  3671. // Returns the policy of a specified bucket. If you are using an identity other
  3672. // than the root user of the Amazon Web Services account that owns the bucket,
  3673. // the calling identity must have the GetBucketPolicy permissions on the specified
  3674. // bucket and belong to the bucket owner's account in order to use this operation.
  3675. //
  3676. // If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access
  3677. // Denied error. If you have the correct permissions, but you're not using an
  3678. // identity that belongs to the bucket owner's account, Amazon S3 returns a
  3679. // 405 Method Not Allowed error.
  3680. //
  3681. // As a security precaution, the root user of the Amazon Web Services account
  3682. // that owns a bucket can always use this operation, even if the policy explicitly
  3683. // denies the root user the ability to perform this action.
  3684. //
  3685. // For more information about bucket policies, see Using Bucket Policies and
  3686. // User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
  3687. //
  3688. // The following action is related to GetBucketPolicy:
  3689. //
  3690. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  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 Simple Storage Service's
  3697. // API operation GetBucketPolicy for usage and error information.
  3698. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  3699. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  3700. req, out := c.GetBucketPolicyRequest(input)
  3701. return out, req.Send()
  3702. }
  3703. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  3704. // the ability to pass a context and additional request options.
  3705. //
  3706. // See GetBucketPolicy for details on how to use this API operation.
  3707. //
  3708. // The context must be non-nil and will be used for request cancellation. If
  3709. // the context is nil a panic will occur. In the future the SDK may create
  3710. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3711. // for more information on using Contexts.
  3712. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  3713. req, out := c.GetBucketPolicyRequest(input)
  3714. req.SetContext(ctx)
  3715. req.ApplyOptions(opts...)
  3716. return out, req.Send()
  3717. }
  3718. const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
  3719. // GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
  3720. // client's request for the GetBucketPolicyStatus operation. The "output" return
  3721. // value will be populated with the request's response once the request completes
  3722. // successfully.
  3723. //
  3724. // Use "Send" method on the returned Request to send the API call to the service.
  3725. // the "output" return value is not valid until after Send returns without error.
  3726. //
  3727. // See GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
  3728. // API call, and error handling.
  3729. //
  3730. // This method is useful when you want to inject custom logic or configuration
  3731. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3732. //
  3733. // // Example sending a request using the GetBucketPolicyStatusRequest method.
  3734. // req, resp := client.GetBucketPolicyStatusRequest(params)
  3735. //
  3736. // err := req.Send()
  3737. // if err == nil { // resp is now filled
  3738. // fmt.Println(resp)
  3739. // }
  3740. //
  3741. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  3742. func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
  3743. op := &request.Operation{
  3744. Name: opGetBucketPolicyStatus,
  3745. HTTPMethod: "GET",
  3746. HTTPPath: "/{Bucket}?policyStatus",
  3747. }
  3748. if input == nil {
  3749. input = &GetBucketPolicyStatusInput{}
  3750. }
  3751. output = &GetBucketPolicyStatusOutput{}
  3752. req = c.newRequest(op, input, output)
  3753. return
  3754. }
  3755. // GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
  3756. //
  3757. // Retrieves the policy status for an Amazon S3 bucket, indicating whether the
  3758. // bucket is public. In order to use this operation, you must have the s3:GetBucketPolicyStatus
  3759. // permission. For more information about Amazon S3 permissions, see Specifying
  3760. // Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  3761. //
  3762. // For more information about when Amazon S3 considers a bucket public, see
  3763. // The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
  3764. //
  3765. // The following operations are related to GetBucketPolicyStatus:
  3766. //
  3767. // - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
  3768. //
  3769. // - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
  3770. //
  3771. // - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
  3772. //
  3773. // - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
  3774. //
  3775. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3776. // with awserr.Error's Code and Message methods to get detailed information about
  3777. // the error.
  3778. //
  3779. // See the AWS API reference guide for Amazon Simple Storage Service's
  3780. // API operation GetBucketPolicyStatus for usage and error information.
  3781. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  3782. func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
  3783. req, out := c.GetBucketPolicyStatusRequest(input)
  3784. return out, req.Send()
  3785. }
  3786. // GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
  3787. // the ability to pass a context and additional request options.
  3788. //
  3789. // See GetBucketPolicyStatus for details on how to use this API operation.
  3790. //
  3791. // The context must be non-nil and will be used for request cancellation. If
  3792. // the context is nil a panic will occur. In the future the SDK may create
  3793. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3794. // for more information on using Contexts.
  3795. func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
  3796. req, out := c.GetBucketPolicyStatusRequest(input)
  3797. req.SetContext(ctx)
  3798. req.ApplyOptions(opts...)
  3799. return out, req.Send()
  3800. }
  3801. const opGetBucketReplication = "GetBucketReplication"
  3802. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  3803. // client's request for the GetBucketReplication operation. The "output" return
  3804. // value will be populated with the request's response once the request completes
  3805. // successfully.
  3806. //
  3807. // Use "Send" method on the returned Request to send the API call to the service.
  3808. // the "output" return value is not valid until after Send returns without error.
  3809. //
  3810. // See GetBucketReplication for more information on using the GetBucketReplication
  3811. // API call, and error handling.
  3812. //
  3813. // This method is useful when you want to inject custom logic or configuration
  3814. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3815. //
  3816. // // Example sending a request using the GetBucketReplicationRequest method.
  3817. // req, resp := client.GetBucketReplicationRequest(params)
  3818. //
  3819. // err := req.Send()
  3820. // if err == nil { // resp is now filled
  3821. // fmt.Println(resp)
  3822. // }
  3823. //
  3824. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  3825. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  3826. op := &request.Operation{
  3827. Name: opGetBucketReplication,
  3828. HTTPMethod: "GET",
  3829. HTTPPath: "/{Bucket}?replication",
  3830. }
  3831. if input == nil {
  3832. input = &GetBucketReplicationInput{}
  3833. }
  3834. output = &GetBucketReplicationOutput{}
  3835. req = c.newRequest(op, input, output)
  3836. return
  3837. }
  3838. // GetBucketReplication API operation for Amazon Simple Storage Service.
  3839. //
  3840. // Returns the replication configuration of a bucket.
  3841. //
  3842. // It can take a while to propagate the put or delete a replication configuration
  3843. // to all Amazon S3 systems. Therefore, a get request soon after put or delete
  3844. // can return a wrong result.
  3845. //
  3846. // For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
  3847. // in the Amazon S3 User Guide.
  3848. //
  3849. // This action requires permissions for the s3:GetReplicationConfiguration action.
  3850. // For more information about permissions, see Using Bucket Policies and User
  3851. // Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
  3852. //
  3853. // If you include the Filter element in a replication configuration, you must
  3854. // also include the DeleteMarkerReplication and Priority elements. The response
  3855. // also returns those elements.
  3856. //
  3857. // For information about GetBucketReplication errors, see List of replication-related
  3858. // error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
  3859. //
  3860. // The following operations are related to GetBucketReplication:
  3861. //
  3862. // - PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
  3863. //
  3864. // - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
  3865. //
  3866. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3867. // with awserr.Error's Code and Message methods to get detailed information about
  3868. // the error.
  3869. //
  3870. // See the AWS API reference guide for Amazon Simple Storage Service's
  3871. // API operation GetBucketReplication for usage and error information.
  3872. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  3873. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  3874. req, out := c.GetBucketReplicationRequest(input)
  3875. return out, req.Send()
  3876. }
  3877. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  3878. // the ability to pass a context and additional request options.
  3879. //
  3880. // See GetBucketReplication for details on how to use this API operation.
  3881. //
  3882. // The context must be non-nil and will be used for request cancellation. If
  3883. // the context is nil a panic will occur. In the future the SDK may create
  3884. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3885. // for more information on using Contexts.
  3886. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  3887. req, out := c.GetBucketReplicationRequest(input)
  3888. req.SetContext(ctx)
  3889. req.ApplyOptions(opts...)
  3890. return out, req.Send()
  3891. }
  3892. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  3893. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  3894. // client's request for the GetBucketRequestPayment operation. The "output" return
  3895. // value will be populated with the request's response once the request completes
  3896. // successfully.
  3897. //
  3898. // Use "Send" method on the returned Request to send the API call to the service.
  3899. // the "output" return value is not valid until after Send returns without error.
  3900. //
  3901. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  3902. // API call, and error handling.
  3903. //
  3904. // This method is useful when you want to inject custom logic or configuration
  3905. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3906. //
  3907. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  3908. // req, resp := client.GetBucketRequestPaymentRequest(params)
  3909. //
  3910. // err := req.Send()
  3911. // if err == nil { // resp is now filled
  3912. // fmt.Println(resp)
  3913. // }
  3914. //
  3915. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  3916. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  3917. op := &request.Operation{
  3918. Name: opGetBucketRequestPayment,
  3919. HTTPMethod: "GET",
  3920. HTTPPath: "/{Bucket}?requestPayment",
  3921. }
  3922. if input == nil {
  3923. input = &GetBucketRequestPaymentInput{}
  3924. }
  3925. output = &GetBucketRequestPaymentOutput{}
  3926. req = c.newRequest(op, input, output)
  3927. return
  3928. }
  3929. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  3930. //
  3931. // Returns the request payment configuration of a bucket. To use this version
  3932. // of the operation, you must be the bucket owner. For more information, see
  3933. // Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
  3934. //
  3935. // The following operations are related to GetBucketRequestPayment:
  3936. //
  3937. // - ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
  3938. //
  3939. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3940. // with awserr.Error's Code and Message methods to get detailed information about
  3941. // the error.
  3942. //
  3943. // See the AWS API reference guide for Amazon Simple Storage Service's
  3944. // API operation GetBucketRequestPayment for usage and error information.
  3945. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  3946. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  3947. req, out := c.GetBucketRequestPaymentRequest(input)
  3948. return out, req.Send()
  3949. }
  3950. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  3951. // the ability to pass a context and additional request options.
  3952. //
  3953. // See GetBucketRequestPayment for details on how to use this API operation.
  3954. //
  3955. // The context must be non-nil and will be used for request cancellation. If
  3956. // the context is nil a panic will occur. In the future the SDK may create
  3957. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3958. // for more information on using Contexts.
  3959. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  3960. req, out := c.GetBucketRequestPaymentRequest(input)
  3961. req.SetContext(ctx)
  3962. req.ApplyOptions(opts...)
  3963. return out, req.Send()
  3964. }
  3965. const opGetBucketTagging = "GetBucketTagging"
  3966. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  3967. // client's request for the GetBucketTagging operation. The "output" return
  3968. // value will be populated with the request's response once the request completes
  3969. // successfully.
  3970. //
  3971. // Use "Send" method on the returned Request to send the API call to the service.
  3972. // the "output" return value is not valid until after Send returns without error.
  3973. //
  3974. // See GetBucketTagging for more information on using the GetBucketTagging
  3975. // API call, and error handling.
  3976. //
  3977. // This method is useful when you want to inject custom logic or configuration
  3978. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3979. //
  3980. // // Example sending a request using the GetBucketTaggingRequest method.
  3981. // req, resp := client.GetBucketTaggingRequest(params)
  3982. //
  3983. // err := req.Send()
  3984. // if err == nil { // resp is now filled
  3985. // fmt.Println(resp)
  3986. // }
  3987. //
  3988. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  3989. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  3990. op := &request.Operation{
  3991. Name: opGetBucketTagging,
  3992. HTTPMethod: "GET",
  3993. HTTPPath: "/{Bucket}?tagging",
  3994. }
  3995. if input == nil {
  3996. input = &GetBucketTaggingInput{}
  3997. }
  3998. output = &GetBucketTaggingOutput{}
  3999. req = c.newRequest(op, input, output)
  4000. return
  4001. }
  4002. // GetBucketTagging API operation for Amazon Simple Storage Service.
  4003. //
  4004. // Returns the tag set associated with the bucket.
  4005. //
  4006. // To use this operation, you must have permission to perform the s3:GetBucketTagging
  4007. // action. By default, the bucket owner has this permission and can grant this
  4008. // permission to others.
  4009. //
  4010. // GetBucketTagging has the following special error:
  4011. //
  4012. // - Error code: NoSuchTagSet Description: There is no tag set associated
  4013. // with the bucket.
  4014. //
  4015. // The following operations are related to GetBucketTagging:
  4016. //
  4017. // - PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
  4018. //
  4019. // - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
  4020. //
  4021. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4022. // with awserr.Error's Code and Message methods to get detailed information about
  4023. // the error.
  4024. //
  4025. // See the AWS API reference guide for Amazon Simple Storage Service's
  4026. // API operation GetBucketTagging for usage and error information.
  4027. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  4028. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  4029. req, out := c.GetBucketTaggingRequest(input)
  4030. return out, req.Send()
  4031. }
  4032. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  4033. // the ability to pass a context and additional request options.
  4034. //
  4035. // See GetBucketTagging for details on how to use this API operation.
  4036. //
  4037. // The context must be non-nil and will be used for request cancellation. If
  4038. // the context is nil a panic will occur. In the future the SDK may create
  4039. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4040. // for more information on using Contexts.
  4041. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  4042. req, out := c.GetBucketTaggingRequest(input)
  4043. req.SetContext(ctx)
  4044. req.ApplyOptions(opts...)
  4045. return out, req.Send()
  4046. }
  4047. const opGetBucketVersioning = "GetBucketVersioning"
  4048. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  4049. // client's request for the GetBucketVersioning operation. The "output" return
  4050. // value will be populated with the request's response once the request completes
  4051. // successfully.
  4052. //
  4053. // Use "Send" method on the returned Request to send the API call to the service.
  4054. // the "output" return value is not valid until after Send returns without error.
  4055. //
  4056. // See GetBucketVersioning for more information on using the GetBucketVersioning
  4057. // API call, and error handling.
  4058. //
  4059. // This method is useful when you want to inject custom logic or configuration
  4060. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4061. //
  4062. // // Example sending a request using the GetBucketVersioningRequest method.
  4063. // req, resp := client.GetBucketVersioningRequest(params)
  4064. //
  4065. // err := req.Send()
  4066. // if err == nil { // resp is now filled
  4067. // fmt.Println(resp)
  4068. // }
  4069. //
  4070. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  4071. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  4072. op := &request.Operation{
  4073. Name: opGetBucketVersioning,
  4074. HTTPMethod: "GET",
  4075. HTTPPath: "/{Bucket}?versioning",
  4076. }
  4077. if input == nil {
  4078. input = &GetBucketVersioningInput{}
  4079. }
  4080. output = &GetBucketVersioningOutput{}
  4081. req = c.newRequest(op, input, output)
  4082. return
  4083. }
  4084. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  4085. //
  4086. // Returns the versioning state of a bucket.
  4087. //
  4088. // To retrieve the versioning state of a bucket, you must be the bucket owner.
  4089. //
  4090. // This implementation also returns the MFA Delete status of the versioning
  4091. // state. If the MFA Delete status is enabled, the bucket owner must use an
  4092. // authentication device to change the versioning state of the bucket.
  4093. //
  4094. // The following operations are related to GetBucketVersioning:
  4095. //
  4096. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  4097. //
  4098. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  4099. //
  4100. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  4101. //
  4102. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4103. // with awserr.Error's Code and Message methods to get detailed information about
  4104. // the error.
  4105. //
  4106. // See the AWS API reference guide for Amazon Simple Storage Service's
  4107. // API operation GetBucketVersioning for usage and error information.
  4108. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  4109. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  4110. req, out := c.GetBucketVersioningRequest(input)
  4111. return out, req.Send()
  4112. }
  4113. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  4114. // the ability to pass a context and additional request options.
  4115. //
  4116. // See GetBucketVersioning for details on how to use this API operation.
  4117. //
  4118. // The context must be non-nil and will be used for request cancellation. If
  4119. // the context is nil a panic will occur. In the future the SDK may create
  4120. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4121. // for more information on using Contexts.
  4122. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  4123. req, out := c.GetBucketVersioningRequest(input)
  4124. req.SetContext(ctx)
  4125. req.ApplyOptions(opts...)
  4126. return out, req.Send()
  4127. }
  4128. const opGetBucketWebsite = "GetBucketWebsite"
  4129. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  4130. // client's request for the GetBucketWebsite operation. The "output" return
  4131. // value will be populated with the request's response once the request completes
  4132. // successfully.
  4133. //
  4134. // Use "Send" method on the returned Request to send the API call to the service.
  4135. // the "output" return value is not valid until after Send returns without error.
  4136. //
  4137. // See GetBucketWebsite for more information on using the GetBucketWebsite
  4138. // API call, and error handling.
  4139. //
  4140. // This method is useful when you want to inject custom logic or configuration
  4141. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4142. //
  4143. // // Example sending a request using the GetBucketWebsiteRequest method.
  4144. // req, resp := client.GetBucketWebsiteRequest(params)
  4145. //
  4146. // err := req.Send()
  4147. // if err == nil { // resp is now filled
  4148. // fmt.Println(resp)
  4149. // }
  4150. //
  4151. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  4152. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  4153. op := &request.Operation{
  4154. Name: opGetBucketWebsite,
  4155. HTTPMethod: "GET",
  4156. HTTPPath: "/{Bucket}?website",
  4157. }
  4158. if input == nil {
  4159. input = &GetBucketWebsiteInput{}
  4160. }
  4161. output = &GetBucketWebsiteOutput{}
  4162. req = c.newRequest(op, input, output)
  4163. return
  4164. }
  4165. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  4166. //
  4167. // Returns the website configuration for a bucket. To host website on Amazon
  4168. // S3, you can configure a bucket as website by adding a website configuration.
  4169. // For more information about hosting websites, see Hosting Websites on Amazon
  4170. // S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
  4171. //
  4172. // This GET action requires the S3:GetBucketWebsite permission. By default,
  4173. // only the bucket owner can read the bucket website configuration. However,
  4174. // bucket owners can allow other users to read the website configuration by
  4175. // writing a bucket policy granting them the S3:GetBucketWebsite permission.
  4176. //
  4177. // The following operations are related to DeleteBucketWebsite:
  4178. //
  4179. // - DeleteBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
  4180. //
  4181. // - PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
  4182. //
  4183. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4184. // with awserr.Error's Code and Message methods to get detailed information about
  4185. // the error.
  4186. //
  4187. // See the AWS API reference guide for Amazon Simple Storage Service's
  4188. // API operation GetBucketWebsite for usage and error information.
  4189. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  4190. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  4191. req, out := c.GetBucketWebsiteRequest(input)
  4192. return out, req.Send()
  4193. }
  4194. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  4195. // the ability to pass a context and additional request options.
  4196. //
  4197. // See GetBucketWebsite for details on how to use this API operation.
  4198. //
  4199. // The context must be non-nil and will be used for request cancellation. If
  4200. // the context is nil a panic will occur. In the future the SDK may create
  4201. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4202. // for more information on using Contexts.
  4203. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  4204. req, out := c.GetBucketWebsiteRequest(input)
  4205. req.SetContext(ctx)
  4206. req.ApplyOptions(opts...)
  4207. return out, req.Send()
  4208. }
  4209. const opGetObject = "GetObject"
  4210. // GetObjectRequest generates a "aws/request.Request" representing the
  4211. // client's request for the GetObject operation. The "output" return
  4212. // value will be populated with the request's response once the request completes
  4213. // successfully.
  4214. //
  4215. // Use "Send" method on the returned Request to send the API call to the service.
  4216. // the "output" return value is not valid until after Send returns without error.
  4217. //
  4218. // See GetObject for more information on using the GetObject
  4219. // API call, and error handling.
  4220. //
  4221. // This method is useful when you want to inject custom logic or configuration
  4222. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4223. //
  4224. // // Example sending a request using the GetObjectRequest method.
  4225. // req, resp := client.GetObjectRequest(params)
  4226. //
  4227. // err := req.Send()
  4228. // if err == nil { // resp is now filled
  4229. // fmt.Println(resp)
  4230. // }
  4231. //
  4232. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  4233. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  4234. op := &request.Operation{
  4235. Name: opGetObject,
  4236. HTTPMethod: "GET",
  4237. HTTPPath: "/{Bucket}/{Key+}",
  4238. }
  4239. if input == nil {
  4240. input = &GetObjectInput{}
  4241. }
  4242. output = &GetObjectOutput{}
  4243. req = c.newRequest(op, input, output)
  4244. return
  4245. }
  4246. // GetObject API operation for Amazon Simple Storage Service.
  4247. //
  4248. // Retrieves objects from Amazon S3. To use GET, you must have READ access to
  4249. // the object. If you grant READ access to the anonymous user, you can return
  4250. // the object without using an authorization header.
  4251. //
  4252. // An Amazon S3 bucket has no directory hierarchy such as you would find in
  4253. // a typical computer file system. You can, however, create a logical hierarchy
  4254. // by using object key names that imply a folder structure. For example, instead
  4255. // of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.
  4256. //
  4257. // To get an object from such a logical hierarchy, specify the full key name
  4258. // for the object in the GET operation. For a virtual hosted-style request example,
  4259. // if you have the object photos/2006/February/sample.jpg, specify the resource
  4260. // as /photos/2006/February/sample.jpg. For a path-style request example, if
  4261. // you have the object photos/2006/February/sample.jpg in the bucket named examplebucket,
  4262. // specify the resource as /examplebucket/photos/2006/February/sample.jpg. For
  4263. // more information about request types, see HTTP Host Header Bucket Specification
  4264. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket).
  4265. //
  4266. // For more information about returning the ACL of an object, see GetObjectAcl
  4267. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html).
  4268. //
  4269. // If the object you are retrieving is stored in the S3 Glacier or S3 Glacier
  4270. // Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering
  4271. // Deep Archive tiers, before you can retrieve the object you must first restore
  4272. // a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
  4273. // Otherwise, this action returns an InvalidObjectStateError error. For information
  4274. // about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html).
  4275. //
  4276. // Encryption request headers, like x-amz-server-side-encryption, should not
  4277. // be sent for GET requests if your object uses server-side encryption with
  4278. // KMS keys (SSE-KMS) or server-side encryption with Amazon S3–managed encryption
  4279. // keys (SSE-S3). If your object does use these types of keys, you’ll get
  4280. // an HTTP 400 BadRequest error.
  4281. //
  4282. // If you encrypt an object by using server-side encryption with customer-provided
  4283. // encryption keys (SSE-C) when you store the object in Amazon S3, then when
  4284. // you GET the object, you must use the following headers:
  4285. //
  4286. // - x-amz-server-side-encryption-customer-algorithm
  4287. //
  4288. // - x-amz-server-side-encryption-customer-key
  4289. //
  4290. // - x-amz-server-side-encryption-customer-key-MD5
  4291. //
  4292. // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
  4293. // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  4294. //
  4295. // Assuming you have the relevant permission to read object tags, the response
  4296. // also returns the x-amz-tagging-count header that provides the count of number
  4297. // of tags associated with the object. You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
  4298. // to retrieve the tag set associated with an object.
  4299. //
  4300. // # Permissions
  4301. //
  4302. // You need the relevant read object (or version) permission for this operation.
  4303. // For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  4304. // If the object you request does not exist, the error Amazon S3 returns depends
  4305. // on whether you also have the s3:ListBucket permission.
  4306. //
  4307. // - If you have the s3:ListBucket permission on the bucket, Amazon S3 will
  4308. // return an HTTP status code 404 ("no such key") error.
  4309. //
  4310. // - If you don’t have the s3:ListBucket permission, Amazon S3 will return
  4311. // an HTTP status code 403 ("access denied") error.
  4312. //
  4313. // # Versioning
  4314. //
  4315. // By default, the GET action returns the current version of an object. To return
  4316. // a different version, use the versionId subresource.
  4317. //
  4318. // - If you supply a versionId, you need the s3:GetObjectVersion permission
  4319. // to access a specific version of an object. If you request a specific version,
  4320. // you do not need to have the s3:GetObject permission.
  4321. //
  4322. // - If the current version of the object is a delete marker, Amazon S3 behaves
  4323. // as if the object was deleted and includes x-amz-delete-marker: true in
  4324. // the response.
  4325. //
  4326. // For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
  4327. //
  4328. // # Overriding Response Header Values
  4329. //
  4330. // There are times when you want to override certain response header values
  4331. // in a GET response. For example, you might override the Content-Disposition
  4332. // response header value in your GET request.
  4333. //
  4334. // You can override values for a set of response headers using the following
  4335. // query parameters. These response header values are sent only on a successful
  4336. // request, that is, when status code 200 OK is returned. The set of headers
  4337. // you can override using these parameters is a subset of the headers that Amazon
  4338. // S3 accepts when you create an object. The response headers that you can override
  4339. // for the GET response are Content-Type, Content-Language, Expires, Cache-Control,
  4340. // Content-Disposition, and Content-Encoding. To override these header values
  4341. // in the GET response, you use the following request parameters.
  4342. //
  4343. // You must sign the request, either using an Authorization header or a presigned
  4344. // URL, when using these parameters. They cannot be used with an unsigned (anonymous)
  4345. // request.
  4346. //
  4347. // - response-content-type
  4348. //
  4349. // - response-content-language
  4350. //
  4351. // - response-expires
  4352. //
  4353. // - response-cache-control
  4354. //
  4355. // - response-content-disposition
  4356. //
  4357. // - response-content-encoding
  4358. //
  4359. // # Additional Considerations about Request Headers
  4360. //
  4361. // If both of the If-Match and If-Unmodified-Since headers are present in the
  4362. // request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since
  4363. // condition evaluates to false; then, S3 returns 200 OK and the data requested.
  4364. //
  4365. // If both of the If-None-Match and If-Modified-Since headers are present in
  4366. // the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since
  4367. // condition evaluates to true; then, S3 returns 304 Not Modified response code.
  4368. //
  4369. // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
  4370. //
  4371. // The following operations are related to GetObject:
  4372. //
  4373. // - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
  4374. //
  4375. // - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
  4376. //
  4377. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4378. // with awserr.Error's Code and Message methods to get detailed information about
  4379. // the error.
  4380. //
  4381. // See the AWS API reference guide for Amazon Simple Storage Service's
  4382. // API operation GetObject for usage and error information.
  4383. //
  4384. // Returned Error Codes:
  4385. //
  4386. // - ErrCodeNoSuchKey "NoSuchKey"
  4387. // The specified key does not exist.
  4388. //
  4389. // - ErrCodeInvalidObjectState "InvalidObjectState"
  4390. // Object is archived and inaccessible until restored.
  4391. //
  4392. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  4393. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  4394. req, out := c.GetObjectRequest(input)
  4395. return out, req.Send()
  4396. }
  4397. // GetObjectWithContext is the same as GetObject with the addition of
  4398. // the ability to pass a context and additional request options.
  4399. //
  4400. // See GetObject for details on how to use this API operation.
  4401. //
  4402. // The context must be non-nil and will be used for request cancellation. If
  4403. // the context is nil a panic will occur. In the future the SDK may create
  4404. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4405. // for more information on using Contexts.
  4406. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  4407. req, out := c.GetObjectRequest(input)
  4408. req.SetContext(ctx)
  4409. req.ApplyOptions(opts...)
  4410. return out, req.Send()
  4411. }
  4412. const opGetObjectAcl = "GetObjectAcl"
  4413. // GetObjectAclRequest generates a "aws/request.Request" representing the
  4414. // client's request for the GetObjectAcl operation. The "output" return
  4415. // value will be populated with the request's response once the request completes
  4416. // successfully.
  4417. //
  4418. // Use "Send" method on the returned Request to send the API call to the service.
  4419. // the "output" return value is not valid until after Send returns without error.
  4420. //
  4421. // See GetObjectAcl for more information on using the GetObjectAcl
  4422. // API call, and error handling.
  4423. //
  4424. // This method is useful when you want to inject custom logic or configuration
  4425. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4426. //
  4427. // // Example sending a request using the GetObjectAclRequest method.
  4428. // req, resp := client.GetObjectAclRequest(params)
  4429. //
  4430. // err := req.Send()
  4431. // if err == nil { // resp is now filled
  4432. // fmt.Println(resp)
  4433. // }
  4434. //
  4435. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  4436. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  4437. op := &request.Operation{
  4438. Name: opGetObjectAcl,
  4439. HTTPMethod: "GET",
  4440. HTTPPath: "/{Bucket}/{Key+}?acl",
  4441. }
  4442. if input == nil {
  4443. input = &GetObjectAclInput{}
  4444. }
  4445. output = &GetObjectAclOutput{}
  4446. req = c.newRequest(op, input, output)
  4447. return
  4448. }
  4449. // GetObjectAcl API operation for Amazon Simple Storage Service.
  4450. //
  4451. // Returns the access control list (ACL) of an object. To use this operation,
  4452. // you must have s3:GetObjectAcl permissions or READ_ACP access to the object.
  4453. // For more information, see Mapping of ACL permissions and access policy permissions
  4454. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#acl-access-policy-permission-mapping)
  4455. // in the Amazon S3 User Guide
  4456. //
  4457. // This action is not supported by Amazon S3 on Outposts.
  4458. //
  4459. // # Versioning
  4460. //
  4461. // By default, GET returns ACL information about the current version of an object.
  4462. // To return ACL information about a different version, use the versionId subresource.
  4463. //
  4464. // If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
  4465. // requests to read ACLs are still supported and return the bucket-owner-full-control
  4466. // ACL with the owner being the account that created the bucket. For more information,
  4467. // see Controlling object ownership and disabling ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  4468. // in the Amazon S3 User Guide.
  4469. //
  4470. // The following operations are related to GetObjectAcl:
  4471. //
  4472. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  4473. //
  4474. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  4475. //
  4476. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  4477. //
  4478. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  4479. //
  4480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4481. // with awserr.Error's Code and Message methods to get detailed information about
  4482. // the error.
  4483. //
  4484. // See the AWS API reference guide for Amazon Simple Storage Service's
  4485. // API operation GetObjectAcl for usage and error information.
  4486. //
  4487. // Returned Error Codes:
  4488. // - ErrCodeNoSuchKey "NoSuchKey"
  4489. // The specified key does not exist.
  4490. //
  4491. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  4492. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  4493. req, out := c.GetObjectAclRequest(input)
  4494. return out, req.Send()
  4495. }
  4496. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  4497. // the ability to pass a context and additional request options.
  4498. //
  4499. // See GetObjectAcl for details on how to use this API operation.
  4500. //
  4501. // The context must be non-nil and will be used for request cancellation. If
  4502. // the context is nil a panic will occur. In the future the SDK may create
  4503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4504. // for more information on using Contexts.
  4505. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  4506. req, out := c.GetObjectAclRequest(input)
  4507. req.SetContext(ctx)
  4508. req.ApplyOptions(opts...)
  4509. return out, req.Send()
  4510. }
  4511. const opGetObjectAttributes = "GetObjectAttributes"
  4512. // GetObjectAttributesRequest generates a "aws/request.Request" representing the
  4513. // client's request for the GetObjectAttributes operation. The "output" return
  4514. // value will be populated with the request's response once the request completes
  4515. // successfully.
  4516. //
  4517. // Use "Send" method on the returned Request to send the API call to the service.
  4518. // the "output" return value is not valid until after Send returns without error.
  4519. //
  4520. // See GetObjectAttributes for more information on using the GetObjectAttributes
  4521. // API call, and error handling.
  4522. //
  4523. // This method is useful when you want to inject custom logic or configuration
  4524. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4525. //
  4526. // // Example sending a request using the GetObjectAttributesRequest method.
  4527. // req, resp := client.GetObjectAttributesRequest(params)
  4528. //
  4529. // err := req.Send()
  4530. // if err == nil { // resp is now filled
  4531. // fmt.Println(resp)
  4532. // }
  4533. //
  4534. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes
  4535. func (c *S3) GetObjectAttributesRequest(input *GetObjectAttributesInput) (req *request.Request, output *GetObjectAttributesOutput) {
  4536. op := &request.Operation{
  4537. Name: opGetObjectAttributes,
  4538. HTTPMethod: "GET",
  4539. HTTPPath: "/{Bucket}/{Key+}?attributes",
  4540. }
  4541. if input == nil {
  4542. input = &GetObjectAttributesInput{}
  4543. }
  4544. output = &GetObjectAttributesOutput{}
  4545. req = c.newRequest(op, input, output)
  4546. return
  4547. }
  4548. // GetObjectAttributes API operation for Amazon Simple Storage Service.
  4549. //
  4550. // Retrieves all the metadata from an object without returning the object itself.
  4551. // This action is useful if you're interested only in an object's metadata.
  4552. // To use GetObjectAttributes, you must have READ access to the object.
  4553. //
  4554. // GetObjectAttributes combines the functionality of GetObjectAcl, GetObjectLegalHold,
  4555. // GetObjectLockConfiguration, GetObjectRetention, GetObjectTagging, HeadObject,
  4556. // and ListParts. All of the data returned with each of those individual calls
  4557. // can be returned with a single call to GetObjectAttributes.
  4558. //
  4559. // If you encrypt an object by using server-side encryption with customer-provided
  4560. // encryption keys (SSE-C) when you store the object in Amazon S3, then when
  4561. // you retrieve the metadata from the object, you must use the following headers:
  4562. //
  4563. // - x-amz-server-side-encryption-customer-algorithm
  4564. //
  4565. // - x-amz-server-side-encryption-customer-key
  4566. //
  4567. // - x-amz-server-side-encryption-customer-key-MD5
  4568. //
  4569. // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
  4570. // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  4571. // in the Amazon S3 User Guide.
  4572. //
  4573. // - Encryption request headers, such as x-amz-server-side-encryption, should
  4574. // not be sent for GET requests if your object uses server-side encryption
  4575. // with Amazon Web Services KMS keys stored in Amazon Web Services Key Management
  4576. // Service (SSE-KMS) or server-side encryption with Amazon S3 managed encryption
  4577. // keys (SSE-S3). If your object does use these types of keys, you'll get
  4578. // an HTTP 400 Bad Request error.
  4579. //
  4580. // - The last modified property in this case is the creation date of the
  4581. // object.
  4582. //
  4583. // Consider the following when using request headers:
  4584. //
  4585. // - If both of the If-Match and If-Unmodified-Since headers are present
  4586. // in the request as follows, then Amazon S3 returns the HTTP status code
  4587. // 200 OK and the data requested: If-Match condition evaluates to true. If-Unmodified-Since
  4588. // condition evaluates to false.
  4589. //
  4590. // - If both of the If-None-Match and If-Modified-Since headers are present
  4591. // in the request as follows, then Amazon S3 returns the HTTP status code
  4592. // 304 Not Modified: If-None-Match condition evaluates to false. If-Modified-Since
  4593. // condition evaluates to true.
  4594. //
  4595. // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
  4596. //
  4597. // # Permissions
  4598. //
  4599. // The permissions that you need to use this operation depend on whether the
  4600. // bucket is versioned. If the bucket is versioned, you need both the s3:GetObjectVersion
  4601. // and s3:GetObjectVersionAttributes permissions for this operation. If the
  4602. // bucket is not versioned, you need the s3:GetObject and s3:GetObjectAttributes
  4603. // permissions. For more information, see Specifying Permissions in a Policy
  4604. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
  4605. // in the Amazon S3 User Guide. If the object that you request does not exist,
  4606. // the error Amazon S3 returns depends on whether you also have the s3:ListBucket
  4607. // permission.
  4608. //
  4609. // - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns
  4610. // an HTTP status code 404 Not Found ("no such key") error.
  4611. //
  4612. // - If you don't have the s3:ListBucket permission, Amazon S3 returns an
  4613. // HTTP status code 403 Forbidden ("access denied") error.
  4614. //
  4615. // The following actions are related to GetObjectAttributes:
  4616. //
  4617. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  4618. //
  4619. // - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
  4620. //
  4621. // - GetObjectLegalHold (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html)
  4622. //
  4623. // - GetObjectLockConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html)
  4624. //
  4625. // - GetObjectRetention (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html)
  4626. //
  4627. // - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
  4628. //
  4629. // - HeadObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html)
  4630. //
  4631. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  4632. //
  4633. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4634. // with awserr.Error's Code and Message methods to get detailed information about
  4635. // the error.
  4636. //
  4637. // See the AWS API reference guide for Amazon Simple Storage Service's
  4638. // API operation GetObjectAttributes for usage and error information.
  4639. //
  4640. // Returned Error Codes:
  4641. // - ErrCodeNoSuchKey "NoSuchKey"
  4642. // The specified key does not exist.
  4643. //
  4644. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAttributes
  4645. func (c *S3) GetObjectAttributes(input *GetObjectAttributesInput) (*GetObjectAttributesOutput, error) {
  4646. req, out := c.GetObjectAttributesRequest(input)
  4647. return out, req.Send()
  4648. }
  4649. // GetObjectAttributesWithContext is the same as GetObjectAttributes with the addition of
  4650. // the ability to pass a context and additional request options.
  4651. //
  4652. // See GetObjectAttributes for details on how to use this API operation.
  4653. //
  4654. // The context must be non-nil and will be used for request cancellation. If
  4655. // the context is nil a panic will occur. In the future the SDK may create
  4656. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4657. // for more information on using Contexts.
  4658. func (c *S3) GetObjectAttributesWithContext(ctx aws.Context, input *GetObjectAttributesInput, opts ...request.Option) (*GetObjectAttributesOutput, error) {
  4659. req, out := c.GetObjectAttributesRequest(input)
  4660. req.SetContext(ctx)
  4661. req.ApplyOptions(opts...)
  4662. return out, req.Send()
  4663. }
  4664. const opGetObjectLegalHold = "GetObjectLegalHold"
  4665. // GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
  4666. // client's request for the GetObjectLegalHold operation. The "output" return
  4667. // value will be populated with the request's response once the request completes
  4668. // successfully.
  4669. //
  4670. // Use "Send" method on the returned Request to send the API call to the service.
  4671. // the "output" return value is not valid until after Send returns without error.
  4672. //
  4673. // See GetObjectLegalHold for more information on using the GetObjectLegalHold
  4674. // API call, and error handling.
  4675. //
  4676. // This method is useful when you want to inject custom logic or configuration
  4677. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4678. //
  4679. // // Example sending a request using the GetObjectLegalHoldRequest method.
  4680. // req, resp := client.GetObjectLegalHoldRequest(params)
  4681. //
  4682. // err := req.Send()
  4683. // if err == nil { // resp is now filled
  4684. // fmt.Println(resp)
  4685. // }
  4686. //
  4687. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  4688. func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
  4689. op := &request.Operation{
  4690. Name: opGetObjectLegalHold,
  4691. HTTPMethod: "GET",
  4692. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  4693. }
  4694. if input == nil {
  4695. input = &GetObjectLegalHoldInput{}
  4696. }
  4697. output = &GetObjectLegalHoldOutput{}
  4698. req = c.newRequest(op, input, output)
  4699. return
  4700. }
  4701. // GetObjectLegalHold API operation for Amazon Simple Storage Service.
  4702. //
  4703. // Gets an object's current legal hold status. For more information, see Locking
  4704. // Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  4705. //
  4706. // This action is not supported by Amazon S3 on Outposts.
  4707. //
  4708. // The following action is related to GetObjectLegalHold:
  4709. //
  4710. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  4711. //
  4712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4713. // with awserr.Error's Code and Message methods to get detailed information about
  4714. // the error.
  4715. //
  4716. // See the AWS API reference guide for Amazon Simple Storage Service's
  4717. // API operation GetObjectLegalHold for usage and error information.
  4718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  4719. func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
  4720. req, out := c.GetObjectLegalHoldRequest(input)
  4721. return out, req.Send()
  4722. }
  4723. // GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
  4724. // the ability to pass a context and additional request options.
  4725. //
  4726. // See GetObjectLegalHold for details on how to use this API operation.
  4727. //
  4728. // The context must be non-nil and will be used for request cancellation. If
  4729. // the context is nil a panic will occur. In the future the SDK may create
  4730. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4731. // for more information on using Contexts.
  4732. func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
  4733. req, out := c.GetObjectLegalHoldRequest(input)
  4734. req.SetContext(ctx)
  4735. req.ApplyOptions(opts...)
  4736. return out, req.Send()
  4737. }
  4738. const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
  4739. // GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  4740. // client's request for the GetObjectLockConfiguration operation. The "output" return
  4741. // value will be populated with the request's response once the request completes
  4742. // successfully.
  4743. //
  4744. // Use "Send" method on the returned Request to send the API call to the service.
  4745. // the "output" return value is not valid until after Send returns without error.
  4746. //
  4747. // See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
  4748. // API call, and error handling.
  4749. //
  4750. // This method is useful when you want to inject custom logic or configuration
  4751. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4752. //
  4753. // // Example sending a request using the GetObjectLockConfigurationRequest method.
  4754. // req, resp := client.GetObjectLockConfigurationRequest(params)
  4755. //
  4756. // err := req.Send()
  4757. // if err == nil { // resp is now filled
  4758. // fmt.Println(resp)
  4759. // }
  4760. //
  4761. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  4762. func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
  4763. op := &request.Operation{
  4764. Name: opGetObjectLockConfiguration,
  4765. HTTPMethod: "GET",
  4766. HTTPPath: "/{Bucket}?object-lock",
  4767. }
  4768. if input == nil {
  4769. input = &GetObjectLockConfigurationInput{}
  4770. }
  4771. output = &GetObjectLockConfigurationOutput{}
  4772. req = c.newRequest(op, input, output)
  4773. return
  4774. }
  4775. // GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
  4776. //
  4777. // Gets the Object Lock configuration for a bucket. The rule specified in the
  4778. // Object Lock configuration will be applied by default to every new object
  4779. // placed in the specified bucket. For more information, see Locking Objects
  4780. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  4781. //
  4782. // The following action is related to GetObjectLockConfiguration:
  4783. //
  4784. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  4785. //
  4786. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4787. // with awserr.Error's Code and Message methods to get detailed information about
  4788. // the error.
  4789. //
  4790. // See the AWS API reference guide for Amazon Simple Storage Service's
  4791. // API operation GetObjectLockConfiguration for usage and error information.
  4792. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  4793. func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
  4794. req, out := c.GetObjectLockConfigurationRequest(input)
  4795. return out, req.Send()
  4796. }
  4797. // GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
  4798. // the ability to pass a context and additional request options.
  4799. //
  4800. // See GetObjectLockConfiguration for details on how to use this API operation.
  4801. //
  4802. // The context must be non-nil and will be used for request cancellation. If
  4803. // the context is nil a panic will occur. In the future the SDK may create
  4804. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4805. // for more information on using Contexts.
  4806. func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
  4807. req, out := c.GetObjectLockConfigurationRequest(input)
  4808. req.SetContext(ctx)
  4809. req.ApplyOptions(opts...)
  4810. return out, req.Send()
  4811. }
  4812. const opGetObjectRetention = "GetObjectRetention"
  4813. // GetObjectRetentionRequest generates a "aws/request.Request" representing the
  4814. // client's request for the GetObjectRetention operation. The "output" return
  4815. // value will be populated with the request's response once the request completes
  4816. // successfully.
  4817. //
  4818. // Use "Send" method on the returned Request to send the API call to the service.
  4819. // the "output" return value is not valid until after Send returns without error.
  4820. //
  4821. // See GetObjectRetention for more information on using the GetObjectRetention
  4822. // API call, and error handling.
  4823. //
  4824. // This method is useful when you want to inject custom logic or configuration
  4825. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4826. //
  4827. // // Example sending a request using the GetObjectRetentionRequest method.
  4828. // req, resp := client.GetObjectRetentionRequest(params)
  4829. //
  4830. // err := req.Send()
  4831. // if err == nil { // resp is now filled
  4832. // fmt.Println(resp)
  4833. // }
  4834. //
  4835. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  4836. func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
  4837. op := &request.Operation{
  4838. Name: opGetObjectRetention,
  4839. HTTPMethod: "GET",
  4840. HTTPPath: "/{Bucket}/{Key+}?retention",
  4841. }
  4842. if input == nil {
  4843. input = &GetObjectRetentionInput{}
  4844. }
  4845. output = &GetObjectRetentionOutput{}
  4846. req = c.newRequest(op, input, output)
  4847. return
  4848. }
  4849. // GetObjectRetention API operation for Amazon Simple Storage Service.
  4850. //
  4851. // Retrieves an object's retention settings. For more information, see Locking
  4852. // Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  4853. //
  4854. // This action is not supported by Amazon S3 on Outposts.
  4855. //
  4856. // The following action is related to GetObjectRetention:
  4857. //
  4858. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  4859. //
  4860. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4861. // with awserr.Error's Code and Message methods to get detailed information about
  4862. // the error.
  4863. //
  4864. // See the AWS API reference guide for Amazon Simple Storage Service's
  4865. // API operation GetObjectRetention for usage and error information.
  4866. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  4867. func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
  4868. req, out := c.GetObjectRetentionRequest(input)
  4869. return out, req.Send()
  4870. }
  4871. // GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
  4872. // the ability to pass a context and additional request options.
  4873. //
  4874. // See GetObjectRetention for details on how to use this API operation.
  4875. //
  4876. // The context must be non-nil and will be used for request cancellation. If
  4877. // the context is nil a panic will occur. In the future the SDK may create
  4878. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4879. // for more information on using Contexts.
  4880. func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
  4881. req, out := c.GetObjectRetentionRequest(input)
  4882. req.SetContext(ctx)
  4883. req.ApplyOptions(opts...)
  4884. return out, req.Send()
  4885. }
  4886. const opGetObjectTagging = "GetObjectTagging"
  4887. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  4888. // client's request for the GetObjectTagging operation. The "output" return
  4889. // value will be populated with the request's response once the request completes
  4890. // successfully.
  4891. //
  4892. // Use "Send" method on the returned Request to send the API call to the service.
  4893. // the "output" return value is not valid until after Send returns without error.
  4894. //
  4895. // See GetObjectTagging for more information on using the GetObjectTagging
  4896. // API call, and error handling.
  4897. //
  4898. // This method is useful when you want to inject custom logic or configuration
  4899. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4900. //
  4901. // // Example sending a request using the GetObjectTaggingRequest method.
  4902. // req, resp := client.GetObjectTaggingRequest(params)
  4903. //
  4904. // err := req.Send()
  4905. // if err == nil { // resp is now filled
  4906. // fmt.Println(resp)
  4907. // }
  4908. //
  4909. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  4910. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  4911. op := &request.Operation{
  4912. Name: opGetObjectTagging,
  4913. HTTPMethod: "GET",
  4914. HTTPPath: "/{Bucket}/{Key+}?tagging",
  4915. }
  4916. if input == nil {
  4917. input = &GetObjectTaggingInput{}
  4918. }
  4919. output = &GetObjectTaggingOutput{}
  4920. req = c.newRequest(op, input, output)
  4921. return
  4922. }
  4923. // GetObjectTagging API operation for Amazon Simple Storage Service.
  4924. //
  4925. // Returns the tag-set of an object. You send the GET request against the tagging
  4926. // subresource associated with the object.
  4927. //
  4928. // To use this operation, you must have permission to perform the s3:GetObjectTagging
  4929. // action. By default, the GET action returns information about current version
  4930. // of an object. For a versioned bucket, you can have multiple versions of an
  4931. // object in your bucket. To retrieve tags of any other version, use the versionId
  4932. // query parameter. You also need permission for the s3:GetObjectVersionTagging
  4933. // action.
  4934. //
  4935. // By default, the bucket owner has this permission and can grant this permission
  4936. // to others.
  4937. //
  4938. // For information about the Amazon S3 object tagging feature, see Object Tagging
  4939. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
  4940. //
  4941. // The following actions are related to GetObjectTagging:
  4942. //
  4943. // - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
  4944. //
  4945. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  4946. //
  4947. // - PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
  4948. //
  4949. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4950. // with awserr.Error's Code and Message methods to get detailed information about
  4951. // the error.
  4952. //
  4953. // See the AWS API reference guide for Amazon Simple Storage Service's
  4954. // API operation GetObjectTagging for usage and error information.
  4955. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  4956. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  4957. req, out := c.GetObjectTaggingRequest(input)
  4958. return out, req.Send()
  4959. }
  4960. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  4961. // the ability to pass a context and additional request options.
  4962. //
  4963. // See GetObjectTagging for details on how to use this API operation.
  4964. //
  4965. // The context must be non-nil and will be used for request cancellation. If
  4966. // the context is nil a panic will occur. In the future the SDK may create
  4967. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4968. // for more information on using Contexts.
  4969. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  4970. req, out := c.GetObjectTaggingRequest(input)
  4971. req.SetContext(ctx)
  4972. req.ApplyOptions(opts...)
  4973. return out, req.Send()
  4974. }
  4975. const opGetObjectTorrent = "GetObjectTorrent"
  4976. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  4977. // client's request for the GetObjectTorrent operation. The "output" return
  4978. // value will be populated with the request's response once the request completes
  4979. // successfully.
  4980. //
  4981. // Use "Send" method on the returned Request to send the API call to the service.
  4982. // the "output" return value is not valid until after Send returns without error.
  4983. //
  4984. // See GetObjectTorrent for more information on using the GetObjectTorrent
  4985. // API call, and error handling.
  4986. //
  4987. // This method is useful when you want to inject custom logic or configuration
  4988. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4989. //
  4990. // // Example sending a request using the GetObjectTorrentRequest method.
  4991. // req, resp := client.GetObjectTorrentRequest(params)
  4992. //
  4993. // err := req.Send()
  4994. // if err == nil { // resp is now filled
  4995. // fmt.Println(resp)
  4996. // }
  4997. //
  4998. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  4999. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  5000. op := &request.Operation{
  5001. Name: opGetObjectTorrent,
  5002. HTTPMethod: "GET",
  5003. HTTPPath: "/{Bucket}/{Key+}?torrent",
  5004. }
  5005. if input == nil {
  5006. input = &GetObjectTorrentInput{}
  5007. }
  5008. output = &GetObjectTorrentOutput{}
  5009. req = c.newRequest(op, input, output)
  5010. return
  5011. }
  5012. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  5013. //
  5014. // Returns torrent files from a bucket. BitTorrent can save you bandwidth when
  5015. // you're distributing large files. For more information about BitTorrent, see
  5016. // Using BitTorrent with Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html).
  5017. //
  5018. // You can get torrent only for objects that are less than 5 GB in size, and
  5019. // that are not encrypted using server-side encryption with a customer-provided
  5020. // encryption key.
  5021. //
  5022. // To use GET, you must have READ access to the object.
  5023. //
  5024. // This action is not supported by Amazon S3 on Outposts.
  5025. //
  5026. // The following action is related to GetObjectTorrent:
  5027. //
  5028. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  5029. //
  5030. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5031. // with awserr.Error's Code and Message methods to get detailed information about
  5032. // the error.
  5033. //
  5034. // See the AWS API reference guide for Amazon Simple Storage Service's
  5035. // API operation GetObjectTorrent for usage and error information.
  5036. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  5037. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  5038. req, out := c.GetObjectTorrentRequest(input)
  5039. return out, req.Send()
  5040. }
  5041. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  5042. // the ability to pass a context and additional request options.
  5043. //
  5044. // See GetObjectTorrent for details on how to use this API operation.
  5045. //
  5046. // The context must be non-nil and will be used for request cancellation. If
  5047. // the context is nil a panic will occur. In the future the SDK may create
  5048. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5049. // for more information on using Contexts.
  5050. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  5051. req, out := c.GetObjectTorrentRequest(input)
  5052. req.SetContext(ctx)
  5053. req.ApplyOptions(opts...)
  5054. return out, req.Send()
  5055. }
  5056. const opGetPublicAccessBlock = "GetPublicAccessBlock"
  5057. // GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
  5058. // client's request for the GetPublicAccessBlock operation. The "output" return
  5059. // value will be populated with the request's response once the request completes
  5060. // successfully.
  5061. //
  5062. // Use "Send" method on the returned Request to send the API call to the service.
  5063. // the "output" return value is not valid until after Send returns without error.
  5064. //
  5065. // See GetPublicAccessBlock for more information on using the GetPublicAccessBlock
  5066. // API call, and error handling.
  5067. //
  5068. // This method is useful when you want to inject custom logic or configuration
  5069. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5070. //
  5071. // // Example sending a request using the GetPublicAccessBlockRequest method.
  5072. // req, resp := client.GetPublicAccessBlockRequest(params)
  5073. //
  5074. // err := req.Send()
  5075. // if err == nil { // resp is now filled
  5076. // fmt.Println(resp)
  5077. // }
  5078. //
  5079. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  5080. func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
  5081. op := &request.Operation{
  5082. Name: opGetPublicAccessBlock,
  5083. HTTPMethod: "GET",
  5084. HTTPPath: "/{Bucket}?publicAccessBlock",
  5085. }
  5086. if input == nil {
  5087. input = &GetPublicAccessBlockInput{}
  5088. }
  5089. output = &GetPublicAccessBlockOutput{}
  5090. req = c.newRequest(op, input, output)
  5091. return
  5092. }
  5093. // GetPublicAccessBlock API operation for Amazon Simple Storage Service.
  5094. //
  5095. // Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To
  5096. // use this operation, you must have the s3:GetBucketPublicAccessBlock permission.
  5097. // For more information about Amazon S3 permissions, see Specifying Permissions
  5098. // in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  5099. //
  5100. // When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
  5101. // or an object, it checks the PublicAccessBlock configuration for both the
  5102. // bucket (or the bucket that contains the object) and the bucket owner's account.
  5103. // If the PublicAccessBlock settings are different between the bucket and the
  5104. // account, Amazon S3 uses the most restrictive combination of the bucket-level
  5105. // and account-level settings.
  5106. //
  5107. // For more information about when Amazon S3 considers a bucket or an object
  5108. // public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
  5109. //
  5110. // The following operations are related to GetPublicAccessBlock:
  5111. //
  5112. // - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
  5113. //
  5114. // - PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
  5115. //
  5116. // - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
  5117. //
  5118. // - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
  5119. //
  5120. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5121. // with awserr.Error's Code and Message methods to get detailed information about
  5122. // the error.
  5123. //
  5124. // See the AWS API reference guide for Amazon Simple Storage Service's
  5125. // API operation GetPublicAccessBlock for usage and error information.
  5126. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  5127. func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
  5128. req, out := c.GetPublicAccessBlockRequest(input)
  5129. return out, req.Send()
  5130. }
  5131. // GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
  5132. // the ability to pass a context and additional request options.
  5133. //
  5134. // See GetPublicAccessBlock for details on how to use this API operation.
  5135. //
  5136. // The context must be non-nil and will be used for request cancellation. If
  5137. // the context is nil a panic will occur. In the future the SDK may create
  5138. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5139. // for more information on using Contexts.
  5140. func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
  5141. req, out := c.GetPublicAccessBlockRequest(input)
  5142. req.SetContext(ctx)
  5143. req.ApplyOptions(opts...)
  5144. return out, req.Send()
  5145. }
  5146. const opHeadBucket = "HeadBucket"
  5147. // HeadBucketRequest generates a "aws/request.Request" representing the
  5148. // client's request for the HeadBucket operation. The "output" return
  5149. // value will be populated with the request's response once the request completes
  5150. // successfully.
  5151. //
  5152. // Use "Send" method on the returned Request to send the API call to the service.
  5153. // the "output" return value is not valid until after Send returns without error.
  5154. //
  5155. // See HeadBucket for more information on using the HeadBucket
  5156. // API call, and error handling.
  5157. //
  5158. // This method is useful when you want to inject custom logic or configuration
  5159. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5160. //
  5161. // // Example sending a request using the HeadBucketRequest method.
  5162. // req, resp := client.HeadBucketRequest(params)
  5163. //
  5164. // err := req.Send()
  5165. // if err == nil { // resp is now filled
  5166. // fmt.Println(resp)
  5167. // }
  5168. //
  5169. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  5170. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  5171. op := &request.Operation{
  5172. Name: opHeadBucket,
  5173. HTTPMethod: "HEAD",
  5174. HTTPPath: "/{Bucket}",
  5175. }
  5176. if input == nil {
  5177. input = &HeadBucketInput{}
  5178. }
  5179. output = &HeadBucketOutput{}
  5180. req = c.newRequest(op, input, output)
  5181. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5182. return
  5183. }
  5184. // HeadBucket API operation for Amazon Simple Storage Service.
  5185. //
  5186. // This action is useful to determine if a bucket exists and you have permission
  5187. // to access it. The action returns a 200 OK if the bucket exists and you have
  5188. // permission to access it.
  5189. //
  5190. // If the bucket does not exist or you do not have permission to access it,
  5191. // the HEAD request returns a generic 404 Not Found or 403 Forbidden code. A
  5192. // message body is not included, so you cannot determine the exception beyond
  5193. // these error codes.
  5194. //
  5195. // To use this operation, you must have permissions to perform the s3:ListBucket
  5196. // action. The bucket owner has this permission by default and can grant this
  5197. // permission to others. For more information about permissions, see Permissions
  5198. // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  5199. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  5200. //
  5201. // To use this API against an access point, you must provide the alias of the
  5202. // access point in place of the bucket name or specify the access point ARN.
  5203. // When using the access point ARN, you must direct requests to the access point
  5204. // hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  5205. // When using the Amazon Web Services SDKs, you provide the ARN in place of
  5206. // the bucket name. For more information see, Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html).
  5207. //
  5208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5209. // with awserr.Error's Code and Message methods to get detailed information about
  5210. // the error.
  5211. //
  5212. // See the AWS API reference guide for Amazon Simple Storage Service's
  5213. // API operation HeadBucket for usage and error information.
  5214. //
  5215. // Returned Error Codes:
  5216. // - ErrCodeNoSuchBucket "NoSuchBucket"
  5217. // The specified bucket does not exist.
  5218. //
  5219. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  5220. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  5221. req, out := c.HeadBucketRequest(input)
  5222. return out, req.Send()
  5223. }
  5224. // HeadBucketWithContext is the same as HeadBucket with the addition of
  5225. // the ability to pass a context and additional request options.
  5226. //
  5227. // See HeadBucket for details on how to use this API operation.
  5228. //
  5229. // The context must be non-nil and will be used for request cancellation. If
  5230. // the context is nil a panic will occur. In the future the SDK may create
  5231. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5232. // for more information on using Contexts.
  5233. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  5234. req, out := c.HeadBucketRequest(input)
  5235. req.SetContext(ctx)
  5236. req.ApplyOptions(opts...)
  5237. return out, req.Send()
  5238. }
  5239. const opHeadObject = "HeadObject"
  5240. // HeadObjectRequest generates a "aws/request.Request" representing the
  5241. // client's request for the HeadObject operation. The "output" return
  5242. // value will be populated with the request's response once the request completes
  5243. // successfully.
  5244. //
  5245. // Use "Send" method on the returned Request to send the API call to the service.
  5246. // the "output" return value is not valid until after Send returns without error.
  5247. //
  5248. // See HeadObject for more information on using the HeadObject
  5249. // API call, and error handling.
  5250. //
  5251. // This method is useful when you want to inject custom logic or configuration
  5252. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5253. //
  5254. // // Example sending a request using the HeadObjectRequest method.
  5255. // req, resp := client.HeadObjectRequest(params)
  5256. //
  5257. // err := req.Send()
  5258. // if err == nil { // resp is now filled
  5259. // fmt.Println(resp)
  5260. // }
  5261. //
  5262. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  5263. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  5264. op := &request.Operation{
  5265. Name: opHeadObject,
  5266. HTTPMethod: "HEAD",
  5267. HTTPPath: "/{Bucket}/{Key+}",
  5268. }
  5269. if input == nil {
  5270. input = &HeadObjectInput{}
  5271. }
  5272. output = &HeadObjectOutput{}
  5273. req = c.newRequest(op, input, output)
  5274. return
  5275. }
  5276. // HeadObject API operation for Amazon Simple Storage Service.
  5277. //
  5278. // The HEAD action retrieves metadata from an object without returning the object
  5279. // itself. This action is useful if you're only interested in an object's metadata.
  5280. // To use HEAD, you must have READ access to the object.
  5281. //
  5282. // A HEAD request has the same options as a GET action on an object. The response
  5283. // is identical to the GET response except that there is no response body. Because
  5284. // of this, if the HEAD request generates an error, it returns a generic 404
  5285. // Not Found or 403 Forbidden code. It is not possible to retrieve the exact
  5286. // exception beyond these error codes.
  5287. //
  5288. // If you encrypt an object by using server-side encryption with customer-provided
  5289. // encryption keys (SSE-C) when you store the object in Amazon S3, then when
  5290. // you retrieve the metadata from the object, you must use the following headers:
  5291. //
  5292. // - x-amz-server-side-encryption-customer-algorithm
  5293. //
  5294. // - x-amz-server-side-encryption-customer-key
  5295. //
  5296. // - x-amz-server-side-encryption-customer-key-MD5
  5297. //
  5298. // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
  5299. // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  5300. //
  5301. // - Encryption request headers, like x-amz-server-side-encryption, should
  5302. // not be sent for GET requests if your object uses server-side encryption
  5303. // with KMS keys (SSE-KMS) or server-side encryption with Amazon S3–managed
  5304. // encryption keys (SSE-S3). If your object does use these types of keys,
  5305. // you’ll get an HTTP 400 BadRequest error.
  5306. //
  5307. // - The last modified property in this case is the creation date of the
  5308. // object.
  5309. //
  5310. // Request headers are limited to 8 KB in size. For more information, see Common
  5311. // Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html).
  5312. //
  5313. // Consider the following when using request headers:
  5314. //
  5315. // - Consideration 1 – If both of the If-Match and If-Unmodified-Since
  5316. // headers are present in the request as follows: If-Match condition evaluates
  5317. // to true, and; If-Unmodified-Since condition evaluates to false; Then Amazon
  5318. // S3 returns 200 OK and the data requested.
  5319. //
  5320. // - Consideration 2 – If both of the If-None-Match and If-Modified-Since
  5321. // headers are present in the request as follows: If-None-Match condition
  5322. // evaluates to false, and; If-Modified-Since condition evaluates to true;
  5323. // Then Amazon S3 returns the 304 Not Modified response code.
  5324. //
  5325. // For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
  5326. //
  5327. // # Permissions
  5328. //
  5329. // You need the relevant read object (or version) permission for this operation.
  5330. // For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  5331. // If the object you request does not exist, the error Amazon S3 returns depends
  5332. // on whether you also have the s3:ListBucket permission.
  5333. //
  5334. // - If you have the s3:ListBucket permission on the bucket, Amazon S3 returns
  5335. // an HTTP status code 404 ("no such key") error.
  5336. //
  5337. // - If you don’t have the s3:ListBucket permission, Amazon S3 returns
  5338. // an HTTP status code 403 ("access denied") error.
  5339. //
  5340. // The following actions are related to HeadObject:
  5341. //
  5342. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  5343. //
  5344. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  5345. //
  5346. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  5347. // for more information on returned errors.
  5348. //
  5349. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5350. // with awserr.Error's Code and Message methods to get detailed information about
  5351. // the error.
  5352. //
  5353. // See the AWS API reference guide for Amazon Simple Storage Service's
  5354. // API operation HeadObject for usage and error information.
  5355. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  5356. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  5357. req, out := c.HeadObjectRequest(input)
  5358. return out, req.Send()
  5359. }
  5360. // HeadObjectWithContext is the same as HeadObject with the addition of
  5361. // the ability to pass a context and additional request options.
  5362. //
  5363. // See HeadObject for details on how to use this API operation.
  5364. //
  5365. // The context must be non-nil and will be used for request cancellation. If
  5366. // the context is nil a panic will occur. In the future the SDK may create
  5367. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5368. // for more information on using Contexts.
  5369. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  5370. req, out := c.HeadObjectRequest(input)
  5371. req.SetContext(ctx)
  5372. req.ApplyOptions(opts...)
  5373. return out, req.Send()
  5374. }
  5375. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  5376. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  5377. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  5378. // value will be populated with the request's response once the request completes
  5379. // successfully.
  5380. //
  5381. // Use "Send" method on the returned Request to send the API call to the service.
  5382. // the "output" return value is not valid until after Send returns without error.
  5383. //
  5384. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  5385. // API call, and error handling.
  5386. //
  5387. // This method is useful when you want to inject custom logic or configuration
  5388. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5389. //
  5390. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  5391. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  5392. //
  5393. // err := req.Send()
  5394. // if err == nil { // resp is now filled
  5395. // fmt.Println(resp)
  5396. // }
  5397. //
  5398. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  5399. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  5400. op := &request.Operation{
  5401. Name: opListBucketAnalyticsConfigurations,
  5402. HTTPMethod: "GET",
  5403. HTTPPath: "/{Bucket}?analytics",
  5404. }
  5405. if input == nil {
  5406. input = &ListBucketAnalyticsConfigurationsInput{}
  5407. }
  5408. output = &ListBucketAnalyticsConfigurationsOutput{}
  5409. req = c.newRequest(op, input, output)
  5410. return
  5411. }
  5412. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  5413. //
  5414. // Lists the analytics configurations for the bucket. You can have up to 1,000
  5415. // analytics configurations per bucket.
  5416. //
  5417. // This action supports list pagination and does not return more than 100 configurations
  5418. // at a time. You should always check the IsTruncated element in the response.
  5419. // If there are no more configurations to list, IsTruncated is set to false.
  5420. // If there are more configurations to list, IsTruncated is set to true, and
  5421. // there will be a value in NextContinuationToken. You use the NextContinuationToken
  5422. // value to continue the pagination of the list by passing the value in continuation-token
  5423. // in the request to GET the next page.
  5424. //
  5425. // To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
  5426. // action. The bucket owner has this permission by default. The bucket owner
  5427. // can grant this permission to others. For more information about permissions,
  5428. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  5429. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  5430. //
  5431. // For information about Amazon S3 analytics feature, see Amazon S3 Analytics
  5432. // – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
  5433. //
  5434. // The following operations are related to ListBucketAnalyticsConfigurations:
  5435. //
  5436. // - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
  5437. //
  5438. // - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
  5439. //
  5440. // - PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
  5441. //
  5442. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5443. // with awserr.Error's Code and Message methods to get detailed information about
  5444. // the error.
  5445. //
  5446. // See the AWS API reference guide for Amazon Simple Storage Service's
  5447. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  5448. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  5449. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  5450. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  5451. return out, req.Send()
  5452. }
  5453. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  5454. // the ability to pass a context and additional request options.
  5455. //
  5456. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  5457. //
  5458. // The context must be non-nil and will be used for request cancellation. If
  5459. // the context is nil a panic will occur. In the future the SDK may create
  5460. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5461. // for more information on using Contexts.
  5462. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  5463. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  5464. req.SetContext(ctx)
  5465. req.ApplyOptions(opts...)
  5466. return out, req.Send()
  5467. }
  5468. const opListBucketIntelligentTieringConfigurations = "ListBucketIntelligentTieringConfigurations"
  5469. // ListBucketIntelligentTieringConfigurationsRequest generates a "aws/request.Request" representing the
  5470. // client's request for the ListBucketIntelligentTieringConfigurations operation. The "output" return
  5471. // value will be populated with the request's response once the request completes
  5472. // successfully.
  5473. //
  5474. // Use "Send" method on the returned Request to send the API call to the service.
  5475. // the "output" return value is not valid until after Send returns without error.
  5476. //
  5477. // See ListBucketIntelligentTieringConfigurations for more information on using the ListBucketIntelligentTieringConfigurations
  5478. // API call, and error handling.
  5479. //
  5480. // This method is useful when you want to inject custom logic or configuration
  5481. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5482. //
  5483. // // Example sending a request using the ListBucketIntelligentTieringConfigurationsRequest method.
  5484. // req, resp := client.ListBucketIntelligentTieringConfigurationsRequest(params)
  5485. //
  5486. // err := req.Send()
  5487. // if err == nil { // resp is now filled
  5488. // fmt.Println(resp)
  5489. // }
  5490. //
  5491. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
  5492. func (c *S3) ListBucketIntelligentTieringConfigurationsRequest(input *ListBucketIntelligentTieringConfigurationsInput) (req *request.Request, output *ListBucketIntelligentTieringConfigurationsOutput) {
  5493. op := &request.Operation{
  5494. Name: opListBucketIntelligentTieringConfigurations,
  5495. HTTPMethod: "GET",
  5496. HTTPPath: "/{Bucket}?intelligent-tiering",
  5497. }
  5498. if input == nil {
  5499. input = &ListBucketIntelligentTieringConfigurationsInput{}
  5500. }
  5501. output = &ListBucketIntelligentTieringConfigurationsOutput{}
  5502. req = c.newRequest(op, input, output)
  5503. return
  5504. }
  5505. // ListBucketIntelligentTieringConfigurations API operation for Amazon Simple Storage Service.
  5506. //
  5507. // Lists the S3 Intelligent-Tiering configuration from the specified bucket.
  5508. //
  5509. // The S3 Intelligent-Tiering storage class is designed to optimize storage
  5510. // costs by automatically moving data to the most cost-effective storage access
  5511. // tier, without performance impact or operational overhead. S3 Intelligent-Tiering
  5512. // delivers automatic cost savings in three low latency and high throughput
  5513. // access tiers. To get the lowest storage cost on data that can be accessed
  5514. // in minutes to hours, you can choose to activate additional archiving capabilities.
  5515. //
  5516. // The S3 Intelligent-Tiering storage class is the ideal storage class for data
  5517. // with unknown, changing, or unpredictable access patterns, independent of
  5518. // object size or retention period. If the size of an object is less than 128
  5519. // KB, it is not monitored and not eligible for auto-tiering. Smaller objects
  5520. // can be stored, but they are always charged at the Frequent Access tier rates
  5521. // in the S3 Intelligent-Tiering storage class.
  5522. //
  5523. // For more information, see Storage class for automatically optimizing frequently
  5524. // and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
  5525. //
  5526. // Operations related to ListBucketIntelligentTieringConfigurations include:
  5527. //
  5528. // - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
  5529. //
  5530. // - PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
  5531. //
  5532. // - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
  5533. //
  5534. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5535. // with awserr.Error's Code and Message methods to get detailed information about
  5536. // the error.
  5537. //
  5538. // See the AWS API reference guide for Amazon Simple Storage Service's
  5539. // API operation ListBucketIntelligentTieringConfigurations for usage and error information.
  5540. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
  5541. func (c *S3) ListBucketIntelligentTieringConfigurations(input *ListBucketIntelligentTieringConfigurationsInput) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
  5542. req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
  5543. return out, req.Send()
  5544. }
  5545. // ListBucketIntelligentTieringConfigurationsWithContext is the same as ListBucketIntelligentTieringConfigurations with the addition of
  5546. // the ability to pass a context and additional request options.
  5547. //
  5548. // See ListBucketIntelligentTieringConfigurations for details on how to use this API operation.
  5549. //
  5550. // The context must be non-nil and will be used for request cancellation. If
  5551. // the context is nil a panic will occur. In the future the SDK may create
  5552. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5553. // for more information on using Contexts.
  5554. func (c *S3) ListBucketIntelligentTieringConfigurationsWithContext(ctx aws.Context, input *ListBucketIntelligentTieringConfigurationsInput, opts ...request.Option) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
  5555. req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
  5556. req.SetContext(ctx)
  5557. req.ApplyOptions(opts...)
  5558. return out, req.Send()
  5559. }
  5560. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  5561. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  5562. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  5563. // value will be populated with the request's response once the request completes
  5564. // successfully.
  5565. //
  5566. // Use "Send" method on the returned Request to send the API call to the service.
  5567. // the "output" return value is not valid until after Send returns without error.
  5568. //
  5569. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  5570. // API call, and error handling.
  5571. //
  5572. // This method is useful when you want to inject custom logic or configuration
  5573. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5574. //
  5575. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  5576. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  5577. //
  5578. // err := req.Send()
  5579. // if err == nil { // resp is now filled
  5580. // fmt.Println(resp)
  5581. // }
  5582. //
  5583. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  5584. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  5585. op := &request.Operation{
  5586. Name: opListBucketInventoryConfigurations,
  5587. HTTPMethod: "GET",
  5588. HTTPPath: "/{Bucket}?inventory",
  5589. }
  5590. if input == nil {
  5591. input = &ListBucketInventoryConfigurationsInput{}
  5592. }
  5593. output = &ListBucketInventoryConfigurationsOutput{}
  5594. req = c.newRequest(op, input, output)
  5595. return
  5596. }
  5597. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  5598. //
  5599. // Returns a list of inventory configurations for the bucket. You can have up
  5600. // to 1,000 analytics configurations per bucket.
  5601. //
  5602. // This action supports list pagination and does not return more than 100 configurations
  5603. // at a time. Always check the IsTruncated element in the response. If there
  5604. // are no more configurations to list, IsTruncated is set to false. If there
  5605. // are more configurations to list, IsTruncated is set to true, and there is
  5606. // a value in NextContinuationToken. You use the NextContinuationToken value
  5607. // to continue the pagination of the list by passing the value in continuation-token
  5608. // in the request to GET the next page.
  5609. //
  5610. // To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
  5611. // action. The bucket owner has this permission by default. The bucket owner
  5612. // can grant this permission to others. For more information about permissions,
  5613. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  5614. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  5615. //
  5616. // For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
  5617. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
  5618. //
  5619. // The following operations are related to ListBucketInventoryConfigurations:
  5620. //
  5621. // - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
  5622. //
  5623. // - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
  5624. //
  5625. // - PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
  5626. //
  5627. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5628. // with awserr.Error's Code and Message methods to get detailed information about
  5629. // the error.
  5630. //
  5631. // See the AWS API reference guide for Amazon Simple Storage Service's
  5632. // API operation ListBucketInventoryConfigurations for usage and error information.
  5633. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  5634. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  5635. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  5636. return out, req.Send()
  5637. }
  5638. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  5639. // the ability to pass a context and additional request options.
  5640. //
  5641. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  5642. //
  5643. // The context must be non-nil and will be used for request cancellation. If
  5644. // the context is nil a panic will occur. In the future the SDK may create
  5645. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5646. // for more information on using Contexts.
  5647. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  5648. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  5649. req.SetContext(ctx)
  5650. req.ApplyOptions(opts...)
  5651. return out, req.Send()
  5652. }
  5653. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  5654. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  5655. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  5656. // value will be populated with the request's response once the request completes
  5657. // successfully.
  5658. //
  5659. // Use "Send" method on the returned Request to send the API call to the service.
  5660. // the "output" return value is not valid until after Send returns without error.
  5661. //
  5662. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  5663. // API call, and error handling.
  5664. //
  5665. // This method is useful when you want to inject custom logic or configuration
  5666. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5667. //
  5668. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  5669. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  5670. //
  5671. // err := req.Send()
  5672. // if err == nil { // resp is now filled
  5673. // fmt.Println(resp)
  5674. // }
  5675. //
  5676. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  5677. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  5678. op := &request.Operation{
  5679. Name: opListBucketMetricsConfigurations,
  5680. HTTPMethod: "GET",
  5681. HTTPPath: "/{Bucket}?metrics",
  5682. }
  5683. if input == nil {
  5684. input = &ListBucketMetricsConfigurationsInput{}
  5685. }
  5686. output = &ListBucketMetricsConfigurationsOutput{}
  5687. req = c.newRequest(op, input, output)
  5688. return
  5689. }
  5690. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  5691. //
  5692. // Lists the metrics configurations for the bucket. The metrics configurations
  5693. // are only for the request metrics of the bucket and do not provide information
  5694. // on daily storage metrics. You can have up to 1,000 configurations per bucket.
  5695. //
  5696. // This action supports list pagination and does not return more than 100 configurations
  5697. // at a time. Always check the IsTruncated element in the response. If there
  5698. // are no more configurations to list, IsTruncated is set to false. If there
  5699. // are more configurations to list, IsTruncated is set to true, and there is
  5700. // a value in NextContinuationToken. You use the NextContinuationToken value
  5701. // to continue the pagination of the list by passing the value in continuation-token
  5702. // in the request to GET the next page.
  5703. //
  5704. // To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
  5705. // action. The bucket owner has this permission by default. The bucket owner
  5706. // can grant this permission to others. For more information about permissions,
  5707. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  5708. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  5709. //
  5710. // For more information about metrics configurations and CloudWatch request
  5711. // metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
  5712. //
  5713. // The following operations are related to ListBucketMetricsConfigurations:
  5714. //
  5715. // - PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
  5716. //
  5717. // - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
  5718. //
  5719. // - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
  5720. //
  5721. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5722. // with awserr.Error's Code and Message methods to get detailed information about
  5723. // the error.
  5724. //
  5725. // See the AWS API reference guide for Amazon Simple Storage Service's
  5726. // API operation ListBucketMetricsConfigurations for usage and error information.
  5727. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  5728. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  5729. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  5730. return out, req.Send()
  5731. }
  5732. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  5733. // the ability to pass a context and additional request options.
  5734. //
  5735. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  5736. //
  5737. // The context must be non-nil and will be used for request cancellation. If
  5738. // the context is nil a panic will occur. In the future the SDK may create
  5739. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5740. // for more information on using Contexts.
  5741. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  5742. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  5743. req.SetContext(ctx)
  5744. req.ApplyOptions(opts...)
  5745. return out, req.Send()
  5746. }
  5747. const opListBuckets = "ListBuckets"
  5748. // ListBucketsRequest generates a "aws/request.Request" representing the
  5749. // client's request for the ListBuckets operation. The "output" return
  5750. // value will be populated with the request's response once the request completes
  5751. // successfully.
  5752. //
  5753. // Use "Send" method on the returned Request to send the API call to the service.
  5754. // the "output" return value is not valid until after Send returns without error.
  5755. //
  5756. // See ListBuckets for more information on using the ListBuckets
  5757. // API call, and error handling.
  5758. //
  5759. // This method is useful when you want to inject custom logic or configuration
  5760. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5761. //
  5762. // // Example sending a request using the ListBucketsRequest method.
  5763. // req, resp := client.ListBucketsRequest(params)
  5764. //
  5765. // err := req.Send()
  5766. // if err == nil { // resp is now filled
  5767. // fmt.Println(resp)
  5768. // }
  5769. //
  5770. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  5771. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  5772. op := &request.Operation{
  5773. Name: opListBuckets,
  5774. HTTPMethod: "GET",
  5775. HTTPPath: "/",
  5776. }
  5777. if input == nil {
  5778. input = &ListBucketsInput{}
  5779. }
  5780. output = &ListBucketsOutput{}
  5781. req = c.newRequest(op, input, output)
  5782. return
  5783. }
  5784. // ListBuckets API operation for Amazon Simple Storage Service.
  5785. //
  5786. // Returns a list of all buckets owned by the authenticated sender of the request.
  5787. // To use this operation, you must have the s3:ListAllMyBuckets permission.
  5788. //
  5789. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5790. // with awserr.Error's Code and Message methods to get detailed information about
  5791. // the error.
  5792. //
  5793. // See the AWS API reference guide for Amazon Simple Storage Service's
  5794. // API operation ListBuckets for usage and error information.
  5795. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  5796. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  5797. req, out := c.ListBucketsRequest(input)
  5798. return out, req.Send()
  5799. }
  5800. // ListBucketsWithContext is the same as ListBuckets with the addition of
  5801. // the ability to pass a context and additional request options.
  5802. //
  5803. // See ListBuckets for details on how to use this API operation.
  5804. //
  5805. // The context must be non-nil and will be used for request cancellation. If
  5806. // the context is nil a panic will occur. In the future the SDK may create
  5807. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5808. // for more information on using Contexts.
  5809. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  5810. req, out := c.ListBucketsRequest(input)
  5811. req.SetContext(ctx)
  5812. req.ApplyOptions(opts...)
  5813. return out, req.Send()
  5814. }
  5815. const opListMultipartUploads = "ListMultipartUploads"
  5816. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  5817. // client's request for the ListMultipartUploads operation. The "output" return
  5818. // value will be populated with the request's response once the request completes
  5819. // successfully.
  5820. //
  5821. // Use "Send" method on the returned Request to send the API call to the service.
  5822. // the "output" return value is not valid until after Send returns without error.
  5823. //
  5824. // See ListMultipartUploads for more information on using the ListMultipartUploads
  5825. // API call, and error handling.
  5826. //
  5827. // This method is useful when you want to inject custom logic or configuration
  5828. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5829. //
  5830. // // Example sending a request using the ListMultipartUploadsRequest method.
  5831. // req, resp := client.ListMultipartUploadsRequest(params)
  5832. //
  5833. // err := req.Send()
  5834. // if err == nil { // resp is now filled
  5835. // fmt.Println(resp)
  5836. // }
  5837. //
  5838. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  5839. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  5840. op := &request.Operation{
  5841. Name: opListMultipartUploads,
  5842. HTTPMethod: "GET",
  5843. HTTPPath: "/{Bucket}?uploads",
  5844. Paginator: &request.Paginator{
  5845. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  5846. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  5847. LimitToken: "MaxUploads",
  5848. TruncationToken: "IsTruncated",
  5849. },
  5850. }
  5851. if input == nil {
  5852. input = &ListMultipartUploadsInput{}
  5853. }
  5854. output = &ListMultipartUploadsOutput{}
  5855. req = c.newRequest(op, input, output)
  5856. return
  5857. }
  5858. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  5859. //
  5860. // This action lists in-progress multipart uploads. An in-progress multipart
  5861. // upload is a multipart upload that has been initiated using the Initiate Multipart
  5862. // Upload request, but has not yet been completed or aborted.
  5863. //
  5864. // This action returns at most 1,000 multipart uploads in the response. 1,000
  5865. // multipart uploads is the maximum number of uploads a response can include,
  5866. // which is also the default value. You can further limit the number of uploads
  5867. // in a response by specifying the max-uploads parameter in the response. If
  5868. // additional multipart uploads satisfy the list criteria, the response will
  5869. // contain an IsTruncated element with the value true. To list the additional
  5870. // multipart uploads, use the key-marker and upload-id-marker request parameters.
  5871. //
  5872. // In the response, the uploads are sorted by key. If your application has initiated
  5873. // more than one multipart upload using the same object key, then uploads in
  5874. // the response are first sorted by key. Additionally, uploads are sorted in
  5875. // ascending order within each key by the upload initiation time.
  5876. //
  5877. // For more information on multipart uploads, see Uploading Objects Using Multipart
  5878. // Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
  5879. //
  5880. // For information on permissions required to use the multipart upload API,
  5881. // see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
  5882. //
  5883. // The following operations are related to ListMultipartUploads:
  5884. //
  5885. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  5886. //
  5887. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  5888. //
  5889. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  5890. //
  5891. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  5892. //
  5893. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  5894. //
  5895. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5896. // with awserr.Error's Code and Message methods to get detailed information about
  5897. // the error.
  5898. //
  5899. // See the AWS API reference guide for Amazon Simple Storage Service's
  5900. // API operation ListMultipartUploads for usage and error information.
  5901. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  5902. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  5903. req, out := c.ListMultipartUploadsRequest(input)
  5904. return out, req.Send()
  5905. }
  5906. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  5907. // the ability to pass a context and additional request options.
  5908. //
  5909. // See ListMultipartUploads for details on how to use this API operation.
  5910. //
  5911. // The context must be non-nil and will be used for request cancellation. If
  5912. // the context is nil a panic will occur. In the future the SDK may create
  5913. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5914. // for more information on using Contexts.
  5915. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  5916. req, out := c.ListMultipartUploadsRequest(input)
  5917. req.SetContext(ctx)
  5918. req.ApplyOptions(opts...)
  5919. return out, req.Send()
  5920. }
  5921. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  5922. // calling the "fn" function with the response data for each page. To stop
  5923. // iterating, return false from the fn function.
  5924. //
  5925. // See ListMultipartUploads method for more information on how to use this operation.
  5926. //
  5927. // Note: This operation can generate multiple requests to a service.
  5928. //
  5929. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  5930. // pageNum := 0
  5931. // err := client.ListMultipartUploadsPages(params,
  5932. // func(page *s3.ListMultipartUploadsOutput, lastPage bool) bool {
  5933. // pageNum++
  5934. // fmt.Println(page)
  5935. // return pageNum <= 3
  5936. // })
  5937. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  5938. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  5939. }
  5940. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  5941. // it takes a Context and allows setting request options on the pages.
  5942. //
  5943. // The context must be non-nil and will be used for request cancellation. If
  5944. // the context is nil a panic will occur. In the future the SDK may create
  5945. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5946. // for more information on using Contexts.
  5947. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  5948. p := request.Pagination{
  5949. NewRequest: func() (*request.Request, error) {
  5950. var inCpy *ListMultipartUploadsInput
  5951. if input != nil {
  5952. tmp := *input
  5953. inCpy = &tmp
  5954. }
  5955. req, _ := c.ListMultipartUploadsRequest(inCpy)
  5956. req.SetContext(ctx)
  5957. req.ApplyOptions(opts...)
  5958. return req, nil
  5959. },
  5960. }
  5961. for p.Next() {
  5962. if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) {
  5963. break
  5964. }
  5965. }
  5966. return p.Err()
  5967. }
  5968. const opListObjectVersions = "ListObjectVersions"
  5969. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  5970. // client's request for the ListObjectVersions operation. The "output" return
  5971. // value will be populated with the request's response once the request completes
  5972. // successfully.
  5973. //
  5974. // Use "Send" method on the returned Request to send the API call to the service.
  5975. // the "output" return value is not valid until after Send returns without error.
  5976. //
  5977. // See ListObjectVersions for more information on using the ListObjectVersions
  5978. // API call, and error handling.
  5979. //
  5980. // This method is useful when you want to inject custom logic or configuration
  5981. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5982. //
  5983. // // Example sending a request using the ListObjectVersionsRequest method.
  5984. // req, resp := client.ListObjectVersionsRequest(params)
  5985. //
  5986. // err := req.Send()
  5987. // if err == nil { // resp is now filled
  5988. // fmt.Println(resp)
  5989. // }
  5990. //
  5991. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  5992. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  5993. op := &request.Operation{
  5994. Name: opListObjectVersions,
  5995. HTTPMethod: "GET",
  5996. HTTPPath: "/{Bucket}?versions",
  5997. Paginator: &request.Paginator{
  5998. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  5999. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  6000. LimitToken: "MaxKeys",
  6001. TruncationToken: "IsTruncated",
  6002. },
  6003. }
  6004. if input == nil {
  6005. input = &ListObjectVersionsInput{}
  6006. }
  6007. output = &ListObjectVersionsOutput{}
  6008. req = c.newRequest(op, input, output)
  6009. return
  6010. }
  6011. // ListObjectVersions API operation for Amazon Simple Storage Service.
  6012. //
  6013. // Returns metadata about all versions of the objects in a bucket. You can also
  6014. // use request parameters as selection criteria to return metadata about a subset
  6015. // of all the object versions.
  6016. //
  6017. // To use this operation, you must have permissions to perform the s3:ListBucketVersions
  6018. // action. Be aware of the name difference.
  6019. //
  6020. // A 200 OK response can contain valid or invalid XML. Make sure to design your
  6021. // application to parse the contents of the response and handle it appropriately.
  6022. //
  6023. // To use this operation, you must have READ access to the bucket.
  6024. //
  6025. // This action is not supported by Amazon S3 on Outposts.
  6026. //
  6027. // The following operations are related to ListObjectVersions:
  6028. //
  6029. // - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
  6030. //
  6031. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  6032. //
  6033. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  6034. //
  6035. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  6036. //
  6037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6038. // with awserr.Error's Code and Message methods to get detailed information about
  6039. // the error.
  6040. //
  6041. // See the AWS API reference guide for Amazon Simple Storage Service's
  6042. // API operation ListObjectVersions for usage and error information.
  6043. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  6044. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  6045. req, out := c.ListObjectVersionsRequest(input)
  6046. return out, req.Send()
  6047. }
  6048. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  6049. // the ability to pass a context and additional request options.
  6050. //
  6051. // See ListObjectVersions for details on how to use this API operation.
  6052. //
  6053. // The context must be non-nil and will be used for request cancellation. If
  6054. // the context is nil a panic will occur. In the future the SDK may create
  6055. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6056. // for more information on using Contexts.
  6057. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  6058. req, out := c.ListObjectVersionsRequest(input)
  6059. req.SetContext(ctx)
  6060. req.ApplyOptions(opts...)
  6061. return out, req.Send()
  6062. }
  6063. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  6064. // calling the "fn" function with the response data for each page. To stop
  6065. // iterating, return false from the fn function.
  6066. //
  6067. // See ListObjectVersions method for more information on how to use this operation.
  6068. //
  6069. // Note: This operation can generate multiple requests to a service.
  6070. //
  6071. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  6072. // pageNum := 0
  6073. // err := client.ListObjectVersionsPages(params,
  6074. // func(page *s3.ListObjectVersionsOutput, lastPage bool) bool {
  6075. // pageNum++
  6076. // fmt.Println(page)
  6077. // return pageNum <= 3
  6078. // })
  6079. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  6080. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  6081. }
  6082. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  6083. // it takes a Context and allows setting request options on the pages.
  6084. //
  6085. // The context must be non-nil and will be used for request cancellation. If
  6086. // the context is nil a panic will occur. In the future the SDK may create
  6087. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6088. // for more information on using Contexts.
  6089. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  6090. p := request.Pagination{
  6091. NewRequest: func() (*request.Request, error) {
  6092. var inCpy *ListObjectVersionsInput
  6093. if input != nil {
  6094. tmp := *input
  6095. inCpy = &tmp
  6096. }
  6097. req, _ := c.ListObjectVersionsRequest(inCpy)
  6098. req.SetContext(ctx)
  6099. req.ApplyOptions(opts...)
  6100. return req, nil
  6101. },
  6102. }
  6103. for p.Next() {
  6104. if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) {
  6105. break
  6106. }
  6107. }
  6108. return p.Err()
  6109. }
  6110. const opListObjects = "ListObjects"
  6111. // ListObjectsRequest generates a "aws/request.Request" representing the
  6112. // client's request for the ListObjects operation. The "output" return
  6113. // value will be populated with the request's response once the request completes
  6114. // successfully.
  6115. //
  6116. // Use "Send" method on the returned Request to send the API call to the service.
  6117. // the "output" return value is not valid until after Send returns without error.
  6118. //
  6119. // See ListObjects for more information on using the ListObjects
  6120. // API call, and error handling.
  6121. //
  6122. // This method is useful when you want to inject custom logic or configuration
  6123. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6124. //
  6125. // // Example sending a request using the ListObjectsRequest method.
  6126. // req, resp := client.ListObjectsRequest(params)
  6127. //
  6128. // err := req.Send()
  6129. // if err == nil { // resp is now filled
  6130. // fmt.Println(resp)
  6131. // }
  6132. //
  6133. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  6134. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  6135. op := &request.Operation{
  6136. Name: opListObjects,
  6137. HTTPMethod: "GET",
  6138. HTTPPath: "/{Bucket}",
  6139. Paginator: &request.Paginator{
  6140. InputTokens: []string{"Marker"},
  6141. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  6142. LimitToken: "MaxKeys",
  6143. TruncationToken: "IsTruncated",
  6144. },
  6145. }
  6146. if input == nil {
  6147. input = &ListObjectsInput{}
  6148. }
  6149. output = &ListObjectsOutput{}
  6150. req = c.newRequest(op, input, output)
  6151. return
  6152. }
  6153. // ListObjects API operation for Amazon Simple Storage Service.
  6154. //
  6155. // Returns some or all (up to 1,000) of the objects in a bucket. You can use
  6156. // the request parameters as selection criteria to return a subset of the objects
  6157. // in a bucket. A 200 OK response can contain valid or invalid XML. Be sure
  6158. // to design your application to parse the contents of the response and handle
  6159. // it appropriately.
  6160. //
  6161. // This action has been revised. We recommend that you use the newer version,
  6162. // ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html),
  6163. // when developing applications. For backward compatibility, Amazon S3 continues
  6164. // to support ListObjects.
  6165. //
  6166. // The following operations are related to ListObjects:
  6167. //
  6168. // - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
  6169. //
  6170. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  6171. //
  6172. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  6173. //
  6174. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  6175. //
  6176. // - ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
  6177. //
  6178. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6179. // with awserr.Error's Code and Message methods to get detailed information about
  6180. // the error.
  6181. //
  6182. // See the AWS API reference guide for Amazon Simple Storage Service's
  6183. // API operation ListObjects for usage and error information.
  6184. //
  6185. // Returned Error Codes:
  6186. // - ErrCodeNoSuchBucket "NoSuchBucket"
  6187. // The specified bucket does not exist.
  6188. //
  6189. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  6190. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  6191. req, out := c.ListObjectsRequest(input)
  6192. return out, req.Send()
  6193. }
  6194. // ListObjectsWithContext is the same as ListObjects with the addition of
  6195. // the ability to pass a context and additional request options.
  6196. //
  6197. // See ListObjects for details on how to use this API operation.
  6198. //
  6199. // The context must be non-nil and will be used for request cancellation. If
  6200. // the context is nil a panic will occur. In the future the SDK may create
  6201. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6202. // for more information on using Contexts.
  6203. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  6204. req, out := c.ListObjectsRequest(input)
  6205. req.SetContext(ctx)
  6206. req.ApplyOptions(opts...)
  6207. return out, req.Send()
  6208. }
  6209. // ListObjectsPages iterates over the pages of a ListObjects operation,
  6210. // calling the "fn" function with the response data for each page. To stop
  6211. // iterating, return false from the fn function.
  6212. //
  6213. // See ListObjects method for more information on how to use this operation.
  6214. //
  6215. // Note: This operation can generate multiple requests to a service.
  6216. //
  6217. // // Example iterating over at most 3 pages of a ListObjects operation.
  6218. // pageNum := 0
  6219. // err := client.ListObjectsPages(params,
  6220. // func(page *s3.ListObjectsOutput, lastPage bool) bool {
  6221. // pageNum++
  6222. // fmt.Println(page)
  6223. // return pageNum <= 3
  6224. // })
  6225. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  6226. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  6227. }
  6228. // ListObjectsPagesWithContext same as ListObjectsPages except
  6229. // it takes a Context and allows setting request options on the pages.
  6230. //
  6231. // The context must be non-nil and will be used for request cancellation. If
  6232. // the context is nil a panic will occur. In the future the SDK may create
  6233. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6234. // for more information on using Contexts.
  6235. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  6236. p := request.Pagination{
  6237. NewRequest: func() (*request.Request, error) {
  6238. var inCpy *ListObjectsInput
  6239. if input != nil {
  6240. tmp := *input
  6241. inCpy = &tmp
  6242. }
  6243. req, _ := c.ListObjectsRequest(inCpy)
  6244. req.SetContext(ctx)
  6245. req.ApplyOptions(opts...)
  6246. return req, nil
  6247. },
  6248. }
  6249. for p.Next() {
  6250. if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) {
  6251. break
  6252. }
  6253. }
  6254. return p.Err()
  6255. }
  6256. const opListObjectsV2 = "ListObjectsV2"
  6257. // ListObjectsV2Request generates a "aws/request.Request" representing the
  6258. // client's request for the ListObjectsV2 operation. The "output" return
  6259. // value will be populated with the request's response once the request completes
  6260. // successfully.
  6261. //
  6262. // Use "Send" method on the returned Request to send the API call to the service.
  6263. // the "output" return value is not valid until after Send returns without error.
  6264. //
  6265. // See ListObjectsV2 for more information on using the ListObjectsV2
  6266. // API call, and error handling.
  6267. //
  6268. // This method is useful when you want to inject custom logic or configuration
  6269. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6270. //
  6271. // // Example sending a request using the ListObjectsV2Request method.
  6272. // req, resp := client.ListObjectsV2Request(params)
  6273. //
  6274. // err := req.Send()
  6275. // if err == nil { // resp is now filled
  6276. // fmt.Println(resp)
  6277. // }
  6278. //
  6279. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  6280. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  6281. op := &request.Operation{
  6282. Name: opListObjectsV2,
  6283. HTTPMethod: "GET",
  6284. HTTPPath: "/{Bucket}?list-type=2",
  6285. Paginator: &request.Paginator{
  6286. InputTokens: []string{"ContinuationToken"},
  6287. OutputTokens: []string{"NextContinuationToken"},
  6288. LimitToken: "MaxKeys",
  6289. TruncationToken: "",
  6290. },
  6291. }
  6292. if input == nil {
  6293. input = &ListObjectsV2Input{}
  6294. }
  6295. output = &ListObjectsV2Output{}
  6296. req = c.newRequest(op, input, output)
  6297. return
  6298. }
  6299. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  6300. //
  6301. // Returns some or all (up to 1,000) of the objects in a bucket with each request.
  6302. // You can use the request parameters as selection criteria to return a subset
  6303. // of the objects in a bucket. A 200 OK response can contain valid or invalid
  6304. // XML. Make sure to design your application to parse the contents of the response
  6305. // and handle it appropriately. Objects are returned sorted in an ascending
  6306. // order of the respective key names in the list. For more information about
  6307. // listing objects, see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
  6308. //
  6309. // To use this operation, you must have READ access to the bucket.
  6310. //
  6311. // To use this action in an Identity and Access Management (IAM) policy, you
  6312. // must have permissions to perform the s3:ListBucket action. The bucket owner
  6313. // has this permission by default and can grant this permission to others. For
  6314. // more information about permissions, see Permissions Related to Bucket Subresource
  6315. // Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  6316. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  6317. //
  6318. // This section describes the latest revision of this action. We recommend that
  6319. // you use this revised API for application development. For backward compatibility,
  6320. // Amazon S3 continues to support the prior version of this API, ListObjects
  6321. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html).
  6322. //
  6323. // To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html).
  6324. //
  6325. // The following operations are related to ListObjectsV2:
  6326. //
  6327. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  6328. //
  6329. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  6330. //
  6331. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  6332. //
  6333. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6334. // with awserr.Error's Code and Message methods to get detailed information about
  6335. // the error.
  6336. //
  6337. // See the AWS API reference guide for Amazon Simple Storage Service's
  6338. // API operation ListObjectsV2 for usage and error information.
  6339. //
  6340. // Returned Error Codes:
  6341. // - ErrCodeNoSuchBucket "NoSuchBucket"
  6342. // The specified bucket does not exist.
  6343. //
  6344. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  6345. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  6346. req, out := c.ListObjectsV2Request(input)
  6347. return out, req.Send()
  6348. }
  6349. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  6350. // the ability to pass a context and additional request options.
  6351. //
  6352. // See ListObjectsV2 for details on how to use this API operation.
  6353. //
  6354. // The context must be non-nil and will be used for request cancellation. If
  6355. // the context is nil a panic will occur. In the future the SDK may create
  6356. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6357. // for more information on using Contexts.
  6358. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  6359. req, out := c.ListObjectsV2Request(input)
  6360. req.SetContext(ctx)
  6361. req.ApplyOptions(opts...)
  6362. return out, req.Send()
  6363. }
  6364. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  6365. // calling the "fn" function with the response data for each page. To stop
  6366. // iterating, return false from the fn function.
  6367. //
  6368. // See ListObjectsV2 method for more information on how to use this operation.
  6369. //
  6370. // Note: This operation can generate multiple requests to a service.
  6371. //
  6372. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  6373. // pageNum := 0
  6374. // err := client.ListObjectsV2Pages(params,
  6375. // func(page *s3.ListObjectsV2Output, lastPage bool) bool {
  6376. // pageNum++
  6377. // fmt.Println(page)
  6378. // return pageNum <= 3
  6379. // })
  6380. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  6381. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  6382. }
  6383. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  6384. // it takes a Context and allows setting request options on the pages.
  6385. //
  6386. // The context must be non-nil and will be used for request cancellation. If
  6387. // the context is nil a panic will occur. In the future the SDK may create
  6388. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6389. // for more information on using Contexts.
  6390. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  6391. p := request.Pagination{
  6392. NewRequest: func() (*request.Request, error) {
  6393. var inCpy *ListObjectsV2Input
  6394. if input != nil {
  6395. tmp := *input
  6396. inCpy = &tmp
  6397. }
  6398. req, _ := c.ListObjectsV2Request(inCpy)
  6399. req.SetContext(ctx)
  6400. req.ApplyOptions(opts...)
  6401. return req, nil
  6402. },
  6403. }
  6404. for p.Next() {
  6405. if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) {
  6406. break
  6407. }
  6408. }
  6409. return p.Err()
  6410. }
  6411. const opListParts = "ListParts"
  6412. // ListPartsRequest generates a "aws/request.Request" representing the
  6413. // client's request for the ListParts operation. The "output" return
  6414. // value will be populated with the request's response once the request completes
  6415. // successfully.
  6416. //
  6417. // Use "Send" method on the returned Request to send the API call to the service.
  6418. // the "output" return value is not valid until after Send returns without error.
  6419. //
  6420. // See ListParts for more information on using the ListParts
  6421. // API call, and error handling.
  6422. //
  6423. // This method is useful when you want to inject custom logic or configuration
  6424. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6425. //
  6426. // // Example sending a request using the ListPartsRequest method.
  6427. // req, resp := client.ListPartsRequest(params)
  6428. //
  6429. // err := req.Send()
  6430. // if err == nil { // resp is now filled
  6431. // fmt.Println(resp)
  6432. // }
  6433. //
  6434. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  6435. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  6436. op := &request.Operation{
  6437. Name: opListParts,
  6438. HTTPMethod: "GET",
  6439. HTTPPath: "/{Bucket}/{Key+}",
  6440. Paginator: &request.Paginator{
  6441. InputTokens: []string{"PartNumberMarker"},
  6442. OutputTokens: []string{"NextPartNumberMarker"},
  6443. LimitToken: "MaxParts",
  6444. TruncationToken: "IsTruncated",
  6445. },
  6446. }
  6447. if input == nil {
  6448. input = &ListPartsInput{}
  6449. }
  6450. output = &ListPartsOutput{}
  6451. req = c.newRequest(op, input, output)
  6452. return
  6453. }
  6454. // ListParts API operation for Amazon Simple Storage Service.
  6455. //
  6456. // Lists the parts that have been uploaded for a specific multipart upload.
  6457. // This operation must include the upload ID, which you obtain by sending the
  6458. // initiate multipart upload request (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)).
  6459. // This request returns a maximum of 1,000 uploaded parts. The default number
  6460. // of parts returned is 1,000 parts. You can restrict the number of parts returned
  6461. // by specifying the max-parts request parameter. If your multipart upload consists
  6462. // of more than 1,000 parts, the response returns an IsTruncated field with
  6463. // the value of true, and a NextPartNumberMarker element. In subsequent ListParts
  6464. // requests you can include the part-number-marker query string parameter and
  6465. // set its value to the NextPartNumberMarker field value from the previous response.
  6466. //
  6467. // If the upload was created using a checksum algorithm, you will need to have
  6468. // permission to the kms:Decrypt action for the request to succeed.
  6469. //
  6470. // For more information on multipart uploads, see Uploading Objects Using Multipart
  6471. // Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
  6472. //
  6473. // For information on permissions required to use the multipart upload API,
  6474. // see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
  6475. //
  6476. // The following operations are related to ListParts:
  6477. //
  6478. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  6479. //
  6480. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  6481. //
  6482. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  6483. //
  6484. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  6485. //
  6486. // - GetObjectAttributes (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html)
  6487. //
  6488. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  6489. //
  6490. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6491. // with awserr.Error's Code and Message methods to get detailed information about
  6492. // the error.
  6493. //
  6494. // See the AWS API reference guide for Amazon Simple Storage Service's
  6495. // API operation ListParts for usage and error information.
  6496. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  6497. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  6498. req, out := c.ListPartsRequest(input)
  6499. return out, req.Send()
  6500. }
  6501. // ListPartsWithContext is the same as ListParts with the addition of
  6502. // the ability to pass a context and additional request options.
  6503. //
  6504. // See ListParts for details on how to use this API operation.
  6505. //
  6506. // The context must be non-nil and will be used for request cancellation. If
  6507. // the context is nil a panic will occur. In the future the SDK may create
  6508. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6509. // for more information on using Contexts.
  6510. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  6511. req, out := c.ListPartsRequest(input)
  6512. req.SetContext(ctx)
  6513. req.ApplyOptions(opts...)
  6514. return out, req.Send()
  6515. }
  6516. // ListPartsPages iterates over the pages of a ListParts operation,
  6517. // calling the "fn" function with the response data for each page. To stop
  6518. // iterating, return false from the fn function.
  6519. //
  6520. // See ListParts method for more information on how to use this operation.
  6521. //
  6522. // Note: This operation can generate multiple requests to a service.
  6523. //
  6524. // // Example iterating over at most 3 pages of a ListParts operation.
  6525. // pageNum := 0
  6526. // err := client.ListPartsPages(params,
  6527. // func(page *s3.ListPartsOutput, lastPage bool) bool {
  6528. // pageNum++
  6529. // fmt.Println(page)
  6530. // return pageNum <= 3
  6531. // })
  6532. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  6533. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  6534. }
  6535. // ListPartsPagesWithContext same as ListPartsPages except
  6536. // it takes a Context and allows setting request options on the pages.
  6537. //
  6538. // The context must be non-nil and will be used for request cancellation. If
  6539. // the context is nil a panic will occur. In the future the SDK may create
  6540. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6541. // for more information on using Contexts.
  6542. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  6543. p := request.Pagination{
  6544. NewRequest: func() (*request.Request, error) {
  6545. var inCpy *ListPartsInput
  6546. if input != nil {
  6547. tmp := *input
  6548. inCpy = &tmp
  6549. }
  6550. req, _ := c.ListPartsRequest(inCpy)
  6551. req.SetContext(ctx)
  6552. req.ApplyOptions(opts...)
  6553. return req, nil
  6554. },
  6555. }
  6556. for p.Next() {
  6557. if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) {
  6558. break
  6559. }
  6560. }
  6561. return p.Err()
  6562. }
  6563. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  6564. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  6565. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  6566. // value will be populated with the request's response once the request completes
  6567. // successfully.
  6568. //
  6569. // Use "Send" method on the returned Request to send the API call to the service.
  6570. // the "output" return value is not valid until after Send returns without error.
  6571. //
  6572. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  6573. // API call, and error handling.
  6574. //
  6575. // This method is useful when you want to inject custom logic or configuration
  6576. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6577. //
  6578. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  6579. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  6580. //
  6581. // err := req.Send()
  6582. // if err == nil { // resp is now filled
  6583. // fmt.Println(resp)
  6584. // }
  6585. //
  6586. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  6587. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  6588. op := &request.Operation{
  6589. Name: opPutBucketAccelerateConfiguration,
  6590. HTTPMethod: "PUT",
  6591. HTTPPath: "/{Bucket}?accelerate",
  6592. }
  6593. if input == nil {
  6594. input = &PutBucketAccelerateConfigurationInput{}
  6595. }
  6596. output = &PutBucketAccelerateConfigurationOutput{}
  6597. req = c.newRequest(op, input, output)
  6598. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6599. return
  6600. }
  6601. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  6602. //
  6603. // Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
  6604. // Acceleration is a bucket-level feature that enables you to perform faster
  6605. // data transfers to Amazon S3.
  6606. //
  6607. // To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration
  6608. // action. The bucket owner has this permission by default. The bucket owner
  6609. // can grant this permission to others. For more information about permissions,
  6610. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  6611. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  6612. //
  6613. // The Transfer Acceleration state of a bucket can be set to one of the following
  6614. // two values:
  6615. //
  6616. // - Enabled – Enables accelerated data transfers to the bucket.
  6617. //
  6618. // - Suspended – Disables accelerated data transfers to the bucket.
  6619. //
  6620. // The GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
  6621. // action returns the transfer acceleration state of a bucket.
  6622. //
  6623. // After setting the Transfer Acceleration state of a bucket to Enabled, it
  6624. // might take up to thirty minutes before the data transfer rates to the bucket
  6625. // increase.
  6626. //
  6627. // The name of the bucket used for Transfer Acceleration must be DNS-compliant
  6628. // and must not contain periods (".").
  6629. //
  6630. // For more information about transfer acceleration, see Transfer Acceleration
  6631. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
  6632. //
  6633. // The following operations are related to PutBucketAccelerateConfiguration:
  6634. //
  6635. // - GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
  6636. //
  6637. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  6638. //
  6639. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6640. // with awserr.Error's Code and Message methods to get detailed information about
  6641. // the error.
  6642. //
  6643. // See the AWS API reference guide for Amazon Simple Storage Service's
  6644. // API operation PutBucketAccelerateConfiguration for usage and error information.
  6645. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  6646. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  6647. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  6648. return out, req.Send()
  6649. }
  6650. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  6651. // the ability to pass a context and additional request options.
  6652. //
  6653. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  6654. //
  6655. // The context must be non-nil and will be used for request cancellation. If
  6656. // the context is nil a panic will occur. In the future the SDK may create
  6657. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6658. // for more information on using Contexts.
  6659. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  6660. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  6661. req.SetContext(ctx)
  6662. req.ApplyOptions(opts...)
  6663. return out, req.Send()
  6664. }
  6665. const opPutBucketAcl = "PutBucketAcl"
  6666. // PutBucketAclRequest generates a "aws/request.Request" representing the
  6667. // client's request for the PutBucketAcl operation. The "output" return
  6668. // value will be populated with the request's response once the request completes
  6669. // successfully.
  6670. //
  6671. // Use "Send" method on the returned Request to send the API call to the service.
  6672. // the "output" return value is not valid until after Send returns without error.
  6673. //
  6674. // See PutBucketAcl for more information on using the PutBucketAcl
  6675. // API call, and error handling.
  6676. //
  6677. // This method is useful when you want to inject custom logic or configuration
  6678. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6679. //
  6680. // // Example sending a request using the PutBucketAclRequest method.
  6681. // req, resp := client.PutBucketAclRequest(params)
  6682. //
  6683. // err := req.Send()
  6684. // if err == nil { // resp is now filled
  6685. // fmt.Println(resp)
  6686. // }
  6687. //
  6688. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  6689. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  6690. op := &request.Operation{
  6691. Name: opPutBucketAcl,
  6692. HTTPMethod: "PUT",
  6693. HTTPPath: "/{Bucket}?acl",
  6694. }
  6695. if input == nil {
  6696. input = &PutBucketAclInput{}
  6697. }
  6698. output = &PutBucketAclOutput{}
  6699. req = c.newRequest(op, input, output)
  6700. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6701. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  6702. Name: "contentMd5Handler",
  6703. Fn: checksum.AddBodyContentMD5Handler,
  6704. })
  6705. return
  6706. }
  6707. // PutBucketAcl API operation for Amazon Simple Storage Service.
  6708. //
  6709. // Sets the permissions on an existing bucket using access control lists (ACL).
  6710. // For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
  6711. // To set the ACL of a bucket, you must have WRITE_ACP permission.
  6712. //
  6713. // You can use one of the following two ways to set a bucket's permissions:
  6714. //
  6715. // - Specify the ACL in the request body
  6716. //
  6717. // - Specify permissions using request headers
  6718. //
  6719. // You cannot specify access permission using both the body and the request
  6720. // headers.
  6721. //
  6722. // Depending on your application needs, you may choose to set the ACL on a bucket
  6723. // using either the request body or the headers. For example, if you have an
  6724. // existing application that updates a bucket ACL using the request body, then
  6725. // you can continue to use that approach.
  6726. //
  6727. // If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
  6728. // ACLs are disabled and no longer affect permissions. You must use policies
  6729. // to grant access to your bucket and the objects in it. Requests to set ACLs
  6730. // or update ACLs fail and return the AccessControlListNotSupported error code.
  6731. // Requests to read ACLs are still supported. For more information, see Controlling
  6732. // object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  6733. // in the Amazon S3 User Guide.
  6734. //
  6735. // # Access Permissions
  6736. //
  6737. // You can set access permissions using one of the following methods:
  6738. //
  6739. // - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
  6740. // a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
  6741. // predefined set of grantees and permissions. Specify the canned ACL name
  6742. // as the value of x-amz-acl. If you use this header, you cannot use other
  6743. // access control-specific headers in your request. For more information,
  6744. // see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  6745. //
  6746. // - Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
  6747. // x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
  6748. // these headers, you specify explicit access permissions and grantees (Amazon
  6749. // Web Services accounts or Amazon S3 groups) who will receive the permission.
  6750. // If you use these ACL-specific headers, you cannot use the x-amz-acl header
  6751. // to set a canned ACL. These parameters map to the set of permissions that
  6752. // Amazon S3 supports in an ACL. For more information, see Access Control
  6753. // List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
  6754. // You specify each grantee as a type=value pair, where the type is one of
  6755. // the following: id – if the value specified is the canonical user ID
  6756. // of an Amazon Web Services account uri – if you are granting permissions
  6757. // to a predefined group emailAddress – if the value specified is the email
  6758. // address of an Amazon Web Services account Using email addresses to specify
  6759. // a grantee is only supported in the following Amazon Web Services Regions:
  6760. // US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
  6761. // (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
  6762. // South America (São Paulo) For a list of all the Amazon S3 supported Regions
  6763. // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  6764. // in the Amazon Web Services General Reference. For example, the following
  6765. // x-amz-grant-write header grants create, overwrite, and delete objects
  6766. // permission to LogDelivery group predefined by Amazon S3 and two Amazon
  6767. // Web Services accounts identified by their email addresses. x-amz-grant-write:
  6768. // uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333",
  6769. // id="555566667777"
  6770. //
  6771. // You can use either a canned ACL or specify access permissions explicitly.
  6772. // You cannot do both.
  6773. //
  6774. // # Grantee Values
  6775. //
  6776. // You can specify the person (grantee) to whom you're assigning access rights
  6777. // (using request elements) in the following ways:
  6778. //
  6779. // - By the person's ID: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6780. // xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName>
  6781. // </Grantee> DisplayName is optional and ignored in the request
  6782. //
  6783. // - By URI: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6784. // xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee>
  6785. //
  6786. // - By Email address: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6787. // xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee>
  6788. // The grantee is resolved to the CanonicalUser and, in a response to a GET
  6789. // Object acl request, appears as the CanonicalUser. Using email addresses
  6790. // to specify a grantee is only supported in the following Amazon Web Services
  6791. // Regions: US East (N. Virginia) US West (N. California) US West (Oregon)
  6792. // Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe
  6793. // (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported
  6794. // Regions and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  6795. // in the Amazon Web Services General Reference.
  6796. //
  6797. // Related Resources
  6798. //
  6799. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  6800. //
  6801. // - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
  6802. //
  6803. // - GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
  6804. //
  6805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6806. // with awserr.Error's Code and Message methods to get detailed information about
  6807. // the error.
  6808. //
  6809. // See the AWS API reference guide for Amazon Simple Storage Service's
  6810. // API operation PutBucketAcl for usage and error information.
  6811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  6812. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  6813. req, out := c.PutBucketAclRequest(input)
  6814. return out, req.Send()
  6815. }
  6816. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  6817. // the ability to pass a context and additional request options.
  6818. //
  6819. // See PutBucketAcl for details on how to use this API operation.
  6820. //
  6821. // The context must be non-nil and will be used for request cancellation. If
  6822. // the context is nil a panic will occur. In the future the SDK may create
  6823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6824. // for more information on using Contexts.
  6825. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  6826. req, out := c.PutBucketAclRequest(input)
  6827. req.SetContext(ctx)
  6828. req.ApplyOptions(opts...)
  6829. return out, req.Send()
  6830. }
  6831. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  6832. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  6833. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  6834. // value will be populated with the request's response once the request completes
  6835. // successfully.
  6836. //
  6837. // Use "Send" method on the returned Request to send the API call to the service.
  6838. // the "output" return value is not valid until after Send returns without error.
  6839. //
  6840. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  6841. // API call, and error handling.
  6842. //
  6843. // This method is useful when you want to inject custom logic or configuration
  6844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6845. //
  6846. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  6847. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  6848. //
  6849. // err := req.Send()
  6850. // if err == nil { // resp is now filled
  6851. // fmt.Println(resp)
  6852. // }
  6853. //
  6854. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  6855. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  6856. op := &request.Operation{
  6857. Name: opPutBucketAnalyticsConfiguration,
  6858. HTTPMethod: "PUT",
  6859. HTTPPath: "/{Bucket}?analytics",
  6860. }
  6861. if input == nil {
  6862. input = &PutBucketAnalyticsConfigurationInput{}
  6863. }
  6864. output = &PutBucketAnalyticsConfigurationOutput{}
  6865. req = c.newRequest(op, input, output)
  6866. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6867. return
  6868. }
  6869. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  6870. //
  6871. // Sets an analytics configuration for the bucket (specified by the analytics
  6872. // configuration ID). You can have up to 1,000 analytics configurations per
  6873. // bucket.
  6874. //
  6875. // You can choose to have storage class analysis export analysis reports sent
  6876. // to a comma-separated values (CSV) flat file. See the DataExport request element.
  6877. // Reports are updated daily and are based on the object filters that you configure.
  6878. // When selecting data export, you specify a destination bucket and an optional
  6879. // destination prefix where the file is written. You can export the data to
  6880. // a destination bucket in a different account. However, the destination bucket
  6881. // must be in the same Region as the bucket that you are making the PUT analytics
  6882. // configuration to. For more information, see Amazon S3 Analytics – Storage
  6883. // Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
  6884. //
  6885. // You must create a bucket policy on the destination bucket where the exported
  6886. // file is written to grant permissions to Amazon S3 to write objects to the
  6887. // bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory
  6888. // and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
  6889. //
  6890. // To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
  6891. // action. The bucket owner has this permission by default. The bucket owner
  6892. // can grant this permission to others. For more information about permissions,
  6893. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  6894. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  6895. //
  6896. // Special Errors
  6897. //
  6898. // - HTTP Error: HTTP 400 Bad Request Code: InvalidArgument Cause: Invalid
  6899. // argument.
  6900. //
  6901. // - HTTP Error: HTTP 400 Bad Request Code: TooManyConfigurations Cause:
  6902. // You are attempting to create a new configuration but have already reached
  6903. // the 1,000-configuration limit.
  6904. //
  6905. // - HTTP Error: HTTP 403 Forbidden Code: AccessDenied Cause: You are not
  6906. // the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration
  6907. // bucket permission to set the configuration on the bucket.
  6908. //
  6909. // Related Resources
  6910. //
  6911. // - GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
  6912. //
  6913. // - DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
  6914. //
  6915. // - ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
  6916. //
  6917. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6918. // with awserr.Error's Code and Message methods to get detailed information about
  6919. // the error.
  6920. //
  6921. // See the AWS API reference guide for Amazon Simple Storage Service's
  6922. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  6923. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  6924. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  6925. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  6926. return out, req.Send()
  6927. }
  6928. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  6929. // the ability to pass a context and additional request options.
  6930. //
  6931. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  6932. //
  6933. // The context must be non-nil and will be used for request cancellation. If
  6934. // the context is nil a panic will occur. In the future the SDK may create
  6935. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6936. // for more information on using Contexts.
  6937. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  6938. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  6939. req.SetContext(ctx)
  6940. req.ApplyOptions(opts...)
  6941. return out, req.Send()
  6942. }
  6943. const opPutBucketCors = "PutBucketCors"
  6944. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  6945. // client's request for the PutBucketCors operation. The "output" return
  6946. // value will be populated with the request's response once the request completes
  6947. // successfully.
  6948. //
  6949. // Use "Send" method on the returned Request to send the API call to the service.
  6950. // the "output" return value is not valid until after Send returns without error.
  6951. //
  6952. // See PutBucketCors for more information on using the PutBucketCors
  6953. // API call, and error handling.
  6954. //
  6955. // This method is useful when you want to inject custom logic or configuration
  6956. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6957. //
  6958. // // Example sending a request using the PutBucketCorsRequest method.
  6959. // req, resp := client.PutBucketCorsRequest(params)
  6960. //
  6961. // err := req.Send()
  6962. // if err == nil { // resp is now filled
  6963. // fmt.Println(resp)
  6964. // }
  6965. //
  6966. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  6967. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  6968. op := &request.Operation{
  6969. Name: opPutBucketCors,
  6970. HTTPMethod: "PUT",
  6971. HTTPPath: "/{Bucket}?cors",
  6972. }
  6973. if input == nil {
  6974. input = &PutBucketCorsInput{}
  6975. }
  6976. output = &PutBucketCorsOutput{}
  6977. req = c.newRequest(op, input, output)
  6978. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6979. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  6980. Name: "contentMd5Handler",
  6981. Fn: checksum.AddBodyContentMD5Handler,
  6982. })
  6983. return
  6984. }
  6985. // PutBucketCors API operation for Amazon Simple Storage Service.
  6986. //
  6987. // Sets the cors configuration for your bucket. If the configuration exists,
  6988. // Amazon S3 replaces it.
  6989. //
  6990. // To use this operation, you must be allowed to perform the s3:PutBucketCORS
  6991. // action. By default, the bucket owner has this permission and can grant it
  6992. // to others.
  6993. //
  6994. // You set this configuration on a bucket so that the bucket can service cross-origin
  6995. // requests. For example, you might want to enable a request whose origin is
  6996. // http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com
  6997. // by using the browser's XMLHttpRequest capability.
  6998. //
  6999. // To enable cross-origin resource sharing (CORS) on a bucket, you add the cors
  7000. // subresource to the bucket. The cors subresource is an XML document in which
  7001. // you configure rules that identify origins and the HTTP methods that can be
  7002. // executed on your bucket. The document is limited to 64 KB in size.
  7003. //
  7004. // When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request)
  7005. // against a bucket, it evaluates the cors configuration on the bucket and uses
  7006. // the first CORSRule rule that matches the incoming browser request to enable
  7007. // a cross-origin request. For a rule to match, the following conditions must
  7008. // be met:
  7009. //
  7010. // - The request's Origin header must match AllowedOrigin elements.
  7011. //
  7012. // - The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method
  7013. // header in case of a pre-flight OPTIONS request must be one of the AllowedMethod
  7014. // elements.
  7015. //
  7016. // - Every header specified in the Access-Control-Request-Headers request
  7017. // header of a pre-flight request must match an AllowedHeader element.
  7018. //
  7019. // For more information about CORS, go to Enabling Cross-Origin Resource Sharing
  7020. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
  7021. // S3 User Guide.
  7022. //
  7023. // Related Resources
  7024. //
  7025. // - GetBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
  7026. //
  7027. // - DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
  7028. //
  7029. // - RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
  7030. //
  7031. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7032. // with awserr.Error's Code and Message methods to get detailed information about
  7033. // the error.
  7034. //
  7035. // See the AWS API reference guide for Amazon Simple Storage Service's
  7036. // API operation PutBucketCors for usage and error information.
  7037. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  7038. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  7039. req, out := c.PutBucketCorsRequest(input)
  7040. return out, req.Send()
  7041. }
  7042. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  7043. // the ability to pass a context and additional request options.
  7044. //
  7045. // See PutBucketCors for details on how to use this API operation.
  7046. //
  7047. // The context must be non-nil and will be used for request cancellation. If
  7048. // the context is nil a panic will occur. In the future the SDK may create
  7049. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7050. // for more information on using Contexts.
  7051. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  7052. req, out := c.PutBucketCorsRequest(input)
  7053. req.SetContext(ctx)
  7054. req.ApplyOptions(opts...)
  7055. return out, req.Send()
  7056. }
  7057. const opPutBucketEncryption = "PutBucketEncryption"
  7058. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  7059. // client's request for the PutBucketEncryption operation. The "output" return
  7060. // value will be populated with the request's response once the request completes
  7061. // successfully.
  7062. //
  7063. // Use "Send" method on the returned Request to send the API call to the service.
  7064. // the "output" return value is not valid until after Send returns without error.
  7065. //
  7066. // See PutBucketEncryption for more information on using the PutBucketEncryption
  7067. // API call, and error handling.
  7068. //
  7069. // This method is useful when you want to inject custom logic or configuration
  7070. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7071. //
  7072. // // Example sending a request using the PutBucketEncryptionRequest method.
  7073. // req, resp := client.PutBucketEncryptionRequest(params)
  7074. //
  7075. // err := req.Send()
  7076. // if err == nil { // resp is now filled
  7077. // fmt.Println(resp)
  7078. // }
  7079. //
  7080. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  7081. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  7082. op := &request.Operation{
  7083. Name: opPutBucketEncryption,
  7084. HTTPMethod: "PUT",
  7085. HTTPPath: "/{Bucket}?encryption",
  7086. }
  7087. if input == nil {
  7088. input = &PutBucketEncryptionInput{}
  7089. }
  7090. output = &PutBucketEncryptionOutput{}
  7091. req = c.newRequest(op, input, output)
  7092. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7093. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  7094. Name: "contentMd5Handler",
  7095. Fn: checksum.AddBodyContentMD5Handler,
  7096. })
  7097. return
  7098. }
  7099. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  7100. //
  7101. // This action uses the encryption subresource to configure default encryption
  7102. // and Amazon S3 Bucket Key for an existing bucket.
  7103. //
  7104. // Default encryption for a bucket can use server-side encryption with Amazon
  7105. // S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). If you specify
  7106. // default encryption using SSE-KMS, you can also configure Amazon S3 Bucket
  7107. // Key. When the default encryption is SSE-KMS, if you upload an object to the
  7108. // bucket and do not specify the KMS key to use for encryption, Amazon S3 uses
  7109. // the default Amazon Web Services managed KMS key for your account. For information
  7110. // about default encryption, see Amazon S3 default bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
  7111. // in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see
  7112. // Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
  7113. // in the Amazon S3 User Guide.
  7114. //
  7115. // This action requires Amazon Web Services Signature Version 4. For more information,
  7116. // see Authenticating Requests (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
  7117. //
  7118. // To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
  7119. // action. The bucket owner has this permission by default. The bucket owner
  7120. // can grant this permission to others. For more information about permissions,
  7121. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  7122. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  7123. // in the Amazon S3 User Guide.
  7124. //
  7125. // Related Resources
  7126. //
  7127. // - GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
  7128. //
  7129. // - DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
  7130. //
  7131. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7132. // with awserr.Error's Code and Message methods to get detailed information about
  7133. // the error.
  7134. //
  7135. // See the AWS API reference guide for Amazon Simple Storage Service's
  7136. // API operation PutBucketEncryption for usage and error information.
  7137. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  7138. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  7139. req, out := c.PutBucketEncryptionRequest(input)
  7140. return out, req.Send()
  7141. }
  7142. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  7143. // the ability to pass a context and additional request options.
  7144. //
  7145. // See PutBucketEncryption for details on how to use this API operation.
  7146. //
  7147. // The context must be non-nil and will be used for request cancellation. If
  7148. // the context is nil a panic will occur. In the future the SDK may create
  7149. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7150. // for more information on using Contexts.
  7151. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  7152. req, out := c.PutBucketEncryptionRequest(input)
  7153. req.SetContext(ctx)
  7154. req.ApplyOptions(opts...)
  7155. return out, req.Send()
  7156. }
  7157. const opPutBucketIntelligentTieringConfiguration = "PutBucketIntelligentTieringConfiguration"
  7158. // PutBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
  7159. // client's request for the PutBucketIntelligentTieringConfiguration operation. The "output" return
  7160. // value will be populated with the request's response once the request completes
  7161. // successfully.
  7162. //
  7163. // Use "Send" method on the returned Request to send the API call to the service.
  7164. // the "output" return value is not valid until after Send returns without error.
  7165. //
  7166. // See PutBucketIntelligentTieringConfiguration for more information on using the PutBucketIntelligentTieringConfiguration
  7167. // API call, and error handling.
  7168. //
  7169. // This method is useful when you want to inject custom logic or configuration
  7170. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7171. //
  7172. // // Example sending a request using the PutBucketIntelligentTieringConfigurationRequest method.
  7173. // req, resp := client.PutBucketIntelligentTieringConfigurationRequest(params)
  7174. //
  7175. // err := req.Send()
  7176. // if err == nil { // resp is now filled
  7177. // fmt.Println(resp)
  7178. // }
  7179. //
  7180. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
  7181. func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketIntelligentTieringConfigurationInput) (req *request.Request, output *PutBucketIntelligentTieringConfigurationOutput) {
  7182. op := &request.Operation{
  7183. Name: opPutBucketIntelligentTieringConfiguration,
  7184. HTTPMethod: "PUT",
  7185. HTTPPath: "/{Bucket}?intelligent-tiering",
  7186. }
  7187. if input == nil {
  7188. input = &PutBucketIntelligentTieringConfigurationInput{}
  7189. }
  7190. output = &PutBucketIntelligentTieringConfigurationOutput{}
  7191. req = c.newRequest(op, input, output)
  7192. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7193. return
  7194. }
  7195. // PutBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
  7196. //
  7197. // Puts a S3 Intelligent-Tiering configuration to the specified bucket. You
  7198. // can have up to 1,000 S3 Intelligent-Tiering configurations per bucket.
  7199. //
  7200. // The S3 Intelligent-Tiering storage class is designed to optimize storage
  7201. // costs by automatically moving data to the most cost-effective storage access
  7202. // tier, without performance impact or operational overhead. S3 Intelligent-Tiering
  7203. // delivers automatic cost savings in three low latency and high throughput
  7204. // access tiers. To get the lowest storage cost on data that can be accessed
  7205. // in minutes to hours, you can choose to activate additional archiving capabilities.
  7206. //
  7207. // The S3 Intelligent-Tiering storage class is the ideal storage class for data
  7208. // with unknown, changing, or unpredictable access patterns, independent of
  7209. // object size or retention period. If the size of an object is less than 128
  7210. // KB, it is not monitored and not eligible for auto-tiering. Smaller objects
  7211. // can be stored, but they are always charged at the Frequent Access tier rates
  7212. // in the S3 Intelligent-Tiering storage class.
  7213. //
  7214. // For more information, see Storage class for automatically optimizing frequently
  7215. // and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
  7216. //
  7217. // Operations related to PutBucketIntelligentTieringConfiguration include:
  7218. //
  7219. // - DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
  7220. //
  7221. // - GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
  7222. //
  7223. // - ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
  7224. //
  7225. // You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically
  7226. // move objects stored in the S3 Intelligent-Tiering storage class to the Archive
  7227. // Access or Deep Archive Access tier.
  7228. //
  7229. // Special Errors
  7230. //
  7231. // - HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument
  7232. //
  7233. // - HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
  7234. // attempting to create a new configuration but have already reached the
  7235. // 1,000-configuration limit.
  7236. //
  7237. // - HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner
  7238. // of the specified bucket, or you do not have the s3:PutIntelligentTieringConfiguration
  7239. // bucket permission to set the configuration on the bucket.
  7240. //
  7241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7242. // with awserr.Error's Code and Message methods to get detailed information about
  7243. // the error.
  7244. //
  7245. // See the AWS API reference guide for Amazon Simple Storage Service's
  7246. // API operation PutBucketIntelligentTieringConfiguration for usage and error information.
  7247. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
  7248. func (c *S3) PutBucketIntelligentTieringConfiguration(input *PutBucketIntelligentTieringConfigurationInput) (*PutBucketIntelligentTieringConfigurationOutput, error) {
  7249. req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
  7250. return out, req.Send()
  7251. }
  7252. // PutBucketIntelligentTieringConfigurationWithContext is the same as PutBucketIntelligentTieringConfiguration with the addition of
  7253. // the ability to pass a context and additional request options.
  7254. //
  7255. // See PutBucketIntelligentTieringConfiguration for details on how to use this API operation.
  7256. //
  7257. // The context must be non-nil and will be used for request cancellation. If
  7258. // the context is nil a panic will occur. In the future the SDK may create
  7259. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7260. // for more information on using Contexts.
  7261. func (c *S3) PutBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *PutBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*PutBucketIntelligentTieringConfigurationOutput, error) {
  7262. req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
  7263. req.SetContext(ctx)
  7264. req.ApplyOptions(opts...)
  7265. return out, req.Send()
  7266. }
  7267. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  7268. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  7269. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  7270. // value will be populated with the request's response once the request completes
  7271. // successfully.
  7272. //
  7273. // Use "Send" method on the returned Request to send the API call to the service.
  7274. // the "output" return value is not valid until after Send returns without error.
  7275. //
  7276. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  7277. // API call, and error handling.
  7278. //
  7279. // This method is useful when you want to inject custom logic or configuration
  7280. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7281. //
  7282. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  7283. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  7284. //
  7285. // err := req.Send()
  7286. // if err == nil { // resp is now filled
  7287. // fmt.Println(resp)
  7288. // }
  7289. //
  7290. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  7291. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  7292. op := &request.Operation{
  7293. Name: opPutBucketInventoryConfiguration,
  7294. HTTPMethod: "PUT",
  7295. HTTPPath: "/{Bucket}?inventory",
  7296. }
  7297. if input == nil {
  7298. input = &PutBucketInventoryConfigurationInput{}
  7299. }
  7300. output = &PutBucketInventoryConfigurationOutput{}
  7301. req = c.newRequest(op, input, output)
  7302. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7303. return
  7304. }
  7305. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  7306. //
  7307. // This implementation of the PUT action adds an inventory configuration (identified
  7308. // by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations
  7309. // per bucket.
  7310. //
  7311. // Amazon S3 inventory generates inventories of the objects in the bucket on
  7312. // a daily or weekly basis, and the results are published to a flat file. The
  7313. // bucket that is inventoried is called the source bucket, and the bucket where
  7314. // the inventory flat file is stored is called the destination bucket. The destination
  7315. // bucket must be in the same Amazon Web Services Region as the source bucket.
  7316. //
  7317. // When you configure an inventory for a source bucket, you specify the destination
  7318. // bucket where you want the inventory to be stored, and whether to generate
  7319. // the inventory daily or weekly. You can also configure what object metadata
  7320. // to include and whether to inventory all object versions or only current versions.
  7321. // For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
  7322. // in the Amazon S3 User Guide.
  7323. //
  7324. // You must create a bucket policy on the destination bucket to grant permissions
  7325. // to Amazon S3 to write objects to the bucket in the defined location. For
  7326. // an example policy, see Granting Permissions for Amazon S3 Inventory and Storage
  7327. // Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
  7328. //
  7329. // To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
  7330. // action. The bucket owner has this permission by default and can grant this
  7331. // permission to others. For more information about permissions, see Permissions
  7332. // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  7333. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  7334. // in the Amazon S3 User Guide.
  7335. //
  7336. // Special Errors
  7337. //
  7338. // - HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument
  7339. //
  7340. // - HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
  7341. // attempting to create a new configuration but have already reached the
  7342. // 1,000-configuration limit.
  7343. //
  7344. // - HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner
  7345. // of the specified bucket, or you do not have the s3:PutInventoryConfiguration
  7346. // bucket permission to set the configuration on the bucket.
  7347. //
  7348. // Related Resources
  7349. //
  7350. // - GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
  7351. //
  7352. // - DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
  7353. //
  7354. // - ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
  7355. //
  7356. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7357. // with awserr.Error's Code and Message methods to get detailed information about
  7358. // the error.
  7359. //
  7360. // See the AWS API reference guide for Amazon Simple Storage Service's
  7361. // API operation PutBucketInventoryConfiguration for usage and error information.
  7362. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  7363. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  7364. req, out := c.PutBucketInventoryConfigurationRequest(input)
  7365. return out, req.Send()
  7366. }
  7367. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  7368. // the ability to pass a context and additional request options.
  7369. //
  7370. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  7371. //
  7372. // The context must be non-nil and will be used for request cancellation. If
  7373. // the context is nil a panic will occur. In the future the SDK may create
  7374. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7375. // for more information on using Contexts.
  7376. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  7377. req, out := c.PutBucketInventoryConfigurationRequest(input)
  7378. req.SetContext(ctx)
  7379. req.ApplyOptions(opts...)
  7380. return out, req.Send()
  7381. }
  7382. const opPutBucketLifecycle = "PutBucketLifecycle"
  7383. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  7384. // client's request for the PutBucketLifecycle operation. The "output" return
  7385. // value will be populated with the request's response once the request completes
  7386. // successfully.
  7387. //
  7388. // Use "Send" method on the returned Request to send the API call to the service.
  7389. // the "output" return value is not valid until after Send returns without error.
  7390. //
  7391. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  7392. // API call, and error handling.
  7393. //
  7394. // This method is useful when you want to inject custom logic or configuration
  7395. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7396. //
  7397. // // Example sending a request using the PutBucketLifecycleRequest method.
  7398. // req, resp := client.PutBucketLifecycleRequest(params)
  7399. //
  7400. // err := req.Send()
  7401. // if err == nil { // resp is now filled
  7402. // fmt.Println(resp)
  7403. // }
  7404. //
  7405. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  7406. //
  7407. // Deprecated: PutBucketLifecycle has been deprecated
  7408. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  7409. if c.Client.Config.Logger != nil {
  7410. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  7411. }
  7412. op := &request.Operation{
  7413. Name: opPutBucketLifecycle,
  7414. HTTPMethod: "PUT",
  7415. HTTPPath: "/{Bucket}?lifecycle",
  7416. }
  7417. if input == nil {
  7418. input = &PutBucketLifecycleInput{}
  7419. }
  7420. output = &PutBucketLifecycleOutput{}
  7421. req = c.newRequest(op, input, output)
  7422. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7423. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  7424. Name: "contentMd5Handler",
  7425. Fn: checksum.AddBodyContentMD5Handler,
  7426. })
  7427. return
  7428. }
  7429. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  7430. //
  7431. // For an updated version of this API, see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html).
  7432. // This version has been deprecated. Existing lifecycle configurations will
  7433. // work. For new lifecycle configurations, use the updated API.
  7434. //
  7435. // Creates a new lifecycle configuration for the bucket or replaces an existing
  7436. // lifecycle configuration. For information about lifecycle configuration, see
  7437. // Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
  7438. // in the Amazon S3 User Guide.
  7439. //
  7440. // By default, all Amazon S3 resources, including buckets, objects, and related
  7441. // subresources (for example, lifecycle configuration and website configuration)
  7442. // are private. Only the resource owner, the Amazon Web Services account that
  7443. // created the resource, can access it. The resource owner can optionally grant
  7444. // access permissions to others by writing an access policy. For this operation,
  7445. // users must get the s3:PutLifecycleConfiguration permission.
  7446. //
  7447. // You can also explicitly deny permissions. Explicit denial also supersedes
  7448. // any other permissions. If you want to prevent users or accounts from removing
  7449. // or deleting objects from your bucket, you must deny them permissions for
  7450. // the following actions:
  7451. //
  7452. // - s3:DeleteObject
  7453. //
  7454. // - s3:DeleteObjectVersion
  7455. //
  7456. // - s3:PutLifecycleConfiguration
  7457. //
  7458. // For more information about permissions, see Managing Access Permissions to
  7459. // your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  7460. // in the Amazon S3 User Guide.
  7461. //
  7462. // For more examples of transitioning objects to storage classes such as STANDARD_IA
  7463. // or ONEZONE_IA, see Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#lifecycle-configuration-examples).
  7464. //
  7465. // Related Resources
  7466. //
  7467. // - GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)(Deprecated)
  7468. //
  7469. // - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
  7470. //
  7471. // - RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
  7472. //
  7473. // - By default, a resource owner—in this case, a bucket owner, which is
  7474. // the Amazon Web Services account that created the bucket—can perform
  7475. // any of the operations. A resource owner can also grant others permission
  7476. // to perform the operation. For more information, see the following topics
  7477. // in the Amazon S3 User Guide: Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
  7478. // Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  7479. //
  7480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7481. // with awserr.Error's Code and Message methods to get detailed information about
  7482. // the error.
  7483. //
  7484. // See the AWS API reference guide for Amazon Simple Storage Service's
  7485. // API operation PutBucketLifecycle for usage and error information.
  7486. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  7487. //
  7488. // Deprecated: PutBucketLifecycle has been deprecated
  7489. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  7490. req, out := c.PutBucketLifecycleRequest(input)
  7491. return out, req.Send()
  7492. }
  7493. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  7494. // the ability to pass a context and additional request options.
  7495. //
  7496. // See PutBucketLifecycle for details on how to use this API operation.
  7497. //
  7498. // The context must be non-nil and will be used for request cancellation. If
  7499. // the context is nil a panic will occur. In the future the SDK may create
  7500. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7501. // for more information on using Contexts.
  7502. //
  7503. // Deprecated: PutBucketLifecycleWithContext has been deprecated
  7504. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  7505. req, out := c.PutBucketLifecycleRequest(input)
  7506. req.SetContext(ctx)
  7507. req.ApplyOptions(opts...)
  7508. return out, req.Send()
  7509. }
  7510. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  7511. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  7512. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  7513. // value will be populated with the request's response once the request completes
  7514. // successfully.
  7515. //
  7516. // Use "Send" method on the returned Request to send the API call to the service.
  7517. // the "output" return value is not valid until after Send returns without error.
  7518. //
  7519. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  7520. // API call, and error handling.
  7521. //
  7522. // This method is useful when you want to inject custom logic or configuration
  7523. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7524. //
  7525. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  7526. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  7527. //
  7528. // err := req.Send()
  7529. // if err == nil { // resp is now filled
  7530. // fmt.Println(resp)
  7531. // }
  7532. //
  7533. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  7534. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  7535. op := &request.Operation{
  7536. Name: opPutBucketLifecycleConfiguration,
  7537. HTTPMethod: "PUT",
  7538. HTTPPath: "/{Bucket}?lifecycle",
  7539. }
  7540. if input == nil {
  7541. input = &PutBucketLifecycleConfigurationInput{}
  7542. }
  7543. output = &PutBucketLifecycleConfigurationOutput{}
  7544. req = c.newRequest(op, input, output)
  7545. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7546. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  7547. Name: "contentMd5Handler",
  7548. Fn: checksum.AddBodyContentMD5Handler,
  7549. })
  7550. return
  7551. }
  7552. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  7553. //
  7554. // Creates a new lifecycle configuration for the bucket or replaces an existing
  7555. // lifecycle configuration. Keep in mind that this will overwrite an existing
  7556. // lifecycle configuration, so if you want to retain any configuration details,
  7557. // they must be included in the new lifecycle configuration. For information
  7558. // about lifecycle configuration, see Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
  7559. //
  7560. // Bucket lifecycle configuration now supports specifying a lifecycle rule using
  7561. // an object key name prefix, one or more object tags, or a combination of both.
  7562. // Accordingly, this section describes the latest API. The previous version
  7563. // of the API supported filtering based only on an object key name prefix, which
  7564. // is supported for backward compatibility. For the related API description,
  7565. // see PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
  7566. //
  7567. // # Rules
  7568. //
  7569. // You specify the lifecycle configuration in your request body. The lifecycle
  7570. // configuration is specified as XML consisting of one or more rules. An Amazon
  7571. // S3 Lifecycle configuration can have up to 1,000 rules. This limit is not
  7572. // adjustable. Each rule consists of the following:
  7573. //
  7574. // - Filter identifying a subset of objects to which the rule applies. The
  7575. // filter can be based on a key name prefix, object tags, or a combination
  7576. // of both.
  7577. //
  7578. // - Status whether the rule is in effect.
  7579. //
  7580. // - One or more lifecycle transition and expiration actions that you want
  7581. // Amazon S3 to perform on the objects identified by the filter. If the state
  7582. // of your bucket is versioning-enabled or versioning-suspended, you can
  7583. // have many versions of the same object (one current version and zero or
  7584. // more noncurrent versions). Amazon S3 provides predefined actions that
  7585. // you can specify for current and noncurrent object versions.
  7586. //
  7587. // For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
  7588. // and Lifecycle Configuration Elements (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html).
  7589. //
  7590. // # Permissions
  7591. //
  7592. // By default, all Amazon S3 resources are private, including buckets, objects,
  7593. // and related subresources (for example, lifecycle configuration and website
  7594. // configuration). Only the resource owner (that is, the Amazon Web Services
  7595. // account that created it) can access the resource. The resource owner can
  7596. // optionally grant access permissions to others by writing an access policy.
  7597. // For this operation, a user must get the s3:PutLifecycleConfiguration permission.
  7598. //
  7599. // You can also explicitly deny permissions. Explicit deny also supersedes any
  7600. // other permissions. If you want to block users or accounts from removing or
  7601. // deleting objects from your bucket, you must deny them permissions for the
  7602. // following actions:
  7603. //
  7604. // - s3:DeleteObject
  7605. //
  7606. // - s3:DeleteObjectVersion
  7607. //
  7608. // - s3:PutLifecycleConfiguration
  7609. //
  7610. // For more information about permissions, see Managing Access Permissions to
  7611. // Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  7612. //
  7613. // The following are related to PutBucketLifecycleConfiguration:
  7614. //
  7615. // - Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
  7616. //
  7617. // - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
  7618. //
  7619. // - DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
  7620. //
  7621. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7622. // with awserr.Error's Code and Message methods to get detailed information about
  7623. // the error.
  7624. //
  7625. // See the AWS API reference guide for Amazon Simple Storage Service's
  7626. // API operation PutBucketLifecycleConfiguration for usage and error information.
  7627. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  7628. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  7629. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  7630. return out, req.Send()
  7631. }
  7632. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  7633. // the ability to pass a context and additional request options.
  7634. //
  7635. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  7636. //
  7637. // The context must be non-nil and will be used for request cancellation. If
  7638. // the context is nil a panic will occur. In the future the SDK may create
  7639. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7640. // for more information on using Contexts.
  7641. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  7642. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  7643. req.SetContext(ctx)
  7644. req.ApplyOptions(opts...)
  7645. return out, req.Send()
  7646. }
  7647. const opPutBucketLogging = "PutBucketLogging"
  7648. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  7649. // client's request for the PutBucketLogging operation. The "output" return
  7650. // value will be populated with the request's response once the request completes
  7651. // successfully.
  7652. //
  7653. // Use "Send" method on the returned Request to send the API call to the service.
  7654. // the "output" return value is not valid until after Send returns without error.
  7655. //
  7656. // See PutBucketLogging for more information on using the PutBucketLogging
  7657. // API call, and error handling.
  7658. //
  7659. // This method is useful when you want to inject custom logic or configuration
  7660. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7661. //
  7662. // // Example sending a request using the PutBucketLoggingRequest method.
  7663. // req, resp := client.PutBucketLoggingRequest(params)
  7664. //
  7665. // err := req.Send()
  7666. // if err == nil { // resp is now filled
  7667. // fmt.Println(resp)
  7668. // }
  7669. //
  7670. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  7671. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  7672. op := &request.Operation{
  7673. Name: opPutBucketLogging,
  7674. HTTPMethod: "PUT",
  7675. HTTPPath: "/{Bucket}?logging",
  7676. }
  7677. if input == nil {
  7678. input = &PutBucketLoggingInput{}
  7679. }
  7680. output = &PutBucketLoggingOutput{}
  7681. req = c.newRequest(op, input, output)
  7682. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7683. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  7684. Name: "contentMd5Handler",
  7685. Fn: checksum.AddBodyContentMD5Handler,
  7686. })
  7687. return
  7688. }
  7689. // PutBucketLogging API operation for Amazon Simple Storage Service.
  7690. //
  7691. // Set the logging parameters for a bucket and to specify permissions for who
  7692. // can view and modify the logging parameters. All logs are saved to buckets
  7693. // in the same Amazon Web Services Region as the source bucket. To set the logging
  7694. // status of a bucket, you must be the bucket owner.
  7695. //
  7696. // The bucket owner is automatically granted FULL_CONTROL to all logs. You use
  7697. // the Grantee request element to grant access to other people. The Permissions
  7698. // request element specifies the kind of access the grantee has to the logs.
  7699. //
  7700. // If the target bucket for log delivery uses the bucket owner enforced setting
  7701. // for S3 Object Ownership, you can't use the Grantee request element to grant
  7702. // access to others. Permissions can only be granted using policies. For more
  7703. // information, see Permissions for server access log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
  7704. // in the Amazon S3 User Guide.
  7705. //
  7706. // # Grantee Values
  7707. //
  7708. // You can specify the person (grantee) to whom you're assigning access rights
  7709. // (using request elements) in the following ways:
  7710. //
  7711. // - By the person's ID: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7712. // xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName>
  7713. // </Grantee> DisplayName is optional and ignored in the request.
  7714. //
  7715. // - By Email address: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7716. // xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee>
  7717. // The grantee is resolved to the CanonicalUser and, in a response to a GET
  7718. // Object acl request, appears as the CanonicalUser.
  7719. //
  7720. // - By URI: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7721. // xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee>
  7722. //
  7723. // To enable logging, you use LoggingEnabled and its children request elements.
  7724. // To disable logging, you use an empty BucketLoggingStatus request element:
  7725. //
  7726. // <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" />
  7727. //
  7728. // For more information about server access logging, see Server Access Logging
  7729. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html) in
  7730. // the Amazon S3 User Guide.
  7731. //
  7732. // For more information about creating a bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
  7733. // For more information about returning the logging status of a bucket, see
  7734. // GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html).
  7735. //
  7736. // The following operations are related to PutBucketLogging:
  7737. //
  7738. // - PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  7739. //
  7740. // - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
  7741. //
  7742. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  7743. //
  7744. // - GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
  7745. //
  7746. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7747. // with awserr.Error's Code and Message methods to get detailed information about
  7748. // the error.
  7749. //
  7750. // See the AWS API reference guide for Amazon Simple Storage Service's
  7751. // API operation PutBucketLogging for usage and error information.
  7752. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  7753. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  7754. req, out := c.PutBucketLoggingRequest(input)
  7755. return out, req.Send()
  7756. }
  7757. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  7758. // the ability to pass a context and additional request options.
  7759. //
  7760. // See PutBucketLogging for details on how to use this API operation.
  7761. //
  7762. // The context must be non-nil and will be used for request cancellation. If
  7763. // the context is nil a panic will occur. In the future the SDK may create
  7764. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7765. // for more information on using Contexts.
  7766. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  7767. req, out := c.PutBucketLoggingRequest(input)
  7768. req.SetContext(ctx)
  7769. req.ApplyOptions(opts...)
  7770. return out, req.Send()
  7771. }
  7772. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  7773. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  7774. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  7775. // value will be populated with the request's response once the request completes
  7776. // successfully.
  7777. //
  7778. // Use "Send" method on the returned Request to send the API call to the service.
  7779. // the "output" return value is not valid until after Send returns without error.
  7780. //
  7781. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  7782. // API call, and error handling.
  7783. //
  7784. // This method is useful when you want to inject custom logic or configuration
  7785. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7786. //
  7787. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  7788. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  7789. //
  7790. // err := req.Send()
  7791. // if err == nil { // resp is now filled
  7792. // fmt.Println(resp)
  7793. // }
  7794. //
  7795. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  7796. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  7797. op := &request.Operation{
  7798. Name: opPutBucketMetricsConfiguration,
  7799. HTTPMethod: "PUT",
  7800. HTTPPath: "/{Bucket}?metrics",
  7801. }
  7802. if input == nil {
  7803. input = &PutBucketMetricsConfigurationInput{}
  7804. }
  7805. output = &PutBucketMetricsConfigurationOutput{}
  7806. req = c.newRequest(op, input, output)
  7807. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7808. return
  7809. }
  7810. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  7811. //
  7812. // Sets a metrics configuration (specified by the metrics configuration ID)
  7813. // for the bucket. You can have up to 1,000 metrics configurations per bucket.
  7814. // If you're updating an existing metrics configuration, note that this is a
  7815. // full replacement of the existing metrics configuration. If you don't include
  7816. // the elements you want to keep, they are erased.
  7817. //
  7818. // To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
  7819. // action. The bucket owner has this permission by default. The bucket owner
  7820. // can grant this permission to others. For more information about permissions,
  7821. // see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  7822. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  7823. //
  7824. // For information about CloudWatch request metrics for Amazon S3, see Monitoring
  7825. // Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
  7826. //
  7827. // The following operations are related to PutBucketMetricsConfiguration:
  7828. //
  7829. // - DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
  7830. //
  7831. // - GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
  7832. //
  7833. // - ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
  7834. //
  7835. // GetBucketLifecycle has the following special error:
  7836. //
  7837. // - Error code: TooManyConfigurations Description: You are attempting to
  7838. // create a new configuration but have already reached the 1,000-configuration
  7839. // limit. HTTP Status Code: HTTP 400 Bad Request
  7840. //
  7841. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7842. // with awserr.Error's Code and Message methods to get detailed information about
  7843. // the error.
  7844. //
  7845. // See the AWS API reference guide for Amazon Simple Storage Service's
  7846. // API operation PutBucketMetricsConfiguration for usage and error information.
  7847. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  7848. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  7849. req, out := c.PutBucketMetricsConfigurationRequest(input)
  7850. return out, req.Send()
  7851. }
  7852. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  7853. // the ability to pass a context and additional request options.
  7854. //
  7855. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  7856. //
  7857. // The context must be non-nil and will be used for request cancellation. If
  7858. // the context is nil a panic will occur. In the future the SDK may create
  7859. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7860. // for more information on using Contexts.
  7861. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  7862. req, out := c.PutBucketMetricsConfigurationRequest(input)
  7863. req.SetContext(ctx)
  7864. req.ApplyOptions(opts...)
  7865. return out, req.Send()
  7866. }
  7867. const opPutBucketNotification = "PutBucketNotification"
  7868. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  7869. // client's request for the PutBucketNotification operation. The "output" return
  7870. // value will be populated with the request's response once the request completes
  7871. // successfully.
  7872. //
  7873. // Use "Send" method on the returned Request to send the API call to the service.
  7874. // the "output" return value is not valid until after Send returns without error.
  7875. //
  7876. // See PutBucketNotification for more information on using the PutBucketNotification
  7877. // API call, and error handling.
  7878. //
  7879. // This method is useful when you want to inject custom logic or configuration
  7880. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7881. //
  7882. // // Example sending a request using the PutBucketNotificationRequest method.
  7883. // req, resp := client.PutBucketNotificationRequest(params)
  7884. //
  7885. // err := req.Send()
  7886. // if err == nil { // resp is now filled
  7887. // fmt.Println(resp)
  7888. // }
  7889. //
  7890. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  7891. //
  7892. // Deprecated: PutBucketNotification has been deprecated
  7893. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  7894. if c.Client.Config.Logger != nil {
  7895. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  7896. }
  7897. op := &request.Operation{
  7898. Name: opPutBucketNotification,
  7899. HTTPMethod: "PUT",
  7900. HTTPPath: "/{Bucket}?notification",
  7901. }
  7902. if input == nil {
  7903. input = &PutBucketNotificationInput{}
  7904. }
  7905. output = &PutBucketNotificationOutput{}
  7906. req = c.newRequest(op, input, output)
  7907. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7908. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  7909. Name: "contentMd5Handler",
  7910. Fn: checksum.AddBodyContentMD5Handler,
  7911. })
  7912. return
  7913. }
  7914. // PutBucketNotification API operation for Amazon Simple Storage Service.
  7915. //
  7916. // No longer used, see the PutBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html)
  7917. // operation.
  7918. //
  7919. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  7920. // with awserr.Error's Code and Message methods to get detailed information about
  7921. // the error.
  7922. //
  7923. // See the AWS API reference guide for Amazon Simple Storage Service's
  7924. // API operation PutBucketNotification for usage and error information.
  7925. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  7926. //
  7927. // Deprecated: PutBucketNotification has been deprecated
  7928. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  7929. req, out := c.PutBucketNotificationRequest(input)
  7930. return out, req.Send()
  7931. }
  7932. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  7933. // the ability to pass a context and additional request options.
  7934. //
  7935. // See PutBucketNotification for details on how to use this API operation.
  7936. //
  7937. // The context must be non-nil and will be used for request cancellation. If
  7938. // the context is nil a panic will occur. In the future the SDK may create
  7939. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  7940. // for more information on using Contexts.
  7941. //
  7942. // Deprecated: PutBucketNotificationWithContext has been deprecated
  7943. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  7944. req, out := c.PutBucketNotificationRequest(input)
  7945. req.SetContext(ctx)
  7946. req.ApplyOptions(opts...)
  7947. return out, req.Send()
  7948. }
  7949. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  7950. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  7951. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  7952. // value will be populated with the request's response once the request completes
  7953. // successfully.
  7954. //
  7955. // Use "Send" method on the returned Request to send the API call to the service.
  7956. // the "output" return value is not valid until after Send returns without error.
  7957. //
  7958. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  7959. // API call, and error handling.
  7960. //
  7961. // This method is useful when you want to inject custom logic or configuration
  7962. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  7963. //
  7964. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  7965. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  7966. //
  7967. // err := req.Send()
  7968. // if err == nil { // resp is now filled
  7969. // fmt.Println(resp)
  7970. // }
  7971. //
  7972. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  7973. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  7974. op := &request.Operation{
  7975. Name: opPutBucketNotificationConfiguration,
  7976. HTTPMethod: "PUT",
  7977. HTTPPath: "/{Bucket}?notification",
  7978. }
  7979. if input == nil {
  7980. input = &PutBucketNotificationConfigurationInput{}
  7981. }
  7982. output = &PutBucketNotificationConfigurationOutput{}
  7983. req = c.newRequest(op, input, output)
  7984. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  7985. return
  7986. }
  7987. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  7988. //
  7989. // Enables notifications of specified events for a bucket. For more information
  7990. // about event notifications, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
  7991. //
  7992. // Using this API, you can replace an existing notification configuration. The
  7993. // configuration is an XML file that defines the event types that you want Amazon
  7994. // S3 to publish and the destination where you want Amazon S3 to publish an
  7995. // event notification when it detects an event of the specified type.
  7996. //
  7997. // By default, your bucket has no event notifications configured. That is, the
  7998. // notification configuration will be an empty NotificationConfiguration.
  7999. //
  8000. // <NotificationConfiguration>
  8001. //
  8002. // </NotificationConfiguration>
  8003. //
  8004. // This action replaces the existing notification configuration with the configuration
  8005. // you include in the request body.
  8006. //
  8007. // After Amazon S3 receives this request, it first verifies that any Amazon
  8008. // Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon
  8009. // SQS) destination exists, and that the bucket owner has permission to publish
  8010. // to it by sending a test notification. In the case of Lambda destinations,
  8011. // Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission
  8012. // to invoke the function from the Amazon S3 bucket. For more information, see
  8013. // Configuring Notifications for Amazon S3 Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
  8014. //
  8015. // You can disable notifications by adding the empty NotificationConfiguration
  8016. // element.
  8017. //
  8018. // For more information about the number of event notification configurations
  8019. // that you can create per bucket, see Amazon S3 service quotas (https://docs.aws.amazon.com/general/latest/gr/s3.html#limits_s3)
  8020. // in Amazon Web Services General Reference.
  8021. //
  8022. // By default, only the bucket owner can configure notifications on a bucket.
  8023. // However, bucket owners can use a bucket policy to grant permission to other
  8024. // users to set this configuration with s3:PutBucketNotification permission.
  8025. //
  8026. // The PUT notification is an atomic operation. For example, suppose your notification
  8027. // configuration includes SNS topic, SQS queue, and Lambda function configurations.
  8028. // When you send a PUT request with this configuration, Amazon S3 sends test
  8029. // messages to your SNS topic. If the message fails, the entire PUT action will
  8030. // fail, and Amazon S3 will not add the configuration to your bucket.
  8031. //
  8032. // # Responses
  8033. //
  8034. // If the configuration in the request body includes only one TopicConfiguration
  8035. // specifying only the s3:ReducedRedundancyLostObject event type, the response
  8036. // will also include the x-amz-sns-test-message-id header containing the message
  8037. // ID of the test notification sent to the topic.
  8038. //
  8039. // The following action is related to PutBucketNotificationConfiguration:
  8040. //
  8041. // - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
  8042. //
  8043. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8044. // with awserr.Error's Code and Message methods to get detailed information about
  8045. // the error.
  8046. //
  8047. // See the AWS API reference guide for Amazon Simple Storage Service's
  8048. // API operation PutBucketNotificationConfiguration for usage and error information.
  8049. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  8050. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  8051. req, out := c.PutBucketNotificationConfigurationRequest(input)
  8052. return out, req.Send()
  8053. }
  8054. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  8055. // the ability to pass a context and additional request options.
  8056. //
  8057. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  8058. //
  8059. // The context must be non-nil and will be used for request cancellation. If
  8060. // the context is nil a panic will occur. In the future the SDK may create
  8061. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8062. // for more information on using Contexts.
  8063. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  8064. req, out := c.PutBucketNotificationConfigurationRequest(input)
  8065. req.SetContext(ctx)
  8066. req.ApplyOptions(opts...)
  8067. return out, req.Send()
  8068. }
  8069. const opPutBucketOwnershipControls = "PutBucketOwnershipControls"
  8070. // PutBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
  8071. // client's request for the PutBucketOwnershipControls operation. The "output" return
  8072. // value will be populated with the request's response once the request completes
  8073. // successfully.
  8074. //
  8075. // Use "Send" method on the returned Request to send the API call to the service.
  8076. // the "output" return value is not valid until after Send returns without error.
  8077. //
  8078. // See PutBucketOwnershipControls for more information on using the PutBucketOwnershipControls
  8079. // API call, and error handling.
  8080. //
  8081. // This method is useful when you want to inject custom logic or configuration
  8082. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8083. //
  8084. // // Example sending a request using the PutBucketOwnershipControlsRequest method.
  8085. // req, resp := client.PutBucketOwnershipControlsRequest(params)
  8086. //
  8087. // err := req.Send()
  8088. // if err == nil { // resp is now filled
  8089. // fmt.Println(resp)
  8090. // }
  8091. //
  8092. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
  8093. func (c *S3) PutBucketOwnershipControlsRequest(input *PutBucketOwnershipControlsInput) (req *request.Request, output *PutBucketOwnershipControlsOutput) {
  8094. op := &request.Operation{
  8095. Name: opPutBucketOwnershipControls,
  8096. HTTPMethod: "PUT",
  8097. HTTPPath: "/{Bucket}?ownershipControls",
  8098. }
  8099. if input == nil {
  8100. input = &PutBucketOwnershipControlsInput{}
  8101. }
  8102. output = &PutBucketOwnershipControlsOutput{}
  8103. req = c.newRequest(op, input, output)
  8104. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8105. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8106. Name: "contentMd5Handler",
  8107. Fn: checksum.AddBodyContentMD5Handler,
  8108. })
  8109. return
  8110. }
  8111. // PutBucketOwnershipControls API operation for Amazon Simple Storage Service.
  8112. //
  8113. // Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
  8114. // operation, you must have the s3:PutBucketOwnershipControls permission. For
  8115. // more information about Amazon S3 permissions, see Specifying permissions
  8116. // in a policy (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/using-with-s3-actions.html).
  8117. //
  8118. // For information about Amazon S3 Object Ownership, see Using object ownership
  8119. // (https://docs.aws.amazon.com/AmazonS3/latest/user-guide/about-object-ownership.html).
  8120. //
  8121. // The following operations are related to PutBucketOwnershipControls:
  8122. //
  8123. // - GetBucketOwnershipControls
  8124. //
  8125. // - DeleteBucketOwnershipControls
  8126. //
  8127. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8128. // with awserr.Error's Code and Message methods to get detailed information about
  8129. // the error.
  8130. //
  8131. // See the AWS API reference guide for Amazon Simple Storage Service's
  8132. // API operation PutBucketOwnershipControls for usage and error information.
  8133. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
  8134. func (c *S3) PutBucketOwnershipControls(input *PutBucketOwnershipControlsInput) (*PutBucketOwnershipControlsOutput, error) {
  8135. req, out := c.PutBucketOwnershipControlsRequest(input)
  8136. return out, req.Send()
  8137. }
  8138. // PutBucketOwnershipControlsWithContext is the same as PutBucketOwnershipControls with the addition of
  8139. // the ability to pass a context and additional request options.
  8140. //
  8141. // See PutBucketOwnershipControls for details on how to use this API operation.
  8142. //
  8143. // The context must be non-nil and will be used for request cancellation. If
  8144. // the context is nil a panic will occur. In the future the SDK may create
  8145. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8146. // for more information on using Contexts.
  8147. func (c *S3) PutBucketOwnershipControlsWithContext(ctx aws.Context, input *PutBucketOwnershipControlsInput, opts ...request.Option) (*PutBucketOwnershipControlsOutput, error) {
  8148. req, out := c.PutBucketOwnershipControlsRequest(input)
  8149. req.SetContext(ctx)
  8150. req.ApplyOptions(opts...)
  8151. return out, req.Send()
  8152. }
  8153. const opPutBucketPolicy = "PutBucketPolicy"
  8154. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  8155. // client's request for the PutBucketPolicy operation. The "output" return
  8156. // value will be populated with the request's response once the request completes
  8157. // successfully.
  8158. //
  8159. // Use "Send" method on the returned Request to send the API call to the service.
  8160. // the "output" return value is not valid until after Send returns without error.
  8161. //
  8162. // See PutBucketPolicy for more information on using the PutBucketPolicy
  8163. // API call, and error handling.
  8164. //
  8165. // This method is useful when you want to inject custom logic or configuration
  8166. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8167. //
  8168. // // Example sending a request using the PutBucketPolicyRequest method.
  8169. // req, resp := client.PutBucketPolicyRequest(params)
  8170. //
  8171. // err := req.Send()
  8172. // if err == nil { // resp is now filled
  8173. // fmt.Println(resp)
  8174. // }
  8175. //
  8176. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  8177. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  8178. op := &request.Operation{
  8179. Name: opPutBucketPolicy,
  8180. HTTPMethod: "PUT",
  8181. HTTPPath: "/{Bucket}?policy",
  8182. }
  8183. if input == nil {
  8184. input = &PutBucketPolicyInput{}
  8185. }
  8186. output = &PutBucketPolicyOutput{}
  8187. req = c.newRequest(op, input, output)
  8188. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8189. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8190. Name: "contentMd5Handler",
  8191. Fn: checksum.AddBodyContentMD5Handler,
  8192. })
  8193. return
  8194. }
  8195. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  8196. //
  8197. // Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using
  8198. // an identity other than the root user of the Amazon Web Services account that
  8199. // owns the bucket, the calling identity must have the PutBucketPolicy permissions
  8200. // on the specified bucket and belong to the bucket owner's account in order
  8201. // to use this operation.
  8202. //
  8203. // If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access
  8204. // Denied error. If you have the correct permissions, but you're not using an
  8205. // identity that belongs to the bucket owner's account, Amazon S3 returns a
  8206. // 405 Method Not Allowed error.
  8207. //
  8208. // As a security precaution, the root user of the Amazon Web Services account
  8209. // that owns a bucket can always use this operation, even if the policy explicitly
  8210. // denies the root user the ability to perform this action.
  8211. //
  8212. // For more information, see Bucket policy examples (https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies.html).
  8213. //
  8214. // The following operations are related to PutBucketPolicy:
  8215. //
  8216. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  8217. //
  8218. // - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
  8219. //
  8220. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8221. // with awserr.Error's Code and Message methods to get detailed information about
  8222. // the error.
  8223. //
  8224. // See the AWS API reference guide for Amazon Simple Storage Service's
  8225. // API operation PutBucketPolicy for usage and error information.
  8226. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  8227. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  8228. req, out := c.PutBucketPolicyRequest(input)
  8229. return out, req.Send()
  8230. }
  8231. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  8232. // the ability to pass a context and additional request options.
  8233. //
  8234. // See PutBucketPolicy for details on how to use this API operation.
  8235. //
  8236. // The context must be non-nil and will be used for request cancellation. If
  8237. // the context is nil a panic will occur. In the future the SDK may create
  8238. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8239. // for more information on using Contexts.
  8240. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  8241. req, out := c.PutBucketPolicyRequest(input)
  8242. req.SetContext(ctx)
  8243. req.ApplyOptions(opts...)
  8244. return out, req.Send()
  8245. }
  8246. const opPutBucketReplication = "PutBucketReplication"
  8247. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  8248. // client's request for the PutBucketReplication operation. The "output" return
  8249. // value will be populated with the request's response once the request completes
  8250. // successfully.
  8251. //
  8252. // Use "Send" method on the returned Request to send the API call to the service.
  8253. // the "output" return value is not valid until after Send returns without error.
  8254. //
  8255. // See PutBucketReplication for more information on using the PutBucketReplication
  8256. // API call, and error handling.
  8257. //
  8258. // This method is useful when you want to inject custom logic or configuration
  8259. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8260. //
  8261. // // Example sending a request using the PutBucketReplicationRequest method.
  8262. // req, resp := client.PutBucketReplicationRequest(params)
  8263. //
  8264. // err := req.Send()
  8265. // if err == nil { // resp is now filled
  8266. // fmt.Println(resp)
  8267. // }
  8268. //
  8269. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  8270. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  8271. op := &request.Operation{
  8272. Name: opPutBucketReplication,
  8273. HTTPMethod: "PUT",
  8274. HTTPPath: "/{Bucket}?replication",
  8275. }
  8276. if input == nil {
  8277. input = &PutBucketReplicationInput{}
  8278. }
  8279. output = &PutBucketReplicationOutput{}
  8280. req = c.newRequest(op, input, output)
  8281. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8282. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8283. Name: "contentMd5Handler",
  8284. Fn: checksum.AddBodyContentMD5Handler,
  8285. })
  8286. return
  8287. }
  8288. // PutBucketReplication API operation for Amazon Simple Storage Service.
  8289. //
  8290. // Creates a replication configuration or replaces an existing one. For more
  8291. // information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
  8292. // in the Amazon S3 User Guide.
  8293. //
  8294. // Specify the replication configuration in the request body. In the replication
  8295. // configuration, you provide the name of the destination bucket or buckets
  8296. // where you want Amazon S3 to replicate objects, the IAM role that Amazon S3
  8297. // can assume to replicate objects on your behalf, and other relevant information.
  8298. //
  8299. // A replication configuration must include at least one rule, and can contain
  8300. // a maximum of 1,000. Each rule identifies a subset of objects to replicate
  8301. // by filtering the objects in the source bucket. To choose additional subsets
  8302. // of objects to replicate, add a rule for each subset.
  8303. //
  8304. // To specify a subset of the objects in the source bucket to apply a replication
  8305. // rule to, add the Filter element as a child of the Rule element. You can filter
  8306. // objects based on an object key prefix, one or more object tags, or both.
  8307. // When you add the Filter element in the configuration, you must also add the
  8308. // following elements: DeleteMarkerReplication, Status, and Priority.
  8309. //
  8310. // If you are using an earlier version of the replication configuration, Amazon
  8311. // S3 handles replication of delete markers differently. For more information,
  8312. // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
  8313. //
  8314. // For information about enabling versioning on a bucket, see Using Versioning
  8315. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html).
  8316. //
  8317. // # Handling Replication of Encrypted Objects
  8318. //
  8319. // By default, Amazon S3 doesn't replicate objects that are stored at rest using
  8320. // server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted
  8321. // objects, add the following: SourceSelectionCriteria, SseKmsEncryptedObjects,
  8322. // Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information about
  8323. // replication configuration, see Replicating Objects Created with SSE Using
  8324. // KMS keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
  8325. //
  8326. // For information on PutBucketReplication errors, see List of replication-related
  8327. // error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
  8328. //
  8329. // # Permissions
  8330. //
  8331. // To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration
  8332. // permissions for the bucket.
  8333. //
  8334. // By default, a resource owner, in this case the Amazon Web Services account
  8335. // that created the bucket, can perform this operation. The resource owner can
  8336. // also grant others permissions to perform the operation. For more information
  8337. // about permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
  8338. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  8339. //
  8340. // To perform this operation, the user or role performing the action must have
  8341. // the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
  8342. // permission.
  8343. //
  8344. // The following operations are related to PutBucketReplication:
  8345. //
  8346. // - GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
  8347. //
  8348. // - DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
  8349. //
  8350. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8351. // with awserr.Error's Code and Message methods to get detailed information about
  8352. // the error.
  8353. //
  8354. // See the AWS API reference guide for Amazon Simple Storage Service's
  8355. // API operation PutBucketReplication for usage and error information.
  8356. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  8357. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  8358. req, out := c.PutBucketReplicationRequest(input)
  8359. return out, req.Send()
  8360. }
  8361. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  8362. // the ability to pass a context and additional request options.
  8363. //
  8364. // See PutBucketReplication for details on how to use this API operation.
  8365. //
  8366. // The context must be non-nil and will be used for request cancellation. If
  8367. // the context is nil a panic will occur. In the future the SDK may create
  8368. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8369. // for more information on using Contexts.
  8370. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  8371. req, out := c.PutBucketReplicationRequest(input)
  8372. req.SetContext(ctx)
  8373. req.ApplyOptions(opts...)
  8374. return out, req.Send()
  8375. }
  8376. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  8377. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  8378. // client's request for the PutBucketRequestPayment operation. The "output" return
  8379. // value will be populated with the request's response once the request completes
  8380. // successfully.
  8381. //
  8382. // Use "Send" method on the returned Request to send the API call to the service.
  8383. // the "output" return value is not valid until after Send returns without error.
  8384. //
  8385. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  8386. // API call, and error handling.
  8387. //
  8388. // This method is useful when you want to inject custom logic or configuration
  8389. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8390. //
  8391. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  8392. // req, resp := client.PutBucketRequestPaymentRequest(params)
  8393. //
  8394. // err := req.Send()
  8395. // if err == nil { // resp is now filled
  8396. // fmt.Println(resp)
  8397. // }
  8398. //
  8399. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  8400. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  8401. op := &request.Operation{
  8402. Name: opPutBucketRequestPayment,
  8403. HTTPMethod: "PUT",
  8404. HTTPPath: "/{Bucket}?requestPayment",
  8405. }
  8406. if input == nil {
  8407. input = &PutBucketRequestPaymentInput{}
  8408. }
  8409. output = &PutBucketRequestPaymentOutput{}
  8410. req = c.newRequest(op, input, output)
  8411. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8412. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8413. Name: "contentMd5Handler",
  8414. Fn: checksum.AddBodyContentMD5Handler,
  8415. })
  8416. return
  8417. }
  8418. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  8419. //
  8420. // Sets the request payment configuration for a bucket. By default, the bucket
  8421. // owner pays for downloads from the bucket. This configuration parameter enables
  8422. // the bucket owner (only) to specify that the person requesting the download
  8423. // will be charged for the download. For more information, see Requester Pays
  8424. // Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
  8425. //
  8426. // The following operations are related to PutBucketRequestPayment:
  8427. //
  8428. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  8429. //
  8430. // - GetBucketRequestPayment (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
  8431. //
  8432. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8433. // with awserr.Error's Code and Message methods to get detailed information about
  8434. // the error.
  8435. //
  8436. // See the AWS API reference guide for Amazon Simple Storage Service's
  8437. // API operation PutBucketRequestPayment for usage and error information.
  8438. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  8439. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  8440. req, out := c.PutBucketRequestPaymentRequest(input)
  8441. return out, req.Send()
  8442. }
  8443. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  8444. // the ability to pass a context and additional request options.
  8445. //
  8446. // See PutBucketRequestPayment for details on how to use this API operation.
  8447. //
  8448. // The context must be non-nil and will be used for request cancellation. If
  8449. // the context is nil a panic will occur. In the future the SDK may create
  8450. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8451. // for more information on using Contexts.
  8452. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  8453. req, out := c.PutBucketRequestPaymentRequest(input)
  8454. req.SetContext(ctx)
  8455. req.ApplyOptions(opts...)
  8456. return out, req.Send()
  8457. }
  8458. const opPutBucketTagging = "PutBucketTagging"
  8459. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  8460. // client's request for the PutBucketTagging operation. The "output" return
  8461. // value will be populated with the request's response once the request completes
  8462. // successfully.
  8463. //
  8464. // Use "Send" method on the returned Request to send the API call to the service.
  8465. // the "output" return value is not valid until after Send returns without error.
  8466. //
  8467. // See PutBucketTagging for more information on using the PutBucketTagging
  8468. // API call, and error handling.
  8469. //
  8470. // This method is useful when you want to inject custom logic or configuration
  8471. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8472. //
  8473. // // Example sending a request using the PutBucketTaggingRequest method.
  8474. // req, resp := client.PutBucketTaggingRequest(params)
  8475. //
  8476. // err := req.Send()
  8477. // if err == nil { // resp is now filled
  8478. // fmt.Println(resp)
  8479. // }
  8480. //
  8481. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  8482. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  8483. op := &request.Operation{
  8484. Name: opPutBucketTagging,
  8485. HTTPMethod: "PUT",
  8486. HTTPPath: "/{Bucket}?tagging",
  8487. }
  8488. if input == nil {
  8489. input = &PutBucketTaggingInput{}
  8490. }
  8491. output = &PutBucketTaggingOutput{}
  8492. req = c.newRequest(op, input, output)
  8493. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8494. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8495. Name: "contentMd5Handler",
  8496. Fn: checksum.AddBodyContentMD5Handler,
  8497. })
  8498. return
  8499. }
  8500. // PutBucketTagging API operation for Amazon Simple Storage Service.
  8501. //
  8502. // Sets the tags for a bucket.
  8503. //
  8504. // Use tags to organize your Amazon Web Services bill to reflect your own cost
  8505. // structure. To do this, sign up to get your Amazon Web Services account bill
  8506. // with tag key values included. Then, to see the cost of combined resources,
  8507. // organize your billing information according to resources with the same tag
  8508. // key values. For example, you can tag several resources with a specific application
  8509. // name, and then organize your billing information to see the total cost of
  8510. // that application across several services. For more information, see Cost
  8511. // Allocation and Tagging (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
  8512. // and Using Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html).
  8513. //
  8514. // When this operation sets the tags for a bucket, it will overwrite any current
  8515. // tags the bucket already has. You cannot use this operation to add tags to
  8516. // an existing list of tags.
  8517. //
  8518. // To use this operation, you must have permissions to perform the s3:PutBucketTagging
  8519. // action. The bucket owner has this permission by default and can grant this
  8520. // permission to others. For more information about permissions, see Permissions
  8521. // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  8522. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
  8523. //
  8524. // PutBucketTagging has the following special errors:
  8525. //
  8526. // - Error code: InvalidTagError Description: The tag provided was not a
  8527. // valid tag. This error can occur if the tag did not pass input validation.
  8528. // For information about tag restrictions, see User-Defined Tag Restrictions
  8529. // (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
  8530. // and Amazon Web Services-Generated Cost Allocation Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/aws-tag-restrictions.html).
  8531. //
  8532. // - Error code: MalformedXMLError Description: The XML provided does not
  8533. // match the schema.
  8534. //
  8535. // - Error code: OperationAbortedError Description: A conflicting conditional
  8536. // action is currently in progress against this resource. Please try again.
  8537. //
  8538. // - Error code: InternalError Description: The service was unable to apply
  8539. // the provided tag to the bucket.
  8540. //
  8541. // The following operations are related to PutBucketTagging:
  8542. //
  8543. // - GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
  8544. //
  8545. // - DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
  8546. //
  8547. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8548. // with awserr.Error's Code and Message methods to get detailed information about
  8549. // the error.
  8550. //
  8551. // See the AWS API reference guide for Amazon Simple Storage Service's
  8552. // API operation PutBucketTagging for usage and error information.
  8553. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  8554. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  8555. req, out := c.PutBucketTaggingRequest(input)
  8556. return out, req.Send()
  8557. }
  8558. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  8559. // the ability to pass a context and additional request options.
  8560. //
  8561. // See PutBucketTagging for details on how to use this API operation.
  8562. //
  8563. // The context must be non-nil and will be used for request cancellation. If
  8564. // the context is nil a panic will occur. In the future the SDK may create
  8565. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8566. // for more information on using Contexts.
  8567. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  8568. req, out := c.PutBucketTaggingRequest(input)
  8569. req.SetContext(ctx)
  8570. req.ApplyOptions(opts...)
  8571. return out, req.Send()
  8572. }
  8573. const opPutBucketVersioning = "PutBucketVersioning"
  8574. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  8575. // client's request for the PutBucketVersioning operation. The "output" return
  8576. // value will be populated with the request's response once the request completes
  8577. // successfully.
  8578. //
  8579. // Use "Send" method on the returned Request to send the API call to the service.
  8580. // the "output" return value is not valid until after Send returns without error.
  8581. //
  8582. // See PutBucketVersioning for more information on using the PutBucketVersioning
  8583. // API call, and error handling.
  8584. //
  8585. // This method is useful when you want to inject custom logic or configuration
  8586. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8587. //
  8588. // // Example sending a request using the PutBucketVersioningRequest method.
  8589. // req, resp := client.PutBucketVersioningRequest(params)
  8590. //
  8591. // err := req.Send()
  8592. // if err == nil { // resp is now filled
  8593. // fmt.Println(resp)
  8594. // }
  8595. //
  8596. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  8597. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  8598. op := &request.Operation{
  8599. Name: opPutBucketVersioning,
  8600. HTTPMethod: "PUT",
  8601. HTTPPath: "/{Bucket}?versioning",
  8602. }
  8603. if input == nil {
  8604. input = &PutBucketVersioningInput{}
  8605. }
  8606. output = &PutBucketVersioningOutput{}
  8607. req = c.newRequest(op, input, output)
  8608. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8609. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8610. Name: "contentMd5Handler",
  8611. Fn: checksum.AddBodyContentMD5Handler,
  8612. })
  8613. return
  8614. }
  8615. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  8616. //
  8617. // Sets the versioning state of an existing bucket.
  8618. //
  8619. // You can set the versioning state with one of the following values:
  8620. //
  8621. // Enabled—Enables versioning for the objects in the bucket. All objects added
  8622. // to the bucket receive a unique version ID.
  8623. //
  8624. // Suspended—Disables versioning for the objects in the bucket. All objects
  8625. // added to the bucket receive the version ID null.
  8626. //
  8627. // If the versioning state has never been set on a bucket, it has no versioning
  8628. // state; a GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
  8629. // request does not return a versioning state value.
  8630. //
  8631. // In order to enable MFA Delete, you must be the bucket owner. If you are the
  8632. // bucket owner and want to enable MFA Delete in the bucket versioning configuration,
  8633. // you must include the x-amz-mfa request header and the Status and the MfaDelete
  8634. // request elements in a request to set the versioning state of the bucket.
  8635. //
  8636. // If you have an object expiration lifecycle policy in your non-versioned bucket
  8637. // and you want to maintain the same permanent delete behavior when you enable
  8638. // versioning, you must add a noncurrent expiration policy. The noncurrent expiration
  8639. // lifecycle policy will manage the deletes of the noncurrent object versions
  8640. // in the version-enabled bucket. (A version-enabled bucket maintains one current
  8641. // and zero or more noncurrent object versions.) For more information, see Lifecycle
  8642. // and Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config).
  8643. //
  8644. // Related Resources
  8645. //
  8646. // - CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
  8647. //
  8648. // - DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
  8649. //
  8650. // - GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
  8651. //
  8652. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8653. // with awserr.Error's Code and Message methods to get detailed information about
  8654. // the error.
  8655. //
  8656. // See the AWS API reference guide for Amazon Simple Storage Service's
  8657. // API operation PutBucketVersioning for usage and error information.
  8658. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  8659. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  8660. req, out := c.PutBucketVersioningRequest(input)
  8661. return out, req.Send()
  8662. }
  8663. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  8664. // the ability to pass a context and additional request options.
  8665. //
  8666. // See PutBucketVersioning for details on how to use this API operation.
  8667. //
  8668. // The context must be non-nil and will be used for request cancellation. If
  8669. // the context is nil a panic will occur. In the future the SDK may create
  8670. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8671. // for more information on using Contexts.
  8672. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  8673. req, out := c.PutBucketVersioningRequest(input)
  8674. req.SetContext(ctx)
  8675. req.ApplyOptions(opts...)
  8676. return out, req.Send()
  8677. }
  8678. const opPutBucketWebsite = "PutBucketWebsite"
  8679. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  8680. // client's request for the PutBucketWebsite operation. The "output" return
  8681. // value will be populated with the request's response once the request completes
  8682. // successfully.
  8683. //
  8684. // Use "Send" method on the returned Request to send the API call to the service.
  8685. // the "output" return value is not valid until after Send returns without error.
  8686. //
  8687. // See PutBucketWebsite for more information on using the PutBucketWebsite
  8688. // API call, and error handling.
  8689. //
  8690. // This method is useful when you want to inject custom logic or configuration
  8691. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8692. //
  8693. // // Example sending a request using the PutBucketWebsiteRequest method.
  8694. // req, resp := client.PutBucketWebsiteRequest(params)
  8695. //
  8696. // err := req.Send()
  8697. // if err == nil { // resp is now filled
  8698. // fmt.Println(resp)
  8699. // }
  8700. //
  8701. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  8702. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  8703. op := &request.Operation{
  8704. Name: opPutBucketWebsite,
  8705. HTTPMethod: "PUT",
  8706. HTTPPath: "/{Bucket}?website",
  8707. }
  8708. if input == nil {
  8709. input = &PutBucketWebsiteInput{}
  8710. }
  8711. output = &PutBucketWebsiteOutput{}
  8712. req = c.newRequest(op, input, output)
  8713. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  8714. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  8715. Name: "contentMd5Handler",
  8716. Fn: checksum.AddBodyContentMD5Handler,
  8717. })
  8718. return
  8719. }
  8720. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  8721. //
  8722. // Sets the configuration of the website that is specified in the website subresource.
  8723. // To configure a bucket as a website, you can add this subresource on the bucket
  8724. // with website configuration information such as the file name of the index
  8725. // document and any redirect rules. For more information, see Hosting Websites
  8726. // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
  8727. //
  8728. // This PUT action requires the S3:PutBucketWebsite permission. By default,
  8729. // only the bucket owner can configure the website attached to a bucket; however,
  8730. // bucket owners can allow other users to set the website configuration by writing
  8731. // a bucket policy that grants them the S3:PutBucketWebsite permission.
  8732. //
  8733. // To redirect all website requests sent to the bucket's website endpoint, you
  8734. // add a website configuration with the following elements. Because all requests
  8735. // are sent to another website, you don't need to provide index document name
  8736. // for the bucket.
  8737. //
  8738. // - WebsiteConfiguration
  8739. //
  8740. // - RedirectAllRequestsTo
  8741. //
  8742. // - HostName
  8743. //
  8744. // - Protocol
  8745. //
  8746. // If you want granular control over redirects, you can use the following elements
  8747. // to add routing rules that describe conditions for redirecting requests and
  8748. // information about the redirect destination. In this case, the website configuration
  8749. // must provide an index document for the bucket, because some requests might
  8750. // not be redirected.
  8751. //
  8752. // - WebsiteConfiguration
  8753. //
  8754. // - IndexDocument
  8755. //
  8756. // - Suffix
  8757. //
  8758. // - ErrorDocument
  8759. //
  8760. // - Key
  8761. //
  8762. // - RoutingRules
  8763. //
  8764. // - RoutingRule
  8765. //
  8766. // - Condition
  8767. //
  8768. // - HttpErrorCodeReturnedEquals
  8769. //
  8770. // - KeyPrefixEquals
  8771. //
  8772. // - Redirect
  8773. //
  8774. // - Protocol
  8775. //
  8776. // - HostName
  8777. //
  8778. // - ReplaceKeyPrefixWith
  8779. //
  8780. // - ReplaceKeyWith
  8781. //
  8782. // - HttpRedirectCode
  8783. //
  8784. // Amazon S3 has a limitation of 50 routing rules per website configuration.
  8785. // If you require more than 50 routing rules, you can use object redirect. For
  8786. // more information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html)
  8787. // in the Amazon S3 User Guide.
  8788. //
  8789. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8790. // with awserr.Error's Code and Message methods to get detailed information about
  8791. // the error.
  8792. //
  8793. // See the AWS API reference guide for Amazon Simple Storage Service's
  8794. // API operation PutBucketWebsite for usage and error information.
  8795. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  8796. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  8797. req, out := c.PutBucketWebsiteRequest(input)
  8798. return out, req.Send()
  8799. }
  8800. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  8801. // the ability to pass a context and additional request options.
  8802. //
  8803. // See PutBucketWebsite for details on how to use this API operation.
  8804. //
  8805. // The context must be non-nil and will be used for request cancellation. If
  8806. // the context is nil a panic will occur. In the future the SDK may create
  8807. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8808. // for more information on using Contexts.
  8809. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  8810. req, out := c.PutBucketWebsiteRequest(input)
  8811. req.SetContext(ctx)
  8812. req.ApplyOptions(opts...)
  8813. return out, req.Send()
  8814. }
  8815. const opPutObject = "PutObject"
  8816. // PutObjectRequest generates a "aws/request.Request" representing the
  8817. // client's request for the PutObject operation. The "output" return
  8818. // value will be populated with the request's response once the request completes
  8819. // successfully.
  8820. //
  8821. // Use "Send" method on the returned Request to send the API call to the service.
  8822. // the "output" return value is not valid until after Send returns without error.
  8823. //
  8824. // See PutObject for more information on using the PutObject
  8825. // API call, and error handling.
  8826. //
  8827. // This method is useful when you want to inject custom logic or configuration
  8828. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8829. //
  8830. // // Example sending a request using the PutObjectRequest method.
  8831. // req, resp := client.PutObjectRequest(params)
  8832. //
  8833. // err := req.Send()
  8834. // if err == nil { // resp is now filled
  8835. // fmt.Println(resp)
  8836. // }
  8837. //
  8838. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  8839. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  8840. op := &request.Operation{
  8841. Name: opPutObject,
  8842. HTTPMethod: "PUT",
  8843. HTTPPath: "/{Bucket}/{Key+}",
  8844. }
  8845. if input == nil {
  8846. input = &PutObjectInput{}
  8847. }
  8848. output = &PutObjectOutput{}
  8849. req = c.newRequest(op, input, output)
  8850. return
  8851. }
  8852. // PutObject API operation for Amazon Simple Storage Service.
  8853. //
  8854. // Adds an object to a bucket. You must have WRITE permissions on a bucket to
  8855. // add an object to it.
  8856. //
  8857. // Amazon S3 never adds partial objects; if you receive a success response,
  8858. // Amazon S3 added the entire object to the bucket.
  8859. //
  8860. // Amazon S3 is a distributed system. If it receives multiple write requests
  8861. // for the same object simultaneously, it overwrites all but the last object
  8862. // written. Amazon S3 does not provide object locking; if you need this, make
  8863. // sure to build it into your application layer or use versioning instead.
  8864. //
  8865. // To ensure that data is not corrupted traversing the network, use the Content-MD5
  8866. // header. When you use this header, Amazon S3 checks the object against the
  8867. // provided MD5 value and, if they do not match, returns an error. Additionally,
  8868. // you can calculate the MD5 while putting an object to Amazon S3 and compare
  8869. // the returned ETag to the calculated MD5 value.
  8870. //
  8871. // - To successfully complete the PutObject request, you must have the s3:PutObject
  8872. // in your IAM permissions.
  8873. //
  8874. // - To successfully change the objects acl of your PutObject request, you
  8875. // must have the s3:PutObjectAcl in your IAM permissions.
  8876. //
  8877. // - The Content-MD5 header is required for any request to upload an object
  8878. // with a retention period configured using Amazon S3 Object Lock. For more
  8879. // information about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview
  8880. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)
  8881. // in the Amazon S3 User Guide.
  8882. //
  8883. // # Server-side Encryption
  8884. //
  8885. // You can optionally request server-side encryption. With server-side encryption,
  8886. // Amazon S3 encrypts your data as it writes it to disks in its data centers
  8887. // and decrypts the data when you access it. You have the option to provide
  8888. // your own encryption key or use Amazon Web Services managed encryption keys
  8889. // (SSE-S3 or SSE-KMS). For more information, see Using Server-Side Encryption
  8890. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
  8891. //
  8892. // If you request server-side encryption using Amazon Web Services Key Management
  8893. // Service (SSE-KMS), you can enable an S3 Bucket Key at the object-level. For
  8894. // more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
  8895. // in the Amazon S3 User Guide.
  8896. //
  8897. // # Access Control List (ACL)-Specific Request Headers
  8898. //
  8899. // You can use headers to grant ACL- based permissions. By default, all objects
  8900. // are private. Only the owner has full access control. When adding a new object,
  8901. // you can grant permissions to individual Amazon Web Services accounts or to
  8902. // predefined groups defined by Amazon S3. These permissions are then added
  8903. // to the ACL on the object. For more information, see Access Control List (ACL)
  8904. // Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
  8905. // and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
  8906. //
  8907. // If the bucket that you're uploading objects to uses the bucket owner enforced
  8908. // setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
  8909. // Buckets that use this setting only accept PUT requests that don't specify
  8910. // an ACL or PUT requests that specify bucket owner full control ACLs, such
  8911. // as the bucket-owner-full-control canned ACL or an equivalent form of this
  8912. // ACL expressed in the XML format. PUT requests that contain other ACLs (for
  8913. // example, custom grants to certain Amazon Web Services accounts) fail and
  8914. // return a 400 error with the error code AccessControlListNotSupported.
  8915. //
  8916. // For more information, see Controlling ownership of objects and disabling
  8917. // ACLs (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  8918. // in the Amazon S3 User Guide.
  8919. //
  8920. // If your bucket uses the bucket owner enforced setting for Object Ownership,
  8921. // all objects written to the bucket by any account will be owned by the bucket
  8922. // owner.
  8923. //
  8924. // # Storage Class Options
  8925. //
  8926. // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
  8927. // objects. The STANDARD storage class provides high durability and high availability.
  8928. // Depending on performance needs, you can specify a different Storage Class.
  8929. // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
  8930. // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
  8931. // in the Amazon S3 User Guide.
  8932. //
  8933. // # Versioning
  8934. //
  8935. // If you enable versioning for a bucket, Amazon S3 automatically generates
  8936. // a unique version ID for the object being stored. Amazon S3 returns this ID
  8937. // in the response. When you enable versioning for a bucket, if Amazon S3 receives
  8938. // multiple write requests for the same object simultaneously, it stores all
  8939. // of the objects.
  8940. //
  8941. // For more information about versioning, see Adding Objects to Versioning Enabled
  8942. // Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html).
  8943. // For information about returning the versioning state of a bucket, see GetBucketVersioning
  8944. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
  8945. //
  8946. // Related Resources
  8947. //
  8948. // - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
  8949. //
  8950. // - DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
  8951. //
  8952. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  8953. // with awserr.Error's Code and Message methods to get detailed information about
  8954. // the error.
  8955. //
  8956. // See the AWS API reference guide for Amazon Simple Storage Service's
  8957. // API operation PutObject for usage and error information.
  8958. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  8959. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  8960. req, out := c.PutObjectRequest(input)
  8961. return out, req.Send()
  8962. }
  8963. // PutObjectWithContext is the same as PutObject with the addition of
  8964. // the ability to pass a context and additional request options.
  8965. //
  8966. // See PutObject for details on how to use this API operation.
  8967. //
  8968. // The context must be non-nil and will be used for request cancellation. If
  8969. // the context is nil a panic will occur. In the future the SDK may create
  8970. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  8971. // for more information on using Contexts.
  8972. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  8973. req, out := c.PutObjectRequest(input)
  8974. req.SetContext(ctx)
  8975. req.ApplyOptions(opts...)
  8976. return out, req.Send()
  8977. }
  8978. const opPutObjectAcl = "PutObjectAcl"
  8979. // PutObjectAclRequest generates a "aws/request.Request" representing the
  8980. // client's request for the PutObjectAcl operation. The "output" return
  8981. // value will be populated with the request's response once the request completes
  8982. // successfully.
  8983. //
  8984. // Use "Send" method on the returned Request to send the API call to the service.
  8985. // the "output" return value is not valid until after Send returns without error.
  8986. //
  8987. // See PutObjectAcl for more information on using the PutObjectAcl
  8988. // API call, and error handling.
  8989. //
  8990. // This method is useful when you want to inject custom logic or configuration
  8991. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  8992. //
  8993. // // Example sending a request using the PutObjectAclRequest method.
  8994. // req, resp := client.PutObjectAclRequest(params)
  8995. //
  8996. // err := req.Send()
  8997. // if err == nil { // resp is now filled
  8998. // fmt.Println(resp)
  8999. // }
  9000. //
  9001. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  9002. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  9003. op := &request.Operation{
  9004. Name: opPutObjectAcl,
  9005. HTTPMethod: "PUT",
  9006. HTTPPath: "/{Bucket}/{Key+}?acl",
  9007. }
  9008. if input == nil {
  9009. input = &PutObjectAclInput{}
  9010. }
  9011. output = &PutObjectAclOutput{}
  9012. req = c.newRequest(op, input, output)
  9013. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9014. Name: "contentMd5Handler",
  9015. Fn: checksum.AddBodyContentMD5Handler,
  9016. })
  9017. return
  9018. }
  9019. // PutObjectAcl API operation for Amazon Simple Storage Service.
  9020. //
  9021. // Uses the acl subresource to set the access control list (ACL) permissions
  9022. // for a new or existing object in an S3 bucket. You must have WRITE_ACP permission
  9023. // to set the ACL of an object. For more information, see What permissions can
  9024. // I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
  9025. // in the Amazon S3 User Guide.
  9026. //
  9027. // This action is not supported by Amazon S3 on Outposts.
  9028. //
  9029. // Depending on your application needs, you can choose to set the ACL on an
  9030. // object using either the request body or the headers. For example, if you
  9031. // have an existing application that updates a bucket ACL using the request
  9032. // body, you can continue to use that approach. For more information, see Access
  9033. // Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
  9034. // in the Amazon S3 User Guide.
  9035. //
  9036. // If your bucket uses the bucket owner enforced setting for S3 Object Ownership,
  9037. // ACLs are disabled and no longer affect permissions. You must use policies
  9038. // to grant access to your bucket and the objects in it. Requests to set ACLs
  9039. // or update ACLs fail and return the AccessControlListNotSupported error code.
  9040. // Requests to read ACLs are still supported. For more information, see Controlling
  9041. // object ownership (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
  9042. // in the Amazon S3 User Guide.
  9043. //
  9044. // # Access Permissions
  9045. //
  9046. // You can set access permissions using one of the following methods:
  9047. //
  9048. // - Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
  9049. // a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
  9050. // predefined set of grantees and permissions. Specify the canned ACL name
  9051. // as the value of x-amz-acl. If you use this header, you cannot use other
  9052. // access control-specific headers in your request. For more information,
  9053. // see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  9054. //
  9055. // - Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
  9056. // x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
  9057. // these headers, you specify explicit access permissions and grantees (Amazon
  9058. // Web Services accounts or Amazon S3 groups) who will receive the permission.
  9059. // If you use these ACL-specific headers, you cannot use x-amz-acl header
  9060. // to set a canned ACL. These parameters map to the set of permissions that
  9061. // Amazon S3 supports in an ACL. For more information, see Access Control
  9062. // List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
  9063. // You specify each grantee as a type=value pair, where the type is one of
  9064. // the following: id – if the value specified is the canonical user ID
  9065. // of an Amazon Web Services account uri – if you are granting permissions
  9066. // to a predefined group emailAddress – if the value specified is the email
  9067. // address of an Amazon Web Services account Using email addresses to specify
  9068. // a grantee is only supported in the following Amazon Web Services Regions:
  9069. // US East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
  9070. // (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
  9071. // South America (São Paulo) For a list of all the Amazon S3 supported Regions
  9072. // and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  9073. // in the Amazon Web Services General Reference. For example, the following
  9074. // x-amz-grant-read header grants list objects permission to the two Amazon
  9075. // Web Services accounts identified by their email addresses. x-amz-grant-read:
  9076. // emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com"
  9077. //
  9078. // You can use either a canned ACL or specify access permissions explicitly.
  9079. // You cannot do both.
  9080. //
  9081. // # Grantee Values
  9082. //
  9083. // You can specify the person (grantee) to whom you're assigning access rights
  9084. // (using request elements) in the following ways:
  9085. //
  9086. // - By the person's ID: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9087. // xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName>
  9088. // </Grantee> DisplayName is optional and ignored in the request.
  9089. //
  9090. // - By URI: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9091. // xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee>
  9092. //
  9093. // - By Email address: <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9094. // xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee>
  9095. // The grantee is resolved to the CanonicalUser and, in a response to a GET
  9096. // Object acl request, appears as the CanonicalUser. Using email addresses
  9097. // to specify a grantee is only supported in the following Amazon Web Services
  9098. // Regions: US East (N. Virginia) US West (N. California) US West (Oregon)
  9099. // Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe
  9100. // (Ireland) South America (São Paulo) For a list of all the Amazon S3 supported
  9101. // Regions and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  9102. // in the Amazon Web Services General Reference.
  9103. //
  9104. // # Versioning
  9105. //
  9106. // The ACL of an object is set at the object version level. By default, PUT
  9107. // sets the ACL of the current version of an object. To set the ACL of a different
  9108. // version, use the versionId subresource.
  9109. //
  9110. // Related Resources
  9111. //
  9112. // - CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
  9113. //
  9114. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  9115. //
  9116. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9117. // with awserr.Error's Code and Message methods to get detailed information about
  9118. // the error.
  9119. //
  9120. // See the AWS API reference guide for Amazon Simple Storage Service's
  9121. // API operation PutObjectAcl for usage and error information.
  9122. //
  9123. // Returned Error Codes:
  9124. // - ErrCodeNoSuchKey "NoSuchKey"
  9125. // The specified key does not exist.
  9126. //
  9127. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  9128. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  9129. req, out := c.PutObjectAclRequest(input)
  9130. return out, req.Send()
  9131. }
  9132. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  9133. // the ability to pass a context and additional request options.
  9134. //
  9135. // See PutObjectAcl for details on how to use this API operation.
  9136. //
  9137. // The context must be non-nil and will be used for request cancellation. If
  9138. // the context is nil a panic will occur. In the future the SDK may create
  9139. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9140. // for more information on using Contexts.
  9141. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  9142. req, out := c.PutObjectAclRequest(input)
  9143. req.SetContext(ctx)
  9144. req.ApplyOptions(opts...)
  9145. return out, req.Send()
  9146. }
  9147. const opPutObjectLegalHold = "PutObjectLegalHold"
  9148. // PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
  9149. // client's request for the PutObjectLegalHold operation. The "output" return
  9150. // value will be populated with the request's response once the request completes
  9151. // successfully.
  9152. //
  9153. // Use "Send" method on the returned Request to send the API call to the service.
  9154. // the "output" return value is not valid until after Send returns without error.
  9155. //
  9156. // See PutObjectLegalHold for more information on using the PutObjectLegalHold
  9157. // API call, and error handling.
  9158. //
  9159. // This method is useful when you want to inject custom logic or configuration
  9160. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9161. //
  9162. // // Example sending a request using the PutObjectLegalHoldRequest method.
  9163. // req, resp := client.PutObjectLegalHoldRequest(params)
  9164. //
  9165. // err := req.Send()
  9166. // if err == nil { // resp is now filled
  9167. // fmt.Println(resp)
  9168. // }
  9169. //
  9170. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  9171. func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
  9172. op := &request.Operation{
  9173. Name: opPutObjectLegalHold,
  9174. HTTPMethod: "PUT",
  9175. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  9176. }
  9177. if input == nil {
  9178. input = &PutObjectLegalHoldInput{}
  9179. }
  9180. output = &PutObjectLegalHoldOutput{}
  9181. req = c.newRequest(op, input, output)
  9182. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9183. Name: "contentMd5Handler",
  9184. Fn: checksum.AddBodyContentMD5Handler,
  9185. })
  9186. return
  9187. }
  9188. // PutObjectLegalHold API operation for Amazon Simple Storage Service.
  9189. //
  9190. // Applies a legal hold configuration to the specified object. For more information,
  9191. // see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  9192. //
  9193. // This action is not supported by Amazon S3 on Outposts.
  9194. //
  9195. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9196. // with awserr.Error's Code and Message methods to get detailed information about
  9197. // the error.
  9198. //
  9199. // See the AWS API reference guide for Amazon Simple Storage Service's
  9200. // API operation PutObjectLegalHold for usage and error information.
  9201. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  9202. func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
  9203. req, out := c.PutObjectLegalHoldRequest(input)
  9204. return out, req.Send()
  9205. }
  9206. // PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
  9207. // the ability to pass a context and additional request options.
  9208. //
  9209. // See PutObjectLegalHold for details on how to use this API operation.
  9210. //
  9211. // The context must be non-nil and will be used for request cancellation. If
  9212. // the context is nil a panic will occur. In the future the SDK may create
  9213. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9214. // for more information on using Contexts.
  9215. func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
  9216. req, out := c.PutObjectLegalHoldRequest(input)
  9217. req.SetContext(ctx)
  9218. req.ApplyOptions(opts...)
  9219. return out, req.Send()
  9220. }
  9221. const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
  9222. // PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  9223. // client's request for the PutObjectLockConfiguration operation. The "output" return
  9224. // value will be populated with the request's response once the request completes
  9225. // successfully.
  9226. //
  9227. // Use "Send" method on the returned Request to send the API call to the service.
  9228. // the "output" return value is not valid until after Send returns without error.
  9229. //
  9230. // See PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
  9231. // API call, and error handling.
  9232. //
  9233. // This method is useful when you want to inject custom logic or configuration
  9234. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9235. //
  9236. // // Example sending a request using the PutObjectLockConfigurationRequest method.
  9237. // req, resp := client.PutObjectLockConfigurationRequest(params)
  9238. //
  9239. // err := req.Send()
  9240. // if err == nil { // resp is now filled
  9241. // fmt.Println(resp)
  9242. // }
  9243. //
  9244. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  9245. func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
  9246. op := &request.Operation{
  9247. Name: opPutObjectLockConfiguration,
  9248. HTTPMethod: "PUT",
  9249. HTTPPath: "/{Bucket}?object-lock",
  9250. }
  9251. if input == nil {
  9252. input = &PutObjectLockConfigurationInput{}
  9253. }
  9254. output = &PutObjectLockConfigurationOutput{}
  9255. req = c.newRequest(op, input, output)
  9256. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9257. Name: "contentMd5Handler",
  9258. Fn: checksum.AddBodyContentMD5Handler,
  9259. })
  9260. return
  9261. }
  9262. // PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
  9263. //
  9264. // Places an Object Lock configuration on the specified bucket. The rule specified
  9265. // in the Object Lock configuration will be applied by default to every new
  9266. // object placed in the specified bucket. For more information, see Locking
  9267. // Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  9268. //
  9269. // - The DefaultRetention settings require both a mode and a period.
  9270. //
  9271. // - The DefaultRetention period can be either Days or Years but you must
  9272. // select one. You cannot specify Days and Years at the same time.
  9273. //
  9274. // - You can only enable Object Lock for new buckets. If you want to turn
  9275. // on Object Lock for an existing bucket, contact Amazon Web Services Support.
  9276. //
  9277. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9278. // with awserr.Error's Code and Message methods to get detailed information about
  9279. // the error.
  9280. //
  9281. // See the AWS API reference guide for Amazon Simple Storage Service's
  9282. // API operation PutObjectLockConfiguration for usage and error information.
  9283. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  9284. func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
  9285. req, out := c.PutObjectLockConfigurationRequest(input)
  9286. return out, req.Send()
  9287. }
  9288. // PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
  9289. // the ability to pass a context and additional request options.
  9290. //
  9291. // See PutObjectLockConfiguration for details on how to use this API operation.
  9292. //
  9293. // The context must be non-nil and will be used for request cancellation. If
  9294. // the context is nil a panic will occur. In the future the SDK may create
  9295. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9296. // for more information on using Contexts.
  9297. func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
  9298. req, out := c.PutObjectLockConfigurationRequest(input)
  9299. req.SetContext(ctx)
  9300. req.ApplyOptions(opts...)
  9301. return out, req.Send()
  9302. }
  9303. const opPutObjectRetention = "PutObjectRetention"
  9304. // PutObjectRetentionRequest generates a "aws/request.Request" representing the
  9305. // client's request for the PutObjectRetention operation. The "output" return
  9306. // value will be populated with the request's response once the request completes
  9307. // successfully.
  9308. //
  9309. // Use "Send" method on the returned Request to send the API call to the service.
  9310. // the "output" return value is not valid until after Send returns without error.
  9311. //
  9312. // See PutObjectRetention for more information on using the PutObjectRetention
  9313. // API call, and error handling.
  9314. //
  9315. // This method is useful when you want to inject custom logic or configuration
  9316. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9317. //
  9318. // // Example sending a request using the PutObjectRetentionRequest method.
  9319. // req, resp := client.PutObjectRetentionRequest(params)
  9320. //
  9321. // err := req.Send()
  9322. // if err == nil { // resp is now filled
  9323. // fmt.Println(resp)
  9324. // }
  9325. //
  9326. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  9327. func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
  9328. op := &request.Operation{
  9329. Name: opPutObjectRetention,
  9330. HTTPMethod: "PUT",
  9331. HTTPPath: "/{Bucket}/{Key+}?retention",
  9332. }
  9333. if input == nil {
  9334. input = &PutObjectRetentionInput{}
  9335. }
  9336. output = &PutObjectRetentionOutput{}
  9337. req = c.newRequest(op, input, output)
  9338. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9339. Name: "contentMd5Handler",
  9340. Fn: checksum.AddBodyContentMD5Handler,
  9341. })
  9342. return
  9343. }
  9344. // PutObjectRetention API operation for Amazon Simple Storage Service.
  9345. //
  9346. // Places an Object Retention configuration on an object. For more information,
  9347. // see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  9348. // Users or accounts require the s3:PutObjectRetention permission in order to
  9349. // place an Object Retention configuration on objects. Bypassing a Governance
  9350. // Retention configuration requires the s3:BypassGovernanceRetention permission.
  9351. //
  9352. // This action is not supported by Amazon S3 on Outposts.
  9353. //
  9354. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9355. // with awserr.Error's Code and Message methods to get detailed information about
  9356. // the error.
  9357. //
  9358. // See the AWS API reference guide for Amazon Simple Storage Service's
  9359. // API operation PutObjectRetention for usage and error information.
  9360. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  9361. func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
  9362. req, out := c.PutObjectRetentionRequest(input)
  9363. return out, req.Send()
  9364. }
  9365. // PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
  9366. // the ability to pass a context and additional request options.
  9367. //
  9368. // See PutObjectRetention for details on how to use this API operation.
  9369. //
  9370. // The context must be non-nil and will be used for request cancellation. If
  9371. // the context is nil a panic will occur. In the future the SDK may create
  9372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9373. // for more information on using Contexts.
  9374. func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
  9375. req, out := c.PutObjectRetentionRequest(input)
  9376. req.SetContext(ctx)
  9377. req.ApplyOptions(opts...)
  9378. return out, req.Send()
  9379. }
  9380. const opPutObjectTagging = "PutObjectTagging"
  9381. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  9382. // client's request for the PutObjectTagging operation. The "output" return
  9383. // value will be populated with the request's response once the request completes
  9384. // successfully.
  9385. //
  9386. // Use "Send" method on the returned Request to send the API call to the service.
  9387. // the "output" return value is not valid until after Send returns without error.
  9388. //
  9389. // See PutObjectTagging for more information on using the PutObjectTagging
  9390. // API call, and error handling.
  9391. //
  9392. // This method is useful when you want to inject custom logic or configuration
  9393. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9394. //
  9395. // // Example sending a request using the PutObjectTaggingRequest method.
  9396. // req, resp := client.PutObjectTaggingRequest(params)
  9397. //
  9398. // err := req.Send()
  9399. // if err == nil { // resp is now filled
  9400. // fmt.Println(resp)
  9401. // }
  9402. //
  9403. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  9404. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  9405. op := &request.Operation{
  9406. Name: opPutObjectTagging,
  9407. HTTPMethod: "PUT",
  9408. HTTPPath: "/{Bucket}/{Key+}?tagging",
  9409. }
  9410. if input == nil {
  9411. input = &PutObjectTaggingInput{}
  9412. }
  9413. output = &PutObjectTaggingOutput{}
  9414. req = c.newRequest(op, input, output)
  9415. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9416. Name: "contentMd5Handler",
  9417. Fn: checksum.AddBodyContentMD5Handler,
  9418. })
  9419. return
  9420. }
  9421. // PutObjectTagging API operation for Amazon Simple Storage Service.
  9422. //
  9423. // Sets the supplied tag-set to an object that already exists in a bucket.
  9424. //
  9425. // A tag is a key-value pair. You can associate tags with an object by sending
  9426. // a PUT request against the tagging subresource that is associated with the
  9427. // object. You can retrieve tags by sending a GET request. For more information,
  9428. // see GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html).
  9429. //
  9430. // For tagging-related restrictions related to characters and encodings, see
  9431. // Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html).
  9432. // Note that Amazon S3 limits the maximum number of tags to 10 tags per object.
  9433. //
  9434. // To use this operation, you must have permission to perform the s3:PutObjectTagging
  9435. // action. By default, the bucket owner has this permission and can grant this
  9436. // permission to others.
  9437. //
  9438. // To put tags of any other version, use the versionId query parameter. You
  9439. // also need permission for the s3:PutObjectVersionTagging action.
  9440. //
  9441. // For information about the Amazon S3 object tagging feature, see Object Tagging
  9442. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
  9443. //
  9444. // Special Errors
  9445. //
  9446. // - Code: InvalidTagError Cause: The tag provided was not a valid tag. This
  9447. // error can occur if the tag did not pass input validation. For more information,
  9448. // see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
  9449. //
  9450. // - Code: MalformedXMLError Cause: The XML provided does not match the schema.
  9451. //
  9452. // - Code: OperationAbortedError Cause: A conflicting conditional action
  9453. // is currently in progress against this resource. Please try again.
  9454. //
  9455. // - Code: InternalError Cause: The service was unable to apply the provided
  9456. // tag to the object.
  9457. //
  9458. // Related Resources
  9459. //
  9460. // - GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
  9461. //
  9462. // - DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
  9463. //
  9464. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9465. // with awserr.Error's Code and Message methods to get detailed information about
  9466. // the error.
  9467. //
  9468. // See the AWS API reference guide for Amazon Simple Storage Service's
  9469. // API operation PutObjectTagging for usage and error information.
  9470. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  9471. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  9472. req, out := c.PutObjectTaggingRequest(input)
  9473. return out, req.Send()
  9474. }
  9475. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  9476. // the ability to pass a context and additional request options.
  9477. //
  9478. // See PutObjectTagging for details on how to use this API operation.
  9479. //
  9480. // The context must be non-nil and will be used for request cancellation. If
  9481. // the context is nil a panic will occur. In the future the SDK may create
  9482. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9483. // for more information on using Contexts.
  9484. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  9485. req, out := c.PutObjectTaggingRequest(input)
  9486. req.SetContext(ctx)
  9487. req.ApplyOptions(opts...)
  9488. return out, req.Send()
  9489. }
  9490. const opPutPublicAccessBlock = "PutPublicAccessBlock"
  9491. // PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
  9492. // client's request for the PutPublicAccessBlock operation. The "output" return
  9493. // value will be populated with the request's response once the request completes
  9494. // successfully.
  9495. //
  9496. // Use "Send" method on the returned Request to send the API call to the service.
  9497. // the "output" return value is not valid until after Send returns without error.
  9498. //
  9499. // See PutPublicAccessBlock for more information on using the PutPublicAccessBlock
  9500. // API call, and error handling.
  9501. //
  9502. // This method is useful when you want to inject custom logic or configuration
  9503. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9504. //
  9505. // // Example sending a request using the PutPublicAccessBlockRequest method.
  9506. // req, resp := client.PutPublicAccessBlockRequest(params)
  9507. //
  9508. // err := req.Send()
  9509. // if err == nil { // resp is now filled
  9510. // fmt.Println(resp)
  9511. // }
  9512. //
  9513. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  9514. func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
  9515. op := &request.Operation{
  9516. Name: opPutPublicAccessBlock,
  9517. HTTPMethod: "PUT",
  9518. HTTPPath: "/{Bucket}?publicAccessBlock",
  9519. }
  9520. if input == nil {
  9521. input = &PutPublicAccessBlockInput{}
  9522. }
  9523. output = &PutPublicAccessBlockOutput{}
  9524. req = c.newRequest(op, input, output)
  9525. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  9526. req.Handlers.Build.PushBackNamed(request.NamedHandler{
  9527. Name: "contentMd5Handler",
  9528. Fn: checksum.AddBodyContentMD5Handler,
  9529. })
  9530. return
  9531. }
  9532. // PutPublicAccessBlock API operation for Amazon Simple Storage Service.
  9533. //
  9534. // Creates or modifies the PublicAccessBlock configuration for an Amazon S3
  9535. // bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock
  9536. // permission. For more information about Amazon S3 permissions, see Specifying
  9537. // Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
  9538. //
  9539. // When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
  9540. // or an object, it checks the PublicAccessBlock configuration for both the
  9541. // bucket (or the bucket that contains the object) and the bucket owner's account.
  9542. // If the PublicAccessBlock configurations are different between the bucket
  9543. // and the account, Amazon S3 uses the most restrictive combination of the bucket-level
  9544. // and account-level settings.
  9545. //
  9546. // For more information about when Amazon S3 considers a bucket or an object
  9547. // public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
  9548. //
  9549. // Related Resources
  9550. //
  9551. // - GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
  9552. //
  9553. // - DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
  9554. //
  9555. // - GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
  9556. //
  9557. // - Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
  9558. //
  9559. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9560. // with awserr.Error's Code and Message methods to get detailed information about
  9561. // the error.
  9562. //
  9563. // See the AWS API reference guide for Amazon Simple Storage Service's
  9564. // API operation PutPublicAccessBlock for usage and error information.
  9565. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  9566. func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
  9567. req, out := c.PutPublicAccessBlockRequest(input)
  9568. return out, req.Send()
  9569. }
  9570. // PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
  9571. // the ability to pass a context and additional request options.
  9572. //
  9573. // See PutPublicAccessBlock for details on how to use this API operation.
  9574. //
  9575. // The context must be non-nil and will be used for request cancellation. If
  9576. // the context is nil a panic will occur. In the future the SDK may create
  9577. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9578. // for more information on using Contexts.
  9579. func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
  9580. req, out := c.PutPublicAccessBlockRequest(input)
  9581. req.SetContext(ctx)
  9582. req.ApplyOptions(opts...)
  9583. return out, req.Send()
  9584. }
  9585. const opRestoreObject = "RestoreObject"
  9586. // RestoreObjectRequest generates a "aws/request.Request" representing the
  9587. // client's request for the RestoreObject operation. The "output" return
  9588. // value will be populated with the request's response once the request completes
  9589. // successfully.
  9590. //
  9591. // Use "Send" method on the returned Request to send the API call to the service.
  9592. // the "output" return value is not valid until after Send returns without error.
  9593. //
  9594. // See RestoreObject for more information on using the RestoreObject
  9595. // API call, and error handling.
  9596. //
  9597. // This method is useful when you want to inject custom logic or configuration
  9598. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9599. //
  9600. // // Example sending a request using the RestoreObjectRequest method.
  9601. // req, resp := client.RestoreObjectRequest(params)
  9602. //
  9603. // err := req.Send()
  9604. // if err == nil { // resp is now filled
  9605. // fmt.Println(resp)
  9606. // }
  9607. //
  9608. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  9609. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  9610. op := &request.Operation{
  9611. Name: opRestoreObject,
  9612. HTTPMethod: "POST",
  9613. HTTPPath: "/{Bucket}/{Key+}?restore",
  9614. }
  9615. if input == nil {
  9616. input = &RestoreObjectInput{}
  9617. }
  9618. output = &RestoreObjectOutput{}
  9619. req = c.newRequest(op, input, output)
  9620. return
  9621. }
  9622. // RestoreObject API operation for Amazon Simple Storage Service.
  9623. //
  9624. // # Restores an archived copy of an object back into Amazon S3
  9625. //
  9626. // This action is not supported by Amazon S3 on Outposts.
  9627. //
  9628. // This action performs the following types of requests:
  9629. //
  9630. // - select - Perform a select query on an archived object
  9631. //
  9632. // - restore an archive - Restore an archived object
  9633. //
  9634. // To use this operation, you must have permissions to perform the s3:RestoreObject
  9635. // action. The bucket owner has this permission by default and can grant this
  9636. // permission to others. For more information about permissions, see Permissions
  9637. // Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
  9638. // and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
  9639. // in the Amazon S3 User Guide.
  9640. //
  9641. // # Querying Archives with Select Requests
  9642. //
  9643. // You use a select type of request to perform SQL queries on archived objects.
  9644. // The archived objects that are being queried by the select request must be
  9645. // formatted as uncompressed comma-separated values (CSV) files. You can run
  9646. // queries and custom analytics on your archived data without having to restore
  9647. // your data to a hotter Amazon S3 tier. For an overview about select requests,
  9648. // see Querying Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
  9649. // in the Amazon S3 User Guide.
  9650. //
  9651. // When making a select request, do the following:
  9652. //
  9653. // - Define an output location for the select query's output. This must be
  9654. // an Amazon S3 bucket in the same Amazon Web Services Region as the bucket
  9655. // that contains the archive object that is being queried. The Amazon Web
  9656. // Services account that initiates the job must have permissions to write
  9657. // to the S3 bucket. You can specify the storage class and encryption for
  9658. // the output objects stored in the bucket. For more information about output,
  9659. // see Querying Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
  9660. // in the Amazon S3 User Guide. For more information about the S3 structure
  9661. // in the request body, see the following: PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
  9662. // Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
  9663. // in the Amazon S3 User Guide Protecting Data Using Server-Side Encryption
  9664. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
  9665. // in the Amazon S3 User Guide
  9666. //
  9667. // - Define the SQL expression for the SELECT type of restoration for your
  9668. // query in the request body's SelectParameters structure. You can use expressions
  9669. // like the following examples. The following expression returns all records
  9670. // from the specified object. SELECT * FROM Object Assuming that you are
  9671. // not using any headers for data stored in the object, you can specify columns
  9672. // with positional headers. SELECT s._1, s._2 FROM Object s WHERE s._3 >
  9673. // 100 If you have headers and you set the fileHeaderInfo in the CSV structure
  9674. // in the request body to USE, you can specify headers in the query. (If
  9675. // you set the fileHeaderInfo field to IGNORE, the first row is skipped for
  9676. // the query.) You cannot mix ordinal positions with header column names.
  9677. // SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
  9678. //
  9679. // For more information about using SQL with S3 Glacier Select restore, see
  9680. // SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
  9681. // in the Amazon S3 User Guide.
  9682. //
  9683. // When making a select request, you can also do the following:
  9684. //
  9685. // - To expedite your queries, specify the Expedited tier. For more information
  9686. // about tiers, see "Restoring Archives," later in this topic.
  9687. //
  9688. // - Specify details about the data serialization format of both the input
  9689. // object that is being queried and the serialization of the CSV-encoded
  9690. // query results.
  9691. //
  9692. // The following are additional important facts about the select feature:
  9693. //
  9694. // - The output results are new Amazon S3 objects. Unlike archive retrievals,
  9695. // they are stored until explicitly deleted-manually or through a lifecycle
  9696. // policy.
  9697. //
  9698. // - You can issue more than one select request on the same Amazon S3 object.
  9699. // Amazon S3 doesn't deduplicate requests, so avoid issuing duplicate requests.
  9700. //
  9701. // - Amazon S3 accepts a select request even if the object has already been
  9702. // restored. A select request doesn’t return error response 409.
  9703. //
  9704. // # Restoring objects
  9705. //
  9706. // Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage
  9707. // class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
  9708. // Archive tiers are not accessible in real time. For objects in Archive Access
  9709. // or Deep Archive Access tiers you must first initiate a restore request, and
  9710. // then wait until the object is moved into the Frequent Access tier. For objects
  9711. // in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate
  9712. // a restore request, and then wait until a temporary copy of the object is
  9713. // available. To access an archived object, you must restore the object for
  9714. // the duration (number of days) that you specify.
  9715. //
  9716. // To restore a specific object version, you can provide a version ID. If you
  9717. // don't provide a version ID, Amazon S3 restores the current version.
  9718. //
  9719. // When restoring an archived object (or using a select request), you can specify
  9720. // one of the following data access tier options in the Tier element of the
  9721. // request body:
  9722. //
  9723. // - Expedited - Expedited retrievals allow you to quickly access your data
  9724. // stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive
  9725. // tier when occasional urgent requests for a subset of archives are required.
  9726. // For all but the largest archived objects (250 MB+), data accessed using
  9727. // Expedited retrievals is typically made available within 1–5 minutes.
  9728. // Provisioned capacity ensures that retrieval capacity for Expedited retrievals
  9729. // is available when you need it. Expedited retrievals and provisioned capacity
  9730. // are not available for objects stored in the S3 Glacier Deep Archive storage
  9731. // class or S3 Intelligent-Tiering Deep Archive tier.
  9732. //
  9733. // - Standard - Standard retrievals allow you to access any of your archived
  9734. // objects within several hours. This is the default option for retrieval
  9735. // requests that do not specify the retrieval option. Standard retrievals
  9736. // typically finish within 3–5 hours for objects stored in the S3 Glacier
  9737. // storage class or S3 Intelligent-Tiering Archive tier. They typically finish
  9738. // within 12 hours for objects stored in the S3 Glacier Deep Archive storage
  9739. // class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals
  9740. // are free for objects stored in S3 Intelligent-Tiering.
  9741. //
  9742. // - Bulk - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier,
  9743. // enabling you to retrieve large amounts, even petabytes, of data inexpensively.
  9744. // Bulk retrievals typically finish within 5–12 hours for objects stored
  9745. // in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier.
  9746. // They typically finish within 48 hours for objects stored in the S3 Glacier
  9747. // Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
  9748. // Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.
  9749. //
  9750. // For more information about archive retrieval options and provisioned capacity
  9751. // for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
  9752. // in the Amazon S3 User Guide.
  9753. //
  9754. // You can use Amazon S3 restore speed upgrade to change the restore speed to
  9755. // a faster speed while it is in progress. For more information, see Upgrading
  9756. // the speed of an in-progress restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html)
  9757. // in the Amazon S3 User Guide.
  9758. //
  9759. // To get the status of object restoration, you can send a HEAD request. Operations
  9760. // return the x-amz-restore header, which provides information about the restoration
  9761. // status, in the response. You can use Amazon S3 event notifications to notify
  9762. // you when a restore is initiated or completed. For more information, see Configuring
  9763. // Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  9764. // in the Amazon S3 User Guide.
  9765. //
  9766. // After restoring an archived object, you can update the restoration period
  9767. // by reissuing the request with a new period. Amazon S3 updates the restoration
  9768. // period relative to the current time and charges only for the request-there
  9769. // are no data transfer charges. You cannot update the restoration period when
  9770. // Amazon S3 is actively processing your current restore request for the object.
  9771. //
  9772. // If your bucket has a lifecycle configuration with a rule that includes an
  9773. // expiration action, the object expiration overrides the life span that you
  9774. // specify in a restore request. For example, if you restore an object copy
  9775. // for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes
  9776. // the object in 3 days. For more information about lifecycle configuration,
  9777. // see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
  9778. // and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
  9779. // in Amazon S3 User Guide.
  9780. //
  9781. // # Responses
  9782. //
  9783. // A successful action returns either the 200 OK or 202 Accepted status code.
  9784. //
  9785. // - If the object is not previously restored, then Amazon S3 returns 202
  9786. // Accepted in the response.
  9787. //
  9788. // - If the object is previously restored, Amazon S3 returns 200 OK in the
  9789. // response.
  9790. //
  9791. // Special Errors
  9792. //
  9793. // - Code: RestoreAlreadyInProgress Cause: Object restore is already in progress.
  9794. // (This error does not apply to SELECT type requests.) HTTP Status Code:
  9795. // 409 Conflict SOAP Fault Code Prefix: Client
  9796. //
  9797. // - Code: GlacierExpeditedRetrievalNotAvailable Cause: expedited retrievals
  9798. // are currently not available. Try again later. (Returned if there is insufficient
  9799. // capacity to process the Expedited request. This error applies only to
  9800. // Expedited retrievals and not to S3 Standard or Bulk retrievals.) HTTP
  9801. // Status Code: 503 SOAP Fault Code Prefix: N/A
  9802. //
  9803. // Related Resources
  9804. //
  9805. // - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
  9806. //
  9807. // - GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
  9808. //
  9809. // - SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
  9810. // in the Amazon S3 User Guide
  9811. //
  9812. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9813. // with awserr.Error's Code and Message methods to get detailed information about
  9814. // the error.
  9815. //
  9816. // See the AWS API reference guide for Amazon Simple Storage Service's
  9817. // API operation RestoreObject for usage and error information.
  9818. //
  9819. // Returned Error Codes:
  9820. // - ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  9821. // This action is not allowed against this storage tier.
  9822. //
  9823. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  9824. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  9825. req, out := c.RestoreObjectRequest(input)
  9826. return out, req.Send()
  9827. }
  9828. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  9829. // the ability to pass a context and additional request options.
  9830. //
  9831. // See RestoreObject for details on how to use this API operation.
  9832. //
  9833. // The context must be non-nil and will be used for request cancellation. If
  9834. // the context is nil a panic will occur. In the future the SDK may create
  9835. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9836. // for more information on using Contexts.
  9837. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  9838. req, out := c.RestoreObjectRequest(input)
  9839. req.SetContext(ctx)
  9840. req.ApplyOptions(opts...)
  9841. return out, req.Send()
  9842. }
  9843. const opSelectObjectContent = "SelectObjectContent"
  9844. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  9845. // client's request for the SelectObjectContent operation. The "output" return
  9846. // value will be populated with the request's response once the request completes
  9847. // successfully.
  9848. //
  9849. // Use "Send" method on the returned Request to send the API call to the service.
  9850. // the "output" return value is not valid until after Send returns without error.
  9851. //
  9852. // See SelectObjectContent for more information on using the SelectObjectContent
  9853. // API call, and error handling.
  9854. //
  9855. // This method is useful when you want to inject custom logic or configuration
  9856. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  9857. //
  9858. // // Example sending a request using the SelectObjectContentRequest method.
  9859. // req, resp := client.SelectObjectContentRequest(params)
  9860. //
  9861. // err := req.Send()
  9862. // if err == nil { // resp is now filled
  9863. // fmt.Println(resp)
  9864. // }
  9865. //
  9866. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  9867. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  9868. op := &request.Operation{
  9869. Name: opSelectObjectContent,
  9870. HTTPMethod: "POST",
  9871. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  9872. }
  9873. if input == nil {
  9874. input = &SelectObjectContentInput{}
  9875. }
  9876. output = &SelectObjectContentOutput{}
  9877. req = c.newRequest(op, input, output)
  9878. es := NewSelectObjectContentEventStream()
  9879. req.Handlers.Unmarshal.PushBack(es.setStreamCloser)
  9880. output.EventStream = es
  9881. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  9882. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  9883. req.Handlers.Unmarshal.PushBack(es.runOutputStream)
  9884. req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose)
  9885. return
  9886. }
  9887. // SelectObjectContent API operation for Amazon Simple Storage Service.
  9888. //
  9889. // This action filters the contents of an Amazon S3 object based on a simple
  9890. // structured query language (SQL) statement. In the request, along with the
  9891. // SQL expression, you must also specify a data serialization format (JSON,
  9892. // CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse
  9893. // object data into records, and returns only records that match the specified
  9894. // SQL expression. You must also specify the data serialization format for the
  9895. // response.
  9896. //
  9897. // This action is not supported by Amazon S3 on Outposts.
  9898. //
  9899. // For more information about Amazon S3 Select, see Selecting Content from Objects
  9900. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html)
  9901. // and SELECT Command (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-glacier-select-sql-reference-select.html)
  9902. // in the Amazon S3 User Guide.
  9903. //
  9904. // For more information about using SQL with Amazon S3 Select, see SQL Reference
  9905. // for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
  9906. // in the Amazon S3 User Guide.
  9907. //
  9908. // # Permissions
  9909. //
  9910. // You must have s3:GetObject permission for this operation. Amazon S3 Select
  9911. // does not support anonymous access. For more information about permissions,
  9912. // see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
  9913. // in the Amazon S3 User Guide.
  9914. //
  9915. // # Object Data Formats
  9916. //
  9917. // You can use Amazon S3 Select to query objects that have the following format
  9918. // properties:
  9919. //
  9920. // - CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.
  9921. //
  9922. // - UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.
  9923. //
  9924. // - GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2.
  9925. // GZIP and BZIP2 are the only compression formats that Amazon S3 Select
  9926. // supports for CSV and JSON files. Amazon S3 Select supports columnar compression
  9927. // for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object
  9928. // compression for Parquet objects.
  9929. //
  9930. // - Server-side encryption - Amazon S3 Select supports querying objects
  9931. // that are protected with server-side encryption. For objects that are encrypted
  9932. // with customer-provided encryption keys (SSE-C), you must use HTTPS, and
  9933. // you must use the headers that are documented in the GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
  9934. // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
  9935. // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  9936. // in the Amazon S3 User Guide. For objects that are encrypted with Amazon
  9937. // S3 managed encryption keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS),
  9938. // server-side encryption is handled transparently, so you don't need to
  9939. // specify anything. For more information about server-side encryption, including
  9940. // SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
  9941. // in the Amazon S3 User Guide.
  9942. //
  9943. // # Working with the Response Body
  9944. //
  9945. // Given the response size is unknown, Amazon S3 Select streams the response
  9946. // as a series of messages and includes a Transfer-Encoding header with chunked
  9947. // as its value in the response. For more information, see Appendix: SelectObjectContent
  9948. // Response (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html).
  9949. //
  9950. // # GetObject Support
  9951. //
  9952. // The SelectObjectContent action does not support the following GetObject functionality.
  9953. // For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
  9954. //
  9955. // - Range: Although you can specify a scan range for an Amazon S3 Select
  9956. // request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange)
  9957. // in the request parameters), you cannot specify the range of bytes of an
  9958. // object to return.
  9959. //
  9960. // - GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You cannot
  9961. // specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes.
  9962. // For more information, about storage classes see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro)
  9963. // in the Amazon S3 User Guide.
  9964. //
  9965. // # Special Errors
  9966. //
  9967. // For a list of special errors for this operation, see List of SELECT Object
  9968. // Content Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
  9969. //
  9970. // Related Resources
  9971. //
  9972. // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
  9973. //
  9974. // - GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
  9975. //
  9976. // - PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
  9977. //
  9978. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  9979. // with awserr.Error's Code and Message methods to get detailed information about
  9980. // the error.
  9981. //
  9982. // See the AWS API reference guide for Amazon Simple Storage Service's
  9983. // API operation SelectObjectContent for usage and error information.
  9984. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  9985. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  9986. req, out := c.SelectObjectContentRequest(input)
  9987. return out, req.Send()
  9988. }
  9989. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  9990. // the ability to pass a context and additional request options.
  9991. //
  9992. // See SelectObjectContent for details on how to use this API operation.
  9993. //
  9994. // The context must be non-nil and will be used for request cancellation. If
  9995. // the context is nil a panic will occur. In the future the SDK may create
  9996. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  9997. // for more information on using Contexts.
  9998. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  9999. req, out := c.SelectObjectContentRequest(input)
  10000. req.SetContext(ctx)
  10001. req.ApplyOptions(opts...)
  10002. return out, req.Send()
  10003. }
  10004. var _ awserr.Error
  10005. // SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent.
  10006. //
  10007. // For testing and mocking the event stream this type should be initialized via
  10008. // the NewSelectObjectContentEventStream constructor function. Using the functional options
  10009. // to pass in nested mock behavior.
  10010. type SelectObjectContentEventStream struct {
  10011. // Reader is the EventStream reader for the SelectObjectContentEventStream
  10012. // events. This value is automatically set by the SDK when the API call is made
  10013. // Use this member when unit testing your code with the SDK to mock out the
  10014. // EventStream Reader.
  10015. //
  10016. // Must not be nil.
  10017. Reader SelectObjectContentEventStreamReader
  10018. outputReader io.ReadCloser
  10019. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  10020. // EventStream this is the response Body. The stream will be closed when
  10021. // the Close method of the EventStream is called.
  10022. StreamCloser io.Closer
  10023. done chan struct{}
  10024. closeOnce sync.Once
  10025. err *eventstreamapi.OnceError
  10026. }
  10027. // NewSelectObjectContentEventStream initializes an SelectObjectContentEventStream.
  10028. // This function should only be used for testing and mocking the SelectObjectContentEventStream
  10029. // stream within your application.
  10030. //
  10031. // The Reader member must be set before reading events from the stream.
  10032. //
  10033. // The StreamCloser member should be set to the underlying io.Closer,
  10034. // (e.g. http.Response.Body), that will be closed when the stream Close method
  10035. // is called.
  10036. //
  10037. // es := NewSelectObjectContentEventStream(func(o *SelectObjectContentEventStream){
  10038. // es.Reader = myMockStreamReader
  10039. // es.StreamCloser = myMockStreamCloser
  10040. // })
  10041. func NewSelectObjectContentEventStream(opts ...func(*SelectObjectContentEventStream)) *SelectObjectContentEventStream {
  10042. es := &SelectObjectContentEventStream{
  10043. done: make(chan struct{}),
  10044. err: eventstreamapi.NewOnceError(),
  10045. }
  10046. for _, fn := range opts {
  10047. fn(es)
  10048. }
  10049. return es
  10050. }
  10051. func (es *SelectObjectContentEventStream) setStreamCloser(r *request.Request) {
  10052. es.StreamCloser = r.HTTPResponse.Body
  10053. }
  10054. func (es *SelectObjectContentEventStream) runOnStreamPartClose(r *request.Request) {
  10055. if es.done == nil {
  10056. return
  10057. }
  10058. go es.waitStreamPartClose()
  10059. }
  10060. func (es *SelectObjectContentEventStream) waitStreamPartClose() {
  10061. var outputErrCh <-chan struct{}
  10062. if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok {
  10063. outputErrCh = v.ErrorSet()
  10064. }
  10065. var outputClosedCh <-chan struct{}
  10066. if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok {
  10067. outputClosedCh = v.Closed()
  10068. }
  10069. select {
  10070. case <-es.done:
  10071. case <-outputErrCh:
  10072. es.err.SetError(es.Reader.Err())
  10073. es.Close()
  10074. case <-outputClosedCh:
  10075. if err := es.Reader.Err(); err != nil {
  10076. es.err.SetError(es.Reader.Err())
  10077. }
  10078. es.Close()
  10079. }
  10080. }
  10081. // Events returns a channel to read events from.
  10082. //
  10083. // These events are:
  10084. //
  10085. // - ContinuationEvent
  10086. // - EndEvent
  10087. // - ProgressEvent
  10088. // - RecordsEvent
  10089. // - StatsEvent
  10090. // - SelectObjectContentEventStreamUnknownEvent
  10091. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  10092. return es.Reader.Events()
  10093. }
  10094. func (es *SelectObjectContentEventStream) runOutputStream(r *request.Request) {
  10095. var opts []func(*eventstream.Decoder)
  10096. if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) {
  10097. opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger))
  10098. }
  10099. unmarshalerForEvent := unmarshalerForSelectObjectContentEventStreamEvent{
  10100. metadata: protocol.ResponseMetadata{
  10101. StatusCode: r.HTTPResponse.StatusCode,
  10102. RequestID: r.RequestID,
  10103. },
  10104. }.UnmarshalerForEventName
  10105. decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...)
  10106. eventReader := eventstreamapi.NewEventReader(decoder,
  10107. protocol.HandlerPayloadUnmarshal{
  10108. Unmarshalers: r.Handlers.UnmarshalStream,
  10109. },
  10110. unmarshalerForEvent,
  10111. )
  10112. es.outputReader = r.HTTPResponse.Body
  10113. es.Reader = newReadSelectObjectContentEventStream(eventReader)
  10114. }
  10115. // Close closes the stream. This will also cause the stream to be closed.
  10116. // Close must be called when done using the stream API. Not calling Close
  10117. // may result in resource leaks.
  10118. //
  10119. // You can use the closing of the Reader's Events channel to terminate your
  10120. // application's read from the API's stream.
  10121. func (es *SelectObjectContentEventStream) Close() (err error) {
  10122. es.closeOnce.Do(es.safeClose)
  10123. return es.Err()
  10124. }
  10125. func (es *SelectObjectContentEventStream) safeClose() {
  10126. if es.done != nil {
  10127. close(es.done)
  10128. }
  10129. es.Reader.Close()
  10130. if es.outputReader != nil {
  10131. es.outputReader.Close()
  10132. }
  10133. es.StreamCloser.Close()
  10134. }
  10135. // Err returns any error that occurred while reading or writing EventStream
  10136. // Events from the service API's response. Returns nil if there were no errors.
  10137. func (es *SelectObjectContentEventStream) Err() error {
  10138. if err := es.err.Err(); err != nil {
  10139. return err
  10140. }
  10141. if err := es.Reader.Err(); err != nil {
  10142. return err
  10143. }
  10144. return nil
  10145. }
  10146. const opUploadPart = "UploadPart"
  10147. // UploadPartRequest generates a "aws/request.Request" representing the
  10148. // client's request for the UploadPart operation. The "output" return
  10149. // value will be populated with the request's response once the request completes
  10150. // successfully.
  10151. //
  10152. // Use "Send" method on the returned Request to send the API call to the service.
  10153. // the "output" return value is not valid until after Send returns without error.
  10154. //
  10155. // See UploadPart for more information on using the UploadPart
  10156. // API call, and error handling.
  10157. //
  10158. // This method is useful when you want to inject custom logic or configuration
  10159. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10160. //
  10161. // // Example sending a request using the UploadPartRequest method.
  10162. // req, resp := client.UploadPartRequest(params)
  10163. //
  10164. // err := req.Send()
  10165. // if err == nil { // resp is now filled
  10166. // fmt.Println(resp)
  10167. // }
  10168. //
  10169. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  10170. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  10171. op := &request.Operation{
  10172. Name: opUploadPart,
  10173. HTTPMethod: "PUT",
  10174. HTTPPath: "/{Bucket}/{Key+}",
  10175. }
  10176. if input == nil {
  10177. input = &UploadPartInput{}
  10178. }
  10179. output = &UploadPartOutput{}
  10180. req = c.newRequest(op, input, output)
  10181. return
  10182. }
  10183. // UploadPart API operation for Amazon Simple Storage Service.
  10184. //
  10185. // Uploads a part in a multipart upload.
  10186. //
  10187. // In this operation, you provide part data in your request. However, you have
  10188. // an option to specify your existing Amazon S3 object as a data source for
  10189. // the part you are uploading. To upload a part from an existing object, you
  10190. // use the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
  10191. // operation.
  10192. //
  10193. // You must initiate a multipart upload (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html))
  10194. // before you can upload any part. In response to your initiate request, Amazon
  10195. // S3 returns an upload ID, a unique identifier, that you must include in your
  10196. // upload part request.
  10197. //
  10198. // Part numbers can be any number from 1 to 10,000, inclusive. A part number
  10199. // uniquely identifies a part and also defines its position within the object
  10200. // being created. If you upload a new part using the same part number that was
  10201. // used with a previous part, the previously uploaded part is overwritten.
  10202. //
  10203. // For information about maximum and minimum part sizes and other multipart
  10204. // upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
  10205. // in the Amazon S3 User Guide.
  10206. //
  10207. // To ensure that data is not corrupted when traversing the network, specify
  10208. // the Content-MD5 header in the upload part request. Amazon S3 checks the part
  10209. // data against the provided MD5 value. If they do not match, Amazon S3 returns
  10210. // an error.
  10211. //
  10212. // If the upload request is signed with Signature Version 4, then Amazon Web
  10213. // Services S3 uses the x-amz-content-sha256 header as a checksum instead of
  10214. // Content-MD5. For more information see Authenticating Requests: Using the
  10215. // Authorization Header (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
  10216. //
  10217. // Note: After you initiate multipart upload and upload one or more parts, you
  10218. // must either complete or abort multipart upload in order to stop getting charged
  10219. // for storage of the uploaded parts. Only after you either complete or abort
  10220. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  10221. // you for the parts storage.
  10222. //
  10223. // For more information on multipart uploads, go to Multipart Upload Overview
  10224. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the
  10225. // Amazon S3 User Guide .
  10226. //
  10227. // For information on the permissions required to use the multipart upload API,
  10228. // go to Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
  10229. // in the Amazon S3 User Guide.
  10230. //
  10231. // You can optionally request server-side encryption where Amazon S3 encrypts
  10232. // your data as it writes it to disks in its data centers and decrypts it for
  10233. // you when you access it. You have the option of providing your own encryption
  10234. // key, or you can use the Amazon Web Services managed encryption keys. If you
  10235. // choose to provide your own encryption key, the request headers you provide
  10236. // in the request must match the headers you used in the request to initiate
  10237. // the upload by using CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
  10238. // For more information, go to Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
  10239. // in the Amazon S3 User Guide.
  10240. //
  10241. // Server-side encryption is supported by the S3 Multipart Upload actions. Unless
  10242. // you are using a customer-provided encryption key, you don't need to specify
  10243. // the encryption parameters in each UploadPart request. Instead, you only need
  10244. // to specify the server-side encryption parameters in the initial Initiate
  10245. // Multipart request. For more information, see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
  10246. //
  10247. // If you requested server-side encryption using a customer-provided encryption
  10248. // key in your initiate multipart upload request, you must provide identical
  10249. // encryption information in each part upload using the following headers.
  10250. //
  10251. // - x-amz-server-side-encryption-customer-algorithm
  10252. //
  10253. // - x-amz-server-side-encryption-customer-key
  10254. //
  10255. // - x-amz-server-side-encryption-customer-key-MD5
  10256. //
  10257. // Special Errors
  10258. //
  10259. // - Code: NoSuchUpload Cause: The specified multipart upload does not exist.
  10260. // The upload ID might be invalid, or the multipart upload might have been
  10261. // aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault Code
  10262. // Prefix: Client
  10263. //
  10264. // Related Resources
  10265. //
  10266. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  10267. //
  10268. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  10269. //
  10270. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  10271. //
  10272. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  10273. //
  10274. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  10275. //
  10276. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10277. // with awserr.Error's Code and Message methods to get detailed information about
  10278. // the error.
  10279. //
  10280. // See the AWS API reference guide for Amazon Simple Storage Service's
  10281. // API operation UploadPart for usage and error information.
  10282. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  10283. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  10284. req, out := c.UploadPartRequest(input)
  10285. return out, req.Send()
  10286. }
  10287. // UploadPartWithContext is the same as UploadPart with the addition of
  10288. // the ability to pass a context and additional request options.
  10289. //
  10290. // See UploadPart for details on how to use this API operation.
  10291. //
  10292. // The context must be non-nil and will be used for request cancellation. If
  10293. // the context is nil a panic will occur. In the future the SDK may create
  10294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10295. // for more information on using Contexts.
  10296. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  10297. req, out := c.UploadPartRequest(input)
  10298. req.SetContext(ctx)
  10299. req.ApplyOptions(opts...)
  10300. return out, req.Send()
  10301. }
  10302. const opUploadPartCopy = "UploadPartCopy"
  10303. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  10304. // client's request for the UploadPartCopy operation. The "output" return
  10305. // value will be populated with the request's response once the request completes
  10306. // successfully.
  10307. //
  10308. // Use "Send" method on the returned Request to send the API call to the service.
  10309. // the "output" return value is not valid until after Send returns without error.
  10310. //
  10311. // See UploadPartCopy for more information on using the UploadPartCopy
  10312. // API call, and error handling.
  10313. //
  10314. // This method is useful when you want to inject custom logic or configuration
  10315. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10316. //
  10317. // // Example sending a request using the UploadPartCopyRequest method.
  10318. // req, resp := client.UploadPartCopyRequest(params)
  10319. //
  10320. // err := req.Send()
  10321. // if err == nil { // resp is now filled
  10322. // fmt.Println(resp)
  10323. // }
  10324. //
  10325. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  10326. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  10327. op := &request.Operation{
  10328. Name: opUploadPartCopy,
  10329. HTTPMethod: "PUT",
  10330. HTTPPath: "/{Bucket}/{Key+}",
  10331. }
  10332. if input == nil {
  10333. input = &UploadPartCopyInput{}
  10334. }
  10335. output = &UploadPartCopyOutput{}
  10336. req = c.newRequest(op, input, output)
  10337. return
  10338. }
  10339. // UploadPartCopy API operation for Amazon Simple Storage Service.
  10340. //
  10341. // Uploads a part by copying data from an existing object as data source. You
  10342. // specify the data source by adding the request header x-amz-copy-source in
  10343. // your request and a byte range by adding the request header x-amz-copy-source-range
  10344. // in your request.
  10345. //
  10346. // For information about maximum and minimum part sizes and other multipart
  10347. // upload specifications, see Multipart upload limits (https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html)
  10348. // in the Amazon S3 User Guide.
  10349. //
  10350. // Instead of using an existing object as part data, you might use the UploadPart
  10351. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) action
  10352. // and provide data in your request.
  10353. //
  10354. // You must initiate a multipart upload before you can upload any part. In response
  10355. // to your initiate request. Amazon S3 returns a unique identifier, the upload
  10356. // ID, that you must include in your upload part request.
  10357. //
  10358. // For more information about using the UploadPartCopy operation, see the following:
  10359. //
  10360. // - For conceptual information about multipart uploads, see Uploading Objects
  10361. // Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
  10362. // in the Amazon S3 User Guide.
  10363. //
  10364. // - For information about permissions required to use the multipart upload
  10365. // API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
  10366. // in the Amazon S3 User Guide.
  10367. //
  10368. // - For information about copying objects using a single atomic action vs.
  10369. // a multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html)
  10370. // in the Amazon S3 User Guide.
  10371. //
  10372. // - For information about using server-side encryption with customer-provided
  10373. // encryption keys with the UploadPartCopy operation, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
  10374. // and UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
  10375. //
  10376. // Note the following additional considerations about the request headers x-amz-copy-source-if-match,
  10377. // x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and
  10378. // x-amz-copy-source-if-modified-since:
  10379. //
  10380. // - Consideration 1 - If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
  10381. // headers are present in the request as follows: x-amz-copy-source-if-match
  10382. // condition evaluates to true, and; x-amz-copy-source-if-unmodified-since
  10383. // condition evaluates to false; Amazon S3 returns 200 OK and copies the
  10384. // data.
  10385. //
  10386. // - Consideration 2 - If both of the x-amz-copy-source-if-none-match and
  10387. // x-amz-copy-source-if-modified-since headers are present in the request
  10388. // as follows: x-amz-copy-source-if-none-match condition evaluates to false,
  10389. // and; x-amz-copy-source-if-modified-since condition evaluates to true;
  10390. // Amazon S3 returns 412 Precondition Failed response code.
  10391. //
  10392. // # Versioning
  10393. //
  10394. // If your bucket has versioning enabled, you could have multiple versions of
  10395. // the same object. By default, x-amz-copy-source identifies the current version
  10396. // of the object to copy. If the current version is a delete marker and you
  10397. // don't specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404
  10398. // error, because the object does not exist. If you specify versionId in the
  10399. // x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns
  10400. // an HTTP 400 error, because you are not allowed to specify a delete marker
  10401. // as a version for the x-amz-copy-source.
  10402. //
  10403. // You can optionally specify a specific version of the source object to copy
  10404. // by adding the versionId subresource as shown in the following example:
  10405. //
  10406. // x-amz-copy-source: /bucket/object?versionId=version id
  10407. //
  10408. // Special Errors
  10409. //
  10410. // - Code: NoSuchUpload Cause: The specified multipart upload does not exist.
  10411. // The upload ID might be invalid, or the multipart upload might have been
  10412. // aborted or completed. HTTP Status Code: 404 Not Found
  10413. //
  10414. // - Code: InvalidRequest Cause: The specified copy source is not supported
  10415. // as a byte-range copy source. HTTP Status Code: 400 Bad Request
  10416. //
  10417. // Related Resources
  10418. //
  10419. // - CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
  10420. //
  10421. // - UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
  10422. //
  10423. // - CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
  10424. //
  10425. // - AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
  10426. //
  10427. // - ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
  10428. //
  10429. // - ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
  10430. //
  10431. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10432. // with awserr.Error's Code and Message methods to get detailed information about
  10433. // the error.
  10434. //
  10435. // See the AWS API reference guide for Amazon Simple Storage Service's
  10436. // API operation UploadPartCopy for usage and error information.
  10437. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  10438. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  10439. req, out := c.UploadPartCopyRequest(input)
  10440. return out, req.Send()
  10441. }
  10442. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  10443. // the ability to pass a context and additional request options.
  10444. //
  10445. // See UploadPartCopy for details on how to use this API operation.
  10446. //
  10447. // The context must be non-nil and will be used for request cancellation. If
  10448. // the context is nil a panic will occur. In the future the SDK may create
  10449. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10450. // for more information on using Contexts.
  10451. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  10452. req, out := c.UploadPartCopyRequest(input)
  10453. req.SetContext(ctx)
  10454. req.ApplyOptions(opts...)
  10455. return out, req.Send()
  10456. }
  10457. const opWriteGetObjectResponse = "WriteGetObjectResponse"
  10458. // WriteGetObjectResponseRequest generates a "aws/request.Request" representing the
  10459. // client's request for the WriteGetObjectResponse operation. The "output" return
  10460. // value will be populated with the request's response once the request completes
  10461. // successfully.
  10462. //
  10463. // Use "Send" method on the returned Request to send the API call to the service.
  10464. // the "output" return value is not valid until after Send returns without error.
  10465. //
  10466. // See WriteGetObjectResponse for more information on using the WriteGetObjectResponse
  10467. // API call, and error handling.
  10468. //
  10469. // This method is useful when you want to inject custom logic or configuration
  10470. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  10471. //
  10472. // // Example sending a request using the WriteGetObjectResponseRequest method.
  10473. // req, resp := client.WriteGetObjectResponseRequest(params)
  10474. //
  10475. // err := req.Send()
  10476. // if err == nil { // resp is now filled
  10477. // fmt.Println(resp)
  10478. // }
  10479. //
  10480. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
  10481. func (c *S3) WriteGetObjectResponseRequest(input *WriteGetObjectResponseInput) (req *request.Request, output *WriteGetObjectResponseOutput) {
  10482. op := &request.Operation{
  10483. Name: opWriteGetObjectResponse,
  10484. HTTPMethod: "POST",
  10485. HTTPPath: "/WriteGetObjectResponse",
  10486. }
  10487. if input == nil {
  10488. input = &WriteGetObjectResponseInput{}
  10489. }
  10490. output = &WriteGetObjectResponseOutput{}
  10491. req = c.newRequest(op, input, output)
  10492. req.Handlers.Sign.Remove(v4.SignRequestHandler)
  10493. handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload)
  10494. req.Handlers.Sign.PushFrontNamed(handler)
  10495. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  10496. req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{RequestRoute}.", input.hostLabels))
  10497. req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
  10498. return
  10499. }
  10500. // WriteGetObjectResponse API operation for Amazon Simple Storage Service.
  10501. //
  10502. // Passes transformed objects to a GetObject operation when using Object Lambda
  10503. // access points. For information about Object Lambda access points, see Transforming
  10504. // objects with Object Lambda access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
  10505. // in the Amazon S3 User Guide.
  10506. //
  10507. // This operation supports metadata that can be returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html),
  10508. // in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage.
  10509. // The GetObject response metadata is supported so that the WriteGetObjectResponse
  10510. // caller, typically an Lambda function, can provide the same metadata when
  10511. // it internally invokes GetObject. When WriteGetObjectResponse is called by
  10512. // a customer-owned Lambda function, the metadata returned to the end user GetObject
  10513. // call might differ from what Amazon S3 would normally return.
  10514. //
  10515. // You can include any number of metadata headers. When including a metadata
  10516. // header, it should be prefaced with x-amz-meta. For example, x-amz-meta-my-custom-header:
  10517. // MyCustomValue. The primary use case for this is to forward GetObject metadata.
  10518. //
  10519. // Amazon Web Services provides some prebuilt Lambda functions that you can
  10520. // use with S3 Object Lambda to detect and redact personally identifiable information
  10521. // (PII) and decompress S3 objects. These Lambda functions are available in
  10522. // the Amazon Web Services Serverless Application Repository, and can be selected
  10523. // through the Amazon Web Services Management Console when you create your Object
  10524. // Lambda access point.
  10525. //
  10526. // Example 1: PII Access Control - This Lambda function uses Amazon Comprehend,
  10527. // a natural language processing (NLP) service using machine learning to find
  10528. // insights and relationships in text. It automatically detects personally identifiable
  10529. // information (PII) such as names, addresses, dates, credit card numbers, and
  10530. // social security numbers from documents in your Amazon S3 bucket.
  10531. //
  10532. // Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a
  10533. // natural language processing (NLP) service using machine learning to find
  10534. // insights and relationships in text. It automatically redacts personally identifiable
  10535. // information (PII) such as names, addresses, dates, credit card numbers, and
  10536. // social security numbers from documents in your Amazon S3 bucket.
  10537. //
  10538. // Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression,
  10539. // is equipped to decompress objects stored in S3 in one of six compressed file
  10540. // formats including bzip2, gzip, snappy, zlib, zstandard and ZIP.
  10541. //
  10542. // For information on how to view and use these functions, see Using Amazon
  10543. // Web Services built Lambda functions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html)
  10544. // in the Amazon S3 User Guide.
  10545. //
  10546. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  10547. // with awserr.Error's Code and Message methods to get detailed information about
  10548. // the error.
  10549. //
  10550. // See the AWS API reference guide for Amazon Simple Storage Service's
  10551. // API operation WriteGetObjectResponse for usage and error information.
  10552. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
  10553. func (c *S3) WriteGetObjectResponse(input *WriteGetObjectResponseInput) (*WriteGetObjectResponseOutput, error) {
  10554. req, out := c.WriteGetObjectResponseRequest(input)
  10555. return out, req.Send()
  10556. }
  10557. // WriteGetObjectResponseWithContext is the same as WriteGetObjectResponse with the addition of
  10558. // the ability to pass a context and additional request options.
  10559. //
  10560. // See WriteGetObjectResponse for details on how to use this API operation.
  10561. //
  10562. // The context must be non-nil and will be used for request cancellation. If
  10563. // the context is nil a panic will occur. In the future the SDK may create
  10564. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  10565. // for more information on using Contexts.
  10566. func (c *S3) WriteGetObjectResponseWithContext(ctx aws.Context, input *WriteGetObjectResponseInput, opts ...request.Option) (*WriteGetObjectResponseOutput, error) {
  10567. req, out := c.WriteGetObjectResponseRequest(input)
  10568. req.SetContext(ctx)
  10569. req.ApplyOptions(opts...)
  10570. return out, req.Send()
  10571. }
  10572. // Specifies the days since the initiation of an incomplete multipart upload
  10573. // that Amazon S3 will wait before permanently removing all parts of the upload.
  10574. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  10575. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
  10576. // in the Amazon S3 User Guide.
  10577. type AbortIncompleteMultipartUpload struct {
  10578. _ struct{} `type:"structure"`
  10579. // Specifies the number of days after which Amazon S3 aborts an incomplete multipart
  10580. // upload.
  10581. DaysAfterInitiation *int64 `type:"integer"`
  10582. }
  10583. // String returns the string representation.
  10584. //
  10585. // API parameter values that are decorated as "sensitive" in the API will not
  10586. // be included in the string output. The member name will be present, but the
  10587. // value will be replaced with "sensitive".
  10588. func (s AbortIncompleteMultipartUpload) String() string {
  10589. return awsutil.Prettify(s)
  10590. }
  10591. // GoString returns the string representation.
  10592. //
  10593. // API parameter values that are decorated as "sensitive" in the API will not
  10594. // be included in the string output. The member name will be present, but the
  10595. // value will be replaced with "sensitive".
  10596. func (s AbortIncompleteMultipartUpload) GoString() string {
  10597. return s.String()
  10598. }
  10599. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  10600. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  10601. s.DaysAfterInitiation = &v
  10602. return s
  10603. }
  10604. type AbortMultipartUploadInput struct {
  10605. _ struct{} `locationName:"AbortMultipartUploadRequest" type:"structure"`
  10606. // The bucket name to which the upload was taking place.
  10607. //
  10608. // When using this action with an access point, you must direct requests to
  10609. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  10610. // When using this action with an access point through the Amazon Web Services
  10611. // SDKs, you provide the access point ARN in place of the bucket name. For more
  10612. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  10613. // in the Amazon S3 User Guide.
  10614. //
  10615. // When using this action with Amazon S3 on Outposts, you must direct requests
  10616. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  10617. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  10618. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  10619. // you provide the Outposts bucket ARN in place of the bucket name. For more
  10620. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  10621. // in the Amazon S3 User Guide.
  10622. //
  10623. // Bucket is a required field
  10624. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10625. // The account ID of the expected bucket owner. If the bucket is owned by a
  10626. // different account, the request fails with the HTTP status code 403 Forbidden
  10627. // (access denied).
  10628. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  10629. // Key of the object for which the multipart upload was initiated.
  10630. //
  10631. // Key is a required field
  10632. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10633. // Confirms that the requester knows that they will be charged for the request.
  10634. // Bucket owners need not specify this parameter in their requests. For information
  10635. // about downloading objects from Requester Pays buckets, see Downloading Objects
  10636. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  10637. // in the Amazon S3 User Guide.
  10638. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10639. // Upload ID that identifies the multipart upload.
  10640. //
  10641. // UploadId is a required field
  10642. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  10643. }
  10644. // String returns the string representation.
  10645. //
  10646. // API parameter values that are decorated as "sensitive" in the API will not
  10647. // be included in the string output. The member name will be present, but the
  10648. // value will be replaced with "sensitive".
  10649. func (s AbortMultipartUploadInput) String() string {
  10650. return awsutil.Prettify(s)
  10651. }
  10652. // GoString returns the string representation.
  10653. //
  10654. // API parameter values that are decorated as "sensitive" in the API will not
  10655. // be included in the string output. The member name will be present, but the
  10656. // value will be replaced with "sensitive".
  10657. func (s AbortMultipartUploadInput) GoString() string {
  10658. return s.String()
  10659. }
  10660. // Validate inspects the fields of the type to determine if they are valid.
  10661. func (s *AbortMultipartUploadInput) Validate() error {
  10662. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  10663. if s.Bucket == nil {
  10664. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10665. }
  10666. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10667. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10668. }
  10669. if s.Key == nil {
  10670. invalidParams.Add(request.NewErrParamRequired("Key"))
  10671. }
  10672. if s.Key != nil && len(*s.Key) < 1 {
  10673. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10674. }
  10675. if s.UploadId == nil {
  10676. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  10677. }
  10678. if invalidParams.Len() > 0 {
  10679. return invalidParams
  10680. }
  10681. return nil
  10682. }
  10683. // SetBucket sets the Bucket field's value.
  10684. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  10685. s.Bucket = &v
  10686. return s
  10687. }
  10688. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  10689. if s.Bucket == nil {
  10690. return v
  10691. }
  10692. return *s.Bucket
  10693. }
  10694. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  10695. func (s *AbortMultipartUploadInput) SetExpectedBucketOwner(v string) *AbortMultipartUploadInput {
  10696. s.ExpectedBucketOwner = &v
  10697. return s
  10698. }
  10699. // SetKey sets the Key field's value.
  10700. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  10701. s.Key = &v
  10702. return s
  10703. }
  10704. // SetRequestPayer sets the RequestPayer field's value.
  10705. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  10706. s.RequestPayer = &v
  10707. return s
  10708. }
  10709. // SetUploadId sets the UploadId field's value.
  10710. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  10711. s.UploadId = &v
  10712. return s
  10713. }
  10714. func (s *AbortMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
  10715. if s.Bucket == nil {
  10716. return nil, fmt.Errorf("member Bucket is nil")
  10717. }
  10718. return parseEndpointARN(*s.Bucket)
  10719. }
  10720. func (s *AbortMultipartUploadInput) hasEndpointARN() bool {
  10721. if s.Bucket == nil {
  10722. return false
  10723. }
  10724. return arn.IsARN(*s.Bucket)
  10725. }
  10726. // updateArnableField updates the value of the input field that
  10727. // takes an ARN as an input. This method is useful to backfill
  10728. // the parsed resource name from ARN into the input member.
  10729. // It returns a pointer to a modified copy of input and an error.
  10730. // Note that original input is not modified.
  10731. func (s AbortMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
  10732. if s.Bucket == nil {
  10733. return nil, fmt.Errorf("member Bucket is nil")
  10734. }
  10735. s.Bucket = aws.String(v)
  10736. return &s, nil
  10737. }
  10738. type AbortMultipartUploadOutput struct {
  10739. _ struct{} `type:"structure"`
  10740. // If present, indicates that the requester was successfully charged for the
  10741. // request.
  10742. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10743. }
  10744. // String returns the string representation.
  10745. //
  10746. // API parameter values that are decorated as "sensitive" in the API will not
  10747. // be included in the string output. The member name will be present, but the
  10748. // value will be replaced with "sensitive".
  10749. func (s AbortMultipartUploadOutput) String() string {
  10750. return awsutil.Prettify(s)
  10751. }
  10752. // GoString returns the string representation.
  10753. //
  10754. // API parameter values that are decorated as "sensitive" in the API will not
  10755. // be included in the string output. The member name will be present, but the
  10756. // value will be replaced with "sensitive".
  10757. func (s AbortMultipartUploadOutput) GoString() string {
  10758. return s.String()
  10759. }
  10760. // SetRequestCharged sets the RequestCharged field's value.
  10761. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  10762. s.RequestCharged = &v
  10763. return s
  10764. }
  10765. // Configures the transfer acceleration state for an Amazon S3 bucket. For more
  10766. // information, see Amazon S3 Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
  10767. // in the Amazon S3 User Guide.
  10768. type AccelerateConfiguration struct {
  10769. _ struct{} `type:"structure"`
  10770. // Specifies the transfer acceleration status of the bucket.
  10771. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  10772. }
  10773. // String returns the string representation.
  10774. //
  10775. // API parameter values that are decorated as "sensitive" in the API will not
  10776. // be included in the string output. The member name will be present, but the
  10777. // value will be replaced with "sensitive".
  10778. func (s AccelerateConfiguration) String() string {
  10779. return awsutil.Prettify(s)
  10780. }
  10781. // GoString returns the string representation.
  10782. //
  10783. // API parameter values that are decorated as "sensitive" in the API will not
  10784. // be included in the string output. The member name will be present, but the
  10785. // value will be replaced with "sensitive".
  10786. func (s AccelerateConfiguration) GoString() string {
  10787. return s.String()
  10788. }
  10789. // SetStatus sets the Status field's value.
  10790. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  10791. s.Status = &v
  10792. return s
  10793. }
  10794. // Contains the elements that set the ACL permissions for an object per grantee.
  10795. type AccessControlPolicy struct {
  10796. _ struct{} `type:"structure"`
  10797. // A list of grants.
  10798. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10799. // Container for the bucket owner's display name and ID.
  10800. Owner *Owner `type:"structure"`
  10801. }
  10802. // String returns the string representation.
  10803. //
  10804. // API parameter values that are decorated as "sensitive" in the API will not
  10805. // be included in the string output. The member name will be present, but the
  10806. // value will be replaced with "sensitive".
  10807. func (s AccessControlPolicy) String() string {
  10808. return awsutil.Prettify(s)
  10809. }
  10810. // GoString returns the string representation.
  10811. //
  10812. // API parameter values that are decorated as "sensitive" in the API will not
  10813. // be included in the string output. The member name will be present, but the
  10814. // value will be replaced with "sensitive".
  10815. func (s AccessControlPolicy) GoString() string {
  10816. return s.String()
  10817. }
  10818. // Validate inspects the fields of the type to determine if they are valid.
  10819. func (s *AccessControlPolicy) Validate() error {
  10820. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  10821. if s.Grants != nil {
  10822. for i, v := range s.Grants {
  10823. if v == nil {
  10824. continue
  10825. }
  10826. if err := v.Validate(); err != nil {
  10827. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  10828. }
  10829. }
  10830. }
  10831. if invalidParams.Len() > 0 {
  10832. return invalidParams
  10833. }
  10834. return nil
  10835. }
  10836. // SetGrants sets the Grants field's value.
  10837. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  10838. s.Grants = v
  10839. return s
  10840. }
  10841. // SetOwner sets the Owner field's value.
  10842. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  10843. s.Owner = v
  10844. return s
  10845. }
  10846. // A container for information about access control for replicas.
  10847. type AccessControlTranslation struct {
  10848. _ struct{} `type:"structure"`
  10849. // Specifies the replica ownership. For default and valid values, see PUT bucket
  10850. // replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
  10851. // in the Amazon S3 API Reference.
  10852. //
  10853. // Owner is a required field
  10854. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  10855. }
  10856. // String returns the string representation.
  10857. //
  10858. // API parameter values that are decorated as "sensitive" in the API will not
  10859. // be included in the string output. The member name will be present, but the
  10860. // value will be replaced with "sensitive".
  10861. func (s AccessControlTranslation) String() string {
  10862. return awsutil.Prettify(s)
  10863. }
  10864. // GoString returns the string representation.
  10865. //
  10866. // API parameter values that are decorated as "sensitive" in the API will not
  10867. // be included in the string output. The member name will be present, but the
  10868. // value will be replaced with "sensitive".
  10869. func (s AccessControlTranslation) GoString() string {
  10870. return s.String()
  10871. }
  10872. // Validate inspects the fields of the type to determine if they are valid.
  10873. func (s *AccessControlTranslation) Validate() error {
  10874. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  10875. if s.Owner == nil {
  10876. invalidParams.Add(request.NewErrParamRequired("Owner"))
  10877. }
  10878. if invalidParams.Len() > 0 {
  10879. return invalidParams
  10880. }
  10881. return nil
  10882. }
  10883. // SetOwner sets the Owner field's value.
  10884. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  10885. s.Owner = &v
  10886. return s
  10887. }
  10888. // A conjunction (logical AND) of predicates, which is used in evaluating a
  10889. // metrics filter. The operator must have at least two predicates in any combination,
  10890. // and an object must match all of the predicates for the filter to apply.
  10891. type AnalyticsAndOperator struct {
  10892. _ struct{} `type:"structure"`
  10893. // The prefix to use when evaluating an AND predicate: The prefix that an object
  10894. // must have to be included in the metrics results.
  10895. Prefix *string `type:"string"`
  10896. // The list of tags to use when evaluating an AND predicate.
  10897. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  10898. }
  10899. // String returns the string representation.
  10900. //
  10901. // API parameter values that are decorated as "sensitive" in the API will not
  10902. // be included in the string output. The member name will be present, but the
  10903. // value will be replaced with "sensitive".
  10904. func (s AnalyticsAndOperator) String() string {
  10905. return awsutil.Prettify(s)
  10906. }
  10907. // GoString returns the string representation.
  10908. //
  10909. // API parameter values that are decorated as "sensitive" in the API will not
  10910. // be included in the string output. The member name will be present, but the
  10911. // value will be replaced with "sensitive".
  10912. func (s AnalyticsAndOperator) GoString() string {
  10913. return s.String()
  10914. }
  10915. // Validate inspects the fields of the type to determine if they are valid.
  10916. func (s *AnalyticsAndOperator) Validate() error {
  10917. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  10918. if s.Tags != nil {
  10919. for i, v := range s.Tags {
  10920. if v == nil {
  10921. continue
  10922. }
  10923. if err := v.Validate(); err != nil {
  10924. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  10925. }
  10926. }
  10927. }
  10928. if invalidParams.Len() > 0 {
  10929. return invalidParams
  10930. }
  10931. return nil
  10932. }
  10933. // SetPrefix sets the Prefix field's value.
  10934. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  10935. s.Prefix = &v
  10936. return s
  10937. }
  10938. // SetTags sets the Tags field's value.
  10939. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  10940. s.Tags = v
  10941. return s
  10942. }
  10943. // Specifies the configuration and any analyses for the analytics filter of
  10944. // an Amazon S3 bucket.
  10945. type AnalyticsConfiguration struct {
  10946. _ struct{} `type:"structure"`
  10947. // The filter used to describe a set of objects for analyses. A filter must
  10948. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  10949. // If no filter is provided, all objects will be considered in any analysis.
  10950. Filter *AnalyticsFilter `type:"structure"`
  10951. // The ID that identifies the analytics configuration.
  10952. //
  10953. // Id is a required field
  10954. Id *string `type:"string" required:"true"`
  10955. // Contains data related to access patterns to be collected and made available
  10956. // to analyze the tradeoffs between different storage classes.
  10957. //
  10958. // StorageClassAnalysis is a required field
  10959. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  10960. }
  10961. // String returns the string representation.
  10962. //
  10963. // API parameter values that are decorated as "sensitive" in the API will not
  10964. // be included in the string output. The member name will be present, but the
  10965. // value will be replaced with "sensitive".
  10966. func (s AnalyticsConfiguration) String() string {
  10967. return awsutil.Prettify(s)
  10968. }
  10969. // GoString returns the string representation.
  10970. //
  10971. // API parameter values that are decorated as "sensitive" in the API will not
  10972. // be included in the string output. The member name will be present, but the
  10973. // value will be replaced with "sensitive".
  10974. func (s AnalyticsConfiguration) GoString() string {
  10975. return s.String()
  10976. }
  10977. // Validate inspects the fields of the type to determine if they are valid.
  10978. func (s *AnalyticsConfiguration) Validate() error {
  10979. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  10980. if s.Id == nil {
  10981. invalidParams.Add(request.NewErrParamRequired("Id"))
  10982. }
  10983. if s.StorageClassAnalysis == nil {
  10984. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  10985. }
  10986. if s.Filter != nil {
  10987. if err := s.Filter.Validate(); err != nil {
  10988. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  10989. }
  10990. }
  10991. if s.StorageClassAnalysis != nil {
  10992. if err := s.StorageClassAnalysis.Validate(); err != nil {
  10993. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  10994. }
  10995. }
  10996. if invalidParams.Len() > 0 {
  10997. return invalidParams
  10998. }
  10999. return nil
  11000. }
  11001. // SetFilter sets the Filter field's value.
  11002. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  11003. s.Filter = v
  11004. return s
  11005. }
  11006. // SetId sets the Id field's value.
  11007. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  11008. s.Id = &v
  11009. return s
  11010. }
  11011. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  11012. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  11013. s.StorageClassAnalysis = v
  11014. return s
  11015. }
  11016. // Where to publish the analytics results.
  11017. type AnalyticsExportDestination struct {
  11018. _ struct{} `type:"structure"`
  11019. // A destination signifying output to an S3 bucket.
  11020. //
  11021. // S3BucketDestination is a required field
  11022. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  11023. }
  11024. // String returns the string representation.
  11025. //
  11026. // API parameter values that are decorated as "sensitive" in the API will not
  11027. // be included in the string output. The member name will be present, but the
  11028. // value will be replaced with "sensitive".
  11029. func (s AnalyticsExportDestination) String() string {
  11030. return awsutil.Prettify(s)
  11031. }
  11032. // GoString returns the string representation.
  11033. //
  11034. // API parameter values that are decorated as "sensitive" in the API will not
  11035. // be included in the string output. The member name will be present, but the
  11036. // value will be replaced with "sensitive".
  11037. func (s AnalyticsExportDestination) GoString() string {
  11038. return s.String()
  11039. }
  11040. // Validate inspects the fields of the type to determine if they are valid.
  11041. func (s *AnalyticsExportDestination) Validate() error {
  11042. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  11043. if s.S3BucketDestination == nil {
  11044. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  11045. }
  11046. if s.S3BucketDestination != nil {
  11047. if err := s.S3BucketDestination.Validate(); err != nil {
  11048. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  11049. }
  11050. }
  11051. if invalidParams.Len() > 0 {
  11052. return invalidParams
  11053. }
  11054. return nil
  11055. }
  11056. // SetS3BucketDestination sets the S3BucketDestination field's value.
  11057. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  11058. s.S3BucketDestination = v
  11059. return s
  11060. }
  11061. // The filter used to describe a set of objects for analyses. A filter must
  11062. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  11063. // If no filter is provided, all objects will be considered in any analysis.
  11064. type AnalyticsFilter struct {
  11065. _ struct{} `type:"structure"`
  11066. // A conjunction (logical AND) of predicates, which is used in evaluating an
  11067. // analytics filter. The operator must have at least two predicates.
  11068. And *AnalyticsAndOperator `type:"structure"`
  11069. // The prefix to use when evaluating an analytics filter.
  11070. Prefix *string `type:"string"`
  11071. // The tag to use when evaluating an analytics filter.
  11072. Tag *Tag `type:"structure"`
  11073. }
  11074. // String returns the string representation.
  11075. //
  11076. // API parameter values that are decorated as "sensitive" in the API will not
  11077. // be included in the string output. The member name will be present, but the
  11078. // value will be replaced with "sensitive".
  11079. func (s AnalyticsFilter) String() string {
  11080. return awsutil.Prettify(s)
  11081. }
  11082. // GoString returns the string representation.
  11083. //
  11084. // API parameter values that are decorated as "sensitive" in the API will not
  11085. // be included in the string output. The member name will be present, but the
  11086. // value will be replaced with "sensitive".
  11087. func (s AnalyticsFilter) GoString() string {
  11088. return s.String()
  11089. }
  11090. // Validate inspects the fields of the type to determine if they are valid.
  11091. func (s *AnalyticsFilter) Validate() error {
  11092. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  11093. if s.And != nil {
  11094. if err := s.And.Validate(); err != nil {
  11095. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  11096. }
  11097. }
  11098. if s.Tag != nil {
  11099. if err := s.Tag.Validate(); err != nil {
  11100. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  11101. }
  11102. }
  11103. if invalidParams.Len() > 0 {
  11104. return invalidParams
  11105. }
  11106. return nil
  11107. }
  11108. // SetAnd sets the And field's value.
  11109. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  11110. s.And = v
  11111. return s
  11112. }
  11113. // SetPrefix sets the Prefix field's value.
  11114. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  11115. s.Prefix = &v
  11116. return s
  11117. }
  11118. // SetTag sets the Tag field's value.
  11119. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  11120. s.Tag = v
  11121. return s
  11122. }
  11123. // Contains information about where to publish the analytics results.
  11124. type AnalyticsS3BucketDestination struct {
  11125. _ struct{} `type:"structure"`
  11126. // The Amazon Resource Name (ARN) of the bucket to which data is exported.
  11127. //
  11128. // Bucket is a required field
  11129. Bucket *string `type:"string" required:"true"`
  11130. // The account ID that owns the destination S3 bucket. If no account ID is provided,
  11131. // the owner is not validated before exporting data.
  11132. //
  11133. // Although this value is optional, we strongly recommend that you set it to
  11134. // help prevent problems if the destination bucket ownership changes.
  11135. BucketAccountId *string `type:"string"`
  11136. // Specifies the file format used when exporting data to Amazon S3.
  11137. //
  11138. // Format is a required field
  11139. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  11140. // The prefix to use when exporting data. The prefix is prepended to all results.
  11141. Prefix *string `type:"string"`
  11142. }
  11143. // String returns the string representation.
  11144. //
  11145. // API parameter values that are decorated as "sensitive" in the API will not
  11146. // be included in the string output. The member name will be present, but the
  11147. // value will be replaced with "sensitive".
  11148. func (s AnalyticsS3BucketDestination) String() string {
  11149. return awsutil.Prettify(s)
  11150. }
  11151. // GoString returns the string representation.
  11152. //
  11153. // API parameter values that are decorated as "sensitive" in the API will not
  11154. // be included in the string output. The member name will be present, but the
  11155. // value will be replaced with "sensitive".
  11156. func (s AnalyticsS3BucketDestination) GoString() string {
  11157. return s.String()
  11158. }
  11159. // Validate inspects the fields of the type to determine if they are valid.
  11160. func (s *AnalyticsS3BucketDestination) Validate() error {
  11161. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  11162. if s.Bucket == nil {
  11163. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11164. }
  11165. if s.Format == nil {
  11166. invalidParams.Add(request.NewErrParamRequired("Format"))
  11167. }
  11168. if invalidParams.Len() > 0 {
  11169. return invalidParams
  11170. }
  11171. return nil
  11172. }
  11173. // SetBucket sets the Bucket field's value.
  11174. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  11175. s.Bucket = &v
  11176. return s
  11177. }
  11178. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  11179. if s.Bucket == nil {
  11180. return v
  11181. }
  11182. return *s.Bucket
  11183. }
  11184. // SetBucketAccountId sets the BucketAccountId field's value.
  11185. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  11186. s.BucketAccountId = &v
  11187. return s
  11188. }
  11189. // SetFormat sets the Format field's value.
  11190. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  11191. s.Format = &v
  11192. return s
  11193. }
  11194. // SetPrefix sets the Prefix field's value.
  11195. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  11196. s.Prefix = &v
  11197. return s
  11198. }
  11199. // In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name
  11200. // is globally unique, and the namespace is shared by all Amazon Web Services
  11201. // accounts.
  11202. type Bucket struct {
  11203. _ struct{} `type:"structure"`
  11204. // Date the bucket was created. This date can change when making changes to
  11205. // your bucket, such as editing its bucket policy.
  11206. CreationDate *time.Time `type:"timestamp"`
  11207. // The name of the bucket.
  11208. Name *string `type:"string"`
  11209. }
  11210. // String returns the string representation.
  11211. //
  11212. // API parameter values that are decorated as "sensitive" in the API will not
  11213. // be included in the string output. The member name will be present, but the
  11214. // value will be replaced with "sensitive".
  11215. func (s Bucket) String() string {
  11216. return awsutil.Prettify(s)
  11217. }
  11218. // GoString returns the string representation.
  11219. //
  11220. // API parameter values that are decorated as "sensitive" in the API will not
  11221. // be included in the string output. The member name will be present, but the
  11222. // value will be replaced with "sensitive".
  11223. func (s Bucket) GoString() string {
  11224. return s.String()
  11225. }
  11226. // SetCreationDate sets the CreationDate field's value.
  11227. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  11228. s.CreationDate = &v
  11229. return s
  11230. }
  11231. // SetName sets the Name field's value.
  11232. func (s *Bucket) SetName(v string) *Bucket {
  11233. s.Name = &v
  11234. return s
  11235. }
  11236. // Specifies the lifecycle configuration for objects in an Amazon S3 bucket.
  11237. // For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
  11238. // in the Amazon S3 User Guide.
  11239. type BucketLifecycleConfiguration struct {
  11240. _ struct{} `type:"structure"`
  11241. // A lifecycle rule for individual objects in an Amazon S3 bucket.
  11242. //
  11243. // Rules is a required field
  11244. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  11245. }
  11246. // String returns the string representation.
  11247. //
  11248. // API parameter values that are decorated as "sensitive" in the API will not
  11249. // be included in the string output. The member name will be present, but the
  11250. // value will be replaced with "sensitive".
  11251. func (s BucketLifecycleConfiguration) String() string {
  11252. return awsutil.Prettify(s)
  11253. }
  11254. // GoString returns the string representation.
  11255. //
  11256. // API parameter values that are decorated as "sensitive" in the API will not
  11257. // be included in the string output. The member name will be present, but the
  11258. // value will be replaced with "sensitive".
  11259. func (s BucketLifecycleConfiguration) GoString() string {
  11260. return s.String()
  11261. }
  11262. // Validate inspects the fields of the type to determine if they are valid.
  11263. func (s *BucketLifecycleConfiguration) Validate() error {
  11264. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  11265. if s.Rules == nil {
  11266. invalidParams.Add(request.NewErrParamRequired("Rules"))
  11267. }
  11268. if s.Rules != nil {
  11269. for i, v := range s.Rules {
  11270. if v == nil {
  11271. continue
  11272. }
  11273. if err := v.Validate(); err != nil {
  11274. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  11275. }
  11276. }
  11277. }
  11278. if invalidParams.Len() > 0 {
  11279. return invalidParams
  11280. }
  11281. return nil
  11282. }
  11283. // SetRules sets the Rules field's value.
  11284. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  11285. s.Rules = v
  11286. return s
  11287. }
  11288. // Container for logging status information.
  11289. type BucketLoggingStatus struct {
  11290. _ struct{} `type:"structure"`
  11291. // Describes where logs are stored and the prefix that Amazon S3 assigns to
  11292. // all log object keys for a bucket. For more information, see PUT Bucket logging
  11293. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
  11294. // in the Amazon S3 API Reference.
  11295. LoggingEnabled *LoggingEnabled `type:"structure"`
  11296. }
  11297. // String returns the string representation.
  11298. //
  11299. // API parameter values that are decorated as "sensitive" in the API will not
  11300. // be included in the string output. The member name will be present, but the
  11301. // value will be replaced with "sensitive".
  11302. func (s BucketLoggingStatus) String() string {
  11303. return awsutil.Prettify(s)
  11304. }
  11305. // GoString returns the string representation.
  11306. //
  11307. // API parameter values that are decorated as "sensitive" in the API will not
  11308. // be included in the string output. The member name will be present, but the
  11309. // value will be replaced with "sensitive".
  11310. func (s BucketLoggingStatus) GoString() string {
  11311. return s.String()
  11312. }
  11313. // Validate inspects the fields of the type to determine if they are valid.
  11314. func (s *BucketLoggingStatus) Validate() error {
  11315. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  11316. if s.LoggingEnabled != nil {
  11317. if err := s.LoggingEnabled.Validate(); err != nil {
  11318. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  11319. }
  11320. }
  11321. if invalidParams.Len() > 0 {
  11322. return invalidParams
  11323. }
  11324. return nil
  11325. }
  11326. // SetLoggingEnabled sets the LoggingEnabled field's value.
  11327. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  11328. s.LoggingEnabled = v
  11329. return s
  11330. }
  11331. // Describes the cross-origin access configuration for objects in an Amazon
  11332. // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
  11333. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
  11334. // S3 User Guide.
  11335. type CORSConfiguration struct {
  11336. _ struct{} `type:"structure"`
  11337. // A set of origins and methods (cross-origin access that you want to allow).
  11338. // You can add up to 100 rules to the configuration.
  11339. //
  11340. // CORSRules is a required field
  11341. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  11342. }
  11343. // String returns the string representation.
  11344. //
  11345. // API parameter values that are decorated as "sensitive" in the API will not
  11346. // be included in the string output. The member name will be present, but the
  11347. // value will be replaced with "sensitive".
  11348. func (s CORSConfiguration) String() string {
  11349. return awsutil.Prettify(s)
  11350. }
  11351. // GoString returns the string representation.
  11352. //
  11353. // API parameter values that are decorated as "sensitive" in the API will not
  11354. // be included in the string output. The member name will be present, but the
  11355. // value will be replaced with "sensitive".
  11356. func (s CORSConfiguration) GoString() string {
  11357. return s.String()
  11358. }
  11359. // Validate inspects the fields of the type to determine if they are valid.
  11360. func (s *CORSConfiguration) Validate() error {
  11361. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  11362. if s.CORSRules == nil {
  11363. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  11364. }
  11365. if s.CORSRules != nil {
  11366. for i, v := range s.CORSRules {
  11367. if v == nil {
  11368. continue
  11369. }
  11370. if err := v.Validate(); err != nil {
  11371. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  11372. }
  11373. }
  11374. }
  11375. if invalidParams.Len() > 0 {
  11376. return invalidParams
  11377. }
  11378. return nil
  11379. }
  11380. // SetCORSRules sets the CORSRules field's value.
  11381. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  11382. s.CORSRules = v
  11383. return s
  11384. }
  11385. // Specifies a cross-origin access rule for an Amazon S3 bucket.
  11386. type CORSRule struct {
  11387. _ struct{} `type:"structure"`
  11388. // Headers that are specified in the Access-Control-Request-Headers header.
  11389. // These headers are allowed in a preflight OPTIONS request. In response to
  11390. // any preflight OPTIONS request, Amazon S3 returns any requested headers that
  11391. // are allowed.
  11392. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  11393. // An HTTP method that you allow the origin to execute. Valid values are GET,
  11394. // PUT, HEAD, POST, and DELETE.
  11395. //
  11396. // AllowedMethods is a required field
  11397. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  11398. // One or more origins you want customers to be able to access the bucket from.
  11399. //
  11400. // AllowedOrigins is a required field
  11401. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  11402. // One or more headers in the response that you want customers to be able to
  11403. // access from their applications (for example, from a JavaScript XMLHttpRequest
  11404. // object).
  11405. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  11406. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  11407. ID *string `type:"string"`
  11408. // The time in seconds that your browser is to cache the preflight response
  11409. // for the specified resource.
  11410. MaxAgeSeconds *int64 `type:"integer"`
  11411. }
  11412. // String returns the string representation.
  11413. //
  11414. // API parameter values that are decorated as "sensitive" in the API will not
  11415. // be included in the string output. The member name will be present, but the
  11416. // value will be replaced with "sensitive".
  11417. func (s CORSRule) String() string {
  11418. return awsutil.Prettify(s)
  11419. }
  11420. // GoString returns the string representation.
  11421. //
  11422. // API parameter values that are decorated as "sensitive" in the API will not
  11423. // be included in the string output. The member name will be present, but the
  11424. // value will be replaced with "sensitive".
  11425. func (s CORSRule) GoString() string {
  11426. return s.String()
  11427. }
  11428. // Validate inspects the fields of the type to determine if they are valid.
  11429. func (s *CORSRule) Validate() error {
  11430. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  11431. if s.AllowedMethods == nil {
  11432. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  11433. }
  11434. if s.AllowedOrigins == nil {
  11435. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  11436. }
  11437. if invalidParams.Len() > 0 {
  11438. return invalidParams
  11439. }
  11440. return nil
  11441. }
  11442. // SetAllowedHeaders sets the AllowedHeaders field's value.
  11443. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  11444. s.AllowedHeaders = v
  11445. return s
  11446. }
  11447. // SetAllowedMethods sets the AllowedMethods field's value.
  11448. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  11449. s.AllowedMethods = v
  11450. return s
  11451. }
  11452. // SetAllowedOrigins sets the AllowedOrigins field's value.
  11453. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  11454. s.AllowedOrigins = v
  11455. return s
  11456. }
  11457. // SetExposeHeaders sets the ExposeHeaders field's value.
  11458. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  11459. s.ExposeHeaders = v
  11460. return s
  11461. }
  11462. // SetID sets the ID field's value.
  11463. func (s *CORSRule) SetID(v string) *CORSRule {
  11464. s.ID = &v
  11465. return s
  11466. }
  11467. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  11468. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  11469. s.MaxAgeSeconds = &v
  11470. return s
  11471. }
  11472. // Describes how an uncompressed comma-separated values (CSV)-formatted input
  11473. // object is formatted.
  11474. type CSVInput struct {
  11475. _ struct{} `type:"structure"`
  11476. // Specifies that CSV field values may contain quoted record delimiters and
  11477. // such records should be allowed. Default value is FALSE. Setting this value
  11478. // to TRUE may lower performance.
  11479. AllowQuotedRecordDelimiter *bool `type:"boolean"`
  11480. // A single character used to indicate that a row should be ignored when the
  11481. // character is present at the start of that row. You can specify any character
  11482. // to indicate a comment line.
  11483. Comments *string `type:"string"`
  11484. // A single character used to separate individual fields in a record. You can
  11485. // specify an arbitrary delimiter.
  11486. FieldDelimiter *string `type:"string"`
  11487. // Describes the first line of input. Valid values are:
  11488. //
  11489. // * NONE: First line is not a header.
  11490. //
  11491. // * IGNORE: First line is a header, but you can't use the header values
  11492. // to indicate the column in an expression. You can use column position (such
  11493. // as _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s).
  11494. //
  11495. // * Use: First line is a header, and you can use the header value to identify
  11496. // a column in an expression (SELECT "name" FROM OBJECT).
  11497. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  11498. // A single character used for escaping when the field delimiter is part of
  11499. // the value. For example, if the value is a, b, Amazon S3 wraps this field
  11500. // value in quotation marks, as follows: " a , b ".
  11501. //
  11502. // Type: String
  11503. //
  11504. // Default: "
  11505. //
  11506. // Ancestors: CSV
  11507. QuoteCharacter *string `type:"string"`
  11508. // A single character used for escaping the quotation mark character inside
  11509. // an already escaped value. For example, the value """ a , b """ is parsed
  11510. // as " a , b ".
  11511. QuoteEscapeCharacter *string `type:"string"`
  11512. // A single character used to separate individual records in the input. Instead
  11513. // of the default value, you can specify an arbitrary delimiter.
  11514. RecordDelimiter *string `type:"string"`
  11515. }
  11516. // String returns the string representation.
  11517. //
  11518. // API parameter values that are decorated as "sensitive" in the API will not
  11519. // be included in the string output. The member name will be present, but the
  11520. // value will be replaced with "sensitive".
  11521. func (s CSVInput) String() string {
  11522. return awsutil.Prettify(s)
  11523. }
  11524. // GoString returns the string representation.
  11525. //
  11526. // API parameter values that are decorated as "sensitive" in the API will not
  11527. // be included in the string output. The member name will be present, but the
  11528. // value will be replaced with "sensitive".
  11529. func (s CSVInput) GoString() string {
  11530. return s.String()
  11531. }
  11532. // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
  11533. func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
  11534. s.AllowQuotedRecordDelimiter = &v
  11535. return s
  11536. }
  11537. // SetComments sets the Comments field's value.
  11538. func (s *CSVInput) SetComments(v string) *CSVInput {
  11539. s.Comments = &v
  11540. return s
  11541. }
  11542. // SetFieldDelimiter sets the FieldDelimiter field's value.
  11543. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  11544. s.FieldDelimiter = &v
  11545. return s
  11546. }
  11547. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  11548. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  11549. s.FileHeaderInfo = &v
  11550. return s
  11551. }
  11552. // SetQuoteCharacter sets the QuoteCharacter field's value.
  11553. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  11554. s.QuoteCharacter = &v
  11555. return s
  11556. }
  11557. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  11558. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  11559. s.QuoteEscapeCharacter = &v
  11560. return s
  11561. }
  11562. // SetRecordDelimiter sets the RecordDelimiter field's value.
  11563. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  11564. s.RecordDelimiter = &v
  11565. return s
  11566. }
  11567. // Describes how uncompressed comma-separated values (CSV)-formatted results
  11568. // are formatted.
  11569. type CSVOutput struct {
  11570. _ struct{} `type:"structure"`
  11571. // The value used to separate individual fields in a record. You can specify
  11572. // an arbitrary delimiter.
  11573. FieldDelimiter *string `type:"string"`
  11574. // A single character used for escaping when the field delimiter is part of
  11575. // the value. For example, if the value is a, b, Amazon S3 wraps this field
  11576. // value in quotation marks, as follows: " a , b ".
  11577. QuoteCharacter *string `type:"string"`
  11578. // The single character used for escaping the quote character inside an already
  11579. // escaped value.
  11580. QuoteEscapeCharacter *string `type:"string"`
  11581. // Indicates whether to use quotation marks around output fields.
  11582. //
  11583. // * ALWAYS: Always use quotation marks for output fields.
  11584. //
  11585. // * ASNEEDED: Use quotation marks for output fields when needed.
  11586. QuoteFields *string `type:"string" enum:"QuoteFields"`
  11587. // A single character used to separate individual records in the output. Instead
  11588. // of the default value, you can specify an arbitrary delimiter.
  11589. RecordDelimiter *string `type:"string"`
  11590. }
  11591. // String returns the string representation.
  11592. //
  11593. // API parameter values that are decorated as "sensitive" in the API will not
  11594. // be included in the string output. The member name will be present, but the
  11595. // value will be replaced with "sensitive".
  11596. func (s CSVOutput) String() string {
  11597. return awsutil.Prettify(s)
  11598. }
  11599. // GoString returns the string representation.
  11600. //
  11601. // API parameter values that are decorated as "sensitive" in the API will not
  11602. // be included in the string output. The member name will be present, but the
  11603. // value will be replaced with "sensitive".
  11604. func (s CSVOutput) GoString() string {
  11605. return s.String()
  11606. }
  11607. // SetFieldDelimiter sets the FieldDelimiter field's value.
  11608. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  11609. s.FieldDelimiter = &v
  11610. return s
  11611. }
  11612. // SetQuoteCharacter sets the QuoteCharacter field's value.
  11613. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  11614. s.QuoteCharacter = &v
  11615. return s
  11616. }
  11617. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  11618. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  11619. s.QuoteEscapeCharacter = &v
  11620. return s
  11621. }
  11622. // SetQuoteFields sets the QuoteFields field's value.
  11623. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  11624. s.QuoteFields = &v
  11625. return s
  11626. }
  11627. // SetRecordDelimiter sets the RecordDelimiter field's value.
  11628. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  11629. s.RecordDelimiter = &v
  11630. return s
  11631. }
  11632. // Contains all the possible checksum or digest values for an object.
  11633. type Checksum struct {
  11634. _ struct{} `type:"structure"`
  11635. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  11636. // present if it was uploaded with the object. With multipart uploads, this
  11637. // may not be a checksum value of the object. For more information about how
  11638. // checksums are calculated with multipart uploads, see Checking object integrity
  11639. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  11640. // in the Amazon S3 User Guide.
  11641. ChecksumCRC32 *string `type:"string"`
  11642. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  11643. // be present if it was uploaded with the object. With multipart uploads, this
  11644. // may not be a checksum value of the object. For more information about how
  11645. // checksums are calculated with multipart uploads, see Checking object integrity
  11646. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  11647. // in the Amazon S3 User Guide.
  11648. ChecksumCRC32C *string `type:"string"`
  11649. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  11650. // present if it was uploaded with the object. With multipart uploads, this
  11651. // may not be a checksum value of the object. For more information about how
  11652. // checksums are calculated with multipart uploads, see Checking object integrity
  11653. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  11654. // in the Amazon S3 User Guide.
  11655. ChecksumSHA1 *string `type:"string"`
  11656. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  11657. // be present if it was uploaded with the object. With multipart uploads, this
  11658. // may not be a checksum value of the object. For more information about how
  11659. // checksums are calculated with multipart uploads, see Checking object integrity
  11660. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  11661. // in the Amazon S3 User Guide.
  11662. ChecksumSHA256 *string `type:"string"`
  11663. }
  11664. // String returns the string representation.
  11665. //
  11666. // API parameter values that are decorated as "sensitive" in the API will not
  11667. // be included in the string output. The member name will be present, but the
  11668. // value will be replaced with "sensitive".
  11669. func (s Checksum) String() string {
  11670. return awsutil.Prettify(s)
  11671. }
  11672. // GoString returns the string representation.
  11673. //
  11674. // API parameter values that are decorated as "sensitive" in the API will not
  11675. // be included in the string output. The member name will be present, but the
  11676. // value will be replaced with "sensitive".
  11677. func (s Checksum) GoString() string {
  11678. return s.String()
  11679. }
  11680. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  11681. func (s *Checksum) SetChecksumCRC32(v string) *Checksum {
  11682. s.ChecksumCRC32 = &v
  11683. return s
  11684. }
  11685. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  11686. func (s *Checksum) SetChecksumCRC32C(v string) *Checksum {
  11687. s.ChecksumCRC32C = &v
  11688. return s
  11689. }
  11690. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  11691. func (s *Checksum) SetChecksumSHA1(v string) *Checksum {
  11692. s.ChecksumSHA1 = &v
  11693. return s
  11694. }
  11695. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  11696. func (s *Checksum) SetChecksumSHA256(v string) *Checksum {
  11697. s.ChecksumSHA256 = &v
  11698. return s
  11699. }
  11700. // Container for specifying the Lambda notification configuration.
  11701. type CloudFunctionConfiguration struct {
  11702. _ struct{} `type:"structure"`
  11703. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  11704. // of the specified type.
  11705. CloudFunction *string `type:"string"`
  11706. // The bucket event for which to send notifications.
  11707. //
  11708. // Deprecated: Event has been deprecated
  11709. Event *string `deprecated:"true" type:"string" enum:"Event"`
  11710. // Bucket events for which to send notifications.
  11711. Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"`
  11712. // An optional unique identifier for configurations in a notification configuration.
  11713. // If you don't provide one, Amazon S3 will assign an ID.
  11714. Id *string `type:"string"`
  11715. // The role supporting the invocation of the Lambda function
  11716. InvocationRole *string `type:"string"`
  11717. }
  11718. // String returns the string representation.
  11719. //
  11720. // API parameter values that are decorated as "sensitive" in the API will not
  11721. // be included in the string output. The member name will be present, but the
  11722. // value will be replaced with "sensitive".
  11723. func (s CloudFunctionConfiguration) String() string {
  11724. return awsutil.Prettify(s)
  11725. }
  11726. // GoString returns the string representation.
  11727. //
  11728. // API parameter values that are decorated as "sensitive" in the API will not
  11729. // be included in the string output. The member name will be present, but the
  11730. // value will be replaced with "sensitive".
  11731. func (s CloudFunctionConfiguration) GoString() string {
  11732. return s.String()
  11733. }
  11734. // SetCloudFunction sets the CloudFunction field's value.
  11735. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  11736. s.CloudFunction = &v
  11737. return s
  11738. }
  11739. // SetEvent sets the Event field's value.
  11740. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  11741. s.Event = &v
  11742. return s
  11743. }
  11744. // SetEvents sets the Events field's value.
  11745. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  11746. s.Events = v
  11747. return s
  11748. }
  11749. // SetId sets the Id field's value.
  11750. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  11751. s.Id = &v
  11752. return s
  11753. }
  11754. // SetInvocationRole sets the InvocationRole field's value.
  11755. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  11756. s.InvocationRole = &v
  11757. return s
  11758. }
  11759. // Container for all (if there are any) keys between Prefix and the next occurrence
  11760. // of the string specified by a delimiter. CommonPrefixes lists keys that act
  11761. // like subdirectories in the directory specified by Prefix. For example, if
  11762. // the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july,
  11763. // the common prefix is notes/summer/.
  11764. type CommonPrefix struct {
  11765. _ struct{} `type:"structure"`
  11766. // Container for the specified common prefix.
  11767. Prefix *string `type:"string"`
  11768. }
  11769. // String returns the string representation.
  11770. //
  11771. // API parameter values that are decorated as "sensitive" in the API will not
  11772. // be included in the string output. The member name will be present, but the
  11773. // value will be replaced with "sensitive".
  11774. func (s CommonPrefix) String() string {
  11775. return awsutil.Prettify(s)
  11776. }
  11777. // GoString returns the string representation.
  11778. //
  11779. // API parameter values that are decorated as "sensitive" in the API will not
  11780. // be included in the string output. The member name will be present, but the
  11781. // value will be replaced with "sensitive".
  11782. func (s CommonPrefix) GoString() string {
  11783. return s.String()
  11784. }
  11785. // SetPrefix sets the Prefix field's value.
  11786. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  11787. s.Prefix = &v
  11788. return s
  11789. }
  11790. type CompleteMultipartUploadInput struct {
  11791. _ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"`
  11792. // Name of the bucket to which the multipart upload was initiated.
  11793. //
  11794. // When using this action with an access point, you must direct requests to
  11795. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  11796. // When using this action with an access point through the Amazon Web Services
  11797. // SDKs, you provide the access point ARN in place of the bucket name. For more
  11798. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  11799. // in the Amazon S3 User Guide.
  11800. //
  11801. // When using this action with Amazon S3 on Outposts, you must direct requests
  11802. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  11803. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  11804. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  11805. // you provide the Outposts bucket ARN in place of the bucket name. For more
  11806. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  11807. // in the Amazon S3 User Guide.
  11808. //
  11809. // Bucket is a required field
  11810. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11811. // This header can be used as a data integrity check to verify that the data
  11812. // received is the same data that was originally sent. This header specifies
  11813. // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
  11814. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  11815. // in the Amazon S3 User Guide.
  11816. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  11817. // This header can be used as a data integrity check to verify that the data
  11818. // received is the same data that was originally sent. This header specifies
  11819. // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
  11820. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  11821. // in the Amazon S3 User Guide.
  11822. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  11823. // This header can be used as a data integrity check to verify that the data
  11824. // received is the same data that was originally sent. This header specifies
  11825. // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
  11826. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  11827. // in the Amazon S3 User Guide.
  11828. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  11829. // This header can be used as a data integrity check to verify that the data
  11830. // received is the same data that was originally sent. This header specifies
  11831. // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
  11832. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  11833. // in the Amazon S3 User Guide.
  11834. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  11835. // The account ID of the expected bucket owner. If the bucket is owned by a
  11836. // different account, the request fails with the HTTP status code 403 Forbidden
  11837. // (access denied).
  11838. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  11839. // Object key for which the multipart upload was initiated.
  11840. //
  11841. // Key is a required field
  11842. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11843. // The container for the multipart upload request information.
  11844. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  11845. // Confirms that the requester knows that they will be charged for the request.
  11846. // Bucket owners need not specify this parameter in their requests. For information
  11847. // about downloading objects from Requester Pays buckets, see Downloading Objects
  11848. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  11849. // in the Amazon S3 User Guide.
  11850. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11851. // The server-side encryption (SSE) algorithm used to encrypt the object. This
  11852. // parameter is needed only when the object was created using a checksum algorithm.
  11853. // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  11854. // in the Amazon S3 User Guide.
  11855. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11856. // The server-side encryption (SSE) customer managed key. This parameter is
  11857. // needed only when the object was created using a checksum algorithm. For more
  11858. // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  11859. // in the Amazon S3 User Guide.
  11860. //
  11861. // SSECustomerKey is a sensitive parameter and its value will be
  11862. // replaced with "sensitive" in string returned by CompleteMultipartUploadInput's
  11863. // String and GoString methods.
  11864. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  11865. // The MD5 server-side encryption (SSE) customer managed key. This parameter
  11866. // is needed only when the object was created using a checksum algorithm. For
  11867. // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  11868. // in the Amazon S3 User Guide.
  11869. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11870. // ID for the initiated multipart upload.
  11871. //
  11872. // UploadId is a required field
  11873. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  11874. }
  11875. // String returns the string representation.
  11876. //
  11877. // API parameter values that are decorated as "sensitive" in the API will not
  11878. // be included in the string output. The member name will be present, but the
  11879. // value will be replaced with "sensitive".
  11880. func (s CompleteMultipartUploadInput) String() string {
  11881. return awsutil.Prettify(s)
  11882. }
  11883. // GoString returns the string representation.
  11884. //
  11885. // API parameter values that are decorated as "sensitive" in the API will not
  11886. // be included in the string output. The member name will be present, but the
  11887. // value will be replaced with "sensitive".
  11888. func (s CompleteMultipartUploadInput) GoString() string {
  11889. return s.String()
  11890. }
  11891. // Validate inspects the fields of the type to determine if they are valid.
  11892. func (s *CompleteMultipartUploadInput) Validate() error {
  11893. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  11894. if s.Bucket == nil {
  11895. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11896. }
  11897. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11898. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11899. }
  11900. if s.Key == nil {
  11901. invalidParams.Add(request.NewErrParamRequired("Key"))
  11902. }
  11903. if s.Key != nil && len(*s.Key) < 1 {
  11904. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11905. }
  11906. if s.UploadId == nil {
  11907. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  11908. }
  11909. if invalidParams.Len() > 0 {
  11910. return invalidParams
  11911. }
  11912. return nil
  11913. }
  11914. // SetBucket sets the Bucket field's value.
  11915. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  11916. s.Bucket = &v
  11917. return s
  11918. }
  11919. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  11920. if s.Bucket == nil {
  11921. return v
  11922. }
  11923. return *s.Bucket
  11924. }
  11925. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  11926. func (s *CompleteMultipartUploadInput) SetChecksumCRC32(v string) *CompleteMultipartUploadInput {
  11927. s.ChecksumCRC32 = &v
  11928. return s
  11929. }
  11930. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  11931. func (s *CompleteMultipartUploadInput) SetChecksumCRC32C(v string) *CompleteMultipartUploadInput {
  11932. s.ChecksumCRC32C = &v
  11933. return s
  11934. }
  11935. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  11936. func (s *CompleteMultipartUploadInput) SetChecksumSHA1(v string) *CompleteMultipartUploadInput {
  11937. s.ChecksumSHA1 = &v
  11938. return s
  11939. }
  11940. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  11941. func (s *CompleteMultipartUploadInput) SetChecksumSHA256(v string) *CompleteMultipartUploadInput {
  11942. s.ChecksumSHA256 = &v
  11943. return s
  11944. }
  11945. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  11946. func (s *CompleteMultipartUploadInput) SetExpectedBucketOwner(v string) *CompleteMultipartUploadInput {
  11947. s.ExpectedBucketOwner = &v
  11948. return s
  11949. }
  11950. // SetKey sets the Key field's value.
  11951. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  11952. s.Key = &v
  11953. return s
  11954. }
  11955. // SetMultipartUpload sets the MultipartUpload field's value.
  11956. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  11957. s.MultipartUpload = v
  11958. return s
  11959. }
  11960. // SetRequestPayer sets the RequestPayer field's value.
  11961. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  11962. s.RequestPayer = &v
  11963. return s
  11964. }
  11965. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11966. func (s *CompleteMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CompleteMultipartUploadInput {
  11967. s.SSECustomerAlgorithm = &v
  11968. return s
  11969. }
  11970. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11971. func (s *CompleteMultipartUploadInput) SetSSECustomerKey(v string) *CompleteMultipartUploadInput {
  11972. s.SSECustomerKey = &v
  11973. return s
  11974. }
  11975. func (s *CompleteMultipartUploadInput) getSSECustomerKey() (v string) {
  11976. if s.SSECustomerKey == nil {
  11977. return v
  11978. }
  11979. return *s.SSECustomerKey
  11980. }
  11981. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11982. func (s *CompleteMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CompleteMultipartUploadInput {
  11983. s.SSECustomerKeyMD5 = &v
  11984. return s
  11985. }
  11986. // SetUploadId sets the UploadId field's value.
  11987. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  11988. s.UploadId = &v
  11989. return s
  11990. }
  11991. func (s *CompleteMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
  11992. if s.Bucket == nil {
  11993. return nil, fmt.Errorf("member Bucket is nil")
  11994. }
  11995. return parseEndpointARN(*s.Bucket)
  11996. }
  11997. func (s *CompleteMultipartUploadInput) hasEndpointARN() bool {
  11998. if s.Bucket == nil {
  11999. return false
  12000. }
  12001. return arn.IsARN(*s.Bucket)
  12002. }
  12003. // updateArnableField updates the value of the input field that
  12004. // takes an ARN as an input. This method is useful to backfill
  12005. // the parsed resource name from ARN into the input member.
  12006. // It returns a pointer to a modified copy of input and an error.
  12007. // Note that original input is not modified.
  12008. func (s CompleteMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
  12009. if s.Bucket == nil {
  12010. return nil, fmt.Errorf("member Bucket is nil")
  12011. }
  12012. s.Bucket = aws.String(v)
  12013. return &s, nil
  12014. }
  12015. type CompleteMultipartUploadOutput struct {
  12016. _ struct{} `type:"structure"`
  12017. // The name of the bucket that contains the newly created object. Does not return
  12018. // the access point ARN or access point alias if used.
  12019. //
  12020. // When using this action with an access point, you must direct requests to
  12021. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  12022. // When using this action with an access point through the Amazon Web Services
  12023. // SDKs, you provide the access point ARN in place of the bucket name. For more
  12024. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  12025. // in the Amazon S3 User Guide.
  12026. //
  12027. // When using this action with Amazon S3 on Outposts, you must direct requests
  12028. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  12029. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  12030. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  12031. // you provide the Outposts bucket ARN in place of the bucket name. For more
  12032. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  12033. // in the Amazon S3 User Guide.
  12034. Bucket *string `type:"string"`
  12035. // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
  12036. // encryption with Amazon Web Services KMS (SSE-KMS).
  12037. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  12038. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  12039. // present if it was uploaded with the object. With multipart uploads, this
  12040. // may not be a checksum value of the object. For more information about how
  12041. // checksums are calculated with multipart uploads, see Checking object integrity
  12042. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12043. // in the Amazon S3 User Guide.
  12044. ChecksumCRC32 *string `type:"string"`
  12045. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  12046. // be present if it was uploaded with the object. With multipart uploads, this
  12047. // may not be a checksum value of the object. For more information about how
  12048. // checksums are calculated with multipart uploads, see Checking object integrity
  12049. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12050. // in the Amazon S3 User Guide.
  12051. ChecksumCRC32C *string `type:"string"`
  12052. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  12053. // present if it was uploaded with the object. With multipart uploads, this
  12054. // may not be a checksum value of the object. For more information about how
  12055. // checksums are calculated with multipart uploads, see Checking object integrity
  12056. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12057. // in the Amazon S3 User Guide.
  12058. ChecksumSHA1 *string `type:"string"`
  12059. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  12060. // be present if it was uploaded with the object. With multipart uploads, this
  12061. // may not be a checksum value of the object. For more information about how
  12062. // checksums are calculated with multipart uploads, see Checking object integrity
  12063. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12064. // in the Amazon S3 User Guide.
  12065. ChecksumSHA256 *string `type:"string"`
  12066. // Entity tag that identifies the newly created object's data. Objects with
  12067. // different object data will have different entity tags. The entity tag is
  12068. // an opaque string. The entity tag may or may not be an MD5 digest of the object
  12069. // data. If the entity tag is not an MD5 digest of the object data, it will
  12070. // contain one or more nonhexadecimal characters and/or will consist of less
  12071. // than 32 or more than 32 hexadecimal digits. For more information about how
  12072. // the entity tag is calculated, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  12073. // in the Amazon S3 User Guide.
  12074. ETag *string `type:"string"`
  12075. // If the object expiration is configured, this will contain the expiration
  12076. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL-encoded.
  12077. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  12078. // The object key of the newly created object.
  12079. Key *string `min:"1" type:"string"`
  12080. // The URI that identifies the newly created object.
  12081. Location *string `type:"string"`
  12082. // If present, indicates that the requester was successfully charged for the
  12083. // request.
  12084. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12085. // If present, specifies the ID of the Amazon Web Services Key Management Service
  12086. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  12087. // the object.
  12088. //
  12089. // SSEKMSKeyId is a sensitive parameter and its value will be
  12090. // replaced with "sensitive" in string returned by CompleteMultipartUploadOutput's
  12091. // String and GoString methods.
  12092. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12093. // If you specified server-side encryption either with an Amazon S3-managed
  12094. // encryption key or an Amazon Web Services KMS key in your initiate multipart
  12095. // upload request, the response includes this header. It confirms the encryption
  12096. // algorithm that Amazon S3 used to encrypt the object.
  12097. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12098. // Version ID of the newly created object, in case the bucket has versioning
  12099. // turned on.
  12100. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  12101. }
  12102. // String returns the string representation.
  12103. //
  12104. // API parameter values that are decorated as "sensitive" in the API will not
  12105. // be included in the string output. The member name will be present, but the
  12106. // value will be replaced with "sensitive".
  12107. func (s CompleteMultipartUploadOutput) String() string {
  12108. return awsutil.Prettify(s)
  12109. }
  12110. // GoString returns the string representation.
  12111. //
  12112. // API parameter values that are decorated as "sensitive" in the API will not
  12113. // be included in the string output. The member name will be present, but the
  12114. // value will be replaced with "sensitive".
  12115. func (s CompleteMultipartUploadOutput) GoString() string {
  12116. return s.String()
  12117. }
  12118. // SetBucket sets the Bucket field's value.
  12119. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  12120. s.Bucket = &v
  12121. return s
  12122. }
  12123. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  12124. if s.Bucket == nil {
  12125. return v
  12126. }
  12127. return *s.Bucket
  12128. }
  12129. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  12130. func (s *CompleteMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CompleteMultipartUploadOutput {
  12131. s.BucketKeyEnabled = &v
  12132. return s
  12133. }
  12134. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  12135. func (s *CompleteMultipartUploadOutput) SetChecksumCRC32(v string) *CompleteMultipartUploadOutput {
  12136. s.ChecksumCRC32 = &v
  12137. return s
  12138. }
  12139. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  12140. func (s *CompleteMultipartUploadOutput) SetChecksumCRC32C(v string) *CompleteMultipartUploadOutput {
  12141. s.ChecksumCRC32C = &v
  12142. return s
  12143. }
  12144. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  12145. func (s *CompleteMultipartUploadOutput) SetChecksumSHA1(v string) *CompleteMultipartUploadOutput {
  12146. s.ChecksumSHA1 = &v
  12147. return s
  12148. }
  12149. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  12150. func (s *CompleteMultipartUploadOutput) SetChecksumSHA256(v string) *CompleteMultipartUploadOutput {
  12151. s.ChecksumSHA256 = &v
  12152. return s
  12153. }
  12154. // SetETag sets the ETag field's value.
  12155. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  12156. s.ETag = &v
  12157. return s
  12158. }
  12159. // SetExpiration sets the Expiration field's value.
  12160. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  12161. s.Expiration = &v
  12162. return s
  12163. }
  12164. // SetKey sets the Key field's value.
  12165. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  12166. s.Key = &v
  12167. return s
  12168. }
  12169. // SetLocation sets the Location field's value.
  12170. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  12171. s.Location = &v
  12172. return s
  12173. }
  12174. // SetRequestCharged sets the RequestCharged field's value.
  12175. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  12176. s.RequestCharged = &v
  12177. return s
  12178. }
  12179. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12180. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  12181. s.SSEKMSKeyId = &v
  12182. return s
  12183. }
  12184. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12185. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  12186. s.ServerSideEncryption = &v
  12187. return s
  12188. }
  12189. // SetVersionId sets the VersionId field's value.
  12190. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  12191. s.VersionId = &v
  12192. return s
  12193. }
  12194. // The container for the completed multipart upload details.
  12195. type CompletedMultipartUpload struct {
  12196. _ struct{} `type:"structure"`
  12197. // Array of CompletedPart data types.
  12198. //
  12199. // If you do not supply a valid Part with your request, the service sends back
  12200. // an HTTP 400 response.
  12201. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  12202. }
  12203. // String returns the string representation.
  12204. //
  12205. // API parameter values that are decorated as "sensitive" in the API will not
  12206. // be included in the string output. The member name will be present, but the
  12207. // value will be replaced with "sensitive".
  12208. func (s CompletedMultipartUpload) String() string {
  12209. return awsutil.Prettify(s)
  12210. }
  12211. // GoString returns the string representation.
  12212. //
  12213. // API parameter values that are decorated as "sensitive" in the API will not
  12214. // be included in the string output. The member name will be present, but the
  12215. // value will be replaced with "sensitive".
  12216. func (s CompletedMultipartUpload) GoString() string {
  12217. return s.String()
  12218. }
  12219. // SetParts sets the Parts field's value.
  12220. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  12221. s.Parts = v
  12222. return s
  12223. }
  12224. // Details of the parts that were uploaded.
  12225. type CompletedPart struct {
  12226. _ struct{} `type:"structure"`
  12227. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  12228. // present if it was uploaded with the object. With multipart uploads, this
  12229. // may not be a checksum value of the object. For more information about how
  12230. // checksums are calculated with multipart uploads, see Checking object integrity
  12231. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12232. // in the Amazon S3 User Guide.
  12233. ChecksumCRC32 *string `type:"string"`
  12234. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  12235. // be present if it was uploaded with the object. With multipart uploads, this
  12236. // may not be a checksum value of the object. For more information about how
  12237. // checksums are calculated with multipart uploads, see Checking object integrity
  12238. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12239. // in the Amazon S3 User Guide.
  12240. ChecksumCRC32C *string `type:"string"`
  12241. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  12242. // present if it was uploaded with the object. With multipart uploads, this
  12243. // may not be a checksum value of the object. For more information about how
  12244. // checksums are calculated with multipart uploads, see Checking object integrity
  12245. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12246. // in the Amazon S3 User Guide.
  12247. ChecksumSHA1 *string `type:"string"`
  12248. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  12249. // be present if it was uploaded with the object. With multipart uploads, this
  12250. // may not be a checksum value of the object. For more information about how
  12251. // checksums are calculated with multipart uploads, see Checking object integrity
  12252. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  12253. // in the Amazon S3 User Guide.
  12254. ChecksumSHA256 *string `type:"string"`
  12255. // Entity tag returned when the part was uploaded.
  12256. ETag *string `type:"string"`
  12257. // Part number that identifies the part. This is a positive integer between
  12258. // 1 and 10,000.
  12259. PartNumber *int64 `type:"integer"`
  12260. }
  12261. // String returns the string representation.
  12262. //
  12263. // API parameter values that are decorated as "sensitive" in the API will not
  12264. // be included in the string output. The member name will be present, but the
  12265. // value will be replaced with "sensitive".
  12266. func (s CompletedPart) String() string {
  12267. return awsutil.Prettify(s)
  12268. }
  12269. // GoString returns the string representation.
  12270. //
  12271. // API parameter values that are decorated as "sensitive" in the API will not
  12272. // be included in the string output. The member name will be present, but the
  12273. // value will be replaced with "sensitive".
  12274. func (s CompletedPart) GoString() string {
  12275. return s.String()
  12276. }
  12277. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  12278. func (s *CompletedPart) SetChecksumCRC32(v string) *CompletedPart {
  12279. s.ChecksumCRC32 = &v
  12280. return s
  12281. }
  12282. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  12283. func (s *CompletedPart) SetChecksumCRC32C(v string) *CompletedPart {
  12284. s.ChecksumCRC32C = &v
  12285. return s
  12286. }
  12287. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  12288. func (s *CompletedPart) SetChecksumSHA1(v string) *CompletedPart {
  12289. s.ChecksumSHA1 = &v
  12290. return s
  12291. }
  12292. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  12293. func (s *CompletedPart) SetChecksumSHA256(v string) *CompletedPart {
  12294. s.ChecksumSHA256 = &v
  12295. return s
  12296. }
  12297. // SetETag sets the ETag field's value.
  12298. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  12299. s.ETag = &v
  12300. return s
  12301. }
  12302. // SetPartNumber sets the PartNumber field's value.
  12303. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  12304. s.PartNumber = &v
  12305. return s
  12306. }
  12307. // A container for describing a condition that must be met for the specified
  12308. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  12309. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  12310. // redirect request to another host where you might process the error.
  12311. type Condition struct {
  12312. _ struct{} `type:"structure"`
  12313. // The HTTP error code when the redirect is applied. In the event of an error,
  12314. // if the error code equals this value, then the specified redirect is applied.
  12315. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  12316. // is not specified. If both are specified, then both must be true for the redirect
  12317. // to be applied.
  12318. HttpErrorCodeReturnedEquals *string `type:"string"`
  12319. // The object key name prefix when the redirect is applied. For example, to
  12320. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  12321. // To redirect request for all pages with the prefix docs/, the key prefix will
  12322. // be /docs, which identifies all objects in the docs/ folder. Required when
  12323. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  12324. // is not specified. If both conditions are specified, both must be true for
  12325. // the redirect to be applied.
  12326. //
  12327. // Replacement must be made for object keys containing special characters (such
  12328. // as carriage returns) when using XML requests. For more information, see XML
  12329. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  12330. KeyPrefixEquals *string `type:"string"`
  12331. }
  12332. // String returns the string representation.
  12333. //
  12334. // API parameter values that are decorated as "sensitive" in the API will not
  12335. // be included in the string output. The member name will be present, but the
  12336. // value will be replaced with "sensitive".
  12337. func (s Condition) String() string {
  12338. return awsutil.Prettify(s)
  12339. }
  12340. // GoString returns the string representation.
  12341. //
  12342. // API parameter values that are decorated as "sensitive" in the API will not
  12343. // be included in the string output. The member name will be present, but the
  12344. // value will be replaced with "sensitive".
  12345. func (s Condition) GoString() string {
  12346. return s.String()
  12347. }
  12348. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  12349. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  12350. s.HttpErrorCodeReturnedEquals = &v
  12351. return s
  12352. }
  12353. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  12354. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  12355. s.KeyPrefixEquals = &v
  12356. return s
  12357. }
  12358. type ContinuationEvent struct {
  12359. _ struct{} `locationName:"ContinuationEvent" type:"structure"`
  12360. }
  12361. // String returns the string representation.
  12362. //
  12363. // API parameter values that are decorated as "sensitive" in the API will not
  12364. // be included in the string output. The member name will be present, but the
  12365. // value will be replaced with "sensitive".
  12366. func (s ContinuationEvent) String() string {
  12367. return awsutil.Prettify(s)
  12368. }
  12369. // GoString returns the string representation.
  12370. //
  12371. // API parameter values that are decorated as "sensitive" in the API will not
  12372. // be included in the string output. The member name will be present, but the
  12373. // value will be replaced with "sensitive".
  12374. func (s ContinuationEvent) GoString() string {
  12375. return s.String()
  12376. }
  12377. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  12378. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  12379. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  12380. // This method is only used internally within the SDK's EventStream handling.
  12381. func (s *ContinuationEvent) UnmarshalEvent(
  12382. payloadUnmarshaler protocol.PayloadUnmarshaler,
  12383. msg eventstream.Message,
  12384. ) error {
  12385. return nil
  12386. }
  12387. // MarshalEvent marshals the type into an stream event value. This method
  12388. // should only used internally within the SDK's EventStream handling.
  12389. func (s *ContinuationEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  12390. msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  12391. return msg, err
  12392. }
  12393. type CopyObjectInput struct {
  12394. _ struct{} `locationName:"CopyObjectRequest" type:"structure"`
  12395. // The canned ACL to apply to the object.
  12396. //
  12397. // This action is not supported by Amazon S3 on Outposts.
  12398. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  12399. // The name of the destination bucket.
  12400. //
  12401. // When using this action with an access point, you must direct requests to
  12402. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  12403. // When using this action with an access point through the Amazon Web Services
  12404. // SDKs, you provide the access point ARN in place of the bucket name. For more
  12405. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  12406. // in the Amazon S3 User Guide.
  12407. //
  12408. // When using this action with Amazon S3 on Outposts, you must direct requests
  12409. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  12410. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  12411. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  12412. // you provide the Outposts bucket ARN in place of the bucket name. For more
  12413. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  12414. // in the Amazon S3 User Guide.
  12415. //
  12416. // Bucket is a required field
  12417. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12418. // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
  12419. // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
  12420. // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
  12421. // SSE-KMS.
  12422. //
  12423. // Specifying this header with a COPY action doesn’t affect bucket-level settings
  12424. // for S3 Bucket Key.
  12425. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  12426. // Specifies caching behavior along the request/reply chain.
  12427. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  12428. // Indicates the algorithm you want Amazon S3 to use to create the checksum
  12429. // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  12430. // in the Amazon S3 User Guide.
  12431. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  12432. // Specifies presentational information for the object.
  12433. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  12434. // Specifies what content encodings have been applied to the object and thus
  12435. // what decoding mechanisms must be applied to obtain the media-type referenced
  12436. // by the Content-Type header field.
  12437. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  12438. // The language the content is in.
  12439. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  12440. // A standard MIME type describing the format of the object data.
  12441. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  12442. // Specifies the source object for the copy operation. You specify the value
  12443. // in one of two formats, depending on whether you want to access the source
  12444. // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
  12445. //
  12446. // * For objects not accessed through an access point, specify the name of
  12447. // the source bucket and the key of the source object, separated by a slash
  12448. // (/). For example, to copy the object reports/january.pdf from the bucket
  12449. // awsexamplebucket, use awsexamplebucket/reports/january.pdf. The value
  12450. // must be URL-encoded.
  12451. //
  12452. // * For objects accessed through access points, specify the Amazon Resource
  12453. // Name (ARN) of the object as accessed through the access point, in the
  12454. // format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>.
  12455. // For example, to copy the object reports/january.pdf through access point
  12456. // my-access-point owned by account 123456789012 in Region us-west-2, use
  12457. // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
  12458. // The value must be URL encoded. Amazon S3 supports copy operations using
  12459. // access points only when the source and destination buckets are in the
  12460. // same Amazon Web Services Region. Alternatively, for objects accessed through
  12461. // Amazon S3 on Outposts, specify the ARN of the object as accessed in the
  12462. // format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>.
  12463. // For example, to copy the object reports/january.pdf through outpost my-outpost
  12464. // owned by account 123456789012 in Region us-west-2, use the URL encoding
  12465. // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
  12466. // The value must be URL-encoded.
  12467. //
  12468. // To copy a specific version of an object, append ?versionId=<version-id> to
  12469. // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
  12470. // If you don't specify a version ID, Amazon S3 copies the latest version of
  12471. // the source object.
  12472. //
  12473. // CopySource is a required field
  12474. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  12475. // Copies the object if its entity tag (ETag) matches the specified tag.
  12476. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  12477. // Copies the object if it has been modified since the specified time.
  12478. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  12479. // Copies the object if its entity tag (ETag) is different than the specified
  12480. // ETag.
  12481. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  12482. // Copies the object if it hasn't been modified since the specified time.
  12483. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  12484. // Specifies the algorithm to use when decrypting the source object (for example,
  12485. // AES256).
  12486. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  12487. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  12488. // the source object. The encryption key provided in this header must be one
  12489. // that was used when the source object was created.
  12490. //
  12491. // CopySourceSSECustomerKey is a sensitive parameter and its value will be
  12492. // replaced with "sensitive" in string returned by CopyObjectInput's
  12493. // String and GoString methods.
  12494. CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  12495. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  12496. // Amazon S3 uses this header for a message integrity check to ensure that the
  12497. // encryption key was transmitted without error.
  12498. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  12499. // The account ID of the expected destination bucket owner. If the destination
  12500. // bucket is owned by a different account, the request fails with the HTTP status
  12501. // code 403 Forbidden (access denied).
  12502. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  12503. // The account ID of the expected source bucket owner. If the source bucket
  12504. // is owned by a different account, the request fails with the HTTP status code
  12505. // 403 Forbidden (access denied).
  12506. ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`
  12507. // The date and time at which the object is no longer cacheable.
  12508. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  12509. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  12510. //
  12511. // This action is not supported by Amazon S3 on Outposts.
  12512. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  12513. // Allows grantee to read the object data and its metadata.
  12514. //
  12515. // This action is not supported by Amazon S3 on Outposts.
  12516. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  12517. // Allows grantee to read the object ACL.
  12518. //
  12519. // This action is not supported by Amazon S3 on Outposts.
  12520. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  12521. // Allows grantee to write the ACL for the applicable object.
  12522. //
  12523. // This action is not supported by Amazon S3 on Outposts.
  12524. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  12525. // The key of the destination object.
  12526. //
  12527. // Key is a required field
  12528. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12529. // A map of metadata to store with the object in S3.
  12530. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  12531. // Specifies whether the metadata is copied from the source object or replaced
  12532. // with metadata provided in the request.
  12533. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  12534. // Specifies whether you want to apply a legal hold to the copied object.
  12535. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  12536. // The Object Lock mode that you want to apply to the copied object.
  12537. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  12538. // The date and time when you want the copied object's Object Lock to expire.
  12539. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  12540. // Confirms that the requester knows that they will be charged for the request.
  12541. // Bucket owners need not specify this parameter in their requests. For information
  12542. // about downloading objects from Requester Pays buckets, see Downloading Objects
  12543. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  12544. // in the Amazon S3 User Guide.
  12545. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12546. // Specifies the algorithm to use to when encrypting the object (for example,
  12547. // AES256).
  12548. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12549. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  12550. // data. This value is used to store the object and then it is discarded; Amazon
  12551. // S3 does not store the encryption key. The key must be appropriate for use
  12552. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  12553. // header.
  12554. //
  12555. // SSECustomerKey is a sensitive parameter and its value will be
  12556. // replaced with "sensitive" in string returned by CopyObjectInput's
  12557. // String and GoString methods.
  12558. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  12559. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  12560. // Amazon S3 uses this header for a message integrity check to ensure that the
  12561. // encryption key was transmitted without error.
  12562. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12563. // Specifies the Amazon Web Services KMS Encryption Context to use for object
  12564. // encryption. The value of this header is a base64-encoded UTF-8 string holding
  12565. // JSON with the encryption context key-value pairs.
  12566. //
  12567. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  12568. // replaced with "sensitive" in string returned by CopyObjectInput's
  12569. // String and GoString methods.
  12570. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  12571. // Specifies the Amazon Web Services KMS key ID to use for object encryption.
  12572. // All GET and PUT requests for an object protected by Amazon Web Services KMS
  12573. // will fail if not made via SSL or using SigV4. For information about configuring
  12574. // using any of the officially supported Amazon Web Services SDKs and Amazon
  12575. // Web Services CLI, see Specifying the Signature Version in Request Authentication
  12576. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
  12577. // in the Amazon S3 User Guide.
  12578. //
  12579. // SSEKMSKeyId is a sensitive parameter and its value will be
  12580. // replaced with "sensitive" in string returned by CopyObjectInput's
  12581. // String and GoString methods.
  12582. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12583. // The server-side encryption algorithm used when storing this object in Amazon
  12584. // S3 (for example, AES256, aws:kms).
  12585. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12586. // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
  12587. // objects. The STANDARD storage class provides high durability and high availability.
  12588. // Depending on performance needs, you can specify a different Storage Class.
  12589. // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
  12590. // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
  12591. // in the Amazon S3 User Guide.
  12592. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  12593. // The tag-set for the object destination object this value must be used in
  12594. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  12595. // Query parameters.
  12596. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  12597. // Specifies whether the object tag-set are copied from the source object or
  12598. // replaced with tag-set provided in the request.
  12599. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  12600. // If the bucket is configured as a website, redirects requests for this object
  12601. // to another object in the same bucket or to an external URL. Amazon S3 stores
  12602. // the value of this header in the object metadata.
  12603. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  12604. }
  12605. // String returns the string representation.
  12606. //
  12607. // API parameter values that are decorated as "sensitive" in the API will not
  12608. // be included in the string output. The member name will be present, but the
  12609. // value will be replaced with "sensitive".
  12610. func (s CopyObjectInput) String() string {
  12611. return awsutil.Prettify(s)
  12612. }
  12613. // GoString returns the string representation.
  12614. //
  12615. // API parameter values that are decorated as "sensitive" in the API will not
  12616. // be included in the string output. The member name will be present, but the
  12617. // value will be replaced with "sensitive".
  12618. func (s CopyObjectInput) GoString() string {
  12619. return s.String()
  12620. }
  12621. // Validate inspects the fields of the type to determine if they are valid.
  12622. func (s *CopyObjectInput) Validate() error {
  12623. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  12624. if s.Bucket == nil {
  12625. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12626. }
  12627. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12628. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12629. }
  12630. if s.CopySource == nil {
  12631. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  12632. }
  12633. if s.Key == nil {
  12634. invalidParams.Add(request.NewErrParamRequired("Key"))
  12635. }
  12636. if s.Key != nil && len(*s.Key) < 1 {
  12637. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12638. }
  12639. if invalidParams.Len() > 0 {
  12640. return invalidParams
  12641. }
  12642. return nil
  12643. }
  12644. // SetACL sets the ACL field's value.
  12645. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  12646. s.ACL = &v
  12647. return s
  12648. }
  12649. // SetBucket sets the Bucket field's value.
  12650. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  12651. s.Bucket = &v
  12652. return s
  12653. }
  12654. func (s *CopyObjectInput) getBucket() (v string) {
  12655. if s.Bucket == nil {
  12656. return v
  12657. }
  12658. return *s.Bucket
  12659. }
  12660. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  12661. func (s *CopyObjectInput) SetBucketKeyEnabled(v bool) *CopyObjectInput {
  12662. s.BucketKeyEnabled = &v
  12663. return s
  12664. }
  12665. // SetCacheControl sets the CacheControl field's value.
  12666. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  12667. s.CacheControl = &v
  12668. return s
  12669. }
  12670. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  12671. func (s *CopyObjectInput) SetChecksumAlgorithm(v string) *CopyObjectInput {
  12672. s.ChecksumAlgorithm = &v
  12673. return s
  12674. }
  12675. // SetContentDisposition sets the ContentDisposition field's value.
  12676. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  12677. s.ContentDisposition = &v
  12678. return s
  12679. }
  12680. // SetContentEncoding sets the ContentEncoding field's value.
  12681. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  12682. s.ContentEncoding = &v
  12683. return s
  12684. }
  12685. // SetContentLanguage sets the ContentLanguage field's value.
  12686. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  12687. s.ContentLanguage = &v
  12688. return s
  12689. }
  12690. // SetContentType sets the ContentType field's value.
  12691. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  12692. s.ContentType = &v
  12693. return s
  12694. }
  12695. // SetCopySource sets the CopySource field's value.
  12696. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  12697. s.CopySource = &v
  12698. return s
  12699. }
  12700. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  12701. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  12702. s.CopySourceIfMatch = &v
  12703. return s
  12704. }
  12705. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  12706. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  12707. s.CopySourceIfModifiedSince = &v
  12708. return s
  12709. }
  12710. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  12711. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  12712. s.CopySourceIfNoneMatch = &v
  12713. return s
  12714. }
  12715. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  12716. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  12717. s.CopySourceIfUnmodifiedSince = &v
  12718. return s
  12719. }
  12720. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  12721. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  12722. s.CopySourceSSECustomerAlgorithm = &v
  12723. return s
  12724. }
  12725. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  12726. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  12727. s.CopySourceSSECustomerKey = &v
  12728. return s
  12729. }
  12730. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  12731. if s.CopySourceSSECustomerKey == nil {
  12732. return v
  12733. }
  12734. return *s.CopySourceSSECustomerKey
  12735. }
  12736. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  12737. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  12738. s.CopySourceSSECustomerKeyMD5 = &v
  12739. return s
  12740. }
  12741. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  12742. func (s *CopyObjectInput) SetExpectedBucketOwner(v string) *CopyObjectInput {
  12743. s.ExpectedBucketOwner = &v
  12744. return s
  12745. }
  12746. // SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
  12747. func (s *CopyObjectInput) SetExpectedSourceBucketOwner(v string) *CopyObjectInput {
  12748. s.ExpectedSourceBucketOwner = &v
  12749. return s
  12750. }
  12751. // SetExpires sets the Expires field's value.
  12752. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  12753. s.Expires = &v
  12754. return s
  12755. }
  12756. // SetGrantFullControl sets the GrantFullControl field's value.
  12757. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  12758. s.GrantFullControl = &v
  12759. return s
  12760. }
  12761. // SetGrantRead sets the GrantRead field's value.
  12762. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  12763. s.GrantRead = &v
  12764. return s
  12765. }
  12766. // SetGrantReadACP sets the GrantReadACP field's value.
  12767. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  12768. s.GrantReadACP = &v
  12769. return s
  12770. }
  12771. // SetGrantWriteACP sets the GrantWriteACP field's value.
  12772. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  12773. s.GrantWriteACP = &v
  12774. return s
  12775. }
  12776. // SetKey sets the Key field's value.
  12777. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  12778. s.Key = &v
  12779. return s
  12780. }
  12781. // SetMetadata sets the Metadata field's value.
  12782. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  12783. s.Metadata = v
  12784. return s
  12785. }
  12786. // SetMetadataDirective sets the MetadataDirective field's value.
  12787. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  12788. s.MetadataDirective = &v
  12789. return s
  12790. }
  12791. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  12792. func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
  12793. s.ObjectLockLegalHoldStatus = &v
  12794. return s
  12795. }
  12796. // SetObjectLockMode sets the ObjectLockMode field's value.
  12797. func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
  12798. s.ObjectLockMode = &v
  12799. return s
  12800. }
  12801. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  12802. func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
  12803. s.ObjectLockRetainUntilDate = &v
  12804. return s
  12805. }
  12806. // SetRequestPayer sets the RequestPayer field's value.
  12807. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  12808. s.RequestPayer = &v
  12809. return s
  12810. }
  12811. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12812. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  12813. s.SSECustomerAlgorithm = &v
  12814. return s
  12815. }
  12816. // SetSSECustomerKey sets the SSECustomerKey field's value.
  12817. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  12818. s.SSECustomerKey = &v
  12819. return s
  12820. }
  12821. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  12822. if s.SSECustomerKey == nil {
  12823. return v
  12824. }
  12825. return *s.SSECustomerKey
  12826. }
  12827. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12828. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  12829. s.SSECustomerKeyMD5 = &v
  12830. return s
  12831. }
  12832. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  12833. func (s *CopyObjectInput) SetSSEKMSEncryptionContext(v string) *CopyObjectInput {
  12834. s.SSEKMSEncryptionContext = &v
  12835. return s
  12836. }
  12837. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12838. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  12839. s.SSEKMSKeyId = &v
  12840. return s
  12841. }
  12842. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12843. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  12844. s.ServerSideEncryption = &v
  12845. return s
  12846. }
  12847. // SetStorageClass sets the StorageClass field's value.
  12848. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  12849. s.StorageClass = &v
  12850. return s
  12851. }
  12852. // SetTagging sets the Tagging field's value.
  12853. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  12854. s.Tagging = &v
  12855. return s
  12856. }
  12857. // SetTaggingDirective sets the TaggingDirective field's value.
  12858. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  12859. s.TaggingDirective = &v
  12860. return s
  12861. }
  12862. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  12863. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  12864. s.WebsiteRedirectLocation = &v
  12865. return s
  12866. }
  12867. func (s *CopyObjectInput) getEndpointARN() (arn.Resource, error) {
  12868. if s.Bucket == nil {
  12869. return nil, fmt.Errorf("member Bucket is nil")
  12870. }
  12871. return parseEndpointARN(*s.Bucket)
  12872. }
  12873. func (s *CopyObjectInput) hasEndpointARN() bool {
  12874. if s.Bucket == nil {
  12875. return false
  12876. }
  12877. return arn.IsARN(*s.Bucket)
  12878. }
  12879. // updateArnableField updates the value of the input field that
  12880. // takes an ARN as an input. This method is useful to backfill
  12881. // the parsed resource name from ARN into the input member.
  12882. // It returns a pointer to a modified copy of input and an error.
  12883. // Note that original input is not modified.
  12884. func (s CopyObjectInput) updateArnableField(v string) (interface{}, error) {
  12885. if s.Bucket == nil {
  12886. return nil, fmt.Errorf("member Bucket is nil")
  12887. }
  12888. s.Bucket = aws.String(v)
  12889. return &s, nil
  12890. }
  12891. type CopyObjectOutput struct {
  12892. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  12893. // Indicates whether the copied object uses an S3 Bucket Key for server-side
  12894. // encryption with Amazon Web Services KMS (SSE-KMS).
  12895. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  12896. // Container for all response elements.
  12897. CopyObjectResult *CopyObjectResult `type:"structure"`
  12898. // Version of the copied object in the destination bucket.
  12899. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  12900. // If the object expiration is configured, the response includes this header.
  12901. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  12902. // If present, indicates that the requester was successfully charged for the
  12903. // request.
  12904. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12905. // If server-side encryption with a customer-provided encryption key was requested,
  12906. // the response will include this header confirming the encryption algorithm
  12907. // used.
  12908. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12909. // If server-side encryption with a customer-provided encryption key was requested,
  12910. // the response will include this header to provide round-trip message integrity
  12911. // verification of the customer-provided encryption key.
  12912. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12913. // If present, specifies the Amazon Web Services KMS Encryption Context to use
  12914. // for object encryption. The value of this header is a base64-encoded UTF-8
  12915. // string holding JSON with the encryption context key-value pairs.
  12916. //
  12917. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  12918. // replaced with "sensitive" in string returned by CopyObjectOutput's
  12919. // String and GoString methods.
  12920. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  12921. // If present, specifies the ID of the Amazon Web Services Key Management Service
  12922. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  12923. // the object.
  12924. //
  12925. // SSEKMSKeyId is a sensitive parameter and its value will be
  12926. // replaced with "sensitive" in string returned by CopyObjectOutput's
  12927. // String and GoString methods.
  12928. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12929. // The server-side encryption algorithm used when storing this object in Amazon
  12930. // S3 (for example, AES256, aws:kms).
  12931. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12932. // Version ID of the newly created copy.
  12933. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  12934. }
  12935. // String returns the string representation.
  12936. //
  12937. // API parameter values that are decorated as "sensitive" in the API will not
  12938. // be included in the string output. The member name will be present, but the
  12939. // value will be replaced with "sensitive".
  12940. func (s CopyObjectOutput) String() string {
  12941. return awsutil.Prettify(s)
  12942. }
  12943. // GoString returns the string representation.
  12944. //
  12945. // API parameter values that are decorated as "sensitive" in the API will not
  12946. // be included in the string output. The member name will be present, but the
  12947. // value will be replaced with "sensitive".
  12948. func (s CopyObjectOutput) GoString() string {
  12949. return s.String()
  12950. }
  12951. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  12952. func (s *CopyObjectOutput) SetBucketKeyEnabled(v bool) *CopyObjectOutput {
  12953. s.BucketKeyEnabled = &v
  12954. return s
  12955. }
  12956. // SetCopyObjectResult sets the CopyObjectResult field's value.
  12957. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  12958. s.CopyObjectResult = v
  12959. return s
  12960. }
  12961. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  12962. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  12963. s.CopySourceVersionId = &v
  12964. return s
  12965. }
  12966. // SetExpiration sets the Expiration field's value.
  12967. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  12968. s.Expiration = &v
  12969. return s
  12970. }
  12971. // SetRequestCharged sets the RequestCharged field's value.
  12972. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  12973. s.RequestCharged = &v
  12974. return s
  12975. }
  12976. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12977. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  12978. s.SSECustomerAlgorithm = &v
  12979. return s
  12980. }
  12981. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12982. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  12983. s.SSECustomerKeyMD5 = &v
  12984. return s
  12985. }
  12986. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  12987. func (s *CopyObjectOutput) SetSSEKMSEncryptionContext(v string) *CopyObjectOutput {
  12988. s.SSEKMSEncryptionContext = &v
  12989. return s
  12990. }
  12991. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12992. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  12993. s.SSEKMSKeyId = &v
  12994. return s
  12995. }
  12996. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12997. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  12998. s.ServerSideEncryption = &v
  12999. return s
  13000. }
  13001. // SetVersionId sets the VersionId field's value.
  13002. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  13003. s.VersionId = &v
  13004. return s
  13005. }
  13006. // Container for all response elements.
  13007. type CopyObjectResult struct {
  13008. _ struct{} `type:"structure"`
  13009. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  13010. // present if it was uploaded with the object. With multipart uploads, this
  13011. // may not be a checksum value of the object. For more information about how
  13012. // checksums are calculated with multipart uploads, see Checking object integrity
  13013. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13014. // in the Amazon S3 User Guide.
  13015. ChecksumCRC32 *string `type:"string"`
  13016. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  13017. // be present if it was uploaded with the object. With multipart uploads, this
  13018. // may not be a checksum value of the object. For more information about how
  13019. // checksums are calculated with multipart uploads, see Checking object integrity
  13020. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13021. // in the Amazon S3 User Guide.
  13022. ChecksumCRC32C *string `type:"string"`
  13023. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  13024. // present if it was uploaded with the object. With multipart uploads, this
  13025. // may not be a checksum value of the object. For more information about how
  13026. // checksums are calculated with multipart uploads, see Checking object integrity
  13027. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13028. // in the Amazon S3 User Guide.
  13029. ChecksumSHA1 *string `type:"string"`
  13030. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  13031. // be present if it was uploaded with the object. With multipart uploads, this
  13032. // may not be a checksum value of the object. For more information about how
  13033. // checksums are calculated with multipart uploads, see Checking object integrity
  13034. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13035. // in the Amazon S3 User Guide.
  13036. ChecksumSHA256 *string `type:"string"`
  13037. // Returns the ETag of the new object. The ETag reflects only changes to the
  13038. // contents of an object, not its metadata.
  13039. ETag *string `type:"string"`
  13040. // Creation date of the object.
  13041. LastModified *time.Time `type:"timestamp"`
  13042. }
  13043. // String returns the string representation.
  13044. //
  13045. // API parameter values that are decorated as "sensitive" in the API will not
  13046. // be included in the string output. The member name will be present, but the
  13047. // value will be replaced with "sensitive".
  13048. func (s CopyObjectResult) String() string {
  13049. return awsutil.Prettify(s)
  13050. }
  13051. // GoString returns the string representation.
  13052. //
  13053. // API parameter values that are decorated as "sensitive" in the API will not
  13054. // be included in the string output. The member name will be present, but the
  13055. // value will be replaced with "sensitive".
  13056. func (s CopyObjectResult) GoString() string {
  13057. return s.String()
  13058. }
  13059. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  13060. func (s *CopyObjectResult) SetChecksumCRC32(v string) *CopyObjectResult {
  13061. s.ChecksumCRC32 = &v
  13062. return s
  13063. }
  13064. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  13065. func (s *CopyObjectResult) SetChecksumCRC32C(v string) *CopyObjectResult {
  13066. s.ChecksumCRC32C = &v
  13067. return s
  13068. }
  13069. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  13070. func (s *CopyObjectResult) SetChecksumSHA1(v string) *CopyObjectResult {
  13071. s.ChecksumSHA1 = &v
  13072. return s
  13073. }
  13074. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  13075. func (s *CopyObjectResult) SetChecksumSHA256(v string) *CopyObjectResult {
  13076. s.ChecksumSHA256 = &v
  13077. return s
  13078. }
  13079. // SetETag sets the ETag field's value.
  13080. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  13081. s.ETag = &v
  13082. return s
  13083. }
  13084. // SetLastModified sets the LastModified field's value.
  13085. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  13086. s.LastModified = &v
  13087. return s
  13088. }
  13089. // Container for all response elements.
  13090. type CopyPartResult struct {
  13091. _ struct{} `type:"structure"`
  13092. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  13093. // present if it was uploaded with the object. With multipart uploads, this
  13094. // may not be a checksum value of the object. For more information about how
  13095. // checksums are calculated with multipart uploads, see Checking object integrity
  13096. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13097. // in the Amazon S3 User Guide.
  13098. ChecksumCRC32 *string `type:"string"`
  13099. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  13100. // be present if it was uploaded with the object. With multipart uploads, this
  13101. // may not be a checksum value of the object. For more information about how
  13102. // checksums are calculated with multipart uploads, see Checking object integrity
  13103. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13104. // in the Amazon S3 User Guide.
  13105. ChecksumCRC32C *string `type:"string"`
  13106. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  13107. // present if it was uploaded with the object. With multipart uploads, this
  13108. // may not be a checksum value of the object. For more information about how
  13109. // checksums are calculated with multipart uploads, see Checking object integrity
  13110. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13111. // in the Amazon S3 User Guide.
  13112. ChecksumSHA1 *string `type:"string"`
  13113. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  13114. // be present if it was uploaded with the object. With multipart uploads, this
  13115. // may not be a checksum value of the object. For more information about how
  13116. // checksums are calculated with multipart uploads, see Checking object integrity
  13117. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  13118. // in the Amazon S3 User Guide.
  13119. ChecksumSHA256 *string `type:"string"`
  13120. // Entity tag of the object.
  13121. ETag *string `type:"string"`
  13122. // Date and time at which the object was uploaded.
  13123. LastModified *time.Time `type:"timestamp"`
  13124. }
  13125. // String returns the string representation.
  13126. //
  13127. // API parameter values that are decorated as "sensitive" in the API will not
  13128. // be included in the string output. The member name will be present, but the
  13129. // value will be replaced with "sensitive".
  13130. func (s CopyPartResult) String() string {
  13131. return awsutil.Prettify(s)
  13132. }
  13133. // GoString returns the string representation.
  13134. //
  13135. // API parameter values that are decorated as "sensitive" in the API will not
  13136. // be included in the string output. The member name will be present, but the
  13137. // value will be replaced with "sensitive".
  13138. func (s CopyPartResult) GoString() string {
  13139. return s.String()
  13140. }
  13141. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  13142. func (s *CopyPartResult) SetChecksumCRC32(v string) *CopyPartResult {
  13143. s.ChecksumCRC32 = &v
  13144. return s
  13145. }
  13146. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  13147. func (s *CopyPartResult) SetChecksumCRC32C(v string) *CopyPartResult {
  13148. s.ChecksumCRC32C = &v
  13149. return s
  13150. }
  13151. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  13152. func (s *CopyPartResult) SetChecksumSHA1(v string) *CopyPartResult {
  13153. s.ChecksumSHA1 = &v
  13154. return s
  13155. }
  13156. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  13157. func (s *CopyPartResult) SetChecksumSHA256(v string) *CopyPartResult {
  13158. s.ChecksumSHA256 = &v
  13159. return s
  13160. }
  13161. // SetETag sets the ETag field's value.
  13162. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  13163. s.ETag = &v
  13164. return s
  13165. }
  13166. // SetLastModified sets the LastModified field's value.
  13167. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  13168. s.LastModified = &v
  13169. return s
  13170. }
  13171. // The configuration information for the bucket.
  13172. type CreateBucketConfiguration struct {
  13173. _ struct{} `type:"structure"`
  13174. // Specifies the Region where the bucket will be created. If you don't specify
  13175. // a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).
  13176. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  13177. }
  13178. // String returns the string representation.
  13179. //
  13180. // API parameter values that are decorated as "sensitive" in the API will not
  13181. // be included in the string output. The member name will be present, but the
  13182. // value will be replaced with "sensitive".
  13183. func (s CreateBucketConfiguration) String() string {
  13184. return awsutil.Prettify(s)
  13185. }
  13186. // GoString returns the string representation.
  13187. //
  13188. // API parameter values that are decorated as "sensitive" in the API will not
  13189. // be included in the string output. The member name will be present, but the
  13190. // value will be replaced with "sensitive".
  13191. func (s CreateBucketConfiguration) GoString() string {
  13192. return s.String()
  13193. }
  13194. // SetLocationConstraint sets the LocationConstraint field's value.
  13195. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  13196. s.LocationConstraint = &v
  13197. return s
  13198. }
  13199. type CreateBucketInput struct {
  13200. _ struct{} `locationName:"CreateBucketRequest" type:"structure" payload:"CreateBucketConfiguration"`
  13201. // The canned ACL to apply to the bucket.
  13202. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  13203. // The name of the bucket to create.
  13204. //
  13205. // Bucket is a required field
  13206. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13207. // The configuration information for the bucket.
  13208. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13209. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  13210. // bucket.
  13211. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  13212. // Allows grantee to list the objects in the bucket.
  13213. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  13214. // Allows grantee to read the bucket ACL.
  13215. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  13216. // Allows grantee to create new objects in the bucket.
  13217. //
  13218. // For the bucket and object owners of existing objects, also allows deletions
  13219. // and overwrites of those objects.
  13220. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  13221. // Allows grantee to write the ACL for the applicable bucket.
  13222. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  13223. // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
  13224. ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
  13225. // The container element for object ownership for a bucket's ownership controls.
  13226. //
  13227. // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
  13228. // the bucket owner if the objects are uploaded with the bucket-owner-full-control
  13229. // canned ACL.
  13230. //
  13231. // ObjectWriter - The uploading account will own the object if the object is
  13232. // uploaded with the bucket-owner-full-control canned ACL.
  13233. //
  13234. // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
  13235. // affect permissions. The bucket owner automatically owns and has full control
  13236. // over every object in the bucket. The bucket only accepts PUT requests that
  13237. // don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
  13238. // canned ACL or an equivalent form of this ACL expressed in the XML format.
  13239. ObjectOwnership *string `location:"header" locationName:"x-amz-object-ownership" type:"string" enum:"ObjectOwnership"`
  13240. }
  13241. // String returns the string representation.
  13242. //
  13243. // API parameter values that are decorated as "sensitive" in the API will not
  13244. // be included in the string output. The member name will be present, but the
  13245. // value will be replaced with "sensitive".
  13246. func (s CreateBucketInput) String() string {
  13247. return awsutil.Prettify(s)
  13248. }
  13249. // GoString returns the string representation.
  13250. //
  13251. // API parameter values that are decorated as "sensitive" in the API will not
  13252. // be included in the string output. The member name will be present, but the
  13253. // value will be replaced with "sensitive".
  13254. func (s CreateBucketInput) GoString() string {
  13255. return s.String()
  13256. }
  13257. // Validate inspects the fields of the type to determine if they are valid.
  13258. func (s *CreateBucketInput) Validate() error {
  13259. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  13260. if s.Bucket == nil {
  13261. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13262. }
  13263. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13264. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13265. }
  13266. if invalidParams.Len() > 0 {
  13267. return invalidParams
  13268. }
  13269. return nil
  13270. }
  13271. // SetACL sets the ACL field's value.
  13272. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  13273. s.ACL = &v
  13274. return s
  13275. }
  13276. // SetBucket sets the Bucket field's value.
  13277. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  13278. s.Bucket = &v
  13279. return s
  13280. }
  13281. func (s *CreateBucketInput) getBucket() (v string) {
  13282. if s.Bucket == nil {
  13283. return v
  13284. }
  13285. return *s.Bucket
  13286. }
  13287. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  13288. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  13289. s.CreateBucketConfiguration = v
  13290. return s
  13291. }
  13292. // SetGrantFullControl sets the GrantFullControl field's value.
  13293. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  13294. s.GrantFullControl = &v
  13295. return s
  13296. }
  13297. // SetGrantRead sets the GrantRead field's value.
  13298. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  13299. s.GrantRead = &v
  13300. return s
  13301. }
  13302. // SetGrantReadACP sets the GrantReadACP field's value.
  13303. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  13304. s.GrantReadACP = &v
  13305. return s
  13306. }
  13307. // SetGrantWrite sets the GrantWrite field's value.
  13308. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  13309. s.GrantWrite = &v
  13310. return s
  13311. }
  13312. // SetGrantWriteACP sets the GrantWriteACP field's value.
  13313. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  13314. s.GrantWriteACP = &v
  13315. return s
  13316. }
  13317. // SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
  13318. func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
  13319. s.ObjectLockEnabledForBucket = &v
  13320. return s
  13321. }
  13322. // SetObjectOwnership sets the ObjectOwnership field's value.
  13323. func (s *CreateBucketInput) SetObjectOwnership(v string) *CreateBucketInput {
  13324. s.ObjectOwnership = &v
  13325. return s
  13326. }
  13327. type CreateBucketOutput struct {
  13328. _ struct{} `type:"structure"`
  13329. // A forward slash followed by the name of the bucket.
  13330. Location *string `location:"header" locationName:"Location" type:"string"`
  13331. }
  13332. // String returns the string representation.
  13333. //
  13334. // API parameter values that are decorated as "sensitive" in the API will not
  13335. // be included in the string output. The member name will be present, but the
  13336. // value will be replaced with "sensitive".
  13337. func (s CreateBucketOutput) String() string {
  13338. return awsutil.Prettify(s)
  13339. }
  13340. // GoString returns the string representation.
  13341. //
  13342. // API parameter values that are decorated as "sensitive" in the API will not
  13343. // be included in the string output. The member name will be present, but the
  13344. // value will be replaced with "sensitive".
  13345. func (s CreateBucketOutput) GoString() string {
  13346. return s.String()
  13347. }
  13348. // SetLocation sets the Location field's value.
  13349. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  13350. s.Location = &v
  13351. return s
  13352. }
  13353. type CreateMultipartUploadInput struct {
  13354. _ struct{} `locationName:"CreateMultipartUploadRequest" type:"structure"`
  13355. // The canned ACL to apply to the object.
  13356. //
  13357. // This action is not supported by Amazon S3 on Outposts.
  13358. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  13359. // The name of the bucket to which to initiate the upload
  13360. //
  13361. // When using this action with an access point, you must direct requests to
  13362. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  13363. // When using this action with an access point through the Amazon Web Services
  13364. // SDKs, you provide the access point ARN in place of the bucket name. For more
  13365. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  13366. // in the Amazon S3 User Guide.
  13367. //
  13368. // When using this action with Amazon S3 on Outposts, you must direct requests
  13369. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  13370. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  13371. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  13372. // you provide the Outposts bucket ARN in place of the bucket name. For more
  13373. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  13374. // in the Amazon S3 User Guide.
  13375. //
  13376. // Bucket is a required field
  13377. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13378. // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
  13379. // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
  13380. // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
  13381. // SSE-KMS.
  13382. //
  13383. // Specifying this header with an object action doesn’t affect bucket-level
  13384. // settings for S3 Bucket Key.
  13385. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  13386. // Specifies caching behavior along the request/reply chain.
  13387. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  13388. // Indicates the algorithm you want Amazon S3 to use to create the checksum
  13389. // for the object. For more information, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  13390. // in the Amazon S3 User Guide.
  13391. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  13392. // Specifies presentational information for the object.
  13393. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  13394. // Specifies what content encodings have been applied to the object and thus
  13395. // what decoding mechanisms must be applied to obtain the media-type referenced
  13396. // by the Content-Type header field.
  13397. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  13398. // The language the content is in.
  13399. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  13400. // A standard MIME type describing the format of the object data.
  13401. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  13402. // The account ID of the expected bucket owner. If the bucket is owned by a
  13403. // different account, the request fails with the HTTP status code 403 Forbidden
  13404. // (access denied).
  13405. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  13406. // The date and time at which the object is no longer cacheable.
  13407. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  13408. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  13409. //
  13410. // This action is not supported by Amazon S3 on Outposts.
  13411. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  13412. // Allows grantee to read the object data and its metadata.
  13413. //
  13414. // This action is not supported by Amazon S3 on Outposts.
  13415. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  13416. // Allows grantee to read the object ACL.
  13417. //
  13418. // This action is not supported by Amazon S3 on Outposts.
  13419. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  13420. // Allows grantee to write the ACL for the applicable object.
  13421. //
  13422. // This action is not supported by Amazon S3 on Outposts.
  13423. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  13424. // Object key for which the multipart upload is to be initiated.
  13425. //
  13426. // Key is a required field
  13427. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  13428. // A map of metadata to store with the object in S3.
  13429. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  13430. // Specifies whether you want to apply a legal hold to the uploaded object.
  13431. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  13432. // Specifies the Object Lock mode that you want to apply to the uploaded object.
  13433. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  13434. // Specifies the date and time when you want the Object Lock to expire.
  13435. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  13436. // Confirms that the requester knows that they will be charged for the request.
  13437. // Bucket owners need not specify this parameter in their requests. For information
  13438. // about downloading objects from Requester Pays buckets, see Downloading Objects
  13439. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  13440. // in the Amazon S3 User Guide.
  13441. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  13442. // Specifies the algorithm to use to when encrypting the object (for example,
  13443. // AES256).
  13444. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  13445. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  13446. // data. This value is used to store the object and then it is discarded; Amazon
  13447. // S3 does not store the encryption key. The key must be appropriate for use
  13448. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  13449. // header.
  13450. //
  13451. // SSECustomerKey is a sensitive parameter and its value will be
  13452. // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
  13453. // String and GoString methods.
  13454. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  13455. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  13456. // Amazon S3 uses this header for a message integrity check to ensure that the
  13457. // encryption key was transmitted without error.
  13458. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  13459. // Specifies the Amazon Web Services KMS Encryption Context to use for object
  13460. // encryption. The value of this header is a base64-encoded UTF-8 string holding
  13461. // JSON with the encryption context key-value pairs.
  13462. //
  13463. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  13464. // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
  13465. // String and GoString methods.
  13466. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  13467. // Specifies the ID of the symmetric customer managed key to use for object
  13468. // encryption. All GET and PUT requests for an object protected by Amazon Web
  13469. // Services KMS will fail if not made via SSL or using SigV4. For information
  13470. // about configuring using any of the officially supported Amazon Web Services
  13471. // SDKs and Amazon Web Services CLI, see Specifying the Signature Version in
  13472. // Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
  13473. // in the Amazon S3 User Guide.
  13474. //
  13475. // SSEKMSKeyId is a sensitive parameter and its value will be
  13476. // replaced with "sensitive" in string returned by CreateMultipartUploadInput's
  13477. // String and GoString methods.
  13478. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  13479. // The server-side encryption algorithm used when storing this object in Amazon
  13480. // S3 (for example, AES256, aws:kms).
  13481. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  13482. // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
  13483. // objects. The STANDARD storage class provides high durability and high availability.
  13484. // Depending on performance needs, you can specify a different Storage Class.
  13485. // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
  13486. // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
  13487. // in the Amazon S3 User Guide.
  13488. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  13489. // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
  13490. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  13491. // If the bucket is configured as a website, redirects requests for this object
  13492. // to another object in the same bucket or to an external URL. Amazon S3 stores
  13493. // the value of this header in the object metadata.
  13494. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  13495. }
  13496. // String returns the string representation.
  13497. //
  13498. // API parameter values that are decorated as "sensitive" in the API will not
  13499. // be included in the string output. The member name will be present, but the
  13500. // value will be replaced with "sensitive".
  13501. func (s CreateMultipartUploadInput) String() string {
  13502. return awsutil.Prettify(s)
  13503. }
  13504. // GoString returns the string representation.
  13505. //
  13506. // API parameter values that are decorated as "sensitive" in the API will not
  13507. // be included in the string output. The member name will be present, but the
  13508. // value will be replaced with "sensitive".
  13509. func (s CreateMultipartUploadInput) GoString() string {
  13510. return s.String()
  13511. }
  13512. // Validate inspects the fields of the type to determine if they are valid.
  13513. func (s *CreateMultipartUploadInput) Validate() error {
  13514. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  13515. if s.Bucket == nil {
  13516. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13517. }
  13518. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13519. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13520. }
  13521. if s.Key == nil {
  13522. invalidParams.Add(request.NewErrParamRequired("Key"))
  13523. }
  13524. if s.Key != nil && len(*s.Key) < 1 {
  13525. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13526. }
  13527. if invalidParams.Len() > 0 {
  13528. return invalidParams
  13529. }
  13530. return nil
  13531. }
  13532. // SetACL sets the ACL field's value.
  13533. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  13534. s.ACL = &v
  13535. return s
  13536. }
  13537. // SetBucket sets the Bucket field's value.
  13538. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  13539. s.Bucket = &v
  13540. return s
  13541. }
  13542. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  13543. if s.Bucket == nil {
  13544. return v
  13545. }
  13546. return *s.Bucket
  13547. }
  13548. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  13549. func (s *CreateMultipartUploadInput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadInput {
  13550. s.BucketKeyEnabled = &v
  13551. return s
  13552. }
  13553. // SetCacheControl sets the CacheControl field's value.
  13554. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  13555. s.CacheControl = &v
  13556. return s
  13557. }
  13558. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  13559. func (s *CreateMultipartUploadInput) SetChecksumAlgorithm(v string) *CreateMultipartUploadInput {
  13560. s.ChecksumAlgorithm = &v
  13561. return s
  13562. }
  13563. // SetContentDisposition sets the ContentDisposition field's value.
  13564. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  13565. s.ContentDisposition = &v
  13566. return s
  13567. }
  13568. // SetContentEncoding sets the ContentEncoding field's value.
  13569. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  13570. s.ContentEncoding = &v
  13571. return s
  13572. }
  13573. // SetContentLanguage sets the ContentLanguage field's value.
  13574. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  13575. s.ContentLanguage = &v
  13576. return s
  13577. }
  13578. // SetContentType sets the ContentType field's value.
  13579. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  13580. s.ContentType = &v
  13581. return s
  13582. }
  13583. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  13584. func (s *CreateMultipartUploadInput) SetExpectedBucketOwner(v string) *CreateMultipartUploadInput {
  13585. s.ExpectedBucketOwner = &v
  13586. return s
  13587. }
  13588. // SetExpires sets the Expires field's value.
  13589. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  13590. s.Expires = &v
  13591. return s
  13592. }
  13593. // SetGrantFullControl sets the GrantFullControl field's value.
  13594. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  13595. s.GrantFullControl = &v
  13596. return s
  13597. }
  13598. // SetGrantRead sets the GrantRead field's value.
  13599. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  13600. s.GrantRead = &v
  13601. return s
  13602. }
  13603. // SetGrantReadACP sets the GrantReadACP field's value.
  13604. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  13605. s.GrantReadACP = &v
  13606. return s
  13607. }
  13608. // SetGrantWriteACP sets the GrantWriteACP field's value.
  13609. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  13610. s.GrantWriteACP = &v
  13611. return s
  13612. }
  13613. // SetKey sets the Key field's value.
  13614. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  13615. s.Key = &v
  13616. return s
  13617. }
  13618. // SetMetadata sets the Metadata field's value.
  13619. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  13620. s.Metadata = v
  13621. return s
  13622. }
  13623. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  13624. func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
  13625. s.ObjectLockLegalHoldStatus = &v
  13626. return s
  13627. }
  13628. // SetObjectLockMode sets the ObjectLockMode field's value.
  13629. func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
  13630. s.ObjectLockMode = &v
  13631. return s
  13632. }
  13633. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  13634. func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
  13635. s.ObjectLockRetainUntilDate = &v
  13636. return s
  13637. }
  13638. // SetRequestPayer sets the RequestPayer field's value.
  13639. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  13640. s.RequestPayer = &v
  13641. return s
  13642. }
  13643. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  13644. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  13645. s.SSECustomerAlgorithm = &v
  13646. return s
  13647. }
  13648. // SetSSECustomerKey sets the SSECustomerKey field's value.
  13649. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  13650. s.SSECustomerKey = &v
  13651. return s
  13652. }
  13653. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  13654. if s.SSECustomerKey == nil {
  13655. return v
  13656. }
  13657. return *s.SSECustomerKey
  13658. }
  13659. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  13660. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  13661. s.SSECustomerKeyMD5 = &v
  13662. return s
  13663. }
  13664. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  13665. func (s *CreateMultipartUploadInput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadInput {
  13666. s.SSEKMSEncryptionContext = &v
  13667. return s
  13668. }
  13669. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  13670. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  13671. s.SSEKMSKeyId = &v
  13672. return s
  13673. }
  13674. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  13675. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  13676. s.ServerSideEncryption = &v
  13677. return s
  13678. }
  13679. // SetStorageClass sets the StorageClass field's value.
  13680. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  13681. s.StorageClass = &v
  13682. return s
  13683. }
  13684. // SetTagging sets the Tagging field's value.
  13685. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  13686. s.Tagging = &v
  13687. return s
  13688. }
  13689. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  13690. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  13691. s.WebsiteRedirectLocation = &v
  13692. return s
  13693. }
  13694. func (s *CreateMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
  13695. if s.Bucket == nil {
  13696. return nil, fmt.Errorf("member Bucket is nil")
  13697. }
  13698. return parseEndpointARN(*s.Bucket)
  13699. }
  13700. func (s *CreateMultipartUploadInput) hasEndpointARN() bool {
  13701. if s.Bucket == nil {
  13702. return false
  13703. }
  13704. return arn.IsARN(*s.Bucket)
  13705. }
  13706. // updateArnableField updates the value of the input field that
  13707. // takes an ARN as an input. This method is useful to backfill
  13708. // the parsed resource name from ARN into the input member.
  13709. // It returns a pointer to a modified copy of input and an error.
  13710. // Note that original input is not modified.
  13711. func (s CreateMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
  13712. if s.Bucket == nil {
  13713. return nil, fmt.Errorf("member Bucket is nil")
  13714. }
  13715. s.Bucket = aws.String(v)
  13716. return &s, nil
  13717. }
  13718. type CreateMultipartUploadOutput struct {
  13719. _ struct{} `type:"structure"`
  13720. // If the bucket has a lifecycle rule configured with an action to abort incomplete
  13721. // multipart uploads and the prefix in the lifecycle rule matches the object
  13722. // name in the request, the response includes this header. The header indicates
  13723. // when the initiated multipart upload becomes eligible for an abort operation.
  13724. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  13725. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
  13726. //
  13727. // The response also includes the x-amz-abort-rule-id header that provides the
  13728. // ID of the lifecycle configuration rule that defines this action.
  13729. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  13730. // This header is returned along with the x-amz-abort-date header. It identifies
  13731. // the applicable lifecycle configuration rule that defines the action to abort
  13732. // incomplete multipart uploads.
  13733. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  13734. // The name of the bucket to which the multipart upload was initiated. Does
  13735. // not return the access point ARN or access point alias if used.
  13736. //
  13737. // When using this action with an access point, you must direct requests to
  13738. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  13739. // When using this action with an access point through the Amazon Web Services
  13740. // SDKs, you provide the access point ARN in place of the bucket name. For more
  13741. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  13742. // in the Amazon S3 User Guide.
  13743. //
  13744. // When using this action with Amazon S3 on Outposts, you must direct requests
  13745. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  13746. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  13747. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  13748. // you provide the Outposts bucket ARN in place of the bucket name. For more
  13749. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  13750. // in the Amazon S3 User Guide.
  13751. Bucket *string `locationName:"Bucket" type:"string"`
  13752. // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
  13753. // encryption with Amazon Web Services KMS (SSE-KMS).
  13754. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  13755. // The algorithm that was used to create a checksum of the object.
  13756. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  13757. // Object key for which the multipart upload was initiated.
  13758. Key *string `min:"1" type:"string"`
  13759. // If present, indicates that the requester was successfully charged for the
  13760. // request.
  13761. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  13762. // If server-side encryption with a customer-provided encryption key was requested,
  13763. // the response will include this header confirming the encryption algorithm
  13764. // used.
  13765. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  13766. // If server-side encryption with a customer-provided encryption key was requested,
  13767. // the response will include this header to provide round-trip message integrity
  13768. // verification of the customer-provided encryption key.
  13769. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  13770. // If present, specifies the Amazon Web Services KMS Encryption Context to use
  13771. // for object encryption. The value of this header is a base64-encoded UTF-8
  13772. // string holding JSON with the encryption context key-value pairs.
  13773. //
  13774. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  13775. // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's
  13776. // String and GoString methods.
  13777. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  13778. // If present, specifies the ID of the Amazon Web Services Key Management Service
  13779. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  13780. // the object.
  13781. //
  13782. // SSEKMSKeyId is a sensitive parameter and its value will be
  13783. // replaced with "sensitive" in string returned by CreateMultipartUploadOutput's
  13784. // String and GoString methods.
  13785. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  13786. // The server-side encryption algorithm used when storing this object in Amazon
  13787. // S3 (for example, AES256, aws:kms).
  13788. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  13789. // ID for the initiated multipart upload.
  13790. UploadId *string `type:"string"`
  13791. }
  13792. // String returns the string representation.
  13793. //
  13794. // API parameter values that are decorated as "sensitive" in the API will not
  13795. // be included in the string output. The member name will be present, but the
  13796. // value will be replaced with "sensitive".
  13797. func (s CreateMultipartUploadOutput) String() string {
  13798. return awsutil.Prettify(s)
  13799. }
  13800. // GoString returns the string representation.
  13801. //
  13802. // API parameter values that are decorated as "sensitive" in the API will not
  13803. // be included in the string output. The member name will be present, but the
  13804. // value will be replaced with "sensitive".
  13805. func (s CreateMultipartUploadOutput) GoString() string {
  13806. return s.String()
  13807. }
  13808. // SetAbortDate sets the AbortDate field's value.
  13809. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  13810. s.AbortDate = &v
  13811. return s
  13812. }
  13813. // SetAbortRuleId sets the AbortRuleId field's value.
  13814. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  13815. s.AbortRuleId = &v
  13816. return s
  13817. }
  13818. // SetBucket sets the Bucket field's value.
  13819. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  13820. s.Bucket = &v
  13821. return s
  13822. }
  13823. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  13824. if s.Bucket == nil {
  13825. return v
  13826. }
  13827. return *s.Bucket
  13828. }
  13829. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  13830. func (s *CreateMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadOutput {
  13831. s.BucketKeyEnabled = &v
  13832. return s
  13833. }
  13834. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  13835. func (s *CreateMultipartUploadOutput) SetChecksumAlgorithm(v string) *CreateMultipartUploadOutput {
  13836. s.ChecksumAlgorithm = &v
  13837. return s
  13838. }
  13839. // SetKey sets the Key field's value.
  13840. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  13841. s.Key = &v
  13842. return s
  13843. }
  13844. // SetRequestCharged sets the RequestCharged field's value.
  13845. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  13846. s.RequestCharged = &v
  13847. return s
  13848. }
  13849. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  13850. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  13851. s.SSECustomerAlgorithm = &v
  13852. return s
  13853. }
  13854. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  13855. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  13856. s.SSECustomerKeyMD5 = &v
  13857. return s
  13858. }
  13859. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  13860. func (s *CreateMultipartUploadOutput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadOutput {
  13861. s.SSEKMSEncryptionContext = &v
  13862. return s
  13863. }
  13864. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  13865. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  13866. s.SSEKMSKeyId = &v
  13867. return s
  13868. }
  13869. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  13870. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  13871. s.ServerSideEncryption = &v
  13872. return s
  13873. }
  13874. // SetUploadId sets the UploadId field's value.
  13875. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  13876. s.UploadId = &v
  13877. return s
  13878. }
  13879. // The container element for specifying the default Object Lock retention settings
  13880. // for new objects placed in the specified bucket.
  13881. //
  13882. // - The DefaultRetention settings require both a mode and a period.
  13883. //
  13884. // - The DefaultRetention period can be either Days or Years but you must
  13885. // select one. You cannot specify Days and Years at the same time.
  13886. type DefaultRetention struct {
  13887. _ struct{} `type:"structure"`
  13888. // The number of days that you want to specify for the default retention period.
  13889. // Must be used with Mode.
  13890. Days *int64 `type:"integer"`
  13891. // The default Object Lock retention mode you want to apply to new objects placed
  13892. // in the specified bucket. Must be used with either Days or Years.
  13893. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  13894. // The number of years that you want to specify for the default retention period.
  13895. // Must be used with Mode.
  13896. Years *int64 `type:"integer"`
  13897. }
  13898. // String returns the string representation.
  13899. //
  13900. // API parameter values that are decorated as "sensitive" in the API will not
  13901. // be included in the string output. The member name will be present, but the
  13902. // value will be replaced with "sensitive".
  13903. func (s DefaultRetention) String() string {
  13904. return awsutil.Prettify(s)
  13905. }
  13906. // GoString returns the string representation.
  13907. //
  13908. // API parameter values that are decorated as "sensitive" in the API will not
  13909. // be included in the string output. The member name will be present, but the
  13910. // value will be replaced with "sensitive".
  13911. func (s DefaultRetention) GoString() string {
  13912. return s.String()
  13913. }
  13914. // SetDays sets the Days field's value.
  13915. func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
  13916. s.Days = &v
  13917. return s
  13918. }
  13919. // SetMode sets the Mode field's value.
  13920. func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
  13921. s.Mode = &v
  13922. return s
  13923. }
  13924. // SetYears sets the Years field's value.
  13925. func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
  13926. s.Years = &v
  13927. return s
  13928. }
  13929. // Container for the objects to delete.
  13930. type Delete struct {
  13931. _ struct{} `type:"structure"`
  13932. // The objects to delete.
  13933. //
  13934. // Objects is a required field
  13935. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  13936. // Element to enable quiet mode for the request. When you add this element,
  13937. // you must set its value to true.
  13938. Quiet *bool `type:"boolean"`
  13939. }
  13940. // String returns the string representation.
  13941. //
  13942. // API parameter values that are decorated as "sensitive" in the API will not
  13943. // be included in the string output. The member name will be present, but the
  13944. // value will be replaced with "sensitive".
  13945. func (s Delete) String() string {
  13946. return awsutil.Prettify(s)
  13947. }
  13948. // GoString returns the string representation.
  13949. //
  13950. // API parameter values that are decorated as "sensitive" in the API will not
  13951. // be included in the string output. The member name will be present, but the
  13952. // value will be replaced with "sensitive".
  13953. func (s Delete) GoString() string {
  13954. return s.String()
  13955. }
  13956. // Validate inspects the fields of the type to determine if they are valid.
  13957. func (s *Delete) Validate() error {
  13958. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  13959. if s.Objects == nil {
  13960. invalidParams.Add(request.NewErrParamRequired("Objects"))
  13961. }
  13962. if s.Objects != nil {
  13963. for i, v := range s.Objects {
  13964. if v == nil {
  13965. continue
  13966. }
  13967. if err := v.Validate(); err != nil {
  13968. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  13969. }
  13970. }
  13971. }
  13972. if invalidParams.Len() > 0 {
  13973. return invalidParams
  13974. }
  13975. return nil
  13976. }
  13977. // SetObjects sets the Objects field's value.
  13978. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  13979. s.Objects = v
  13980. return s
  13981. }
  13982. // SetQuiet sets the Quiet field's value.
  13983. func (s *Delete) SetQuiet(v bool) *Delete {
  13984. s.Quiet = &v
  13985. return s
  13986. }
  13987. type DeleteBucketAnalyticsConfigurationInput struct {
  13988. _ struct{} `locationName:"DeleteBucketAnalyticsConfigurationRequest" type:"structure"`
  13989. // The name of the bucket from which an analytics configuration is deleted.
  13990. //
  13991. // Bucket is a required field
  13992. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13993. // The account ID of the expected bucket owner. If the bucket is owned by a
  13994. // different account, the request fails with the HTTP status code 403 Forbidden
  13995. // (access denied).
  13996. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  13997. // The ID that identifies the analytics configuration.
  13998. //
  13999. // Id is a required field
  14000. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14001. }
  14002. // String returns the string representation.
  14003. //
  14004. // API parameter values that are decorated as "sensitive" in the API will not
  14005. // be included in the string output. The member name will be present, but the
  14006. // value will be replaced with "sensitive".
  14007. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  14008. return awsutil.Prettify(s)
  14009. }
  14010. // GoString returns the string representation.
  14011. //
  14012. // API parameter values that are decorated as "sensitive" in the API will not
  14013. // be included in the string output. The member name will be present, but the
  14014. // value will be replaced with "sensitive".
  14015. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  14016. return s.String()
  14017. }
  14018. // Validate inspects the fields of the type to determine if they are valid.
  14019. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  14020. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  14021. if s.Bucket == nil {
  14022. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14023. }
  14024. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14025. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14026. }
  14027. if s.Id == nil {
  14028. invalidParams.Add(request.NewErrParamRequired("Id"))
  14029. }
  14030. if invalidParams.Len() > 0 {
  14031. return invalidParams
  14032. }
  14033. return nil
  14034. }
  14035. // SetBucket sets the Bucket field's value.
  14036. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  14037. s.Bucket = &v
  14038. return s
  14039. }
  14040. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  14041. if s.Bucket == nil {
  14042. return v
  14043. }
  14044. return *s.Bucket
  14045. }
  14046. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14047. func (s *DeleteBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketAnalyticsConfigurationInput {
  14048. s.ExpectedBucketOwner = &v
  14049. return s
  14050. }
  14051. // SetId sets the Id field's value.
  14052. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  14053. s.Id = &v
  14054. return s
  14055. }
  14056. func (s *DeleteBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  14057. if s.Bucket == nil {
  14058. return nil, fmt.Errorf("member Bucket is nil")
  14059. }
  14060. return parseEndpointARN(*s.Bucket)
  14061. }
  14062. func (s *DeleteBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
  14063. if s.Bucket == nil {
  14064. return false
  14065. }
  14066. return arn.IsARN(*s.Bucket)
  14067. }
  14068. // updateArnableField updates the value of the input field that
  14069. // takes an ARN as an input. This method is useful to backfill
  14070. // the parsed resource name from ARN into the input member.
  14071. // It returns a pointer to a modified copy of input and an error.
  14072. // Note that original input is not modified.
  14073. func (s DeleteBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  14074. if s.Bucket == nil {
  14075. return nil, fmt.Errorf("member Bucket is nil")
  14076. }
  14077. s.Bucket = aws.String(v)
  14078. return &s, nil
  14079. }
  14080. type DeleteBucketAnalyticsConfigurationOutput struct {
  14081. _ struct{} `type:"structure"`
  14082. }
  14083. // String returns the string representation.
  14084. //
  14085. // API parameter values that are decorated as "sensitive" in the API will not
  14086. // be included in the string output. The member name will be present, but the
  14087. // value will be replaced with "sensitive".
  14088. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  14089. return awsutil.Prettify(s)
  14090. }
  14091. // GoString returns the string representation.
  14092. //
  14093. // API parameter values that are decorated as "sensitive" in the API will not
  14094. // be included in the string output. The member name will be present, but the
  14095. // value will be replaced with "sensitive".
  14096. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  14097. return s.String()
  14098. }
  14099. type DeleteBucketCorsInput struct {
  14100. _ struct{} `locationName:"DeleteBucketCorsRequest" type:"structure"`
  14101. // Specifies the bucket whose cors configuration is being deleted.
  14102. //
  14103. // Bucket is a required field
  14104. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14105. // The account ID of the expected bucket owner. If the bucket is owned by a
  14106. // different account, the request fails with the HTTP status code 403 Forbidden
  14107. // (access denied).
  14108. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14109. }
  14110. // String returns the string representation.
  14111. //
  14112. // API parameter values that are decorated as "sensitive" in the API will not
  14113. // be included in the string output. The member name will be present, but the
  14114. // value will be replaced with "sensitive".
  14115. func (s DeleteBucketCorsInput) String() string {
  14116. return awsutil.Prettify(s)
  14117. }
  14118. // GoString returns the string representation.
  14119. //
  14120. // API parameter values that are decorated as "sensitive" in the API will not
  14121. // be included in the string output. The member name will be present, but the
  14122. // value will be replaced with "sensitive".
  14123. func (s DeleteBucketCorsInput) GoString() string {
  14124. return s.String()
  14125. }
  14126. // Validate inspects the fields of the type to determine if they are valid.
  14127. func (s *DeleteBucketCorsInput) Validate() error {
  14128. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  14129. if s.Bucket == nil {
  14130. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14131. }
  14132. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14133. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14134. }
  14135. if invalidParams.Len() > 0 {
  14136. return invalidParams
  14137. }
  14138. return nil
  14139. }
  14140. // SetBucket sets the Bucket field's value.
  14141. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  14142. s.Bucket = &v
  14143. return s
  14144. }
  14145. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  14146. if s.Bucket == nil {
  14147. return v
  14148. }
  14149. return *s.Bucket
  14150. }
  14151. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14152. func (s *DeleteBucketCorsInput) SetExpectedBucketOwner(v string) *DeleteBucketCorsInput {
  14153. s.ExpectedBucketOwner = &v
  14154. return s
  14155. }
  14156. func (s *DeleteBucketCorsInput) getEndpointARN() (arn.Resource, error) {
  14157. if s.Bucket == nil {
  14158. return nil, fmt.Errorf("member Bucket is nil")
  14159. }
  14160. return parseEndpointARN(*s.Bucket)
  14161. }
  14162. func (s *DeleteBucketCorsInput) hasEndpointARN() bool {
  14163. if s.Bucket == nil {
  14164. return false
  14165. }
  14166. return arn.IsARN(*s.Bucket)
  14167. }
  14168. // updateArnableField updates the value of the input field that
  14169. // takes an ARN as an input. This method is useful to backfill
  14170. // the parsed resource name from ARN into the input member.
  14171. // It returns a pointer to a modified copy of input and an error.
  14172. // Note that original input is not modified.
  14173. func (s DeleteBucketCorsInput) updateArnableField(v string) (interface{}, error) {
  14174. if s.Bucket == nil {
  14175. return nil, fmt.Errorf("member Bucket is nil")
  14176. }
  14177. s.Bucket = aws.String(v)
  14178. return &s, nil
  14179. }
  14180. type DeleteBucketCorsOutput struct {
  14181. _ struct{} `type:"structure"`
  14182. }
  14183. // String returns the string representation.
  14184. //
  14185. // API parameter values that are decorated as "sensitive" in the API will not
  14186. // be included in the string output. The member name will be present, but the
  14187. // value will be replaced with "sensitive".
  14188. func (s DeleteBucketCorsOutput) String() string {
  14189. return awsutil.Prettify(s)
  14190. }
  14191. // GoString returns the string representation.
  14192. //
  14193. // API parameter values that are decorated as "sensitive" in the API will not
  14194. // be included in the string output. The member name will be present, but the
  14195. // value will be replaced with "sensitive".
  14196. func (s DeleteBucketCorsOutput) GoString() string {
  14197. return s.String()
  14198. }
  14199. type DeleteBucketEncryptionInput struct {
  14200. _ struct{} `locationName:"DeleteBucketEncryptionRequest" type:"structure"`
  14201. // The name of the bucket containing the server-side encryption configuration
  14202. // to delete.
  14203. //
  14204. // Bucket is a required field
  14205. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14206. // The account ID of the expected bucket owner. If the bucket is owned by a
  14207. // different account, the request fails with the HTTP status code 403 Forbidden
  14208. // (access denied).
  14209. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14210. }
  14211. // String returns the string representation.
  14212. //
  14213. // API parameter values that are decorated as "sensitive" in the API will not
  14214. // be included in the string output. The member name will be present, but the
  14215. // value will be replaced with "sensitive".
  14216. func (s DeleteBucketEncryptionInput) String() string {
  14217. return awsutil.Prettify(s)
  14218. }
  14219. // GoString returns the string representation.
  14220. //
  14221. // API parameter values that are decorated as "sensitive" in the API will not
  14222. // be included in the string output. The member name will be present, but the
  14223. // value will be replaced with "sensitive".
  14224. func (s DeleteBucketEncryptionInput) GoString() string {
  14225. return s.String()
  14226. }
  14227. // Validate inspects the fields of the type to determine if they are valid.
  14228. func (s *DeleteBucketEncryptionInput) Validate() error {
  14229. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  14230. if s.Bucket == nil {
  14231. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14232. }
  14233. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14234. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14235. }
  14236. if invalidParams.Len() > 0 {
  14237. return invalidParams
  14238. }
  14239. return nil
  14240. }
  14241. // SetBucket sets the Bucket field's value.
  14242. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  14243. s.Bucket = &v
  14244. return s
  14245. }
  14246. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  14247. if s.Bucket == nil {
  14248. return v
  14249. }
  14250. return *s.Bucket
  14251. }
  14252. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14253. func (s *DeleteBucketEncryptionInput) SetExpectedBucketOwner(v string) *DeleteBucketEncryptionInput {
  14254. s.ExpectedBucketOwner = &v
  14255. return s
  14256. }
  14257. func (s *DeleteBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
  14258. if s.Bucket == nil {
  14259. return nil, fmt.Errorf("member Bucket is nil")
  14260. }
  14261. return parseEndpointARN(*s.Bucket)
  14262. }
  14263. func (s *DeleteBucketEncryptionInput) hasEndpointARN() bool {
  14264. if s.Bucket == nil {
  14265. return false
  14266. }
  14267. return arn.IsARN(*s.Bucket)
  14268. }
  14269. // updateArnableField updates the value of the input field that
  14270. // takes an ARN as an input. This method is useful to backfill
  14271. // the parsed resource name from ARN into the input member.
  14272. // It returns a pointer to a modified copy of input and an error.
  14273. // Note that original input is not modified.
  14274. func (s DeleteBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
  14275. if s.Bucket == nil {
  14276. return nil, fmt.Errorf("member Bucket is nil")
  14277. }
  14278. s.Bucket = aws.String(v)
  14279. return &s, nil
  14280. }
  14281. type DeleteBucketEncryptionOutput struct {
  14282. _ struct{} `type:"structure"`
  14283. }
  14284. // String returns the string representation.
  14285. //
  14286. // API parameter values that are decorated as "sensitive" in the API will not
  14287. // be included in the string output. The member name will be present, but the
  14288. // value will be replaced with "sensitive".
  14289. func (s DeleteBucketEncryptionOutput) String() string {
  14290. return awsutil.Prettify(s)
  14291. }
  14292. // GoString returns the string representation.
  14293. //
  14294. // API parameter values that are decorated as "sensitive" in the API will not
  14295. // be included in the string output. The member name will be present, but the
  14296. // value will be replaced with "sensitive".
  14297. func (s DeleteBucketEncryptionOutput) GoString() string {
  14298. return s.String()
  14299. }
  14300. type DeleteBucketInput struct {
  14301. _ struct{} `locationName:"DeleteBucketRequest" type:"structure"`
  14302. // Specifies the bucket being deleted.
  14303. //
  14304. // Bucket is a required field
  14305. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14306. // The account ID of the expected bucket owner. If the bucket is owned by a
  14307. // different account, the request fails with the HTTP status code 403 Forbidden
  14308. // (access denied).
  14309. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14310. }
  14311. // String returns the string representation.
  14312. //
  14313. // API parameter values that are decorated as "sensitive" in the API will not
  14314. // be included in the string output. The member name will be present, but the
  14315. // value will be replaced with "sensitive".
  14316. func (s DeleteBucketInput) String() string {
  14317. return awsutil.Prettify(s)
  14318. }
  14319. // GoString returns the string representation.
  14320. //
  14321. // API parameter values that are decorated as "sensitive" in the API will not
  14322. // be included in the string output. The member name will be present, but the
  14323. // value will be replaced with "sensitive".
  14324. func (s DeleteBucketInput) GoString() string {
  14325. return s.String()
  14326. }
  14327. // Validate inspects the fields of the type to determine if they are valid.
  14328. func (s *DeleteBucketInput) Validate() error {
  14329. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  14330. if s.Bucket == nil {
  14331. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14332. }
  14333. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14334. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14335. }
  14336. if invalidParams.Len() > 0 {
  14337. return invalidParams
  14338. }
  14339. return nil
  14340. }
  14341. // SetBucket sets the Bucket field's value.
  14342. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  14343. s.Bucket = &v
  14344. return s
  14345. }
  14346. func (s *DeleteBucketInput) getBucket() (v string) {
  14347. if s.Bucket == nil {
  14348. return v
  14349. }
  14350. return *s.Bucket
  14351. }
  14352. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14353. func (s *DeleteBucketInput) SetExpectedBucketOwner(v string) *DeleteBucketInput {
  14354. s.ExpectedBucketOwner = &v
  14355. return s
  14356. }
  14357. func (s *DeleteBucketInput) getEndpointARN() (arn.Resource, error) {
  14358. if s.Bucket == nil {
  14359. return nil, fmt.Errorf("member Bucket is nil")
  14360. }
  14361. return parseEndpointARN(*s.Bucket)
  14362. }
  14363. func (s *DeleteBucketInput) hasEndpointARN() bool {
  14364. if s.Bucket == nil {
  14365. return false
  14366. }
  14367. return arn.IsARN(*s.Bucket)
  14368. }
  14369. // updateArnableField updates the value of the input field that
  14370. // takes an ARN as an input. This method is useful to backfill
  14371. // the parsed resource name from ARN into the input member.
  14372. // It returns a pointer to a modified copy of input and an error.
  14373. // Note that original input is not modified.
  14374. func (s DeleteBucketInput) updateArnableField(v string) (interface{}, error) {
  14375. if s.Bucket == nil {
  14376. return nil, fmt.Errorf("member Bucket is nil")
  14377. }
  14378. s.Bucket = aws.String(v)
  14379. return &s, nil
  14380. }
  14381. type DeleteBucketIntelligentTieringConfigurationInput struct {
  14382. _ struct{} `locationName:"DeleteBucketIntelligentTieringConfigurationRequest" type:"structure"`
  14383. // The name of the Amazon S3 bucket whose configuration you want to modify or
  14384. // retrieve.
  14385. //
  14386. // Bucket is a required field
  14387. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14388. // The ID used to identify the S3 Intelligent-Tiering configuration.
  14389. //
  14390. // Id is a required field
  14391. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14392. }
  14393. // String returns the string representation.
  14394. //
  14395. // API parameter values that are decorated as "sensitive" in the API will not
  14396. // be included in the string output. The member name will be present, but the
  14397. // value will be replaced with "sensitive".
  14398. func (s DeleteBucketIntelligentTieringConfigurationInput) String() string {
  14399. return awsutil.Prettify(s)
  14400. }
  14401. // GoString returns the string representation.
  14402. //
  14403. // API parameter values that are decorated as "sensitive" in the API will not
  14404. // be included in the string output. The member name will be present, but the
  14405. // value will be replaced with "sensitive".
  14406. func (s DeleteBucketIntelligentTieringConfigurationInput) GoString() string {
  14407. return s.String()
  14408. }
  14409. // Validate inspects the fields of the type to determine if they are valid.
  14410. func (s *DeleteBucketIntelligentTieringConfigurationInput) Validate() error {
  14411. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketIntelligentTieringConfigurationInput"}
  14412. if s.Bucket == nil {
  14413. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14414. }
  14415. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14416. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14417. }
  14418. if s.Id == nil {
  14419. invalidParams.Add(request.NewErrParamRequired("Id"))
  14420. }
  14421. if invalidParams.Len() > 0 {
  14422. return invalidParams
  14423. }
  14424. return nil
  14425. }
  14426. // SetBucket sets the Bucket field's value.
  14427. func (s *DeleteBucketIntelligentTieringConfigurationInput) SetBucket(v string) *DeleteBucketIntelligentTieringConfigurationInput {
  14428. s.Bucket = &v
  14429. return s
  14430. }
  14431. func (s *DeleteBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
  14432. if s.Bucket == nil {
  14433. return v
  14434. }
  14435. return *s.Bucket
  14436. }
  14437. // SetId sets the Id field's value.
  14438. func (s *DeleteBucketIntelligentTieringConfigurationInput) SetId(v string) *DeleteBucketIntelligentTieringConfigurationInput {
  14439. s.Id = &v
  14440. return s
  14441. }
  14442. func (s *DeleteBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
  14443. if s.Bucket == nil {
  14444. return nil, fmt.Errorf("member Bucket is nil")
  14445. }
  14446. return parseEndpointARN(*s.Bucket)
  14447. }
  14448. func (s *DeleteBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
  14449. if s.Bucket == nil {
  14450. return false
  14451. }
  14452. return arn.IsARN(*s.Bucket)
  14453. }
  14454. // updateArnableField updates the value of the input field that
  14455. // takes an ARN as an input. This method is useful to backfill
  14456. // the parsed resource name from ARN into the input member.
  14457. // It returns a pointer to a modified copy of input and an error.
  14458. // Note that original input is not modified.
  14459. func (s DeleteBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
  14460. if s.Bucket == nil {
  14461. return nil, fmt.Errorf("member Bucket is nil")
  14462. }
  14463. s.Bucket = aws.String(v)
  14464. return &s, nil
  14465. }
  14466. type DeleteBucketIntelligentTieringConfigurationOutput struct {
  14467. _ struct{} `type:"structure"`
  14468. }
  14469. // String returns the string representation.
  14470. //
  14471. // API parameter values that are decorated as "sensitive" in the API will not
  14472. // be included in the string output. The member name will be present, but the
  14473. // value will be replaced with "sensitive".
  14474. func (s DeleteBucketIntelligentTieringConfigurationOutput) String() string {
  14475. return awsutil.Prettify(s)
  14476. }
  14477. // GoString returns the string representation.
  14478. //
  14479. // API parameter values that are decorated as "sensitive" in the API will not
  14480. // be included in the string output. The member name will be present, but the
  14481. // value will be replaced with "sensitive".
  14482. func (s DeleteBucketIntelligentTieringConfigurationOutput) GoString() string {
  14483. return s.String()
  14484. }
  14485. type DeleteBucketInventoryConfigurationInput struct {
  14486. _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"`
  14487. // The name of the bucket containing the inventory configuration to delete.
  14488. //
  14489. // Bucket is a required field
  14490. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14491. // The account ID of the expected bucket owner. If the bucket is owned by a
  14492. // different account, the request fails with the HTTP status code 403 Forbidden
  14493. // (access denied).
  14494. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14495. // The ID used to identify the inventory configuration.
  14496. //
  14497. // Id is a required field
  14498. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14499. }
  14500. // String returns the string representation.
  14501. //
  14502. // API parameter values that are decorated as "sensitive" in the API will not
  14503. // be included in the string output. The member name will be present, but the
  14504. // value will be replaced with "sensitive".
  14505. func (s DeleteBucketInventoryConfigurationInput) String() string {
  14506. return awsutil.Prettify(s)
  14507. }
  14508. // GoString returns the string representation.
  14509. //
  14510. // API parameter values that are decorated as "sensitive" in the API will not
  14511. // be included in the string output. The member name will be present, but the
  14512. // value will be replaced with "sensitive".
  14513. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  14514. return s.String()
  14515. }
  14516. // Validate inspects the fields of the type to determine if they are valid.
  14517. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  14518. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  14519. if s.Bucket == nil {
  14520. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14521. }
  14522. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14523. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14524. }
  14525. if s.Id == nil {
  14526. invalidParams.Add(request.NewErrParamRequired("Id"))
  14527. }
  14528. if invalidParams.Len() > 0 {
  14529. return invalidParams
  14530. }
  14531. return nil
  14532. }
  14533. // SetBucket sets the Bucket field's value.
  14534. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  14535. s.Bucket = &v
  14536. return s
  14537. }
  14538. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  14539. if s.Bucket == nil {
  14540. return v
  14541. }
  14542. return *s.Bucket
  14543. }
  14544. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14545. func (s *DeleteBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketInventoryConfigurationInput {
  14546. s.ExpectedBucketOwner = &v
  14547. return s
  14548. }
  14549. // SetId sets the Id field's value.
  14550. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  14551. s.Id = &v
  14552. return s
  14553. }
  14554. func (s *DeleteBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
  14555. if s.Bucket == nil {
  14556. return nil, fmt.Errorf("member Bucket is nil")
  14557. }
  14558. return parseEndpointARN(*s.Bucket)
  14559. }
  14560. func (s *DeleteBucketInventoryConfigurationInput) hasEndpointARN() bool {
  14561. if s.Bucket == nil {
  14562. return false
  14563. }
  14564. return arn.IsARN(*s.Bucket)
  14565. }
  14566. // updateArnableField updates the value of the input field that
  14567. // takes an ARN as an input. This method is useful to backfill
  14568. // the parsed resource name from ARN into the input member.
  14569. // It returns a pointer to a modified copy of input and an error.
  14570. // Note that original input is not modified.
  14571. func (s DeleteBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
  14572. if s.Bucket == nil {
  14573. return nil, fmt.Errorf("member Bucket is nil")
  14574. }
  14575. s.Bucket = aws.String(v)
  14576. return &s, nil
  14577. }
  14578. type DeleteBucketInventoryConfigurationOutput struct {
  14579. _ struct{} `type:"structure"`
  14580. }
  14581. // String returns the string representation.
  14582. //
  14583. // API parameter values that are decorated as "sensitive" in the API will not
  14584. // be included in the string output. The member name will be present, but the
  14585. // value will be replaced with "sensitive".
  14586. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  14587. return awsutil.Prettify(s)
  14588. }
  14589. // GoString returns the string representation.
  14590. //
  14591. // API parameter values that are decorated as "sensitive" in the API will not
  14592. // be included in the string output. The member name will be present, but the
  14593. // value will be replaced with "sensitive".
  14594. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  14595. return s.String()
  14596. }
  14597. type DeleteBucketLifecycleInput struct {
  14598. _ struct{} `locationName:"DeleteBucketLifecycleRequest" type:"structure"`
  14599. // The bucket name of the lifecycle to delete.
  14600. //
  14601. // Bucket is a required field
  14602. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14603. // The account ID of the expected bucket owner. If the bucket is owned by a
  14604. // different account, the request fails with the HTTP status code 403 Forbidden
  14605. // (access denied).
  14606. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14607. }
  14608. // String returns the string representation.
  14609. //
  14610. // API parameter values that are decorated as "sensitive" in the API will not
  14611. // be included in the string output. The member name will be present, but the
  14612. // value will be replaced with "sensitive".
  14613. func (s DeleteBucketLifecycleInput) String() string {
  14614. return awsutil.Prettify(s)
  14615. }
  14616. // GoString returns the string representation.
  14617. //
  14618. // API parameter values that are decorated as "sensitive" in the API will not
  14619. // be included in the string output. The member name will be present, but the
  14620. // value will be replaced with "sensitive".
  14621. func (s DeleteBucketLifecycleInput) GoString() string {
  14622. return s.String()
  14623. }
  14624. // Validate inspects the fields of the type to determine if they are valid.
  14625. func (s *DeleteBucketLifecycleInput) Validate() error {
  14626. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  14627. if s.Bucket == nil {
  14628. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14629. }
  14630. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14631. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14632. }
  14633. if invalidParams.Len() > 0 {
  14634. return invalidParams
  14635. }
  14636. return nil
  14637. }
  14638. // SetBucket sets the Bucket field's value.
  14639. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  14640. s.Bucket = &v
  14641. return s
  14642. }
  14643. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  14644. if s.Bucket == nil {
  14645. return v
  14646. }
  14647. return *s.Bucket
  14648. }
  14649. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14650. func (s *DeleteBucketLifecycleInput) SetExpectedBucketOwner(v string) *DeleteBucketLifecycleInput {
  14651. s.ExpectedBucketOwner = &v
  14652. return s
  14653. }
  14654. func (s *DeleteBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
  14655. if s.Bucket == nil {
  14656. return nil, fmt.Errorf("member Bucket is nil")
  14657. }
  14658. return parseEndpointARN(*s.Bucket)
  14659. }
  14660. func (s *DeleteBucketLifecycleInput) hasEndpointARN() bool {
  14661. if s.Bucket == nil {
  14662. return false
  14663. }
  14664. return arn.IsARN(*s.Bucket)
  14665. }
  14666. // updateArnableField updates the value of the input field that
  14667. // takes an ARN as an input. This method is useful to backfill
  14668. // the parsed resource name from ARN into the input member.
  14669. // It returns a pointer to a modified copy of input and an error.
  14670. // Note that original input is not modified.
  14671. func (s DeleteBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
  14672. if s.Bucket == nil {
  14673. return nil, fmt.Errorf("member Bucket is nil")
  14674. }
  14675. s.Bucket = aws.String(v)
  14676. return &s, nil
  14677. }
  14678. type DeleteBucketLifecycleOutput struct {
  14679. _ struct{} `type:"structure"`
  14680. }
  14681. // String returns the string representation.
  14682. //
  14683. // API parameter values that are decorated as "sensitive" in the API will not
  14684. // be included in the string output. The member name will be present, but the
  14685. // value will be replaced with "sensitive".
  14686. func (s DeleteBucketLifecycleOutput) String() string {
  14687. return awsutil.Prettify(s)
  14688. }
  14689. // GoString returns the string representation.
  14690. //
  14691. // API parameter values that are decorated as "sensitive" in the API will not
  14692. // be included in the string output. The member name will be present, but the
  14693. // value will be replaced with "sensitive".
  14694. func (s DeleteBucketLifecycleOutput) GoString() string {
  14695. return s.String()
  14696. }
  14697. type DeleteBucketMetricsConfigurationInput struct {
  14698. _ struct{} `locationName:"DeleteBucketMetricsConfigurationRequest" type:"structure"`
  14699. // The name of the bucket containing the metrics configuration to delete.
  14700. //
  14701. // Bucket is a required field
  14702. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14703. // The account ID of the expected bucket owner. If the bucket is owned by a
  14704. // different account, the request fails with the HTTP status code 403 Forbidden
  14705. // (access denied).
  14706. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14707. // The ID used to identify the metrics configuration.
  14708. //
  14709. // Id is a required field
  14710. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14711. }
  14712. // String returns the string representation.
  14713. //
  14714. // API parameter values that are decorated as "sensitive" in the API will not
  14715. // be included in the string output. The member name will be present, but the
  14716. // value will be replaced with "sensitive".
  14717. func (s DeleteBucketMetricsConfigurationInput) String() string {
  14718. return awsutil.Prettify(s)
  14719. }
  14720. // GoString returns the string representation.
  14721. //
  14722. // API parameter values that are decorated as "sensitive" in the API will not
  14723. // be included in the string output. The member name will be present, but the
  14724. // value will be replaced with "sensitive".
  14725. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  14726. return s.String()
  14727. }
  14728. // Validate inspects the fields of the type to determine if they are valid.
  14729. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  14730. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  14731. if s.Bucket == nil {
  14732. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14733. }
  14734. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14735. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14736. }
  14737. if s.Id == nil {
  14738. invalidParams.Add(request.NewErrParamRequired("Id"))
  14739. }
  14740. if invalidParams.Len() > 0 {
  14741. return invalidParams
  14742. }
  14743. return nil
  14744. }
  14745. // SetBucket sets the Bucket field's value.
  14746. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  14747. s.Bucket = &v
  14748. return s
  14749. }
  14750. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  14751. if s.Bucket == nil {
  14752. return v
  14753. }
  14754. return *s.Bucket
  14755. }
  14756. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14757. func (s *DeleteBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketMetricsConfigurationInput {
  14758. s.ExpectedBucketOwner = &v
  14759. return s
  14760. }
  14761. // SetId sets the Id field's value.
  14762. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  14763. s.Id = &v
  14764. return s
  14765. }
  14766. func (s *DeleteBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  14767. if s.Bucket == nil {
  14768. return nil, fmt.Errorf("member Bucket is nil")
  14769. }
  14770. return parseEndpointARN(*s.Bucket)
  14771. }
  14772. func (s *DeleteBucketMetricsConfigurationInput) hasEndpointARN() bool {
  14773. if s.Bucket == nil {
  14774. return false
  14775. }
  14776. return arn.IsARN(*s.Bucket)
  14777. }
  14778. // updateArnableField updates the value of the input field that
  14779. // takes an ARN as an input. This method is useful to backfill
  14780. // the parsed resource name from ARN into the input member.
  14781. // It returns a pointer to a modified copy of input and an error.
  14782. // Note that original input is not modified.
  14783. func (s DeleteBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  14784. if s.Bucket == nil {
  14785. return nil, fmt.Errorf("member Bucket is nil")
  14786. }
  14787. s.Bucket = aws.String(v)
  14788. return &s, nil
  14789. }
  14790. type DeleteBucketMetricsConfigurationOutput struct {
  14791. _ struct{} `type:"structure"`
  14792. }
  14793. // String returns the string representation.
  14794. //
  14795. // API parameter values that are decorated as "sensitive" in the API will not
  14796. // be included in the string output. The member name will be present, but the
  14797. // value will be replaced with "sensitive".
  14798. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  14799. return awsutil.Prettify(s)
  14800. }
  14801. // GoString returns the string representation.
  14802. //
  14803. // API parameter values that are decorated as "sensitive" in the API will not
  14804. // be included in the string output. The member name will be present, but the
  14805. // value will be replaced with "sensitive".
  14806. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  14807. return s.String()
  14808. }
  14809. type DeleteBucketOutput struct {
  14810. _ struct{} `type:"structure"`
  14811. }
  14812. // String returns the string representation.
  14813. //
  14814. // API parameter values that are decorated as "sensitive" in the API will not
  14815. // be included in the string output. The member name will be present, but the
  14816. // value will be replaced with "sensitive".
  14817. func (s DeleteBucketOutput) String() string {
  14818. return awsutil.Prettify(s)
  14819. }
  14820. // GoString returns the string representation.
  14821. //
  14822. // API parameter values that are decorated as "sensitive" in the API will not
  14823. // be included in the string output. The member name will be present, but the
  14824. // value will be replaced with "sensitive".
  14825. func (s DeleteBucketOutput) GoString() string {
  14826. return s.String()
  14827. }
  14828. type DeleteBucketOwnershipControlsInput struct {
  14829. _ struct{} `locationName:"DeleteBucketOwnershipControlsRequest" type:"structure"`
  14830. // The Amazon S3 bucket whose OwnershipControls you want to delete.
  14831. //
  14832. // Bucket is a required field
  14833. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14834. // The account ID of the expected bucket owner. If the bucket is owned by a
  14835. // different account, the request fails with the HTTP status code 403 Forbidden
  14836. // (access denied).
  14837. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14838. }
  14839. // String returns the string representation.
  14840. //
  14841. // API parameter values that are decorated as "sensitive" in the API will not
  14842. // be included in the string output. The member name will be present, but the
  14843. // value will be replaced with "sensitive".
  14844. func (s DeleteBucketOwnershipControlsInput) String() string {
  14845. return awsutil.Prettify(s)
  14846. }
  14847. // GoString returns the string representation.
  14848. //
  14849. // API parameter values that are decorated as "sensitive" in the API will not
  14850. // be included in the string output. The member name will be present, but the
  14851. // value will be replaced with "sensitive".
  14852. func (s DeleteBucketOwnershipControlsInput) GoString() string {
  14853. return s.String()
  14854. }
  14855. // Validate inspects the fields of the type to determine if they are valid.
  14856. func (s *DeleteBucketOwnershipControlsInput) Validate() error {
  14857. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketOwnershipControlsInput"}
  14858. if s.Bucket == nil {
  14859. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14860. }
  14861. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14862. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14863. }
  14864. if invalidParams.Len() > 0 {
  14865. return invalidParams
  14866. }
  14867. return nil
  14868. }
  14869. // SetBucket sets the Bucket field's value.
  14870. func (s *DeleteBucketOwnershipControlsInput) SetBucket(v string) *DeleteBucketOwnershipControlsInput {
  14871. s.Bucket = &v
  14872. return s
  14873. }
  14874. func (s *DeleteBucketOwnershipControlsInput) getBucket() (v string) {
  14875. if s.Bucket == nil {
  14876. return v
  14877. }
  14878. return *s.Bucket
  14879. }
  14880. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14881. func (s *DeleteBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *DeleteBucketOwnershipControlsInput {
  14882. s.ExpectedBucketOwner = &v
  14883. return s
  14884. }
  14885. func (s *DeleteBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
  14886. if s.Bucket == nil {
  14887. return nil, fmt.Errorf("member Bucket is nil")
  14888. }
  14889. return parseEndpointARN(*s.Bucket)
  14890. }
  14891. func (s *DeleteBucketOwnershipControlsInput) hasEndpointARN() bool {
  14892. if s.Bucket == nil {
  14893. return false
  14894. }
  14895. return arn.IsARN(*s.Bucket)
  14896. }
  14897. // updateArnableField updates the value of the input field that
  14898. // takes an ARN as an input. This method is useful to backfill
  14899. // the parsed resource name from ARN into the input member.
  14900. // It returns a pointer to a modified copy of input and an error.
  14901. // Note that original input is not modified.
  14902. func (s DeleteBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
  14903. if s.Bucket == nil {
  14904. return nil, fmt.Errorf("member Bucket is nil")
  14905. }
  14906. s.Bucket = aws.String(v)
  14907. return &s, nil
  14908. }
  14909. type DeleteBucketOwnershipControlsOutput struct {
  14910. _ struct{} `type:"structure"`
  14911. }
  14912. // String returns the string representation.
  14913. //
  14914. // API parameter values that are decorated as "sensitive" in the API will not
  14915. // be included in the string output. The member name will be present, but the
  14916. // value will be replaced with "sensitive".
  14917. func (s DeleteBucketOwnershipControlsOutput) String() string {
  14918. return awsutil.Prettify(s)
  14919. }
  14920. // GoString returns the string representation.
  14921. //
  14922. // API parameter values that are decorated as "sensitive" in the API will not
  14923. // be included in the string output. The member name will be present, but the
  14924. // value will be replaced with "sensitive".
  14925. func (s DeleteBucketOwnershipControlsOutput) GoString() string {
  14926. return s.String()
  14927. }
  14928. type DeleteBucketPolicyInput struct {
  14929. _ struct{} `locationName:"DeleteBucketPolicyRequest" type:"structure"`
  14930. // The bucket name.
  14931. //
  14932. // Bucket is a required field
  14933. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14934. // The account ID of the expected bucket owner. If the bucket is owned by a
  14935. // different account, the request fails with the HTTP status code 403 Forbidden
  14936. // (access denied).
  14937. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  14938. }
  14939. // String returns the string representation.
  14940. //
  14941. // API parameter values that are decorated as "sensitive" in the API will not
  14942. // be included in the string output. The member name will be present, but the
  14943. // value will be replaced with "sensitive".
  14944. func (s DeleteBucketPolicyInput) String() string {
  14945. return awsutil.Prettify(s)
  14946. }
  14947. // GoString returns the string representation.
  14948. //
  14949. // API parameter values that are decorated as "sensitive" in the API will not
  14950. // be included in the string output. The member name will be present, but the
  14951. // value will be replaced with "sensitive".
  14952. func (s DeleteBucketPolicyInput) GoString() string {
  14953. return s.String()
  14954. }
  14955. // Validate inspects the fields of the type to determine if they are valid.
  14956. func (s *DeleteBucketPolicyInput) Validate() error {
  14957. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  14958. if s.Bucket == nil {
  14959. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14960. }
  14961. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14962. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14963. }
  14964. if invalidParams.Len() > 0 {
  14965. return invalidParams
  14966. }
  14967. return nil
  14968. }
  14969. // SetBucket sets the Bucket field's value.
  14970. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  14971. s.Bucket = &v
  14972. return s
  14973. }
  14974. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  14975. if s.Bucket == nil {
  14976. return v
  14977. }
  14978. return *s.Bucket
  14979. }
  14980. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  14981. func (s *DeleteBucketPolicyInput) SetExpectedBucketOwner(v string) *DeleteBucketPolicyInput {
  14982. s.ExpectedBucketOwner = &v
  14983. return s
  14984. }
  14985. func (s *DeleteBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
  14986. if s.Bucket == nil {
  14987. return nil, fmt.Errorf("member Bucket is nil")
  14988. }
  14989. return parseEndpointARN(*s.Bucket)
  14990. }
  14991. func (s *DeleteBucketPolicyInput) hasEndpointARN() bool {
  14992. if s.Bucket == nil {
  14993. return false
  14994. }
  14995. return arn.IsARN(*s.Bucket)
  14996. }
  14997. // updateArnableField updates the value of the input field that
  14998. // takes an ARN as an input. This method is useful to backfill
  14999. // the parsed resource name from ARN into the input member.
  15000. // It returns a pointer to a modified copy of input and an error.
  15001. // Note that original input is not modified.
  15002. func (s DeleteBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
  15003. if s.Bucket == nil {
  15004. return nil, fmt.Errorf("member Bucket is nil")
  15005. }
  15006. s.Bucket = aws.String(v)
  15007. return &s, nil
  15008. }
  15009. type DeleteBucketPolicyOutput struct {
  15010. _ struct{} `type:"structure"`
  15011. }
  15012. // String returns the string representation.
  15013. //
  15014. // API parameter values that are decorated as "sensitive" in the API will not
  15015. // be included in the string output. The member name will be present, but the
  15016. // value will be replaced with "sensitive".
  15017. func (s DeleteBucketPolicyOutput) String() string {
  15018. return awsutil.Prettify(s)
  15019. }
  15020. // GoString returns the string representation.
  15021. //
  15022. // API parameter values that are decorated as "sensitive" in the API will not
  15023. // be included in the string output. The member name will be present, but the
  15024. // value will be replaced with "sensitive".
  15025. func (s DeleteBucketPolicyOutput) GoString() string {
  15026. return s.String()
  15027. }
  15028. type DeleteBucketReplicationInput struct {
  15029. _ struct{} `locationName:"DeleteBucketReplicationRequest" type:"structure"`
  15030. // The bucket name.
  15031. //
  15032. // Bucket is a required field
  15033. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15034. // The account ID of the expected bucket owner. If the bucket is owned by a
  15035. // different account, the request fails with the HTTP status code 403 Forbidden
  15036. // (access denied).
  15037. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15038. }
  15039. // String returns the string representation.
  15040. //
  15041. // API parameter values that are decorated as "sensitive" in the API will not
  15042. // be included in the string output. The member name will be present, but the
  15043. // value will be replaced with "sensitive".
  15044. func (s DeleteBucketReplicationInput) String() string {
  15045. return awsutil.Prettify(s)
  15046. }
  15047. // GoString returns the string representation.
  15048. //
  15049. // API parameter values that are decorated as "sensitive" in the API will not
  15050. // be included in the string output. The member name will be present, but the
  15051. // value will be replaced with "sensitive".
  15052. func (s DeleteBucketReplicationInput) GoString() string {
  15053. return s.String()
  15054. }
  15055. // Validate inspects the fields of the type to determine if they are valid.
  15056. func (s *DeleteBucketReplicationInput) Validate() error {
  15057. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  15058. if s.Bucket == nil {
  15059. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15060. }
  15061. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15062. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15063. }
  15064. if invalidParams.Len() > 0 {
  15065. return invalidParams
  15066. }
  15067. return nil
  15068. }
  15069. // SetBucket sets the Bucket field's value.
  15070. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  15071. s.Bucket = &v
  15072. return s
  15073. }
  15074. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  15075. if s.Bucket == nil {
  15076. return v
  15077. }
  15078. return *s.Bucket
  15079. }
  15080. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15081. func (s *DeleteBucketReplicationInput) SetExpectedBucketOwner(v string) *DeleteBucketReplicationInput {
  15082. s.ExpectedBucketOwner = &v
  15083. return s
  15084. }
  15085. func (s *DeleteBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
  15086. if s.Bucket == nil {
  15087. return nil, fmt.Errorf("member Bucket is nil")
  15088. }
  15089. return parseEndpointARN(*s.Bucket)
  15090. }
  15091. func (s *DeleteBucketReplicationInput) hasEndpointARN() bool {
  15092. if s.Bucket == nil {
  15093. return false
  15094. }
  15095. return arn.IsARN(*s.Bucket)
  15096. }
  15097. // updateArnableField updates the value of the input field that
  15098. // takes an ARN as an input. This method is useful to backfill
  15099. // the parsed resource name from ARN into the input member.
  15100. // It returns a pointer to a modified copy of input and an error.
  15101. // Note that original input is not modified.
  15102. func (s DeleteBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
  15103. if s.Bucket == nil {
  15104. return nil, fmt.Errorf("member Bucket is nil")
  15105. }
  15106. s.Bucket = aws.String(v)
  15107. return &s, nil
  15108. }
  15109. type DeleteBucketReplicationOutput struct {
  15110. _ struct{} `type:"structure"`
  15111. }
  15112. // String returns the string representation.
  15113. //
  15114. // API parameter values that are decorated as "sensitive" in the API will not
  15115. // be included in the string output. The member name will be present, but the
  15116. // value will be replaced with "sensitive".
  15117. func (s DeleteBucketReplicationOutput) String() string {
  15118. return awsutil.Prettify(s)
  15119. }
  15120. // GoString returns the string representation.
  15121. //
  15122. // API parameter values that are decorated as "sensitive" in the API will not
  15123. // be included in the string output. The member name will be present, but the
  15124. // value will be replaced with "sensitive".
  15125. func (s DeleteBucketReplicationOutput) GoString() string {
  15126. return s.String()
  15127. }
  15128. type DeleteBucketTaggingInput struct {
  15129. _ struct{} `locationName:"DeleteBucketTaggingRequest" type:"structure"`
  15130. // The bucket that has the tag set to be removed.
  15131. //
  15132. // Bucket is a required field
  15133. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15134. // The account ID of the expected bucket owner. If the bucket is owned by a
  15135. // different account, the request fails with the HTTP status code 403 Forbidden
  15136. // (access denied).
  15137. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15138. }
  15139. // String returns the string representation.
  15140. //
  15141. // API parameter values that are decorated as "sensitive" in the API will not
  15142. // be included in the string output. The member name will be present, but the
  15143. // value will be replaced with "sensitive".
  15144. func (s DeleteBucketTaggingInput) String() string {
  15145. return awsutil.Prettify(s)
  15146. }
  15147. // GoString returns the string representation.
  15148. //
  15149. // API parameter values that are decorated as "sensitive" in the API will not
  15150. // be included in the string output. The member name will be present, but the
  15151. // value will be replaced with "sensitive".
  15152. func (s DeleteBucketTaggingInput) GoString() string {
  15153. return s.String()
  15154. }
  15155. // Validate inspects the fields of the type to determine if they are valid.
  15156. func (s *DeleteBucketTaggingInput) Validate() error {
  15157. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  15158. if s.Bucket == nil {
  15159. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15160. }
  15161. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15162. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15163. }
  15164. if invalidParams.Len() > 0 {
  15165. return invalidParams
  15166. }
  15167. return nil
  15168. }
  15169. // SetBucket sets the Bucket field's value.
  15170. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  15171. s.Bucket = &v
  15172. return s
  15173. }
  15174. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  15175. if s.Bucket == nil {
  15176. return v
  15177. }
  15178. return *s.Bucket
  15179. }
  15180. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15181. func (s *DeleteBucketTaggingInput) SetExpectedBucketOwner(v string) *DeleteBucketTaggingInput {
  15182. s.ExpectedBucketOwner = &v
  15183. return s
  15184. }
  15185. func (s *DeleteBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
  15186. if s.Bucket == nil {
  15187. return nil, fmt.Errorf("member Bucket is nil")
  15188. }
  15189. return parseEndpointARN(*s.Bucket)
  15190. }
  15191. func (s *DeleteBucketTaggingInput) hasEndpointARN() bool {
  15192. if s.Bucket == nil {
  15193. return false
  15194. }
  15195. return arn.IsARN(*s.Bucket)
  15196. }
  15197. // updateArnableField updates the value of the input field that
  15198. // takes an ARN as an input. This method is useful to backfill
  15199. // the parsed resource name from ARN into the input member.
  15200. // It returns a pointer to a modified copy of input and an error.
  15201. // Note that original input is not modified.
  15202. func (s DeleteBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
  15203. if s.Bucket == nil {
  15204. return nil, fmt.Errorf("member Bucket is nil")
  15205. }
  15206. s.Bucket = aws.String(v)
  15207. return &s, nil
  15208. }
  15209. type DeleteBucketTaggingOutput struct {
  15210. _ struct{} `type:"structure"`
  15211. }
  15212. // String returns the string representation.
  15213. //
  15214. // API parameter values that are decorated as "sensitive" in the API will not
  15215. // be included in the string output. The member name will be present, but the
  15216. // value will be replaced with "sensitive".
  15217. func (s DeleteBucketTaggingOutput) String() string {
  15218. return awsutil.Prettify(s)
  15219. }
  15220. // GoString returns the string representation.
  15221. //
  15222. // API parameter values that are decorated as "sensitive" in the API will not
  15223. // be included in the string output. The member name will be present, but the
  15224. // value will be replaced with "sensitive".
  15225. func (s DeleteBucketTaggingOutput) GoString() string {
  15226. return s.String()
  15227. }
  15228. type DeleteBucketWebsiteInput struct {
  15229. _ struct{} `locationName:"DeleteBucketWebsiteRequest" type:"structure"`
  15230. // The bucket name for which you want to remove the website configuration.
  15231. //
  15232. // Bucket is a required field
  15233. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15234. // The account ID of the expected bucket owner. If the bucket is owned by a
  15235. // different account, the request fails with the HTTP status code 403 Forbidden
  15236. // (access denied).
  15237. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15238. }
  15239. // String returns the string representation.
  15240. //
  15241. // API parameter values that are decorated as "sensitive" in the API will not
  15242. // be included in the string output. The member name will be present, but the
  15243. // value will be replaced with "sensitive".
  15244. func (s DeleteBucketWebsiteInput) String() string {
  15245. return awsutil.Prettify(s)
  15246. }
  15247. // GoString returns the string representation.
  15248. //
  15249. // API parameter values that are decorated as "sensitive" in the API will not
  15250. // be included in the string output. The member name will be present, but the
  15251. // value will be replaced with "sensitive".
  15252. func (s DeleteBucketWebsiteInput) GoString() string {
  15253. return s.String()
  15254. }
  15255. // Validate inspects the fields of the type to determine if they are valid.
  15256. func (s *DeleteBucketWebsiteInput) Validate() error {
  15257. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  15258. if s.Bucket == nil {
  15259. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15260. }
  15261. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15262. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15263. }
  15264. if invalidParams.Len() > 0 {
  15265. return invalidParams
  15266. }
  15267. return nil
  15268. }
  15269. // SetBucket sets the Bucket field's value.
  15270. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  15271. s.Bucket = &v
  15272. return s
  15273. }
  15274. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  15275. if s.Bucket == nil {
  15276. return v
  15277. }
  15278. return *s.Bucket
  15279. }
  15280. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15281. func (s *DeleteBucketWebsiteInput) SetExpectedBucketOwner(v string) *DeleteBucketWebsiteInput {
  15282. s.ExpectedBucketOwner = &v
  15283. return s
  15284. }
  15285. func (s *DeleteBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
  15286. if s.Bucket == nil {
  15287. return nil, fmt.Errorf("member Bucket is nil")
  15288. }
  15289. return parseEndpointARN(*s.Bucket)
  15290. }
  15291. func (s *DeleteBucketWebsiteInput) hasEndpointARN() bool {
  15292. if s.Bucket == nil {
  15293. return false
  15294. }
  15295. return arn.IsARN(*s.Bucket)
  15296. }
  15297. // updateArnableField updates the value of the input field that
  15298. // takes an ARN as an input. This method is useful to backfill
  15299. // the parsed resource name from ARN into the input member.
  15300. // It returns a pointer to a modified copy of input and an error.
  15301. // Note that original input is not modified.
  15302. func (s DeleteBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
  15303. if s.Bucket == nil {
  15304. return nil, fmt.Errorf("member Bucket is nil")
  15305. }
  15306. s.Bucket = aws.String(v)
  15307. return &s, nil
  15308. }
  15309. type DeleteBucketWebsiteOutput struct {
  15310. _ struct{} `type:"structure"`
  15311. }
  15312. // String returns the string representation.
  15313. //
  15314. // API parameter values that are decorated as "sensitive" in the API will not
  15315. // be included in the string output. The member name will be present, but the
  15316. // value will be replaced with "sensitive".
  15317. func (s DeleteBucketWebsiteOutput) String() string {
  15318. return awsutil.Prettify(s)
  15319. }
  15320. // GoString returns the string representation.
  15321. //
  15322. // API parameter values that are decorated as "sensitive" in the API will not
  15323. // be included in the string output. The member name will be present, but the
  15324. // value will be replaced with "sensitive".
  15325. func (s DeleteBucketWebsiteOutput) GoString() string {
  15326. return s.String()
  15327. }
  15328. // Information about the delete marker.
  15329. type DeleteMarkerEntry struct {
  15330. _ struct{} `type:"structure"`
  15331. // Specifies whether the object is (true) or is not (false) the latest version
  15332. // of an object.
  15333. IsLatest *bool `type:"boolean"`
  15334. // The object key.
  15335. Key *string `min:"1" type:"string"`
  15336. // Date and time the object was last modified.
  15337. LastModified *time.Time `type:"timestamp"`
  15338. // The account that created the delete marker.>
  15339. Owner *Owner `type:"structure"`
  15340. // Version ID of an object.
  15341. VersionId *string `type:"string"`
  15342. }
  15343. // String returns the string representation.
  15344. //
  15345. // API parameter values that are decorated as "sensitive" in the API will not
  15346. // be included in the string output. The member name will be present, but the
  15347. // value will be replaced with "sensitive".
  15348. func (s DeleteMarkerEntry) String() string {
  15349. return awsutil.Prettify(s)
  15350. }
  15351. // GoString returns the string representation.
  15352. //
  15353. // API parameter values that are decorated as "sensitive" in the API will not
  15354. // be included in the string output. The member name will be present, but the
  15355. // value will be replaced with "sensitive".
  15356. func (s DeleteMarkerEntry) GoString() string {
  15357. return s.String()
  15358. }
  15359. // SetIsLatest sets the IsLatest field's value.
  15360. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  15361. s.IsLatest = &v
  15362. return s
  15363. }
  15364. // SetKey sets the Key field's value.
  15365. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  15366. s.Key = &v
  15367. return s
  15368. }
  15369. // SetLastModified sets the LastModified field's value.
  15370. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  15371. s.LastModified = &v
  15372. return s
  15373. }
  15374. // SetOwner sets the Owner field's value.
  15375. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  15376. s.Owner = v
  15377. return s
  15378. }
  15379. // SetVersionId sets the VersionId field's value.
  15380. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  15381. s.VersionId = &v
  15382. return s
  15383. }
  15384. // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
  15385. // in your replication configuration, you must also include a DeleteMarkerReplication
  15386. // element. If your Filter includes a Tag element, the DeleteMarkerReplication
  15387. // Status must be set to Disabled, because Amazon S3 does not support replicating
  15388. // delete markers for tag-based rules. For an example configuration, see Basic
  15389. // Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
  15390. //
  15391. // For more information about delete marker replication, see Basic Rule Configuration
  15392. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
  15393. //
  15394. // If you are using an earlier version of the replication configuration, Amazon
  15395. // S3 handles replication of delete markers differently. For more information,
  15396. // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
  15397. type DeleteMarkerReplication struct {
  15398. _ struct{} `type:"structure"`
  15399. // Indicates whether to replicate delete markers.
  15400. //
  15401. // Indicates whether to replicate delete markers.
  15402. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
  15403. }
  15404. // String returns the string representation.
  15405. //
  15406. // API parameter values that are decorated as "sensitive" in the API will not
  15407. // be included in the string output. The member name will be present, but the
  15408. // value will be replaced with "sensitive".
  15409. func (s DeleteMarkerReplication) String() string {
  15410. return awsutil.Prettify(s)
  15411. }
  15412. // GoString returns the string representation.
  15413. //
  15414. // API parameter values that are decorated as "sensitive" in the API will not
  15415. // be included in the string output. The member name will be present, but the
  15416. // value will be replaced with "sensitive".
  15417. func (s DeleteMarkerReplication) GoString() string {
  15418. return s.String()
  15419. }
  15420. // SetStatus sets the Status field's value.
  15421. func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
  15422. s.Status = &v
  15423. return s
  15424. }
  15425. type DeleteObjectInput struct {
  15426. _ struct{} `locationName:"DeleteObjectRequest" type:"structure"`
  15427. // The bucket name of the bucket containing the object.
  15428. //
  15429. // When using this action with an access point, you must direct requests to
  15430. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  15431. // When using this action with an access point through the Amazon Web Services
  15432. // SDKs, you provide the access point ARN in place of the bucket name. For more
  15433. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  15434. // in the Amazon S3 User Guide.
  15435. //
  15436. // When using this action with Amazon S3 on Outposts, you must direct requests
  15437. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  15438. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  15439. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  15440. // you provide the Outposts bucket ARN in place of the bucket name. For more
  15441. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  15442. // in the Amazon S3 User Guide.
  15443. //
  15444. // Bucket is a required field
  15445. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15446. // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
  15447. // to process this operation. To use this header, you must have the s3:BypassGovernanceRetention
  15448. // permission.
  15449. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  15450. // The account ID of the expected bucket owner. If the bucket is owned by a
  15451. // different account, the request fails with the HTTP status code 403 Forbidden
  15452. // (access denied).
  15453. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15454. // Key name of the object to delete.
  15455. //
  15456. // Key is a required field
  15457. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15458. // The concatenation of the authentication device's serial number, a space,
  15459. // and the value that is displayed on your authentication device. Required to
  15460. // permanently delete a versioned object if versioning is configured with MFA
  15461. // delete enabled.
  15462. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  15463. // Confirms that the requester knows that they will be charged for the request.
  15464. // Bucket owners need not specify this parameter in their requests. For information
  15465. // about downloading objects from Requester Pays buckets, see Downloading Objects
  15466. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  15467. // in the Amazon S3 User Guide.
  15468. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15469. // VersionId used to reference a specific version of the object.
  15470. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15471. }
  15472. // String returns the string representation.
  15473. //
  15474. // API parameter values that are decorated as "sensitive" in the API will not
  15475. // be included in the string output. The member name will be present, but the
  15476. // value will be replaced with "sensitive".
  15477. func (s DeleteObjectInput) String() string {
  15478. return awsutil.Prettify(s)
  15479. }
  15480. // GoString returns the string representation.
  15481. //
  15482. // API parameter values that are decorated as "sensitive" in the API will not
  15483. // be included in the string output. The member name will be present, but the
  15484. // value will be replaced with "sensitive".
  15485. func (s DeleteObjectInput) GoString() string {
  15486. return s.String()
  15487. }
  15488. // Validate inspects the fields of the type to determine if they are valid.
  15489. func (s *DeleteObjectInput) Validate() error {
  15490. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  15491. if s.Bucket == nil {
  15492. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15493. }
  15494. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15495. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15496. }
  15497. if s.Key == nil {
  15498. invalidParams.Add(request.NewErrParamRequired("Key"))
  15499. }
  15500. if s.Key != nil && len(*s.Key) < 1 {
  15501. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15502. }
  15503. if invalidParams.Len() > 0 {
  15504. return invalidParams
  15505. }
  15506. return nil
  15507. }
  15508. // SetBucket sets the Bucket field's value.
  15509. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  15510. s.Bucket = &v
  15511. return s
  15512. }
  15513. func (s *DeleteObjectInput) getBucket() (v string) {
  15514. if s.Bucket == nil {
  15515. return v
  15516. }
  15517. return *s.Bucket
  15518. }
  15519. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  15520. func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
  15521. s.BypassGovernanceRetention = &v
  15522. return s
  15523. }
  15524. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15525. func (s *DeleteObjectInput) SetExpectedBucketOwner(v string) *DeleteObjectInput {
  15526. s.ExpectedBucketOwner = &v
  15527. return s
  15528. }
  15529. // SetKey sets the Key field's value.
  15530. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  15531. s.Key = &v
  15532. return s
  15533. }
  15534. // SetMFA sets the MFA field's value.
  15535. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  15536. s.MFA = &v
  15537. return s
  15538. }
  15539. // SetRequestPayer sets the RequestPayer field's value.
  15540. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  15541. s.RequestPayer = &v
  15542. return s
  15543. }
  15544. // SetVersionId sets the VersionId field's value.
  15545. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  15546. s.VersionId = &v
  15547. return s
  15548. }
  15549. func (s *DeleteObjectInput) getEndpointARN() (arn.Resource, error) {
  15550. if s.Bucket == nil {
  15551. return nil, fmt.Errorf("member Bucket is nil")
  15552. }
  15553. return parseEndpointARN(*s.Bucket)
  15554. }
  15555. func (s *DeleteObjectInput) hasEndpointARN() bool {
  15556. if s.Bucket == nil {
  15557. return false
  15558. }
  15559. return arn.IsARN(*s.Bucket)
  15560. }
  15561. // updateArnableField updates the value of the input field that
  15562. // takes an ARN as an input. This method is useful to backfill
  15563. // the parsed resource name from ARN into the input member.
  15564. // It returns a pointer to a modified copy of input and an error.
  15565. // Note that original input is not modified.
  15566. func (s DeleteObjectInput) updateArnableField(v string) (interface{}, error) {
  15567. if s.Bucket == nil {
  15568. return nil, fmt.Errorf("member Bucket is nil")
  15569. }
  15570. s.Bucket = aws.String(v)
  15571. return &s, nil
  15572. }
  15573. type DeleteObjectOutput struct {
  15574. _ struct{} `type:"structure"`
  15575. // Specifies whether the versioned object that was permanently deleted was (true)
  15576. // or was not (false) a delete marker.
  15577. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  15578. // If present, indicates that the requester was successfully charged for the
  15579. // request.
  15580. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15581. // Returns the version ID of the delete marker created as a result of the DELETE
  15582. // operation.
  15583. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15584. }
  15585. // String returns the string representation.
  15586. //
  15587. // API parameter values that are decorated as "sensitive" in the API will not
  15588. // be included in the string output. The member name will be present, but the
  15589. // value will be replaced with "sensitive".
  15590. func (s DeleteObjectOutput) String() string {
  15591. return awsutil.Prettify(s)
  15592. }
  15593. // GoString returns the string representation.
  15594. //
  15595. // API parameter values that are decorated as "sensitive" in the API will not
  15596. // be included in the string output. The member name will be present, but the
  15597. // value will be replaced with "sensitive".
  15598. func (s DeleteObjectOutput) GoString() string {
  15599. return s.String()
  15600. }
  15601. // SetDeleteMarker sets the DeleteMarker field's value.
  15602. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  15603. s.DeleteMarker = &v
  15604. return s
  15605. }
  15606. // SetRequestCharged sets the RequestCharged field's value.
  15607. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  15608. s.RequestCharged = &v
  15609. return s
  15610. }
  15611. // SetVersionId sets the VersionId field's value.
  15612. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  15613. s.VersionId = &v
  15614. return s
  15615. }
  15616. type DeleteObjectTaggingInput struct {
  15617. _ struct{} `locationName:"DeleteObjectTaggingRequest" type:"structure"`
  15618. // The bucket name containing the objects from which to remove the tags.
  15619. //
  15620. // When using this action with an access point, you must direct requests to
  15621. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  15622. // When using this action with an access point through the Amazon Web Services
  15623. // SDKs, you provide the access point ARN in place of the bucket name. For more
  15624. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  15625. // in the Amazon S3 User Guide.
  15626. //
  15627. // When using this action with Amazon S3 on Outposts, you must direct requests
  15628. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  15629. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  15630. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  15631. // you provide the Outposts bucket ARN in place of the bucket name. For more
  15632. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  15633. // in the Amazon S3 User Guide.
  15634. //
  15635. // Bucket is a required field
  15636. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15637. // The account ID of the expected bucket owner. If the bucket is owned by a
  15638. // different account, the request fails with the HTTP status code 403 Forbidden
  15639. // (access denied).
  15640. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15641. // The key that identifies the object in the bucket from which to remove all
  15642. // tags.
  15643. //
  15644. // Key is a required field
  15645. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15646. // The versionId of the object that the tag-set will be removed from.
  15647. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15648. }
  15649. // String returns the string representation.
  15650. //
  15651. // API parameter values that are decorated as "sensitive" in the API will not
  15652. // be included in the string output. The member name will be present, but the
  15653. // value will be replaced with "sensitive".
  15654. func (s DeleteObjectTaggingInput) String() string {
  15655. return awsutil.Prettify(s)
  15656. }
  15657. // GoString returns the string representation.
  15658. //
  15659. // API parameter values that are decorated as "sensitive" in the API will not
  15660. // be included in the string output. The member name will be present, but the
  15661. // value will be replaced with "sensitive".
  15662. func (s DeleteObjectTaggingInput) GoString() string {
  15663. return s.String()
  15664. }
  15665. // Validate inspects the fields of the type to determine if they are valid.
  15666. func (s *DeleteObjectTaggingInput) Validate() error {
  15667. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  15668. if s.Bucket == nil {
  15669. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15670. }
  15671. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15672. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15673. }
  15674. if s.Key == nil {
  15675. invalidParams.Add(request.NewErrParamRequired("Key"))
  15676. }
  15677. if s.Key != nil && len(*s.Key) < 1 {
  15678. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15679. }
  15680. if invalidParams.Len() > 0 {
  15681. return invalidParams
  15682. }
  15683. return nil
  15684. }
  15685. // SetBucket sets the Bucket field's value.
  15686. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  15687. s.Bucket = &v
  15688. return s
  15689. }
  15690. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  15691. if s.Bucket == nil {
  15692. return v
  15693. }
  15694. return *s.Bucket
  15695. }
  15696. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15697. func (s *DeleteObjectTaggingInput) SetExpectedBucketOwner(v string) *DeleteObjectTaggingInput {
  15698. s.ExpectedBucketOwner = &v
  15699. return s
  15700. }
  15701. // SetKey sets the Key field's value.
  15702. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  15703. s.Key = &v
  15704. return s
  15705. }
  15706. // SetVersionId sets the VersionId field's value.
  15707. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  15708. s.VersionId = &v
  15709. return s
  15710. }
  15711. func (s *DeleteObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
  15712. if s.Bucket == nil {
  15713. return nil, fmt.Errorf("member Bucket is nil")
  15714. }
  15715. return parseEndpointARN(*s.Bucket)
  15716. }
  15717. func (s *DeleteObjectTaggingInput) hasEndpointARN() bool {
  15718. if s.Bucket == nil {
  15719. return false
  15720. }
  15721. return arn.IsARN(*s.Bucket)
  15722. }
  15723. // updateArnableField updates the value of the input field that
  15724. // takes an ARN as an input. This method is useful to backfill
  15725. // the parsed resource name from ARN into the input member.
  15726. // It returns a pointer to a modified copy of input and an error.
  15727. // Note that original input is not modified.
  15728. func (s DeleteObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
  15729. if s.Bucket == nil {
  15730. return nil, fmt.Errorf("member Bucket is nil")
  15731. }
  15732. s.Bucket = aws.String(v)
  15733. return &s, nil
  15734. }
  15735. type DeleteObjectTaggingOutput struct {
  15736. _ struct{} `type:"structure"`
  15737. // The versionId of the object the tag-set was removed from.
  15738. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15739. }
  15740. // String returns the string representation.
  15741. //
  15742. // API parameter values that are decorated as "sensitive" in the API will not
  15743. // be included in the string output. The member name will be present, but the
  15744. // value will be replaced with "sensitive".
  15745. func (s DeleteObjectTaggingOutput) String() string {
  15746. return awsutil.Prettify(s)
  15747. }
  15748. // GoString returns the string representation.
  15749. //
  15750. // API parameter values that are decorated as "sensitive" in the API will not
  15751. // be included in the string output. The member name will be present, but the
  15752. // value will be replaced with "sensitive".
  15753. func (s DeleteObjectTaggingOutput) GoString() string {
  15754. return s.String()
  15755. }
  15756. // SetVersionId sets the VersionId field's value.
  15757. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  15758. s.VersionId = &v
  15759. return s
  15760. }
  15761. type DeleteObjectsInput struct {
  15762. _ struct{} `locationName:"DeleteObjectsRequest" type:"structure" payload:"Delete"`
  15763. // The bucket name containing the objects to delete.
  15764. //
  15765. // When using this action with an access point, you must direct requests to
  15766. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  15767. // When using this action with an access point through the Amazon Web Services
  15768. // SDKs, you provide the access point ARN in place of the bucket name. For more
  15769. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  15770. // in the Amazon S3 User Guide.
  15771. //
  15772. // When using this action with Amazon S3 on Outposts, you must direct requests
  15773. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  15774. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  15775. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  15776. // you provide the Outposts bucket ARN in place of the bucket name. For more
  15777. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  15778. // in the Amazon S3 User Guide.
  15779. //
  15780. // Bucket is a required field
  15781. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15782. // Specifies whether you want to delete this object even if it has a Governance-type
  15783. // Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention
  15784. // permission.
  15785. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  15786. // Indicates the algorithm used to create the checksum for the object when using
  15787. // the SDK. This header will not provide any additional functionality if not
  15788. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  15789. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  15790. // the HTTP status code 400 Bad Request. For more information, see Checking
  15791. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  15792. // in the Amazon S3 User Guide.
  15793. //
  15794. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  15795. // parameter.
  15796. //
  15797. // This checksum algorithm must be the same for all parts and it match the checksum
  15798. // value supplied in the CreateMultipartUpload request.
  15799. //
  15800. // The AWS SDK for Go v1 does not support automatic computing request payload
  15801. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  15802. // is specified for this parameter, the matching algorithm's checksum member
  15803. // must be populated with the algorithm's checksum of the request payload.
  15804. //
  15805. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  15806. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  15807. // to be used.
  15808. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  15809. // Container for the request.
  15810. //
  15811. // Delete is a required field
  15812. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15813. // The account ID of the expected bucket owner. If the bucket is owned by a
  15814. // different account, the request fails with the HTTP status code 403 Forbidden
  15815. // (access denied).
  15816. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15817. // The concatenation of the authentication device's serial number, a space,
  15818. // and the value that is displayed on your authentication device. Required to
  15819. // permanently delete a versioned object if versioning is configured with MFA
  15820. // delete enabled.
  15821. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  15822. // Confirms that the requester knows that they will be charged for the request.
  15823. // Bucket owners need not specify this parameter in their requests. For information
  15824. // about downloading objects from Requester Pays buckets, see Downloading Objects
  15825. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  15826. // in the Amazon S3 User Guide.
  15827. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15828. }
  15829. // String returns the string representation.
  15830. //
  15831. // API parameter values that are decorated as "sensitive" in the API will not
  15832. // be included in the string output. The member name will be present, but the
  15833. // value will be replaced with "sensitive".
  15834. func (s DeleteObjectsInput) String() string {
  15835. return awsutil.Prettify(s)
  15836. }
  15837. // GoString returns the string representation.
  15838. //
  15839. // API parameter values that are decorated as "sensitive" in the API will not
  15840. // be included in the string output. The member name will be present, but the
  15841. // value will be replaced with "sensitive".
  15842. func (s DeleteObjectsInput) GoString() string {
  15843. return s.String()
  15844. }
  15845. // Validate inspects the fields of the type to determine if they are valid.
  15846. func (s *DeleteObjectsInput) Validate() error {
  15847. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  15848. if s.Bucket == nil {
  15849. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15850. }
  15851. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15852. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15853. }
  15854. if s.Delete == nil {
  15855. invalidParams.Add(request.NewErrParamRequired("Delete"))
  15856. }
  15857. if s.Delete != nil {
  15858. if err := s.Delete.Validate(); err != nil {
  15859. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  15860. }
  15861. }
  15862. if invalidParams.Len() > 0 {
  15863. return invalidParams
  15864. }
  15865. return nil
  15866. }
  15867. // SetBucket sets the Bucket field's value.
  15868. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  15869. s.Bucket = &v
  15870. return s
  15871. }
  15872. func (s *DeleteObjectsInput) getBucket() (v string) {
  15873. if s.Bucket == nil {
  15874. return v
  15875. }
  15876. return *s.Bucket
  15877. }
  15878. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  15879. func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
  15880. s.BypassGovernanceRetention = &v
  15881. return s
  15882. }
  15883. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  15884. func (s *DeleteObjectsInput) SetChecksumAlgorithm(v string) *DeleteObjectsInput {
  15885. s.ChecksumAlgorithm = &v
  15886. return s
  15887. }
  15888. // SetDelete sets the Delete field's value.
  15889. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  15890. s.Delete = v
  15891. return s
  15892. }
  15893. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  15894. func (s *DeleteObjectsInput) SetExpectedBucketOwner(v string) *DeleteObjectsInput {
  15895. s.ExpectedBucketOwner = &v
  15896. return s
  15897. }
  15898. // SetMFA sets the MFA field's value.
  15899. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  15900. s.MFA = &v
  15901. return s
  15902. }
  15903. // SetRequestPayer sets the RequestPayer field's value.
  15904. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  15905. s.RequestPayer = &v
  15906. return s
  15907. }
  15908. func (s *DeleteObjectsInput) getEndpointARN() (arn.Resource, error) {
  15909. if s.Bucket == nil {
  15910. return nil, fmt.Errorf("member Bucket is nil")
  15911. }
  15912. return parseEndpointARN(*s.Bucket)
  15913. }
  15914. func (s *DeleteObjectsInput) hasEndpointARN() bool {
  15915. if s.Bucket == nil {
  15916. return false
  15917. }
  15918. return arn.IsARN(*s.Bucket)
  15919. }
  15920. // updateArnableField updates the value of the input field that
  15921. // takes an ARN as an input. This method is useful to backfill
  15922. // the parsed resource name from ARN into the input member.
  15923. // It returns a pointer to a modified copy of input and an error.
  15924. // Note that original input is not modified.
  15925. func (s DeleteObjectsInput) updateArnableField(v string) (interface{}, error) {
  15926. if s.Bucket == nil {
  15927. return nil, fmt.Errorf("member Bucket is nil")
  15928. }
  15929. s.Bucket = aws.String(v)
  15930. return &s, nil
  15931. }
  15932. type DeleteObjectsOutput struct {
  15933. _ struct{} `type:"structure"`
  15934. // Container element for a successful delete. It identifies the object that
  15935. // was successfully deleted.
  15936. Deleted []*DeletedObject `type:"list" flattened:"true"`
  15937. // Container for a failed delete action that describes the object that Amazon
  15938. // S3 attempted to delete and the error it encountered.
  15939. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  15940. // If present, indicates that the requester was successfully charged for the
  15941. // request.
  15942. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15943. }
  15944. // String returns the string representation.
  15945. //
  15946. // API parameter values that are decorated as "sensitive" in the API will not
  15947. // be included in the string output. The member name will be present, but the
  15948. // value will be replaced with "sensitive".
  15949. func (s DeleteObjectsOutput) String() string {
  15950. return awsutil.Prettify(s)
  15951. }
  15952. // GoString returns the string representation.
  15953. //
  15954. // API parameter values that are decorated as "sensitive" in the API will not
  15955. // be included in the string output. The member name will be present, but the
  15956. // value will be replaced with "sensitive".
  15957. func (s DeleteObjectsOutput) GoString() string {
  15958. return s.String()
  15959. }
  15960. // SetDeleted sets the Deleted field's value.
  15961. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  15962. s.Deleted = v
  15963. return s
  15964. }
  15965. // SetErrors sets the Errors field's value.
  15966. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  15967. s.Errors = v
  15968. return s
  15969. }
  15970. // SetRequestCharged sets the RequestCharged field's value.
  15971. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  15972. s.RequestCharged = &v
  15973. return s
  15974. }
  15975. type DeletePublicAccessBlockInput struct {
  15976. _ struct{} `locationName:"DeletePublicAccessBlockRequest" type:"structure"`
  15977. // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
  15978. //
  15979. // Bucket is a required field
  15980. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15981. // The account ID of the expected bucket owner. If the bucket is owned by a
  15982. // different account, the request fails with the HTTP status code 403 Forbidden
  15983. // (access denied).
  15984. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  15985. }
  15986. // String returns the string representation.
  15987. //
  15988. // API parameter values that are decorated as "sensitive" in the API will not
  15989. // be included in the string output. The member name will be present, but the
  15990. // value will be replaced with "sensitive".
  15991. func (s DeletePublicAccessBlockInput) String() string {
  15992. return awsutil.Prettify(s)
  15993. }
  15994. // GoString returns the string representation.
  15995. //
  15996. // API parameter values that are decorated as "sensitive" in the API will not
  15997. // be included in the string output. The member name will be present, but the
  15998. // value will be replaced with "sensitive".
  15999. func (s DeletePublicAccessBlockInput) GoString() string {
  16000. return s.String()
  16001. }
  16002. // Validate inspects the fields of the type to determine if they are valid.
  16003. func (s *DeletePublicAccessBlockInput) Validate() error {
  16004. invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
  16005. if s.Bucket == nil {
  16006. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16007. }
  16008. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16009. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16010. }
  16011. if invalidParams.Len() > 0 {
  16012. return invalidParams
  16013. }
  16014. return nil
  16015. }
  16016. // SetBucket sets the Bucket field's value.
  16017. func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
  16018. s.Bucket = &v
  16019. return s
  16020. }
  16021. func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
  16022. if s.Bucket == nil {
  16023. return v
  16024. }
  16025. return *s.Bucket
  16026. }
  16027. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  16028. func (s *DeletePublicAccessBlockInput) SetExpectedBucketOwner(v string) *DeletePublicAccessBlockInput {
  16029. s.ExpectedBucketOwner = &v
  16030. return s
  16031. }
  16032. func (s *DeletePublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
  16033. if s.Bucket == nil {
  16034. return nil, fmt.Errorf("member Bucket is nil")
  16035. }
  16036. return parseEndpointARN(*s.Bucket)
  16037. }
  16038. func (s *DeletePublicAccessBlockInput) hasEndpointARN() bool {
  16039. if s.Bucket == nil {
  16040. return false
  16041. }
  16042. return arn.IsARN(*s.Bucket)
  16043. }
  16044. // updateArnableField updates the value of the input field that
  16045. // takes an ARN as an input. This method is useful to backfill
  16046. // the parsed resource name from ARN into the input member.
  16047. // It returns a pointer to a modified copy of input and an error.
  16048. // Note that original input is not modified.
  16049. func (s DeletePublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
  16050. if s.Bucket == nil {
  16051. return nil, fmt.Errorf("member Bucket is nil")
  16052. }
  16053. s.Bucket = aws.String(v)
  16054. return &s, nil
  16055. }
  16056. type DeletePublicAccessBlockOutput struct {
  16057. _ struct{} `type:"structure"`
  16058. }
  16059. // String returns the string representation.
  16060. //
  16061. // API parameter values that are decorated as "sensitive" in the API will not
  16062. // be included in the string output. The member name will be present, but the
  16063. // value will be replaced with "sensitive".
  16064. func (s DeletePublicAccessBlockOutput) String() string {
  16065. return awsutil.Prettify(s)
  16066. }
  16067. // GoString returns the string representation.
  16068. //
  16069. // API parameter values that are decorated as "sensitive" in the API will not
  16070. // be included in the string output. The member name will be present, but the
  16071. // value will be replaced with "sensitive".
  16072. func (s DeletePublicAccessBlockOutput) GoString() string {
  16073. return s.String()
  16074. }
  16075. // Information about the deleted object.
  16076. type DeletedObject struct {
  16077. _ struct{} `type:"structure"`
  16078. // Specifies whether the versioned object that was permanently deleted was (true)
  16079. // or was not (false) a delete marker. In a simple DELETE, this header indicates
  16080. // whether (true) or not (false) a delete marker was created.
  16081. DeleteMarker *bool `type:"boolean"`
  16082. // The version ID of the delete marker created as a result of the DELETE operation.
  16083. // If you delete a specific object version, the value returned by this header
  16084. // is the version ID of the object version deleted.
  16085. DeleteMarkerVersionId *string `type:"string"`
  16086. // The name of the deleted object.
  16087. Key *string `min:"1" type:"string"`
  16088. // The version ID of the deleted object.
  16089. VersionId *string `type:"string"`
  16090. }
  16091. // String returns the string representation.
  16092. //
  16093. // API parameter values that are decorated as "sensitive" in the API will not
  16094. // be included in the string output. The member name will be present, but the
  16095. // value will be replaced with "sensitive".
  16096. func (s DeletedObject) String() string {
  16097. return awsutil.Prettify(s)
  16098. }
  16099. // GoString returns the string representation.
  16100. //
  16101. // API parameter values that are decorated as "sensitive" in the API will not
  16102. // be included in the string output. The member name will be present, but the
  16103. // value will be replaced with "sensitive".
  16104. func (s DeletedObject) GoString() string {
  16105. return s.String()
  16106. }
  16107. // SetDeleteMarker sets the DeleteMarker field's value.
  16108. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  16109. s.DeleteMarker = &v
  16110. return s
  16111. }
  16112. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  16113. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  16114. s.DeleteMarkerVersionId = &v
  16115. return s
  16116. }
  16117. // SetKey sets the Key field's value.
  16118. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  16119. s.Key = &v
  16120. return s
  16121. }
  16122. // SetVersionId sets the VersionId field's value.
  16123. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  16124. s.VersionId = &v
  16125. return s
  16126. }
  16127. // Specifies information about where to publish analysis or configuration results
  16128. // for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
  16129. type Destination struct {
  16130. _ struct{} `type:"structure"`
  16131. // Specify this only in a cross-account scenario (where source and destination
  16132. // bucket owners are not the same), and you want to change replica ownership
  16133. // to the Amazon Web Services account that owns the destination bucket. If this
  16134. // is not specified in the replication configuration, the replicas are owned
  16135. // by same Amazon Web Services account that owns the source object.
  16136. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  16137. // Destination bucket owner account ID. In a cross-account scenario, if you
  16138. // direct Amazon S3 to change replica ownership to the Amazon Web Services account
  16139. // that owns the destination bucket by specifying the AccessControlTranslation
  16140. // property, this is the account ID of the destination bucket owner. For more
  16141. // information, see Replication Additional Configuration: Changing the Replica
  16142. // Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
  16143. // in the Amazon S3 User Guide.
  16144. Account *string `type:"string"`
  16145. // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
  16146. // store the results.
  16147. //
  16148. // Bucket is a required field
  16149. Bucket *string `type:"string" required:"true"`
  16150. // A container that provides information about encryption. If SourceSelectionCriteria
  16151. // is specified, you must specify this element.
  16152. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  16153. // A container specifying replication metrics-related settings enabling replication
  16154. // metrics and events.
  16155. Metrics *Metrics `type:"structure"`
  16156. // A container specifying S3 Replication Time Control (S3 RTC), including whether
  16157. // S3 RTC is enabled and the time when all objects and operations on objects
  16158. // must be replicated. Must be specified together with a Metrics block.
  16159. ReplicationTime *ReplicationTime `type:"structure"`
  16160. // The storage class to use when replicating objects, such as S3 Standard or
  16161. // reduced redundancy. By default, Amazon S3 uses the storage class of the source
  16162. // object to create the object replica.
  16163. //
  16164. // For valid values, see the StorageClass element of the PUT Bucket replication
  16165. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
  16166. // action in the Amazon S3 API Reference.
  16167. StorageClass *string `type:"string" enum:"StorageClass"`
  16168. }
  16169. // String returns the string representation.
  16170. //
  16171. // API parameter values that are decorated as "sensitive" in the API will not
  16172. // be included in the string output. The member name will be present, but the
  16173. // value will be replaced with "sensitive".
  16174. func (s Destination) String() string {
  16175. return awsutil.Prettify(s)
  16176. }
  16177. // GoString returns the string representation.
  16178. //
  16179. // API parameter values that are decorated as "sensitive" in the API will not
  16180. // be included in the string output. The member name will be present, but the
  16181. // value will be replaced with "sensitive".
  16182. func (s Destination) GoString() string {
  16183. return s.String()
  16184. }
  16185. // Validate inspects the fields of the type to determine if they are valid.
  16186. func (s *Destination) Validate() error {
  16187. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  16188. if s.Bucket == nil {
  16189. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16190. }
  16191. if s.AccessControlTranslation != nil {
  16192. if err := s.AccessControlTranslation.Validate(); err != nil {
  16193. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  16194. }
  16195. }
  16196. if s.Metrics != nil {
  16197. if err := s.Metrics.Validate(); err != nil {
  16198. invalidParams.AddNested("Metrics", err.(request.ErrInvalidParams))
  16199. }
  16200. }
  16201. if s.ReplicationTime != nil {
  16202. if err := s.ReplicationTime.Validate(); err != nil {
  16203. invalidParams.AddNested("ReplicationTime", err.(request.ErrInvalidParams))
  16204. }
  16205. }
  16206. if invalidParams.Len() > 0 {
  16207. return invalidParams
  16208. }
  16209. return nil
  16210. }
  16211. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  16212. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  16213. s.AccessControlTranslation = v
  16214. return s
  16215. }
  16216. // SetAccount sets the Account field's value.
  16217. func (s *Destination) SetAccount(v string) *Destination {
  16218. s.Account = &v
  16219. return s
  16220. }
  16221. // SetBucket sets the Bucket field's value.
  16222. func (s *Destination) SetBucket(v string) *Destination {
  16223. s.Bucket = &v
  16224. return s
  16225. }
  16226. func (s *Destination) getBucket() (v string) {
  16227. if s.Bucket == nil {
  16228. return v
  16229. }
  16230. return *s.Bucket
  16231. }
  16232. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  16233. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  16234. s.EncryptionConfiguration = v
  16235. return s
  16236. }
  16237. // SetMetrics sets the Metrics field's value.
  16238. func (s *Destination) SetMetrics(v *Metrics) *Destination {
  16239. s.Metrics = v
  16240. return s
  16241. }
  16242. // SetReplicationTime sets the ReplicationTime field's value.
  16243. func (s *Destination) SetReplicationTime(v *ReplicationTime) *Destination {
  16244. s.ReplicationTime = v
  16245. return s
  16246. }
  16247. // SetStorageClass sets the StorageClass field's value.
  16248. func (s *Destination) SetStorageClass(v string) *Destination {
  16249. s.StorageClass = &v
  16250. return s
  16251. }
  16252. // Contains the type of server-side encryption used.
  16253. type Encryption struct {
  16254. _ struct{} `type:"structure"`
  16255. // The server-side encryption algorithm used when storing job results in Amazon
  16256. // S3 (for example, AES256, aws:kms).
  16257. //
  16258. // EncryptionType is a required field
  16259. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  16260. // If the encryption type is aws:kms, this optional value can be used to specify
  16261. // the encryption context for the restore results.
  16262. KMSContext *string `type:"string"`
  16263. // If the encryption type is aws:kms, this optional value specifies the ID of
  16264. // the symmetric customer managed key to use for encryption of job results.
  16265. // Amazon S3 only supports symmetric keys. For more information, see Using symmetric
  16266. // and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
  16267. // in the Amazon Web Services Key Management Service Developer Guide.
  16268. //
  16269. // KMSKeyId is a sensitive parameter and its value will be
  16270. // replaced with "sensitive" in string returned by Encryption's
  16271. // String and GoString methods.
  16272. KMSKeyId *string `type:"string" sensitive:"true"`
  16273. }
  16274. // String returns the string representation.
  16275. //
  16276. // API parameter values that are decorated as "sensitive" in the API will not
  16277. // be included in the string output. The member name will be present, but the
  16278. // value will be replaced with "sensitive".
  16279. func (s Encryption) String() string {
  16280. return awsutil.Prettify(s)
  16281. }
  16282. // GoString returns the string representation.
  16283. //
  16284. // API parameter values that are decorated as "sensitive" in the API will not
  16285. // be included in the string output. The member name will be present, but the
  16286. // value will be replaced with "sensitive".
  16287. func (s Encryption) GoString() string {
  16288. return s.String()
  16289. }
  16290. // Validate inspects the fields of the type to determine if they are valid.
  16291. func (s *Encryption) Validate() error {
  16292. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  16293. if s.EncryptionType == nil {
  16294. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  16295. }
  16296. if invalidParams.Len() > 0 {
  16297. return invalidParams
  16298. }
  16299. return nil
  16300. }
  16301. // SetEncryptionType sets the EncryptionType field's value.
  16302. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  16303. s.EncryptionType = &v
  16304. return s
  16305. }
  16306. // SetKMSContext sets the KMSContext field's value.
  16307. func (s *Encryption) SetKMSContext(v string) *Encryption {
  16308. s.KMSContext = &v
  16309. return s
  16310. }
  16311. // SetKMSKeyId sets the KMSKeyId field's value.
  16312. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  16313. s.KMSKeyId = &v
  16314. return s
  16315. }
  16316. // Specifies encryption-related information for an Amazon S3 bucket that is
  16317. // a destination for replicated objects.
  16318. type EncryptionConfiguration struct {
  16319. _ struct{} `type:"structure"`
  16320. // Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web
  16321. // Services KMS key stored in Amazon Web Services Key Management Service (KMS)
  16322. // for the destination bucket. Amazon S3 uses this key to encrypt replica objects.
  16323. // Amazon S3 only supports symmetric, customer managed KMS keys. For more information,
  16324. // see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
  16325. // in the Amazon Web Services Key Management Service Developer Guide.
  16326. ReplicaKmsKeyID *string `type:"string"`
  16327. }
  16328. // String returns the string representation.
  16329. //
  16330. // API parameter values that are decorated as "sensitive" in the API will not
  16331. // be included in the string output. The member name will be present, but the
  16332. // value will be replaced with "sensitive".
  16333. func (s EncryptionConfiguration) String() string {
  16334. return awsutil.Prettify(s)
  16335. }
  16336. // GoString returns the string representation.
  16337. //
  16338. // API parameter values that are decorated as "sensitive" in the API will not
  16339. // be included in the string output. The member name will be present, but the
  16340. // value will be replaced with "sensitive".
  16341. func (s EncryptionConfiguration) GoString() string {
  16342. return s.String()
  16343. }
  16344. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  16345. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  16346. s.ReplicaKmsKeyID = &v
  16347. return s
  16348. }
  16349. // A message that indicates the request is complete and no more messages will
  16350. // be sent. You should not assume that the request is complete until the client
  16351. // receives an EndEvent.
  16352. type EndEvent struct {
  16353. _ struct{} `locationName:"EndEvent" type:"structure"`
  16354. }
  16355. // String returns the string representation.
  16356. //
  16357. // API parameter values that are decorated as "sensitive" in the API will not
  16358. // be included in the string output. The member name will be present, but the
  16359. // value will be replaced with "sensitive".
  16360. func (s EndEvent) String() string {
  16361. return awsutil.Prettify(s)
  16362. }
  16363. // GoString returns the string representation.
  16364. //
  16365. // API parameter values that are decorated as "sensitive" in the API will not
  16366. // be included in the string output. The member name will be present, but the
  16367. // value will be replaced with "sensitive".
  16368. func (s EndEvent) GoString() string {
  16369. return s.String()
  16370. }
  16371. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  16372. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  16373. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  16374. // This method is only used internally within the SDK's EventStream handling.
  16375. func (s *EndEvent) UnmarshalEvent(
  16376. payloadUnmarshaler protocol.PayloadUnmarshaler,
  16377. msg eventstream.Message,
  16378. ) error {
  16379. return nil
  16380. }
  16381. // MarshalEvent marshals the type into an stream event value. This method
  16382. // should only used internally within the SDK's EventStream handling.
  16383. func (s *EndEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  16384. msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  16385. return msg, err
  16386. }
  16387. // Container for all error elements.
  16388. type Error struct {
  16389. _ struct{} `type:"structure"`
  16390. // The error code is a string that uniquely identifies an error condition. It
  16391. // is meant to be read and understood by programs that detect and handle errors
  16392. // by type.
  16393. //
  16394. // Amazon S3 error codes
  16395. //
  16396. // * Code: AccessDenied Description: Access Denied HTTP Status Code: 403
  16397. // Forbidden SOAP Fault Code Prefix: Client
  16398. //
  16399. // * Code: AccountProblem Description: There is a problem with your Amazon
  16400. // Web Services account that prevents the action from completing successfully.
  16401. // Contact Amazon Web Services Support for further assistance. HTTP Status
  16402. // Code: 403 Forbidden SOAP Fault Code Prefix: Client
  16403. //
  16404. // * Code: AllAccessDisabled Description: All access to this Amazon S3 resource
  16405. // has been disabled. Contact Amazon Web Services Support for further assistance.
  16406. // HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
  16407. //
  16408. // * Code: AmbiguousGrantByEmailAddress Description: The email address you
  16409. // provided is associated with more than one account. HTTP Status Code: 400
  16410. // Bad Request SOAP Fault Code Prefix: Client
  16411. //
  16412. // * Code: AuthorizationHeaderMalformed Description: The authorization header
  16413. // you provided is invalid. HTTP Status Code: 400 Bad Request HTTP Status
  16414. // Code: N/A
  16415. //
  16416. // * Code: BadDigest Description: The Content-MD5 you specified did not match
  16417. // what we received. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16418. // Client
  16419. //
  16420. // * Code: BucketAlreadyExists Description: The requested bucket name is
  16421. // not available. The bucket namespace is shared by all users of the system.
  16422. // Please select a different name and try again. HTTP Status Code: 409 Conflict
  16423. // SOAP Fault Code Prefix: Client
  16424. //
  16425. // * Code: BucketAlreadyOwnedByYou Description: The bucket you tried to create
  16426. // already exists, and you own it. Amazon S3 returns this error in all Amazon
  16427. // Web Services Regions except in the North Virginia Region. For legacy compatibility,
  16428. // if you re-create an existing bucket that you already own in the North
  16429. // Virginia Region, Amazon S3 returns 200 OK and resets the bucket access
  16430. // control lists (ACLs). Code: 409 Conflict (in all Regions except the North
  16431. // Virginia Region) SOAP Fault Code Prefix: Client
  16432. //
  16433. // * Code: BucketNotEmpty Description: The bucket you tried to delete is
  16434. // not empty. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
  16435. //
  16436. // * Code: CredentialsNotSupported Description: This request does not support
  16437. // credentials. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16438. // Client
  16439. //
  16440. // * Code: CrossLocationLoggingProhibited Description: Cross-location logging
  16441. // not allowed. Buckets in one geographic location cannot log information
  16442. // to a bucket in another location. HTTP Status Code: 403 Forbidden SOAP
  16443. // Fault Code Prefix: Client
  16444. //
  16445. // * Code: EntityTooSmall Description: Your proposed upload is smaller than
  16446. // the minimum allowed object size. HTTP Status Code: 400 Bad Request SOAP
  16447. // Fault Code Prefix: Client
  16448. //
  16449. // * Code: EntityTooLarge Description: Your proposed upload exceeds the maximum
  16450. // allowed object size. HTTP Status Code: 400 Bad Request SOAP Fault Code
  16451. // Prefix: Client
  16452. //
  16453. // * Code: ExpiredToken Description: The provided token has expired. HTTP
  16454. // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16455. //
  16456. // * Code: IllegalVersioningConfigurationException Description: Indicates
  16457. // that the versioning configuration specified in the request is invalid.
  16458. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16459. //
  16460. // * Code: IncompleteBody Description: You did not provide the number of
  16461. // bytes specified by the Content-Length HTTP header HTTP Status Code: 400
  16462. // Bad Request SOAP Fault Code Prefix: Client
  16463. //
  16464. // * Code: IncorrectNumberOfFilesInPostRequest Description: POST requires
  16465. // exactly one file upload per request. HTTP Status Code: 400 Bad Request
  16466. // SOAP Fault Code Prefix: Client
  16467. //
  16468. // * Code: InlineDataTooLarge Description: Inline data exceeds the maximum
  16469. // allowed size. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16470. // Client
  16471. //
  16472. // * Code: InternalError Description: We encountered an internal error. Please
  16473. // try again. HTTP Status Code: 500 Internal Server Error SOAP Fault Code
  16474. // Prefix: Server
  16475. //
  16476. // * Code: InvalidAccessKeyId Description: The Amazon Web Services access
  16477. // key ID you provided does not exist in our records. HTTP Status Code: 403
  16478. // Forbidden SOAP Fault Code Prefix: Client
  16479. //
  16480. // * Code: InvalidAddressingHeader Description: You must specify the Anonymous
  16481. // role. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
  16482. //
  16483. // * Code: InvalidArgument Description: Invalid Argument HTTP Status Code:
  16484. // 400 Bad Request SOAP Fault Code Prefix: Client
  16485. //
  16486. // * Code: InvalidBucketName Description: The specified bucket is not valid.
  16487. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16488. //
  16489. // * Code: InvalidBucketState Description: The request is not valid with
  16490. // the current state of the bucket. HTTP Status Code: 409 Conflict SOAP Fault
  16491. // Code Prefix: Client
  16492. //
  16493. // * Code: InvalidDigest Description: The Content-MD5 you specified is not
  16494. // valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16495. //
  16496. // * Code: InvalidEncryptionAlgorithmError Description: The encryption request
  16497. // you specified is not valid. The valid value is AES256. HTTP Status Code:
  16498. // 400 Bad Request SOAP Fault Code Prefix: Client
  16499. //
  16500. // * Code: InvalidLocationConstraint Description: The specified location
  16501. // constraint is not valid. For more information about Regions, see How to
  16502. // Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
  16503. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16504. //
  16505. // * Code: InvalidObjectState Description: The action is not valid for the
  16506. // current state of the object. HTTP Status Code: 403 Forbidden SOAP Fault
  16507. // Code Prefix: Client
  16508. //
  16509. // * Code: InvalidPart Description: One or more of the specified parts could
  16510. // not be found. The part might not have been uploaded, or the specified
  16511. // entity tag might not have matched the part's entity tag. HTTP Status Code:
  16512. // 400 Bad Request SOAP Fault Code Prefix: Client
  16513. //
  16514. // * Code: InvalidPartOrder Description: The list of parts was not in ascending
  16515. // order. Parts list must be specified in order by part number. HTTP Status
  16516. // Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16517. //
  16518. // * Code: InvalidPayer Description: All access to this object has been disabled.
  16519. // Please contact Amazon Web Services Support for further assistance. HTTP
  16520. // Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
  16521. //
  16522. // * Code: InvalidPolicyDocument Description: The content of the form does
  16523. // not meet the conditions specified in the policy document. HTTP Status
  16524. // Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16525. //
  16526. // * Code: InvalidRange Description: The requested range cannot be satisfied.
  16527. // HTTP Status Code: 416 Requested Range Not Satisfiable SOAP Fault Code
  16528. // Prefix: Client
  16529. //
  16530. // * Code: InvalidRequest Description: Please use AWS4-HMAC-SHA256. HTTP
  16531. // Status Code: 400 Bad Request Code: N/A
  16532. //
  16533. // * Code: InvalidRequest Description: SOAP requests must be made over an
  16534. // HTTPS connection. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16535. // Client
  16536. //
  16537. // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
  16538. // not supported for buckets with non-DNS compliant names. HTTP Status Code:
  16539. // 400 Bad Request Code: N/A
  16540. //
  16541. // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
  16542. // not supported for buckets with periods (.) in their names. HTTP Status
  16543. // Code: 400 Bad Request Code: N/A
  16544. //
  16545. // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate endpoint
  16546. // only supports virtual style requests. HTTP Status Code: 400 Bad Request
  16547. // Code: N/A
  16548. //
  16549. // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is not
  16550. // configured on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
  16551. //
  16552. // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is disabled
  16553. // on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
  16554. //
  16555. // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
  16556. // not supported on this bucket. Contact Amazon Web Services Support for
  16557. // more information. HTTP Status Code: 400 Bad Request Code: N/A
  16558. //
  16559. // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration cannot
  16560. // be enabled on this bucket. Contact Amazon Web Services Support for more
  16561. // information. HTTP Status Code: 400 Bad Request Code: N/A
  16562. //
  16563. // * Code: InvalidSecurity Description: The provided security credentials
  16564. // are not valid. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix:
  16565. // Client
  16566. //
  16567. // * Code: InvalidSOAPRequest Description: The SOAP request body is invalid.
  16568. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16569. //
  16570. // * Code: InvalidStorageClass Description: The storage class you specified
  16571. // is not valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16572. // Client
  16573. //
  16574. // * Code: InvalidTargetBucketForLogging Description: The target bucket for
  16575. // logging does not exist, is not owned by you, or does not have the appropriate
  16576. // grants for the log-delivery group. HTTP Status Code: 400 Bad Request SOAP
  16577. // Fault Code Prefix: Client
  16578. //
  16579. // * Code: InvalidToken Description: The provided token is malformed or otherwise
  16580. // invalid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16581. //
  16582. // * Code: InvalidURI Description: Couldn't parse the specified URI. HTTP
  16583. // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16584. //
  16585. // * Code: KeyTooLongError Description: Your key is too long. HTTP Status
  16586. // Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16587. //
  16588. // * Code: MalformedACLError Description: The XML you provided was not well-formed
  16589. // or did not validate against our published schema. HTTP Status Code: 400
  16590. // Bad Request SOAP Fault Code Prefix: Client
  16591. //
  16592. // * Code: MalformedPOSTRequest Description: The body of your POST request
  16593. // is not well-formed multipart/form-data. HTTP Status Code: 400 Bad Request
  16594. // SOAP Fault Code Prefix: Client
  16595. //
  16596. // * Code: MalformedXML Description: This happens when the user sends malformed
  16597. // XML (XML that doesn't conform to the published XSD) for the configuration.
  16598. // The error message is, "The XML you provided was not well-formed or did
  16599. // not validate against our published schema." HTTP Status Code: 400 Bad
  16600. // Request SOAP Fault Code Prefix: Client
  16601. //
  16602. // * Code: MaxMessageLengthExceeded Description: Your request was too big.
  16603. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16604. //
  16605. // * Code: MaxPostPreDataLengthExceededError Description: Your POST request
  16606. // fields preceding the upload file were too large. HTTP Status Code: 400
  16607. // Bad Request SOAP Fault Code Prefix: Client
  16608. //
  16609. // * Code: MetadataTooLarge Description: Your metadata headers exceed the
  16610. // maximum allowed metadata size. HTTP Status Code: 400 Bad Request SOAP
  16611. // Fault Code Prefix: Client
  16612. //
  16613. // * Code: MethodNotAllowed Description: The specified method is not allowed
  16614. // against this resource. HTTP Status Code: 405 Method Not Allowed SOAP Fault
  16615. // Code Prefix: Client
  16616. //
  16617. // * Code: MissingAttachment Description: A SOAP attachment was expected,
  16618. // but none were found. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
  16619. //
  16620. // * Code: MissingContentLength Description: You must provide the Content-Length
  16621. // HTTP header. HTTP Status Code: 411 Length Required SOAP Fault Code Prefix:
  16622. // Client
  16623. //
  16624. // * Code: MissingRequestBodyError Description: This happens when the user
  16625. // sends an empty XML document as a request. The error message is, "Request
  16626. // body is empty." HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
  16627. // Client
  16628. //
  16629. // * Code: MissingSecurityElement Description: The SOAP 1.1 request is missing
  16630. // a security element. HTTP Status Code: 400 Bad Request SOAP Fault Code
  16631. // Prefix: Client
  16632. //
  16633. // * Code: MissingSecurityHeader Description: Your request is missing a required
  16634. // header. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16635. //
  16636. // * Code: NoLoggingStatusForKey Description: There is no such thing as a
  16637. // logging status subresource for a key. HTTP Status Code: 400 Bad Request
  16638. // SOAP Fault Code Prefix: Client
  16639. //
  16640. // * Code: NoSuchBucket Description: The specified bucket does not exist.
  16641. // HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client
  16642. //
  16643. // * Code: NoSuchBucketPolicy Description: The specified bucket does not
  16644. // have a bucket policy. HTTP Status Code: 404 Not Found SOAP Fault Code
  16645. // Prefix: Client
  16646. //
  16647. // * Code: NoSuchKey Description: The specified key does not exist. HTTP
  16648. // Status Code: 404 Not Found SOAP Fault Code Prefix: Client
  16649. //
  16650. // * Code: NoSuchLifecycleConfiguration Description: The lifecycle configuration
  16651. // does not exist. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix:
  16652. // Client
  16653. //
  16654. // * Code: NoSuchUpload Description: The specified multipart upload does
  16655. // not exist. The upload ID might be invalid, or the multipart upload might
  16656. // have been aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault
  16657. // Code Prefix: Client
  16658. //
  16659. // * Code: NoSuchVersion Description: Indicates that the version ID specified
  16660. // in the request does not match an existing version. HTTP Status Code: 404
  16661. // Not Found SOAP Fault Code Prefix: Client
  16662. //
  16663. // * Code: NotImplemented Description: A header you provided implies functionality
  16664. // that is not implemented. HTTP Status Code: 501 Not Implemented SOAP Fault
  16665. // Code Prefix: Server
  16666. //
  16667. // * Code: NotSignedUp Description: Your account is not signed up for the
  16668. // Amazon S3 service. You must sign up before you can use Amazon S3. You
  16669. // can sign up at the following URL: Amazon S3 (http://aws.amazon.com/s3)
  16670. // HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
  16671. //
  16672. // * Code: OperationAborted Description: A conflicting conditional action
  16673. // is currently in progress against this resource. Try again. HTTP Status
  16674. // Code: 409 Conflict SOAP Fault Code Prefix: Client
  16675. //
  16676. // * Code: PermanentRedirect Description: The bucket you are attempting to
  16677. // access must be addressed using the specified endpoint. Send all future
  16678. // requests to this endpoint. HTTP Status Code: 301 Moved Permanently SOAP
  16679. // Fault Code Prefix: Client
  16680. //
  16681. // * Code: PreconditionFailed Description: At least one of the preconditions
  16682. // you specified did not hold. HTTP Status Code: 412 Precondition Failed
  16683. // SOAP Fault Code Prefix: Client
  16684. //
  16685. // * Code: Redirect Description: Temporary redirect. HTTP Status Code: 307
  16686. // Moved Temporarily SOAP Fault Code Prefix: Client
  16687. //
  16688. // * Code: RestoreAlreadyInProgress Description: Object restore is already
  16689. // in progress. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
  16690. //
  16691. // * Code: RequestIsNotMultiPartContent Description: Bucket POST must be
  16692. // of the enclosure-type multipart/form-data. HTTP Status Code: 400 Bad Request
  16693. // SOAP Fault Code Prefix: Client
  16694. //
  16695. // * Code: RequestTimeout Description: Your socket connection to the server
  16696. // was not read from or written to within the timeout period. HTTP Status
  16697. // Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16698. //
  16699. // * Code: RequestTimeTooSkewed Description: The difference between the request
  16700. // time and the server's time is too large. HTTP Status Code: 403 Forbidden
  16701. // SOAP Fault Code Prefix: Client
  16702. //
  16703. // * Code: RequestTorrentOfBucketError Description: Requesting the torrent
  16704. // file of a bucket is not permitted. HTTP Status Code: 400 Bad Request SOAP
  16705. // Fault Code Prefix: Client
  16706. //
  16707. // * Code: SignatureDoesNotMatch Description: The request signature we calculated
  16708. // does not match the signature you provided. Check your Amazon Web Services
  16709. // secret access key and signing method. For more information, see REST Authentication
  16710. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
  16711. // and SOAP Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html)
  16712. // for details. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
  16713. //
  16714. // * Code: ServiceUnavailable Description: Reduce your request rate. HTTP
  16715. // Status Code: 503 Service Unavailable SOAP Fault Code Prefix: Server
  16716. //
  16717. // * Code: SlowDown Description: Reduce your request rate. HTTP Status Code:
  16718. // 503 Slow Down SOAP Fault Code Prefix: Server
  16719. //
  16720. // * Code: TemporaryRedirect Description: You are being redirected to the
  16721. // bucket while DNS updates. HTTP Status Code: 307 Moved Temporarily SOAP
  16722. // Fault Code Prefix: Client
  16723. //
  16724. // * Code: TokenRefreshRequired Description: The provided token must be refreshed.
  16725. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16726. //
  16727. // * Code: TooManyBuckets Description: You have attempted to create more
  16728. // buckets than allowed. HTTP Status Code: 400 Bad Request SOAP Fault Code
  16729. // Prefix: Client
  16730. //
  16731. // * Code: UnexpectedContent Description: This request does not support content.
  16732. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16733. //
  16734. // * Code: UnresolvableGrantByEmailAddress Description: The email address
  16735. // you provided does not match any account on record. HTTP Status Code: 400
  16736. // Bad Request SOAP Fault Code Prefix: Client
  16737. //
  16738. // * Code: UserKeyMustBeSpecified Description: The bucket POST must contain
  16739. // the specified field name. If it is specified, check the order of the fields.
  16740. // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
  16741. Code *string `type:"string"`
  16742. // The error key.
  16743. Key *string `min:"1" type:"string"`
  16744. // The error message contains a generic description of the error condition in
  16745. // English. It is intended for a human audience. Simple programs display the
  16746. // message directly to the end user if they encounter an error condition they
  16747. // don't know how or don't care to handle. Sophisticated programs with more
  16748. // exhaustive error handling and proper internationalization are more likely
  16749. // to ignore the error message.
  16750. Message *string `type:"string"`
  16751. // The version ID of the error.
  16752. VersionId *string `type:"string"`
  16753. }
  16754. // String returns the string representation.
  16755. //
  16756. // API parameter values that are decorated as "sensitive" in the API will not
  16757. // be included in the string output. The member name will be present, but the
  16758. // value will be replaced with "sensitive".
  16759. func (s Error) String() string {
  16760. return awsutil.Prettify(s)
  16761. }
  16762. // GoString returns the string representation.
  16763. //
  16764. // API parameter values that are decorated as "sensitive" in the API will not
  16765. // be included in the string output. The member name will be present, but the
  16766. // value will be replaced with "sensitive".
  16767. func (s Error) GoString() string {
  16768. return s.String()
  16769. }
  16770. // SetCode sets the Code field's value.
  16771. func (s *Error) SetCode(v string) *Error {
  16772. s.Code = &v
  16773. return s
  16774. }
  16775. // SetKey sets the Key field's value.
  16776. func (s *Error) SetKey(v string) *Error {
  16777. s.Key = &v
  16778. return s
  16779. }
  16780. // SetMessage sets the Message field's value.
  16781. func (s *Error) SetMessage(v string) *Error {
  16782. s.Message = &v
  16783. return s
  16784. }
  16785. // SetVersionId sets the VersionId field's value.
  16786. func (s *Error) SetVersionId(v string) *Error {
  16787. s.VersionId = &v
  16788. return s
  16789. }
  16790. // The error information.
  16791. type ErrorDocument struct {
  16792. _ struct{} `type:"structure"`
  16793. // The object key name to use when a 4XX class error occurs.
  16794. //
  16795. // Replacement must be made for object keys containing special characters (such
  16796. // as carriage returns) when using XML requests. For more information, see XML
  16797. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  16798. //
  16799. // Key is a required field
  16800. Key *string `min:"1" type:"string" required:"true"`
  16801. }
  16802. // String returns the string representation.
  16803. //
  16804. // API parameter values that are decorated as "sensitive" in the API will not
  16805. // be included in the string output. The member name will be present, but the
  16806. // value will be replaced with "sensitive".
  16807. func (s ErrorDocument) String() string {
  16808. return awsutil.Prettify(s)
  16809. }
  16810. // GoString returns the string representation.
  16811. //
  16812. // API parameter values that are decorated as "sensitive" in the API will not
  16813. // be included in the string output. The member name will be present, but the
  16814. // value will be replaced with "sensitive".
  16815. func (s ErrorDocument) GoString() string {
  16816. return s.String()
  16817. }
  16818. // Validate inspects the fields of the type to determine if they are valid.
  16819. func (s *ErrorDocument) Validate() error {
  16820. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  16821. if s.Key == nil {
  16822. invalidParams.Add(request.NewErrParamRequired("Key"))
  16823. }
  16824. if s.Key != nil && len(*s.Key) < 1 {
  16825. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16826. }
  16827. if invalidParams.Len() > 0 {
  16828. return invalidParams
  16829. }
  16830. return nil
  16831. }
  16832. // SetKey sets the Key field's value.
  16833. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  16834. s.Key = &v
  16835. return s
  16836. }
  16837. // A container for specifying the configuration for Amazon EventBridge.
  16838. type EventBridgeConfiguration struct {
  16839. _ struct{} `type:"structure"`
  16840. }
  16841. // String returns the string representation.
  16842. //
  16843. // API parameter values that are decorated as "sensitive" in the API will not
  16844. // be included in the string output. The member name will be present, but the
  16845. // value will be replaced with "sensitive".
  16846. func (s EventBridgeConfiguration) String() string {
  16847. return awsutil.Prettify(s)
  16848. }
  16849. // GoString returns the string representation.
  16850. //
  16851. // API parameter values that are decorated as "sensitive" in the API will not
  16852. // be included in the string output. The member name will be present, but the
  16853. // value will be replaced with "sensitive".
  16854. func (s EventBridgeConfiguration) GoString() string {
  16855. return s.String()
  16856. }
  16857. // Optional configuration to replicate existing source bucket objects. For more
  16858. // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
  16859. // in the Amazon S3 User Guide.
  16860. type ExistingObjectReplication struct {
  16861. _ struct{} `type:"structure"`
  16862. // Status is a required field
  16863. Status *string `type:"string" required:"true" enum:"ExistingObjectReplicationStatus"`
  16864. }
  16865. // String returns the string representation.
  16866. //
  16867. // API parameter values that are decorated as "sensitive" in the API will not
  16868. // be included in the string output. The member name will be present, but the
  16869. // value will be replaced with "sensitive".
  16870. func (s ExistingObjectReplication) String() string {
  16871. return awsutil.Prettify(s)
  16872. }
  16873. // GoString returns the string representation.
  16874. //
  16875. // API parameter values that are decorated as "sensitive" in the API will not
  16876. // be included in the string output. The member name will be present, but the
  16877. // value will be replaced with "sensitive".
  16878. func (s ExistingObjectReplication) GoString() string {
  16879. return s.String()
  16880. }
  16881. // Validate inspects the fields of the type to determine if they are valid.
  16882. func (s *ExistingObjectReplication) Validate() error {
  16883. invalidParams := request.ErrInvalidParams{Context: "ExistingObjectReplication"}
  16884. if s.Status == nil {
  16885. invalidParams.Add(request.NewErrParamRequired("Status"))
  16886. }
  16887. if invalidParams.Len() > 0 {
  16888. return invalidParams
  16889. }
  16890. return nil
  16891. }
  16892. // SetStatus sets the Status field's value.
  16893. func (s *ExistingObjectReplication) SetStatus(v string) *ExistingObjectReplication {
  16894. s.Status = &v
  16895. return s
  16896. }
  16897. // Specifies the Amazon S3 object key name to filter on and whether to filter
  16898. // on the suffix or prefix of the key name.
  16899. type FilterRule struct {
  16900. _ struct{} `type:"structure"`
  16901. // The object key name prefix or suffix identifying one or more objects to which
  16902. // the filtering rule applies. The maximum length is 1,024 characters. Overlapping
  16903. // prefixes and suffixes are not supported. For more information, see Configuring
  16904. // Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  16905. // in the Amazon S3 User Guide.
  16906. Name *string `type:"string" enum:"FilterRuleName"`
  16907. // The value that the filter searches for in object key names.
  16908. Value *string `type:"string"`
  16909. }
  16910. // String returns the string representation.
  16911. //
  16912. // API parameter values that are decorated as "sensitive" in the API will not
  16913. // be included in the string output. The member name will be present, but the
  16914. // value will be replaced with "sensitive".
  16915. func (s FilterRule) String() string {
  16916. return awsutil.Prettify(s)
  16917. }
  16918. // GoString returns the string representation.
  16919. //
  16920. // API parameter values that are decorated as "sensitive" in the API will not
  16921. // be included in the string output. The member name will be present, but the
  16922. // value will be replaced with "sensitive".
  16923. func (s FilterRule) GoString() string {
  16924. return s.String()
  16925. }
  16926. // SetName sets the Name field's value.
  16927. func (s *FilterRule) SetName(v string) *FilterRule {
  16928. s.Name = &v
  16929. return s
  16930. }
  16931. // SetValue sets the Value field's value.
  16932. func (s *FilterRule) SetValue(v string) *FilterRule {
  16933. s.Value = &v
  16934. return s
  16935. }
  16936. type GetBucketAccelerateConfigurationInput struct {
  16937. _ struct{} `locationName:"GetBucketAccelerateConfigurationRequest" type:"structure"`
  16938. // The name of the bucket for which the accelerate configuration is retrieved.
  16939. //
  16940. // Bucket is a required field
  16941. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16942. // The account ID of the expected bucket owner. If the bucket is owned by a
  16943. // different account, the request fails with the HTTP status code 403 Forbidden
  16944. // (access denied).
  16945. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  16946. }
  16947. // String returns the string representation.
  16948. //
  16949. // API parameter values that are decorated as "sensitive" in the API will not
  16950. // be included in the string output. The member name will be present, but the
  16951. // value will be replaced with "sensitive".
  16952. func (s GetBucketAccelerateConfigurationInput) String() string {
  16953. return awsutil.Prettify(s)
  16954. }
  16955. // GoString returns the string representation.
  16956. //
  16957. // API parameter values that are decorated as "sensitive" in the API will not
  16958. // be included in the string output. The member name will be present, but the
  16959. // value will be replaced with "sensitive".
  16960. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  16961. return s.String()
  16962. }
  16963. // Validate inspects the fields of the type to determine if they are valid.
  16964. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  16965. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  16966. if s.Bucket == nil {
  16967. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16968. }
  16969. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16970. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16971. }
  16972. if invalidParams.Len() > 0 {
  16973. return invalidParams
  16974. }
  16975. return nil
  16976. }
  16977. // SetBucket sets the Bucket field's value.
  16978. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  16979. s.Bucket = &v
  16980. return s
  16981. }
  16982. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  16983. if s.Bucket == nil {
  16984. return v
  16985. }
  16986. return *s.Bucket
  16987. }
  16988. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  16989. func (s *GetBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAccelerateConfigurationInput {
  16990. s.ExpectedBucketOwner = &v
  16991. return s
  16992. }
  16993. func (s *GetBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
  16994. if s.Bucket == nil {
  16995. return nil, fmt.Errorf("member Bucket is nil")
  16996. }
  16997. return parseEndpointARN(*s.Bucket)
  16998. }
  16999. func (s *GetBucketAccelerateConfigurationInput) hasEndpointARN() bool {
  17000. if s.Bucket == nil {
  17001. return false
  17002. }
  17003. return arn.IsARN(*s.Bucket)
  17004. }
  17005. // updateArnableField updates the value of the input field that
  17006. // takes an ARN as an input. This method is useful to backfill
  17007. // the parsed resource name from ARN into the input member.
  17008. // It returns a pointer to a modified copy of input and an error.
  17009. // Note that original input is not modified.
  17010. func (s GetBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
  17011. if s.Bucket == nil {
  17012. return nil, fmt.Errorf("member Bucket is nil")
  17013. }
  17014. s.Bucket = aws.String(v)
  17015. return &s, nil
  17016. }
  17017. type GetBucketAccelerateConfigurationOutput struct {
  17018. _ struct{} `type:"structure"`
  17019. // The accelerate configuration of the bucket.
  17020. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  17021. }
  17022. // String returns the string representation.
  17023. //
  17024. // API parameter values that are decorated as "sensitive" in the API will not
  17025. // be included in the string output. The member name will be present, but the
  17026. // value will be replaced with "sensitive".
  17027. func (s GetBucketAccelerateConfigurationOutput) String() string {
  17028. return awsutil.Prettify(s)
  17029. }
  17030. // GoString returns the string representation.
  17031. //
  17032. // API parameter values that are decorated as "sensitive" in the API will not
  17033. // be included in the string output. The member name will be present, but the
  17034. // value will be replaced with "sensitive".
  17035. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  17036. return s.String()
  17037. }
  17038. // SetStatus sets the Status field's value.
  17039. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  17040. s.Status = &v
  17041. return s
  17042. }
  17043. type GetBucketAclInput struct {
  17044. _ struct{} `locationName:"GetBucketAclRequest" type:"structure"`
  17045. // Specifies the S3 bucket whose ACL is being requested.
  17046. //
  17047. // Bucket is a required field
  17048. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17049. // The account ID of the expected bucket owner. If the bucket is owned by a
  17050. // different account, the request fails with the HTTP status code 403 Forbidden
  17051. // (access denied).
  17052. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17053. }
  17054. // String returns the string representation.
  17055. //
  17056. // API parameter values that are decorated as "sensitive" in the API will not
  17057. // be included in the string output. The member name will be present, but the
  17058. // value will be replaced with "sensitive".
  17059. func (s GetBucketAclInput) String() string {
  17060. return awsutil.Prettify(s)
  17061. }
  17062. // GoString returns the string representation.
  17063. //
  17064. // API parameter values that are decorated as "sensitive" in the API will not
  17065. // be included in the string output. The member name will be present, but the
  17066. // value will be replaced with "sensitive".
  17067. func (s GetBucketAclInput) GoString() string {
  17068. return s.String()
  17069. }
  17070. // Validate inspects the fields of the type to determine if they are valid.
  17071. func (s *GetBucketAclInput) Validate() error {
  17072. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  17073. if s.Bucket == nil {
  17074. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17075. }
  17076. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17077. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17078. }
  17079. if invalidParams.Len() > 0 {
  17080. return invalidParams
  17081. }
  17082. return nil
  17083. }
  17084. // SetBucket sets the Bucket field's value.
  17085. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  17086. s.Bucket = &v
  17087. return s
  17088. }
  17089. func (s *GetBucketAclInput) getBucket() (v string) {
  17090. if s.Bucket == nil {
  17091. return v
  17092. }
  17093. return *s.Bucket
  17094. }
  17095. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17096. func (s *GetBucketAclInput) SetExpectedBucketOwner(v string) *GetBucketAclInput {
  17097. s.ExpectedBucketOwner = &v
  17098. return s
  17099. }
  17100. func (s *GetBucketAclInput) getEndpointARN() (arn.Resource, error) {
  17101. if s.Bucket == nil {
  17102. return nil, fmt.Errorf("member Bucket is nil")
  17103. }
  17104. return parseEndpointARN(*s.Bucket)
  17105. }
  17106. func (s *GetBucketAclInput) hasEndpointARN() bool {
  17107. if s.Bucket == nil {
  17108. return false
  17109. }
  17110. return arn.IsARN(*s.Bucket)
  17111. }
  17112. // updateArnableField updates the value of the input field that
  17113. // takes an ARN as an input. This method is useful to backfill
  17114. // the parsed resource name from ARN into the input member.
  17115. // It returns a pointer to a modified copy of input and an error.
  17116. // Note that original input is not modified.
  17117. func (s GetBucketAclInput) updateArnableField(v string) (interface{}, error) {
  17118. if s.Bucket == nil {
  17119. return nil, fmt.Errorf("member Bucket is nil")
  17120. }
  17121. s.Bucket = aws.String(v)
  17122. return &s, nil
  17123. }
  17124. type GetBucketAclOutput struct {
  17125. _ struct{} `type:"structure"`
  17126. // A list of grants.
  17127. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  17128. // Container for the bucket owner's display name and ID.
  17129. Owner *Owner `type:"structure"`
  17130. }
  17131. // String returns the string representation.
  17132. //
  17133. // API parameter values that are decorated as "sensitive" in the API will not
  17134. // be included in the string output. The member name will be present, but the
  17135. // value will be replaced with "sensitive".
  17136. func (s GetBucketAclOutput) String() string {
  17137. return awsutil.Prettify(s)
  17138. }
  17139. // GoString returns the string representation.
  17140. //
  17141. // API parameter values that are decorated as "sensitive" in the API will not
  17142. // be included in the string output. The member name will be present, but the
  17143. // value will be replaced with "sensitive".
  17144. func (s GetBucketAclOutput) GoString() string {
  17145. return s.String()
  17146. }
  17147. // SetGrants sets the Grants field's value.
  17148. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  17149. s.Grants = v
  17150. return s
  17151. }
  17152. // SetOwner sets the Owner field's value.
  17153. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  17154. s.Owner = v
  17155. return s
  17156. }
  17157. type GetBucketAnalyticsConfigurationInput struct {
  17158. _ struct{} `locationName:"GetBucketAnalyticsConfigurationRequest" type:"structure"`
  17159. // The name of the bucket from which an analytics configuration is retrieved.
  17160. //
  17161. // Bucket is a required field
  17162. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17163. // The account ID of the expected bucket owner. If the bucket is owned by a
  17164. // different account, the request fails with the HTTP status code 403 Forbidden
  17165. // (access denied).
  17166. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17167. // The ID that identifies the analytics configuration.
  17168. //
  17169. // Id is a required field
  17170. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  17171. }
  17172. // String returns the string representation.
  17173. //
  17174. // API parameter values that are decorated as "sensitive" in the API will not
  17175. // be included in the string output. The member name will be present, but the
  17176. // value will be replaced with "sensitive".
  17177. func (s GetBucketAnalyticsConfigurationInput) String() string {
  17178. return awsutil.Prettify(s)
  17179. }
  17180. // GoString returns the string representation.
  17181. //
  17182. // API parameter values that are decorated as "sensitive" in the API will not
  17183. // be included in the string output. The member name will be present, but the
  17184. // value will be replaced with "sensitive".
  17185. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  17186. return s.String()
  17187. }
  17188. // Validate inspects the fields of the type to determine if they are valid.
  17189. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  17190. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  17191. if s.Bucket == nil {
  17192. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17193. }
  17194. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17195. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17196. }
  17197. if s.Id == nil {
  17198. invalidParams.Add(request.NewErrParamRequired("Id"))
  17199. }
  17200. if invalidParams.Len() > 0 {
  17201. return invalidParams
  17202. }
  17203. return nil
  17204. }
  17205. // SetBucket sets the Bucket field's value.
  17206. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  17207. s.Bucket = &v
  17208. return s
  17209. }
  17210. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  17211. if s.Bucket == nil {
  17212. return v
  17213. }
  17214. return *s.Bucket
  17215. }
  17216. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17217. func (s *GetBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAnalyticsConfigurationInput {
  17218. s.ExpectedBucketOwner = &v
  17219. return s
  17220. }
  17221. // SetId sets the Id field's value.
  17222. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  17223. s.Id = &v
  17224. return s
  17225. }
  17226. func (s *GetBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  17227. if s.Bucket == nil {
  17228. return nil, fmt.Errorf("member Bucket is nil")
  17229. }
  17230. return parseEndpointARN(*s.Bucket)
  17231. }
  17232. func (s *GetBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
  17233. if s.Bucket == nil {
  17234. return false
  17235. }
  17236. return arn.IsARN(*s.Bucket)
  17237. }
  17238. // updateArnableField updates the value of the input field that
  17239. // takes an ARN as an input. This method is useful to backfill
  17240. // the parsed resource name from ARN into the input member.
  17241. // It returns a pointer to a modified copy of input and an error.
  17242. // Note that original input is not modified.
  17243. func (s GetBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  17244. if s.Bucket == nil {
  17245. return nil, fmt.Errorf("member Bucket is nil")
  17246. }
  17247. s.Bucket = aws.String(v)
  17248. return &s, nil
  17249. }
  17250. type GetBucketAnalyticsConfigurationOutput struct {
  17251. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  17252. // The configuration and any analyses for the analytics filter.
  17253. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  17254. }
  17255. // String returns the string representation.
  17256. //
  17257. // API parameter values that are decorated as "sensitive" in the API will not
  17258. // be included in the string output. The member name will be present, but the
  17259. // value will be replaced with "sensitive".
  17260. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  17261. return awsutil.Prettify(s)
  17262. }
  17263. // GoString returns the string representation.
  17264. //
  17265. // API parameter values that are decorated as "sensitive" in the API will not
  17266. // be included in the string output. The member name will be present, but the
  17267. // value will be replaced with "sensitive".
  17268. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  17269. return s.String()
  17270. }
  17271. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  17272. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  17273. s.AnalyticsConfiguration = v
  17274. return s
  17275. }
  17276. type GetBucketCorsInput struct {
  17277. _ struct{} `locationName:"GetBucketCorsRequest" type:"structure"`
  17278. // The bucket name for which to get the cors configuration.
  17279. //
  17280. // Bucket is a required field
  17281. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17282. // The account ID of the expected bucket owner. If the bucket is owned by a
  17283. // different account, the request fails with the HTTP status code 403 Forbidden
  17284. // (access denied).
  17285. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17286. }
  17287. // String returns the string representation.
  17288. //
  17289. // API parameter values that are decorated as "sensitive" in the API will not
  17290. // be included in the string output. The member name will be present, but the
  17291. // value will be replaced with "sensitive".
  17292. func (s GetBucketCorsInput) String() string {
  17293. return awsutil.Prettify(s)
  17294. }
  17295. // GoString returns the string representation.
  17296. //
  17297. // API parameter values that are decorated as "sensitive" in the API will not
  17298. // be included in the string output. The member name will be present, but the
  17299. // value will be replaced with "sensitive".
  17300. func (s GetBucketCorsInput) GoString() string {
  17301. return s.String()
  17302. }
  17303. // Validate inspects the fields of the type to determine if they are valid.
  17304. func (s *GetBucketCorsInput) Validate() error {
  17305. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  17306. if s.Bucket == nil {
  17307. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17308. }
  17309. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17310. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17311. }
  17312. if invalidParams.Len() > 0 {
  17313. return invalidParams
  17314. }
  17315. return nil
  17316. }
  17317. // SetBucket sets the Bucket field's value.
  17318. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  17319. s.Bucket = &v
  17320. return s
  17321. }
  17322. func (s *GetBucketCorsInput) getBucket() (v string) {
  17323. if s.Bucket == nil {
  17324. return v
  17325. }
  17326. return *s.Bucket
  17327. }
  17328. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17329. func (s *GetBucketCorsInput) SetExpectedBucketOwner(v string) *GetBucketCorsInput {
  17330. s.ExpectedBucketOwner = &v
  17331. return s
  17332. }
  17333. func (s *GetBucketCorsInput) getEndpointARN() (arn.Resource, error) {
  17334. if s.Bucket == nil {
  17335. return nil, fmt.Errorf("member Bucket is nil")
  17336. }
  17337. return parseEndpointARN(*s.Bucket)
  17338. }
  17339. func (s *GetBucketCorsInput) hasEndpointARN() bool {
  17340. if s.Bucket == nil {
  17341. return false
  17342. }
  17343. return arn.IsARN(*s.Bucket)
  17344. }
  17345. // updateArnableField updates the value of the input field that
  17346. // takes an ARN as an input. This method is useful to backfill
  17347. // the parsed resource name from ARN into the input member.
  17348. // It returns a pointer to a modified copy of input and an error.
  17349. // Note that original input is not modified.
  17350. func (s GetBucketCorsInput) updateArnableField(v string) (interface{}, error) {
  17351. if s.Bucket == nil {
  17352. return nil, fmt.Errorf("member Bucket is nil")
  17353. }
  17354. s.Bucket = aws.String(v)
  17355. return &s, nil
  17356. }
  17357. type GetBucketCorsOutput struct {
  17358. _ struct{} `type:"structure"`
  17359. // A set of origins and methods (cross-origin access that you want to allow).
  17360. // You can add up to 100 rules to the configuration.
  17361. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  17362. }
  17363. // String returns the string representation.
  17364. //
  17365. // API parameter values that are decorated as "sensitive" in the API will not
  17366. // be included in the string output. The member name will be present, but the
  17367. // value will be replaced with "sensitive".
  17368. func (s GetBucketCorsOutput) String() string {
  17369. return awsutil.Prettify(s)
  17370. }
  17371. // GoString returns the string representation.
  17372. //
  17373. // API parameter values that are decorated as "sensitive" in the API will not
  17374. // be included in the string output. The member name will be present, but the
  17375. // value will be replaced with "sensitive".
  17376. func (s GetBucketCorsOutput) GoString() string {
  17377. return s.String()
  17378. }
  17379. // SetCORSRules sets the CORSRules field's value.
  17380. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  17381. s.CORSRules = v
  17382. return s
  17383. }
  17384. type GetBucketEncryptionInput struct {
  17385. _ struct{} `locationName:"GetBucketEncryptionRequest" type:"structure"`
  17386. // The name of the bucket from which the server-side encryption configuration
  17387. // is retrieved.
  17388. //
  17389. // Bucket is a required field
  17390. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17391. // The account ID of the expected bucket owner. If the bucket is owned by a
  17392. // different account, the request fails with the HTTP status code 403 Forbidden
  17393. // (access denied).
  17394. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17395. }
  17396. // String returns the string representation.
  17397. //
  17398. // API parameter values that are decorated as "sensitive" in the API will not
  17399. // be included in the string output. The member name will be present, but the
  17400. // value will be replaced with "sensitive".
  17401. func (s GetBucketEncryptionInput) String() string {
  17402. return awsutil.Prettify(s)
  17403. }
  17404. // GoString returns the string representation.
  17405. //
  17406. // API parameter values that are decorated as "sensitive" in the API will not
  17407. // be included in the string output. The member name will be present, but the
  17408. // value will be replaced with "sensitive".
  17409. func (s GetBucketEncryptionInput) GoString() string {
  17410. return s.String()
  17411. }
  17412. // Validate inspects the fields of the type to determine if they are valid.
  17413. func (s *GetBucketEncryptionInput) Validate() error {
  17414. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  17415. if s.Bucket == nil {
  17416. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17417. }
  17418. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17419. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17420. }
  17421. if invalidParams.Len() > 0 {
  17422. return invalidParams
  17423. }
  17424. return nil
  17425. }
  17426. // SetBucket sets the Bucket field's value.
  17427. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  17428. s.Bucket = &v
  17429. return s
  17430. }
  17431. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  17432. if s.Bucket == nil {
  17433. return v
  17434. }
  17435. return *s.Bucket
  17436. }
  17437. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17438. func (s *GetBucketEncryptionInput) SetExpectedBucketOwner(v string) *GetBucketEncryptionInput {
  17439. s.ExpectedBucketOwner = &v
  17440. return s
  17441. }
  17442. func (s *GetBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
  17443. if s.Bucket == nil {
  17444. return nil, fmt.Errorf("member Bucket is nil")
  17445. }
  17446. return parseEndpointARN(*s.Bucket)
  17447. }
  17448. func (s *GetBucketEncryptionInput) hasEndpointARN() bool {
  17449. if s.Bucket == nil {
  17450. return false
  17451. }
  17452. return arn.IsARN(*s.Bucket)
  17453. }
  17454. // updateArnableField updates the value of the input field that
  17455. // takes an ARN as an input. This method is useful to backfill
  17456. // the parsed resource name from ARN into the input member.
  17457. // It returns a pointer to a modified copy of input and an error.
  17458. // Note that original input is not modified.
  17459. func (s GetBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
  17460. if s.Bucket == nil {
  17461. return nil, fmt.Errorf("member Bucket is nil")
  17462. }
  17463. s.Bucket = aws.String(v)
  17464. return &s, nil
  17465. }
  17466. type GetBucketEncryptionOutput struct {
  17467. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  17468. // Specifies the default server-side-encryption configuration.
  17469. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  17470. }
  17471. // String returns the string representation.
  17472. //
  17473. // API parameter values that are decorated as "sensitive" in the API will not
  17474. // be included in the string output. The member name will be present, but the
  17475. // value will be replaced with "sensitive".
  17476. func (s GetBucketEncryptionOutput) String() string {
  17477. return awsutil.Prettify(s)
  17478. }
  17479. // GoString returns the string representation.
  17480. //
  17481. // API parameter values that are decorated as "sensitive" in the API will not
  17482. // be included in the string output. The member name will be present, but the
  17483. // value will be replaced with "sensitive".
  17484. func (s GetBucketEncryptionOutput) GoString() string {
  17485. return s.String()
  17486. }
  17487. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  17488. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  17489. s.ServerSideEncryptionConfiguration = v
  17490. return s
  17491. }
  17492. type GetBucketIntelligentTieringConfigurationInput struct {
  17493. _ struct{} `locationName:"GetBucketIntelligentTieringConfigurationRequest" type:"structure"`
  17494. // The name of the Amazon S3 bucket whose configuration you want to modify or
  17495. // retrieve.
  17496. //
  17497. // Bucket is a required field
  17498. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17499. // The ID used to identify the S3 Intelligent-Tiering configuration.
  17500. //
  17501. // Id is a required field
  17502. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  17503. }
  17504. // String returns the string representation.
  17505. //
  17506. // API parameter values that are decorated as "sensitive" in the API will not
  17507. // be included in the string output. The member name will be present, but the
  17508. // value will be replaced with "sensitive".
  17509. func (s GetBucketIntelligentTieringConfigurationInput) String() string {
  17510. return awsutil.Prettify(s)
  17511. }
  17512. // GoString returns the string representation.
  17513. //
  17514. // API parameter values that are decorated as "sensitive" in the API will not
  17515. // be included in the string output. The member name will be present, but the
  17516. // value will be replaced with "sensitive".
  17517. func (s GetBucketIntelligentTieringConfigurationInput) GoString() string {
  17518. return s.String()
  17519. }
  17520. // Validate inspects the fields of the type to determine if they are valid.
  17521. func (s *GetBucketIntelligentTieringConfigurationInput) Validate() error {
  17522. invalidParams := request.ErrInvalidParams{Context: "GetBucketIntelligentTieringConfigurationInput"}
  17523. if s.Bucket == nil {
  17524. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17525. }
  17526. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17527. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17528. }
  17529. if s.Id == nil {
  17530. invalidParams.Add(request.NewErrParamRequired("Id"))
  17531. }
  17532. if invalidParams.Len() > 0 {
  17533. return invalidParams
  17534. }
  17535. return nil
  17536. }
  17537. // SetBucket sets the Bucket field's value.
  17538. func (s *GetBucketIntelligentTieringConfigurationInput) SetBucket(v string) *GetBucketIntelligentTieringConfigurationInput {
  17539. s.Bucket = &v
  17540. return s
  17541. }
  17542. func (s *GetBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
  17543. if s.Bucket == nil {
  17544. return v
  17545. }
  17546. return *s.Bucket
  17547. }
  17548. // SetId sets the Id field's value.
  17549. func (s *GetBucketIntelligentTieringConfigurationInput) SetId(v string) *GetBucketIntelligentTieringConfigurationInput {
  17550. s.Id = &v
  17551. return s
  17552. }
  17553. func (s *GetBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
  17554. if s.Bucket == nil {
  17555. return nil, fmt.Errorf("member Bucket is nil")
  17556. }
  17557. return parseEndpointARN(*s.Bucket)
  17558. }
  17559. func (s *GetBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
  17560. if s.Bucket == nil {
  17561. return false
  17562. }
  17563. return arn.IsARN(*s.Bucket)
  17564. }
  17565. // updateArnableField updates the value of the input field that
  17566. // takes an ARN as an input. This method is useful to backfill
  17567. // the parsed resource name from ARN into the input member.
  17568. // It returns a pointer to a modified copy of input and an error.
  17569. // Note that original input is not modified.
  17570. func (s GetBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
  17571. if s.Bucket == nil {
  17572. return nil, fmt.Errorf("member Bucket is nil")
  17573. }
  17574. s.Bucket = aws.String(v)
  17575. return &s, nil
  17576. }
  17577. type GetBucketIntelligentTieringConfigurationOutput struct {
  17578. _ struct{} `type:"structure" payload:"IntelligentTieringConfiguration"`
  17579. // Container for S3 Intelligent-Tiering configuration.
  17580. IntelligentTieringConfiguration *IntelligentTieringConfiguration `type:"structure"`
  17581. }
  17582. // String returns the string representation.
  17583. //
  17584. // API parameter values that are decorated as "sensitive" in the API will not
  17585. // be included in the string output. The member name will be present, but the
  17586. // value will be replaced with "sensitive".
  17587. func (s GetBucketIntelligentTieringConfigurationOutput) String() string {
  17588. return awsutil.Prettify(s)
  17589. }
  17590. // GoString returns the string representation.
  17591. //
  17592. // API parameter values that are decorated as "sensitive" in the API will not
  17593. // be included in the string output. The member name will be present, but the
  17594. // value will be replaced with "sensitive".
  17595. func (s GetBucketIntelligentTieringConfigurationOutput) GoString() string {
  17596. return s.String()
  17597. }
  17598. // SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
  17599. func (s *GetBucketIntelligentTieringConfigurationOutput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *GetBucketIntelligentTieringConfigurationOutput {
  17600. s.IntelligentTieringConfiguration = v
  17601. return s
  17602. }
  17603. type GetBucketInventoryConfigurationInput struct {
  17604. _ struct{} `locationName:"GetBucketInventoryConfigurationRequest" type:"structure"`
  17605. // The name of the bucket containing the inventory configuration to retrieve.
  17606. //
  17607. // Bucket is a required field
  17608. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17609. // The account ID of the expected bucket owner. If the bucket is owned by a
  17610. // different account, the request fails with the HTTP status code 403 Forbidden
  17611. // (access denied).
  17612. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17613. // The ID used to identify the inventory configuration.
  17614. //
  17615. // Id is a required field
  17616. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  17617. }
  17618. // String returns the string representation.
  17619. //
  17620. // API parameter values that are decorated as "sensitive" in the API will not
  17621. // be included in the string output. The member name will be present, but the
  17622. // value will be replaced with "sensitive".
  17623. func (s GetBucketInventoryConfigurationInput) String() string {
  17624. return awsutil.Prettify(s)
  17625. }
  17626. // GoString returns the string representation.
  17627. //
  17628. // API parameter values that are decorated as "sensitive" in the API will not
  17629. // be included in the string output. The member name will be present, but the
  17630. // value will be replaced with "sensitive".
  17631. func (s GetBucketInventoryConfigurationInput) GoString() string {
  17632. return s.String()
  17633. }
  17634. // Validate inspects the fields of the type to determine if they are valid.
  17635. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  17636. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  17637. if s.Bucket == nil {
  17638. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17639. }
  17640. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17641. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17642. }
  17643. if s.Id == nil {
  17644. invalidParams.Add(request.NewErrParamRequired("Id"))
  17645. }
  17646. if invalidParams.Len() > 0 {
  17647. return invalidParams
  17648. }
  17649. return nil
  17650. }
  17651. // SetBucket sets the Bucket field's value.
  17652. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  17653. s.Bucket = &v
  17654. return s
  17655. }
  17656. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  17657. if s.Bucket == nil {
  17658. return v
  17659. }
  17660. return *s.Bucket
  17661. }
  17662. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17663. func (s *GetBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketInventoryConfigurationInput {
  17664. s.ExpectedBucketOwner = &v
  17665. return s
  17666. }
  17667. // SetId sets the Id field's value.
  17668. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  17669. s.Id = &v
  17670. return s
  17671. }
  17672. func (s *GetBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
  17673. if s.Bucket == nil {
  17674. return nil, fmt.Errorf("member Bucket is nil")
  17675. }
  17676. return parseEndpointARN(*s.Bucket)
  17677. }
  17678. func (s *GetBucketInventoryConfigurationInput) hasEndpointARN() bool {
  17679. if s.Bucket == nil {
  17680. return false
  17681. }
  17682. return arn.IsARN(*s.Bucket)
  17683. }
  17684. // updateArnableField updates the value of the input field that
  17685. // takes an ARN as an input. This method is useful to backfill
  17686. // the parsed resource name from ARN into the input member.
  17687. // It returns a pointer to a modified copy of input and an error.
  17688. // Note that original input is not modified.
  17689. func (s GetBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
  17690. if s.Bucket == nil {
  17691. return nil, fmt.Errorf("member Bucket is nil")
  17692. }
  17693. s.Bucket = aws.String(v)
  17694. return &s, nil
  17695. }
  17696. type GetBucketInventoryConfigurationOutput struct {
  17697. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  17698. // Specifies the inventory configuration.
  17699. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  17700. }
  17701. // String returns the string representation.
  17702. //
  17703. // API parameter values that are decorated as "sensitive" in the API will not
  17704. // be included in the string output. The member name will be present, but the
  17705. // value will be replaced with "sensitive".
  17706. func (s GetBucketInventoryConfigurationOutput) String() string {
  17707. return awsutil.Prettify(s)
  17708. }
  17709. // GoString returns the string representation.
  17710. //
  17711. // API parameter values that are decorated as "sensitive" in the API will not
  17712. // be included in the string output. The member name will be present, but the
  17713. // value will be replaced with "sensitive".
  17714. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  17715. return s.String()
  17716. }
  17717. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  17718. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  17719. s.InventoryConfiguration = v
  17720. return s
  17721. }
  17722. type GetBucketLifecycleConfigurationInput struct {
  17723. _ struct{} `locationName:"GetBucketLifecycleConfigurationRequest" type:"structure"`
  17724. // The name of the bucket for which to get the lifecycle information.
  17725. //
  17726. // Bucket is a required field
  17727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17728. // The account ID of the expected bucket owner. If the bucket is owned by a
  17729. // different account, the request fails with the HTTP status code 403 Forbidden
  17730. // (access denied).
  17731. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17732. }
  17733. // String returns the string representation.
  17734. //
  17735. // API parameter values that are decorated as "sensitive" in the API will not
  17736. // be included in the string output. The member name will be present, but the
  17737. // value will be replaced with "sensitive".
  17738. func (s GetBucketLifecycleConfigurationInput) String() string {
  17739. return awsutil.Prettify(s)
  17740. }
  17741. // GoString returns the string representation.
  17742. //
  17743. // API parameter values that are decorated as "sensitive" in the API will not
  17744. // be included in the string output. The member name will be present, but the
  17745. // value will be replaced with "sensitive".
  17746. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  17747. return s.String()
  17748. }
  17749. // Validate inspects the fields of the type to determine if they are valid.
  17750. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  17751. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  17752. if s.Bucket == nil {
  17753. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17754. }
  17755. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17756. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17757. }
  17758. if invalidParams.Len() > 0 {
  17759. return invalidParams
  17760. }
  17761. return nil
  17762. }
  17763. // SetBucket sets the Bucket field's value.
  17764. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  17765. s.Bucket = &v
  17766. return s
  17767. }
  17768. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  17769. if s.Bucket == nil {
  17770. return v
  17771. }
  17772. return *s.Bucket
  17773. }
  17774. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17775. func (s *GetBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleConfigurationInput {
  17776. s.ExpectedBucketOwner = &v
  17777. return s
  17778. }
  17779. func (s *GetBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
  17780. if s.Bucket == nil {
  17781. return nil, fmt.Errorf("member Bucket is nil")
  17782. }
  17783. return parseEndpointARN(*s.Bucket)
  17784. }
  17785. func (s *GetBucketLifecycleConfigurationInput) hasEndpointARN() bool {
  17786. if s.Bucket == nil {
  17787. return false
  17788. }
  17789. return arn.IsARN(*s.Bucket)
  17790. }
  17791. // updateArnableField updates the value of the input field that
  17792. // takes an ARN as an input. This method is useful to backfill
  17793. // the parsed resource name from ARN into the input member.
  17794. // It returns a pointer to a modified copy of input and an error.
  17795. // Note that original input is not modified.
  17796. func (s GetBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
  17797. if s.Bucket == nil {
  17798. return nil, fmt.Errorf("member Bucket is nil")
  17799. }
  17800. s.Bucket = aws.String(v)
  17801. return &s, nil
  17802. }
  17803. type GetBucketLifecycleConfigurationOutput struct {
  17804. _ struct{} `type:"structure"`
  17805. // Container for a lifecycle rule.
  17806. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  17807. }
  17808. // String returns the string representation.
  17809. //
  17810. // API parameter values that are decorated as "sensitive" in the API will not
  17811. // be included in the string output. The member name will be present, but the
  17812. // value will be replaced with "sensitive".
  17813. func (s GetBucketLifecycleConfigurationOutput) String() string {
  17814. return awsutil.Prettify(s)
  17815. }
  17816. // GoString returns the string representation.
  17817. //
  17818. // API parameter values that are decorated as "sensitive" in the API will not
  17819. // be included in the string output. The member name will be present, but the
  17820. // value will be replaced with "sensitive".
  17821. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  17822. return s.String()
  17823. }
  17824. // SetRules sets the Rules field's value.
  17825. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  17826. s.Rules = v
  17827. return s
  17828. }
  17829. type GetBucketLifecycleInput struct {
  17830. _ struct{} `locationName:"GetBucketLifecycleRequest" type:"structure"`
  17831. // The name of the bucket for which to get the lifecycle information.
  17832. //
  17833. // Bucket is a required field
  17834. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17835. // The account ID of the expected bucket owner. If the bucket is owned by a
  17836. // different account, the request fails with the HTTP status code 403 Forbidden
  17837. // (access denied).
  17838. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17839. }
  17840. // String returns the string representation.
  17841. //
  17842. // API parameter values that are decorated as "sensitive" in the API will not
  17843. // be included in the string output. The member name will be present, but the
  17844. // value will be replaced with "sensitive".
  17845. func (s GetBucketLifecycleInput) String() string {
  17846. return awsutil.Prettify(s)
  17847. }
  17848. // GoString returns the string representation.
  17849. //
  17850. // API parameter values that are decorated as "sensitive" in the API will not
  17851. // be included in the string output. The member name will be present, but the
  17852. // value will be replaced with "sensitive".
  17853. func (s GetBucketLifecycleInput) GoString() string {
  17854. return s.String()
  17855. }
  17856. // Validate inspects the fields of the type to determine if they are valid.
  17857. func (s *GetBucketLifecycleInput) Validate() error {
  17858. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  17859. if s.Bucket == nil {
  17860. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17861. }
  17862. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17863. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17864. }
  17865. if invalidParams.Len() > 0 {
  17866. return invalidParams
  17867. }
  17868. return nil
  17869. }
  17870. // SetBucket sets the Bucket field's value.
  17871. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  17872. s.Bucket = &v
  17873. return s
  17874. }
  17875. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  17876. if s.Bucket == nil {
  17877. return v
  17878. }
  17879. return *s.Bucket
  17880. }
  17881. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17882. func (s *GetBucketLifecycleInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleInput {
  17883. s.ExpectedBucketOwner = &v
  17884. return s
  17885. }
  17886. func (s *GetBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
  17887. if s.Bucket == nil {
  17888. return nil, fmt.Errorf("member Bucket is nil")
  17889. }
  17890. return parseEndpointARN(*s.Bucket)
  17891. }
  17892. func (s *GetBucketLifecycleInput) hasEndpointARN() bool {
  17893. if s.Bucket == nil {
  17894. return false
  17895. }
  17896. return arn.IsARN(*s.Bucket)
  17897. }
  17898. // updateArnableField updates the value of the input field that
  17899. // takes an ARN as an input. This method is useful to backfill
  17900. // the parsed resource name from ARN into the input member.
  17901. // It returns a pointer to a modified copy of input and an error.
  17902. // Note that original input is not modified.
  17903. func (s GetBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
  17904. if s.Bucket == nil {
  17905. return nil, fmt.Errorf("member Bucket is nil")
  17906. }
  17907. s.Bucket = aws.String(v)
  17908. return &s, nil
  17909. }
  17910. type GetBucketLifecycleOutput struct {
  17911. _ struct{} `type:"structure"`
  17912. // Container for a lifecycle rule.
  17913. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  17914. }
  17915. // String returns the string representation.
  17916. //
  17917. // API parameter values that are decorated as "sensitive" in the API will not
  17918. // be included in the string output. The member name will be present, but the
  17919. // value will be replaced with "sensitive".
  17920. func (s GetBucketLifecycleOutput) String() string {
  17921. return awsutil.Prettify(s)
  17922. }
  17923. // GoString returns the string representation.
  17924. //
  17925. // API parameter values that are decorated as "sensitive" in the API will not
  17926. // be included in the string output. The member name will be present, but the
  17927. // value will be replaced with "sensitive".
  17928. func (s GetBucketLifecycleOutput) GoString() string {
  17929. return s.String()
  17930. }
  17931. // SetRules sets the Rules field's value.
  17932. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  17933. s.Rules = v
  17934. return s
  17935. }
  17936. type GetBucketLocationInput struct {
  17937. _ struct{} `locationName:"GetBucketLocationRequest" type:"structure"`
  17938. // The name of the bucket for which to get the location.
  17939. //
  17940. // Bucket is a required field
  17941. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17942. // The account ID of the expected bucket owner. If the bucket is owned by a
  17943. // different account, the request fails with the HTTP status code 403 Forbidden
  17944. // (access denied).
  17945. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  17946. }
  17947. // String returns the string representation.
  17948. //
  17949. // API parameter values that are decorated as "sensitive" in the API will not
  17950. // be included in the string output. The member name will be present, but the
  17951. // value will be replaced with "sensitive".
  17952. func (s GetBucketLocationInput) String() string {
  17953. return awsutil.Prettify(s)
  17954. }
  17955. // GoString returns the string representation.
  17956. //
  17957. // API parameter values that are decorated as "sensitive" in the API will not
  17958. // be included in the string output. The member name will be present, but the
  17959. // value will be replaced with "sensitive".
  17960. func (s GetBucketLocationInput) GoString() string {
  17961. return s.String()
  17962. }
  17963. // Validate inspects the fields of the type to determine if they are valid.
  17964. func (s *GetBucketLocationInput) Validate() error {
  17965. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  17966. if s.Bucket == nil {
  17967. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17968. }
  17969. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17970. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17971. }
  17972. if invalidParams.Len() > 0 {
  17973. return invalidParams
  17974. }
  17975. return nil
  17976. }
  17977. // SetBucket sets the Bucket field's value.
  17978. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  17979. s.Bucket = &v
  17980. return s
  17981. }
  17982. func (s *GetBucketLocationInput) getBucket() (v string) {
  17983. if s.Bucket == nil {
  17984. return v
  17985. }
  17986. return *s.Bucket
  17987. }
  17988. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  17989. func (s *GetBucketLocationInput) SetExpectedBucketOwner(v string) *GetBucketLocationInput {
  17990. s.ExpectedBucketOwner = &v
  17991. return s
  17992. }
  17993. func (s *GetBucketLocationInput) getEndpointARN() (arn.Resource, error) {
  17994. if s.Bucket == nil {
  17995. return nil, fmt.Errorf("member Bucket is nil")
  17996. }
  17997. return parseEndpointARN(*s.Bucket)
  17998. }
  17999. func (s *GetBucketLocationInput) hasEndpointARN() bool {
  18000. if s.Bucket == nil {
  18001. return false
  18002. }
  18003. return arn.IsARN(*s.Bucket)
  18004. }
  18005. // updateArnableField updates the value of the input field that
  18006. // takes an ARN as an input. This method is useful to backfill
  18007. // the parsed resource name from ARN into the input member.
  18008. // It returns a pointer to a modified copy of input and an error.
  18009. // Note that original input is not modified.
  18010. func (s GetBucketLocationInput) updateArnableField(v string) (interface{}, error) {
  18011. if s.Bucket == nil {
  18012. return nil, fmt.Errorf("member Bucket is nil")
  18013. }
  18014. s.Bucket = aws.String(v)
  18015. return &s, nil
  18016. }
  18017. type GetBucketLocationOutput struct {
  18018. _ struct{} `type:"structure"`
  18019. // Specifies the Region where the bucket resides. For a list of all the Amazon
  18020. // S3 supported location constraints by Region, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region).
  18021. // Buckets in Region us-east-1 have a LocationConstraint of null.
  18022. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  18023. }
  18024. // String returns the string representation.
  18025. //
  18026. // API parameter values that are decorated as "sensitive" in the API will not
  18027. // be included in the string output. The member name will be present, but the
  18028. // value will be replaced with "sensitive".
  18029. func (s GetBucketLocationOutput) String() string {
  18030. return awsutil.Prettify(s)
  18031. }
  18032. // GoString returns the string representation.
  18033. //
  18034. // API parameter values that are decorated as "sensitive" in the API will not
  18035. // be included in the string output. The member name will be present, but the
  18036. // value will be replaced with "sensitive".
  18037. func (s GetBucketLocationOutput) GoString() string {
  18038. return s.String()
  18039. }
  18040. // SetLocationConstraint sets the LocationConstraint field's value.
  18041. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  18042. s.LocationConstraint = &v
  18043. return s
  18044. }
  18045. type GetBucketLoggingInput struct {
  18046. _ struct{} `locationName:"GetBucketLoggingRequest" type:"structure"`
  18047. // The bucket name for which to get the logging information.
  18048. //
  18049. // Bucket is a required field
  18050. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18051. // The account ID of the expected bucket owner. If the bucket is owned by a
  18052. // different account, the request fails with the HTTP status code 403 Forbidden
  18053. // (access denied).
  18054. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18055. }
  18056. // String returns the string representation.
  18057. //
  18058. // API parameter values that are decorated as "sensitive" in the API will not
  18059. // be included in the string output. The member name will be present, but the
  18060. // value will be replaced with "sensitive".
  18061. func (s GetBucketLoggingInput) String() string {
  18062. return awsutil.Prettify(s)
  18063. }
  18064. // GoString returns the string representation.
  18065. //
  18066. // API parameter values that are decorated as "sensitive" in the API will not
  18067. // be included in the string output. The member name will be present, but the
  18068. // value will be replaced with "sensitive".
  18069. func (s GetBucketLoggingInput) GoString() string {
  18070. return s.String()
  18071. }
  18072. // Validate inspects the fields of the type to determine if they are valid.
  18073. func (s *GetBucketLoggingInput) Validate() error {
  18074. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  18075. if s.Bucket == nil {
  18076. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18077. }
  18078. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18079. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18080. }
  18081. if invalidParams.Len() > 0 {
  18082. return invalidParams
  18083. }
  18084. return nil
  18085. }
  18086. // SetBucket sets the Bucket field's value.
  18087. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  18088. s.Bucket = &v
  18089. return s
  18090. }
  18091. func (s *GetBucketLoggingInput) getBucket() (v string) {
  18092. if s.Bucket == nil {
  18093. return v
  18094. }
  18095. return *s.Bucket
  18096. }
  18097. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18098. func (s *GetBucketLoggingInput) SetExpectedBucketOwner(v string) *GetBucketLoggingInput {
  18099. s.ExpectedBucketOwner = &v
  18100. return s
  18101. }
  18102. func (s *GetBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
  18103. if s.Bucket == nil {
  18104. return nil, fmt.Errorf("member Bucket is nil")
  18105. }
  18106. return parseEndpointARN(*s.Bucket)
  18107. }
  18108. func (s *GetBucketLoggingInput) hasEndpointARN() bool {
  18109. if s.Bucket == nil {
  18110. return false
  18111. }
  18112. return arn.IsARN(*s.Bucket)
  18113. }
  18114. // updateArnableField updates the value of the input field that
  18115. // takes an ARN as an input. This method is useful to backfill
  18116. // the parsed resource name from ARN into the input member.
  18117. // It returns a pointer to a modified copy of input and an error.
  18118. // Note that original input is not modified.
  18119. func (s GetBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
  18120. if s.Bucket == nil {
  18121. return nil, fmt.Errorf("member Bucket is nil")
  18122. }
  18123. s.Bucket = aws.String(v)
  18124. return &s, nil
  18125. }
  18126. type GetBucketLoggingOutput struct {
  18127. _ struct{} `type:"structure"`
  18128. // Describes where logs are stored and the prefix that Amazon S3 assigns to
  18129. // all log object keys for a bucket. For more information, see PUT Bucket logging
  18130. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
  18131. // in the Amazon S3 API Reference.
  18132. LoggingEnabled *LoggingEnabled `type:"structure"`
  18133. }
  18134. // String returns the string representation.
  18135. //
  18136. // API parameter values that are decorated as "sensitive" in the API will not
  18137. // be included in the string output. The member name will be present, but the
  18138. // value will be replaced with "sensitive".
  18139. func (s GetBucketLoggingOutput) String() string {
  18140. return awsutil.Prettify(s)
  18141. }
  18142. // GoString returns the string representation.
  18143. //
  18144. // API parameter values that are decorated as "sensitive" in the API will not
  18145. // be included in the string output. The member name will be present, but the
  18146. // value will be replaced with "sensitive".
  18147. func (s GetBucketLoggingOutput) GoString() string {
  18148. return s.String()
  18149. }
  18150. // SetLoggingEnabled sets the LoggingEnabled field's value.
  18151. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  18152. s.LoggingEnabled = v
  18153. return s
  18154. }
  18155. type GetBucketMetricsConfigurationInput struct {
  18156. _ struct{} `locationName:"GetBucketMetricsConfigurationRequest" type:"structure"`
  18157. // The name of the bucket containing the metrics configuration to retrieve.
  18158. //
  18159. // Bucket is a required field
  18160. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18161. // The account ID of the expected bucket owner. If the bucket is owned by a
  18162. // different account, the request fails with the HTTP status code 403 Forbidden
  18163. // (access denied).
  18164. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18165. // The ID used to identify the metrics configuration.
  18166. //
  18167. // Id is a required field
  18168. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  18169. }
  18170. // String returns the string representation.
  18171. //
  18172. // API parameter values that are decorated as "sensitive" in the API will not
  18173. // be included in the string output. The member name will be present, but the
  18174. // value will be replaced with "sensitive".
  18175. func (s GetBucketMetricsConfigurationInput) String() string {
  18176. return awsutil.Prettify(s)
  18177. }
  18178. // GoString returns the string representation.
  18179. //
  18180. // API parameter values that are decorated as "sensitive" in the API will not
  18181. // be included in the string output. The member name will be present, but the
  18182. // value will be replaced with "sensitive".
  18183. func (s GetBucketMetricsConfigurationInput) GoString() string {
  18184. return s.String()
  18185. }
  18186. // Validate inspects the fields of the type to determine if they are valid.
  18187. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  18188. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  18189. if s.Bucket == nil {
  18190. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18191. }
  18192. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18193. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18194. }
  18195. if s.Id == nil {
  18196. invalidParams.Add(request.NewErrParamRequired("Id"))
  18197. }
  18198. if invalidParams.Len() > 0 {
  18199. return invalidParams
  18200. }
  18201. return nil
  18202. }
  18203. // SetBucket sets the Bucket field's value.
  18204. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  18205. s.Bucket = &v
  18206. return s
  18207. }
  18208. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  18209. if s.Bucket == nil {
  18210. return v
  18211. }
  18212. return *s.Bucket
  18213. }
  18214. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18215. func (s *GetBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketMetricsConfigurationInput {
  18216. s.ExpectedBucketOwner = &v
  18217. return s
  18218. }
  18219. // SetId sets the Id field's value.
  18220. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  18221. s.Id = &v
  18222. return s
  18223. }
  18224. func (s *GetBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  18225. if s.Bucket == nil {
  18226. return nil, fmt.Errorf("member Bucket is nil")
  18227. }
  18228. return parseEndpointARN(*s.Bucket)
  18229. }
  18230. func (s *GetBucketMetricsConfigurationInput) hasEndpointARN() bool {
  18231. if s.Bucket == nil {
  18232. return false
  18233. }
  18234. return arn.IsARN(*s.Bucket)
  18235. }
  18236. // updateArnableField updates the value of the input field that
  18237. // takes an ARN as an input. This method is useful to backfill
  18238. // the parsed resource name from ARN into the input member.
  18239. // It returns a pointer to a modified copy of input and an error.
  18240. // Note that original input is not modified.
  18241. func (s GetBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  18242. if s.Bucket == nil {
  18243. return nil, fmt.Errorf("member Bucket is nil")
  18244. }
  18245. s.Bucket = aws.String(v)
  18246. return &s, nil
  18247. }
  18248. type GetBucketMetricsConfigurationOutput struct {
  18249. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  18250. // Specifies the metrics configuration.
  18251. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  18252. }
  18253. // String returns the string representation.
  18254. //
  18255. // API parameter values that are decorated as "sensitive" in the API will not
  18256. // be included in the string output. The member name will be present, but the
  18257. // value will be replaced with "sensitive".
  18258. func (s GetBucketMetricsConfigurationOutput) String() string {
  18259. return awsutil.Prettify(s)
  18260. }
  18261. // GoString returns the string representation.
  18262. //
  18263. // API parameter values that are decorated as "sensitive" in the API will not
  18264. // be included in the string output. The member name will be present, but the
  18265. // value will be replaced with "sensitive".
  18266. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  18267. return s.String()
  18268. }
  18269. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  18270. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  18271. s.MetricsConfiguration = v
  18272. return s
  18273. }
  18274. type GetBucketNotificationConfigurationRequest struct {
  18275. _ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"`
  18276. // The name of the bucket for which to get the notification configuration.
  18277. //
  18278. // Bucket is a required field
  18279. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18280. // The account ID of the expected bucket owner. If the bucket is owned by a
  18281. // different account, the request fails with the HTTP status code 403 Forbidden
  18282. // (access denied).
  18283. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18284. }
  18285. // String returns the string representation.
  18286. //
  18287. // API parameter values that are decorated as "sensitive" in the API will not
  18288. // be included in the string output. The member name will be present, but the
  18289. // value will be replaced with "sensitive".
  18290. func (s GetBucketNotificationConfigurationRequest) String() string {
  18291. return awsutil.Prettify(s)
  18292. }
  18293. // GoString returns the string representation.
  18294. //
  18295. // API parameter values that are decorated as "sensitive" in the API will not
  18296. // be included in the string output. The member name will be present, but the
  18297. // value will be replaced with "sensitive".
  18298. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  18299. return s.String()
  18300. }
  18301. // Validate inspects the fields of the type to determine if they are valid.
  18302. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  18303. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  18304. if s.Bucket == nil {
  18305. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18306. }
  18307. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18308. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18309. }
  18310. if invalidParams.Len() > 0 {
  18311. return invalidParams
  18312. }
  18313. return nil
  18314. }
  18315. // SetBucket sets the Bucket field's value.
  18316. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  18317. s.Bucket = &v
  18318. return s
  18319. }
  18320. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  18321. if s.Bucket == nil {
  18322. return v
  18323. }
  18324. return *s.Bucket
  18325. }
  18326. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18327. func (s *GetBucketNotificationConfigurationRequest) SetExpectedBucketOwner(v string) *GetBucketNotificationConfigurationRequest {
  18328. s.ExpectedBucketOwner = &v
  18329. return s
  18330. }
  18331. func (s *GetBucketNotificationConfigurationRequest) getEndpointARN() (arn.Resource, error) {
  18332. if s.Bucket == nil {
  18333. return nil, fmt.Errorf("member Bucket is nil")
  18334. }
  18335. return parseEndpointARN(*s.Bucket)
  18336. }
  18337. func (s *GetBucketNotificationConfigurationRequest) hasEndpointARN() bool {
  18338. if s.Bucket == nil {
  18339. return false
  18340. }
  18341. return arn.IsARN(*s.Bucket)
  18342. }
  18343. // updateArnableField updates the value of the input field that
  18344. // takes an ARN as an input. This method is useful to backfill
  18345. // the parsed resource name from ARN into the input member.
  18346. // It returns a pointer to a modified copy of input and an error.
  18347. // Note that original input is not modified.
  18348. func (s GetBucketNotificationConfigurationRequest) updateArnableField(v string) (interface{}, error) {
  18349. if s.Bucket == nil {
  18350. return nil, fmt.Errorf("member Bucket is nil")
  18351. }
  18352. s.Bucket = aws.String(v)
  18353. return &s, nil
  18354. }
  18355. type GetBucketOwnershipControlsInput struct {
  18356. _ struct{} `locationName:"GetBucketOwnershipControlsRequest" type:"structure"`
  18357. // The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.
  18358. //
  18359. // Bucket is a required field
  18360. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18361. // The account ID of the expected bucket owner. If the bucket is owned by a
  18362. // different account, the request fails with the HTTP status code 403 Forbidden
  18363. // (access denied).
  18364. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18365. }
  18366. // String returns the string representation.
  18367. //
  18368. // API parameter values that are decorated as "sensitive" in the API will not
  18369. // be included in the string output. The member name will be present, but the
  18370. // value will be replaced with "sensitive".
  18371. func (s GetBucketOwnershipControlsInput) String() string {
  18372. return awsutil.Prettify(s)
  18373. }
  18374. // GoString returns the string representation.
  18375. //
  18376. // API parameter values that are decorated as "sensitive" in the API will not
  18377. // be included in the string output. The member name will be present, but the
  18378. // value will be replaced with "sensitive".
  18379. func (s GetBucketOwnershipControlsInput) GoString() string {
  18380. return s.String()
  18381. }
  18382. // Validate inspects the fields of the type to determine if they are valid.
  18383. func (s *GetBucketOwnershipControlsInput) Validate() error {
  18384. invalidParams := request.ErrInvalidParams{Context: "GetBucketOwnershipControlsInput"}
  18385. if s.Bucket == nil {
  18386. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18387. }
  18388. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18389. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18390. }
  18391. if invalidParams.Len() > 0 {
  18392. return invalidParams
  18393. }
  18394. return nil
  18395. }
  18396. // SetBucket sets the Bucket field's value.
  18397. func (s *GetBucketOwnershipControlsInput) SetBucket(v string) *GetBucketOwnershipControlsInput {
  18398. s.Bucket = &v
  18399. return s
  18400. }
  18401. func (s *GetBucketOwnershipControlsInput) getBucket() (v string) {
  18402. if s.Bucket == nil {
  18403. return v
  18404. }
  18405. return *s.Bucket
  18406. }
  18407. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18408. func (s *GetBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *GetBucketOwnershipControlsInput {
  18409. s.ExpectedBucketOwner = &v
  18410. return s
  18411. }
  18412. func (s *GetBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
  18413. if s.Bucket == nil {
  18414. return nil, fmt.Errorf("member Bucket is nil")
  18415. }
  18416. return parseEndpointARN(*s.Bucket)
  18417. }
  18418. func (s *GetBucketOwnershipControlsInput) hasEndpointARN() bool {
  18419. if s.Bucket == nil {
  18420. return false
  18421. }
  18422. return arn.IsARN(*s.Bucket)
  18423. }
  18424. // updateArnableField updates the value of the input field that
  18425. // takes an ARN as an input. This method is useful to backfill
  18426. // the parsed resource name from ARN into the input member.
  18427. // It returns a pointer to a modified copy of input and an error.
  18428. // Note that original input is not modified.
  18429. func (s GetBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
  18430. if s.Bucket == nil {
  18431. return nil, fmt.Errorf("member Bucket is nil")
  18432. }
  18433. s.Bucket = aws.String(v)
  18434. return &s, nil
  18435. }
  18436. type GetBucketOwnershipControlsOutput struct {
  18437. _ struct{} `type:"structure" payload:"OwnershipControls"`
  18438. // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
  18439. // currently in effect for this Amazon S3 bucket.
  18440. OwnershipControls *OwnershipControls `type:"structure"`
  18441. }
  18442. // String returns the string representation.
  18443. //
  18444. // API parameter values that are decorated as "sensitive" in the API will not
  18445. // be included in the string output. The member name will be present, but the
  18446. // value will be replaced with "sensitive".
  18447. func (s GetBucketOwnershipControlsOutput) String() string {
  18448. return awsutil.Prettify(s)
  18449. }
  18450. // GoString returns the string representation.
  18451. //
  18452. // API parameter values that are decorated as "sensitive" in the API will not
  18453. // be included in the string output. The member name will be present, but the
  18454. // value will be replaced with "sensitive".
  18455. func (s GetBucketOwnershipControlsOutput) GoString() string {
  18456. return s.String()
  18457. }
  18458. // SetOwnershipControls sets the OwnershipControls field's value.
  18459. func (s *GetBucketOwnershipControlsOutput) SetOwnershipControls(v *OwnershipControls) *GetBucketOwnershipControlsOutput {
  18460. s.OwnershipControls = v
  18461. return s
  18462. }
  18463. type GetBucketPolicyInput struct {
  18464. _ struct{} `locationName:"GetBucketPolicyRequest" type:"structure"`
  18465. // The bucket name for which to get the bucket policy.
  18466. //
  18467. // Bucket is a required field
  18468. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18469. // The account ID of the expected bucket owner. If the bucket is owned by a
  18470. // different account, the request fails with the HTTP status code 403 Forbidden
  18471. // (access denied).
  18472. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18473. }
  18474. // String returns the string representation.
  18475. //
  18476. // API parameter values that are decorated as "sensitive" in the API will not
  18477. // be included in the string output. The member name will be present, but the
  18478. // value will be replaced with "sensitive".
  18479. func (s GetBucketPolicyInput) String() string {
  18480. return awsutil.Prettify(s)
  18481. }
  18482. // GoString returns the string representation.
  18483. //
  18484. // API parameter values that are decorated as "sensitive" in the API will not
  18485. // be included in the string output. The member name will be present, but the
  18486. // value will be replaced with "sensitive".
  18487. func (s GetBucketPolicyInput) GoString() string {
  18488. return s.String()
  18489. }
  18490. // Validate inspects the fields of the type to determine if they are valid.
  18491. func (s *GetBucketPolicyInput) Validate() error {
  18492. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  18493. if s.Bucket == nil {
  18494. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18495. }
  18496. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18497. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18498. }
  18499. if invalidParams.Len() > 0 {
  18500. return invalidParams
  18501. }
  18502. return nil
  18503. }
  18504. // SetBucket sets the Bucket field's value.
  18505. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  18506. s.Bucket = &v
  18507. return s
  18508. }
  18509. func (s *GetBucketPolicyInput) getBucket() (v string) {
  18510. if s.Bucket == nil {
  18511. return v
  18512. }
  18513. return *s.Bucket
  18514. }
  18515. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18516. func (s *GetBucketPolicyInput) SetExpectedBucketOwner(v string) *GetBucketPolicyInput {
  18517. s.ExpectedBucketOwner = &v
  18518. return s
  18519. }
  18520. func (s *GetBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
  18521. if s.Bucket == nil {
  18522. return nil, fmt.Errorf("member Bucket is nil")
  18523. }
  18524. return parseEndpointARN(*s.Bucket)
  18525. }
  18526. func (s *GetBucketPolicyInput) hasEndpointARN() bool {
  18527. if s.Bucket == nil {
  18528. return false
  18529. }
  18530. return arn.IsARN(*s.Bucket)
  18531. }
  18532. // updateArnableField updates the value of the input field that
  18533. // takes an ARN as an input. This method is useful to backfill
  18534. // the parsed resource name from ARN into the input member.
  18535. // It returns a pointer to a modified copy of input and an error.
  18536. // Note that original input is not modified.
  18537. func (s GetBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
  18538. if s.Bucket == nil {
  18539. return nil, fmt.Errorf("member Bucket is nil")
  18540. }
  18541. s.Bucket = aws.String(v)
  18542. return &s, nil
  18543. }
  18544. type GetBucketPolicyOutput struct {
  18545. _ struct{} `type:"structure" payload:"Policy"`
  18546. // The bucket policy as a JSON document.
  18547. Policy *string `type:"string"`
  18548. }
  18549. // String returns the string representation.
  18550. //
  18551. // API parameter values that are decorated as "sensitive" in the API will not
  18552. // be included in the string output. The member name will be present, but the
  18553. // value will be replaced with "sensitive".
  18554. func (s GetBucketPolicyOutput) String() string {
  18555. return awsutil.Prettify(s)
  18556. }
  18557. // GoString returns the string representation.
  18558. //
  18559. // API parameter values that are decorated as "sensitive" in the API will not
  18560. // be included in the string output. The member name will be present, but the
  18561. // value will be replaced with "sensitive".
  18562. func (s GetBucketPolicyOutput) GoString() string {
  18563. return s.String()
  18564. }
  18565. // SetPolicy sets the Policy field's value.
  18566. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  18567. s.Policy = &v
  18568. return s
  18569. }
  18570. type GetBucketPolicyStatusInput struct {
  18571. _ struct{} `locationName:"GetBucketPolicyStatusRequest" type:"structure"`
  18572. // The name of the Amazon S3 bucket whose policy status you want to retrieve.
  18573. //
  18574. // Bucket is a required field
  18575. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18576. // The account ID of the expected bucket owner. If the bucket is owned by a
  18577. // different account, the request fails with the HTTP status code 403 Forbidden
  18578. // (access denied).
  18579. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18580. }
  18581. // String returns the string representation.
  18582. //
  18583. // API parameter values that are decorated as "sensitive" in the API will not
  18584. // be included in the string output. The member name will be present, but the
  18585. // value will be replaced with "sensitive".
  18586. func (s GetBucketPolicyStatusInput) String() string {
  18587. return awsutil.Prettify(s)
  18588. }
  18589. // GoString returns the string representation.
  18590. //
  18591. // API parameter values that are decorated as "sensitive" in the API will not
  18592. // be included in the string output. The member name will be present, but the
  18593. // value will be replaced with "sensitive".
  18594. func (s GetBucketPolicyStatusInput) GoString() string {
  18595. return s.String()
  18596. }
  18597. // Validate inspects the fields of the type to determine if they are valid.
  18598. func (s *GetBucketPolicyStatusInput) Validate() error {
  18599. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
  18600. if s.Bucket == nil {
  18601. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18602. }
  18603. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18604. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18605. }
  18606. if invalidParams.Len() > 0 {
  18607. return invalidParams
  18608. }
  18609. return nil
  18610. }
  18611. // SetBucket sets the Bucket field's value.
  18612. func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
  18613. s.Bucket = &v
  18614. return s
  18615. }
  18616. func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
  18617. if s.Bucket == nil {
  18618. return v
  18619. }
  18620. return *s.Bucket
  18621. }
  18622. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18623. func (s *GetBucketPolicyStatusInput) SetExpectedBucketOwner(v string) *GetBucketPolicyStatusInput {
  18624. s.ExpectedBucketOwner = &v
  18625. return s
  18626. }
  18627. func (s *GetBucketPolicyStatusInput) getEndpointARN() (arn.Resource, error) {
  18628. if s.Bucket == nil {
  18629. return nil, fmt.Errorf("member Bucket is nil")
  18630. }
  18631. return parseEndpointARN(*s.Bucket)
  18632. }
  18633. func (s *GetBucketPolicyStatusInput) hasEndpointARN() bool {
  18634. if s.Bucket == nil {
  18635. return false
  18636. }
  18637. return arn.IsARN(*s.Bucket)
  18638. }
  18639. // updateArnableField updates the value of the input field that
  18640. // takes an ARN as an input. This method is useful to backfill
  18641. // the parsed resource name from ARN into the input member.
  18642. // It returns a pointer to a modified copy of input and an error.
  18643. // Note that original input is not modified.
  18644. func (s GetBucketPolicyStatusInput) updateArnableField(v string) (interface{}, error) {
  18645. if s.Bucket == nil {
  18646. return nil, fmt.Errorf("member Bucket is nil")
  18647. }
  18648. s.Bucket = aws.String(v)
  18649. return &s, nil
  18650. }
  18651. type GetBucketPolicyStatusOutput struct {
  18652. _ struct{} `type:"structure" payload:"PolicyStatus"`
  18653. // The policy status for the specified bucket.
  18654. PolicyStatus *PolicyStatus `type:"structure"`
  18655. }
  18656. // String returns the string representation.
  18657. //
  18658. // API parameter values that are decorated as "sensitive" in the API will not
  18659. // be included in the string output. The member name will be present, but the
  18660. // value will be replaced with "sensitive".
  18661. func (s GetBucketPolicyStatusOutput) String() string {
  18662. return awsutil.Prettify(s)
  18663. }
  18664. // GoString returns the string representation.
  18665. //
  18666. // API parameter values that are decorated as "sensitive" in the API will not
  18667. // be included in the string output. The member name will be present, but the
  18668. // value will be replaced with "sensitive".
  18669. func (s GetBucketPolicyStatusOutput) GoString() string {
  18670. return s.String()
  18671. }
  18672. // SetPolicyStatus sets the PolicyStatus field's value.
  18673. func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
  18674. s.PolicyStatus = v
  18675. return s
  18676. }
  18677. type GetBucketReplicationInput struct {
  18678. _ struct{} `locationName:"GetBucketReplicationRequest" type:"structure"`
  18679. // The bucket name for which to get the replication information.
  18680. //
  18681. // Bucket is a required field
  18682. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18683. // The account ID of the expected bucket owner. If the bucket is owned by a
  18684. // different account, the request fails with the HTTP status code 403 Forbidden
  18685. // (access denied).
  18686. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18687. }
  18688. // String returns the string representation.
  18689. //
  18690. // API parameter values that are decorated as "sensitive" in the API will not
  18691. // be included in the string output. The member name will be present, but the
  18692. // value will be replaced with "sensitive".
  18693. func (s GetBucketReplicationInput) String() string {
  18694. return awsutil.Prettify(s)
  18695. }
  18696. // GoString returns the string representation.
  18697. //
  18698. // API parameter values that are decorated as "sensitive" in the API will not
  18699. // be included in the string output. The member name will be present, but the
  18700. // value will be replaced with "sensitive".
  18701. func (s GetBucketReplicationInput) GoString() string {
  18702. return s.String()
  18703. }
  18704. // Validate inspects the fields of the type to determine if they are valid.
  18705. func (s *GetBucketReplicationInput) Validate() error {
  18706. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  18707. if s.Bucket == nil {
  18708. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18709. }
  18710. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18711. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18712. }
  18713. if invalidParams.Len() > 0 {
  18714. return invalidParams
  18715. }
  18716. return nil
  18717. }
  18718. // SetBucket sets the Bucket field's value.
  18719. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  18720. s.Bucket = &v
  18721. return s
  18722. }
  18723. func (s *GetBucketReplicationInput) getBucket() (v string) {
  18724. if s.Bucket == nil {
  18725. return v
  18726. }
  18727. return *s.Bucket
  18728. }
  18729. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18730. func (s *GetBucketReplicationInput) SetExpectedBucketOwner(v string) *GetBucketReplicationInput {
  18731. s.ExpectedBucketOwner = &v
  18732. return s
  18733. }
  18734. func (s *GetBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
  18735. if s.Bucket == nil {
  18736. return nil, fmt.Errorf("member Bucket is nil")
  18737. }
  18738. return parseEndpointARN(*s.Bucket)
  18739. }
  18740. func (s *GetBucketReplicationInput) hasEndpointARN() bool {
  18741. if s.Bucket == nil {
  18742. return false
  18743. }
  18744. return arn.IsARN(*s.Bucket)
  18745. }
  18746. // updateArnableField updates the value of the input field that
  18747. // takes an ARN as an input. This method is useful to backfill
  18748. // the parsed resource name from ARN into the input member.
  18749. // It returns a pointer to a modified copy of input and an error.
  18750. // Note that original input is not modified.
  18751. func (s GetBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
  18752. if s.Bucket == nil {
  18753. return nil, fmt.Errorf("member Bucket is nil")
  18754. }
  18755. s.Bucket = aws.String(v)
  18756. return &s, nil
  18757. }
  18758. type GetBucketReplicationOutput struct {
  18759. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  18760. // A container for replication rules. You can add up to 1,000 rules. The maximum
  18761. // size of a replication configuration is 2 MB.
  18762. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  18763. }
  18764. // String returns the string representation.
  18765. //
  18766. // API parameter values that are decorated as "sensitive" in the API will not
  18767. // be included in the string output. The member name will be present, but the
  18768. // value will be replaced with "sensitive".
  18769. func (s GetBucketReplicationOutput) String() string {
  18770. return awsutil.Prettify(s)
  18771. }
  18772. // GoString returns the string representation.
  18773. //
  18774. // API parameter values that are decorated as "sensitive" in the API will not
  18775. // be included in the string output. The member name will be present, but the
  18776. // value will be replaced with "sensitive".
  18777. func (s GetBucketReplicationOutput) GoString() string {
  18778. return s.String()
  18779. }
  18780. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  18781. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  18782. s.ReplicationConfiguration = v
  18783. return s
  18784. }
  18785. type GetBucketRequestPaymentInput struct {
  18786. _ struct{} `locationName:"GetBucketRequestPaymentRequest" type:"structure"`
  18787. // The name of the bucket for which to get the payment request configuration
  18788. //
  18789. // Bucket is a required field
  18790. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18791. // The account ID of the expected bucket owner. If the bucket is owned by a
  18792. // different account, the request fails with the HTTP status code 403 Forbidden
  18793. // (access denied).
  18794. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18795. }
  18796. // String returns the string representation.
  18797. //
  18798. // API parameter values that are decorated as "sensitive" in the API will not
  18799. // be included in the string output. The member name will be present, but the
  18800. // value will be replaced with "sensitive".
  18801. func (s GetBucketRequestPaymentInput) String() string {
  18802. return awsutil.Prettify(s)
  18803. }
  18804. // GoString returns the string representation.
  18805. //
  18806. // API parameter values that are decorated as "sensitive" in the API will not
  18807. // be included in the string output. The member name will be present, but the
  18808. // value will be replaced with "sensitive".
  18809. func (s GetBucketRequestPaymentInput) GoString() string {
  18810. return s.String()
  18811. }
  18812. // Validate inspects the fields of the type to determine if they are valid.
  18813. func (s *GetBucketRequestPaymentInput) Validate() error {
  18814. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  18815. if s.Bucket == nil {
  18816. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18817. }
  18818. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18819. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18820. }
  18821. if invalidParams.Len() > 0 {
  18822. return invalidParams
  18823. }
  18824. return nil
  18825. }
  18826. // SetBucket sets the Bucket field's value.
  18827. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  18828. s.Bucket = &v
  18829. return s
  18830. }
  18831. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  18832. if s.Bucket == nil {
  18833. return v
  18834. }
  18835. return *s.Bucket
  18836. }
  18837. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18838. func (s *GetBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *GetBucketRequestPaymentInput {
  18839. s.ExpectedBucketOwner = &v
  18840. return s
  18841. }
  18842. func (s *GetBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
  18843. if s.Bucket == nil {
  18844. return nil, fmt.Errorf("member Bucket is nil")
  18845. }
  18846. return parseEndpointARN(*s.Bucket)
  18847. }
  18848. func (s *GetBucketRequestPaymentInput) hasEndpointARN() bool {
  18849. if s.Bucket == nil {
  18850. return false
  18851. }
  18852. return arn.IsARN(*s.Bucket)
  18853. }
  18854. // updateArnableField updates the value of the input field that
  18855. // takes an ARN as an input. This method is useful to backfill
  18856. // the parsed resource name from ARN into the input member.
  18857. // It returns a pointer to a modified copy of input and an error.
  18858. // Note that original input is not modified.
  18859. func (s GetBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
  18860. if s.Bucket == nil {
  18861. return nil, fmt.Errorf("member Bucket is nil")
  18862. }
  18863. s.Bucket = aws.String(v)
  18864. return &s, nil
  18865. }
  18866. type GetBucketRequestPaymentOutput struct {
  18867. _ struct{} `type:"structure"`
  18868. // Specifies who pays for the download and request fees.
  18869. Payer *string `type:"string" enum:"Payer"`
  18870. }
  18871. // String returns the string representation.
  18872. //
  18873. // API parameter values that are decorated as "sensitive" in the API will not
  18874. // be included in the string output. The member name will be present, but the
  18875. // value will be replaced with "sensitive".
  18876. func (s GetBucketRequestPaymentOutput) String() string {
  18877. return awsutil.Prettify(s)
  18878. }
  18879. // GoString returns the string representation.
  18880. //
  18881. // API parameter values that are decorated as "sensitive" in the API will not
  18882. // be included in the string output. The member name will be present, but the
  18883. // value will be replaced with "sensitive".
  18884. func (s GetBucketRequestPaymentOutput) GoString() string {
  18885. return s.String()
  18886. }
  18887. // SetPayer sets the Payer field's value.
  18888. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  18889. s.Payer = &v
  18890. return s
  18891. }
  18892. type GetBucketTaggingInput struct {
  18893. _ struct{} `locationName:"GetBucketTaggingRequest" type:"structure"`
  18894. // The name of the bucket for which to get the tagging information.
  18895. //
  18896. // Bucket is a required field
  18897. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18898. // The account ID of the expected bucket owner. If the bucket is owned by a
  18899. // different account, the request fails with the HTTP status code 403 Forbidden
  18900. // (access denied).
  18901. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  18902. }
  18903. // String returns the string representation.
  18904. //
  18905. // API parameter values that are decorated as "sensitive" in the API will not
  18906. // be included in the string output. The member name will be present, but the
  18907. // value will be replaced with "sensitive".
  18908. func (s GetBucketTaggingInput) String() string {
  18909. return awsutil.Prettify(s)
  18910. }
  18911. // GoString returns the string representation.
  18912. //
  18913. // API parameter values that are decorated as "sensitive" in the API will not
  18914. // be included in the string output. The member name will be present, but the
  18915. // value will be replaced with "sensitive".
  18916. func (s GetBucketTaggingInput) GoString() string {
  18917. return s.String()
  18918. }
  18919. // Validate inspects the fields of the type to determine if they are valid.
  18920. func (s *GetBucketTaggingInput) Validate() error {
  18921. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  18922. if s.Bucket == nil {
  18923. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18924. }
  18925. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18926. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18927. }
  18928. if invalidParams.Len() > 0 {
  18929. return invalidParams
  18930. }
  18931. return nil
  18932. }
  18933. // SetBucket sets the Bucket field's value.
  18934. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  18935. s.Bucket = &v
  18936. return s
  18937. }
  18938. func (s *GetBucketTaggingInput) getBucket() (v string) {
  18939. if s.Bucket == nil {
  18940. return v
  18941. }
  18942. return *s.Bucket
  18943. }
  18944. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  18945. func (s *GetBucketTaggingInput) SetExpectedBucketOwner(v string) *GetBucketTaggingInput {
  18946. s.ExpectedBucketOwner = &v
  18947. return s
  18948. }
  18949. func (s *GetBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
  18950. if s.Bucket == nil {
  18951. return nil, fmt.Errorf("member Bucket is nil")
  18952. }
  18953. return parseEndpointARN(*s.Bucket)
  18954. }
  18955. func (s *GetBucketTaggingInput) hasEndpointARN() bool {
  18956. if s.Bucket == nil {
  18957. return false
  18958. }
  18959. return arn.IsARN(*s.Bucket)
  18960. }
  18961. // updateArnableField updates the value of the input field that
  18962. // takes an ARN as an input. This method is useful to backfill
  18963. // the parsed resource name from ARN into the input member.
  18964. // It returns a pointer to a modified copy of input and an error.
  18965. // Note that original input is not modified.
  18966. func (s GetBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
  18967. if s.Bucket == nil {
  18968. return nil, fmt.Errorf("member Bucket is nil")
  18969. }
  18970. s.Bucket = aws.String(v)
  18971. return &s, nil
  18972. }
  18973. type GetBucketTaggingOutput struct {
  18974. _ struct{} `type:"structure"`
  18975. // Contains the tag set.
  18976. //
  18977. // TagSet is a required field
  18978. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  18979. }
  18980. // String returns the string representation.
  18981. //
  18982. // API parameter values that are decorated as "sensitive" in the API will not
  18983. // be included in the string output. The member name will be present, but the
  18984. // value will be replaced with "sensitive".
  18985. func (s GetBucketTaggingOutput) String() string {
  18986. return awsutil.Prettify(s)
  18987. }
  18988. // GoString returns the string representation.
  18989. //
  18990. // API parameter values that are decorated as "sensitive" in the API will not
  18991. // be included in the string output. The member name will be present, but the
  18992. // value will be replaced with "sensitive".
  18993. func (s GetBucketTaggingOutput) GoString() string {
  18994. return s.String()
  18995. }
  18996. // SetTagSet sets the TagSet field's value.
  18997. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  18998. s.TagSet = v
  18999. return s
  19000. }
  19001. type GetBucketVersioningInput struct {
  19002. _ struct{} `locationName:"GetBucketVersioningRequest" type:"structure"`
  19003. // The name of the bucket for which to get the versioning information.
  19004. //
  19005. // Bucket is a required field
  19006. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19007. // The account ID of the expected bucket owner. If the bucket is owned by a
  19008. // different account, the request fails with the HTTP status code 403 Forbidden
  19009. // (access denied).
  19010. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  19011. }
  19012. // String returns the string representation.
  19013. //
  19014. // API parameter values that are decorated as "sensitive" in the API will not
  19015. // be included in the string output. The member name will be present, but the
  19016. // value will be replaced with "sensitive".
  19017. func (s GetBucketVersioningInput) String() string {
  19018. return awsutil.Prettify(s)
  19019. }
  19020. // GoString returns the string representation.
  19021. //
  19022. // API parameter values that are decorated as "sensitive" in the API will not
  19023. // be included in the string output. The member name will be present, but the
  19024. // value will be replaced with "sensitive".
  19025. func (s GetBucketVersioningInput) GoString() string {
  19026. return s.String()
  19027. }
  19028. // Validate inspects the fields of the type to determine if they are valid.
  19029. func (s *GetBucketVersioningInput) Validate() error {
  19030. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  19031. if s.Bucket == nil {
  19032. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19033. }
  19034. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19035. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19036. }
  19037. if invalidParams.Len() > 0 {
  19038. return invalidParams
  19039. }
  19040. return nil
  19041. }
  19042. // SetBucket sets the Bucket field's value.
  19043. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  19044. s.Bucket = &v
  19045. return s
  19046. }
  19047. func (s *GetBucketVersioningInput) getBucket() (v string) {
  19048. if s.Bucket == nil {
  19049. return v
  19050. }
  19051. return *s.Bucket
  19052. }
  19053. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  19054. func (s *GetBucketVersioningInput) SetExpectedBucketOwner(v string) *GetBucketVersioningInput {
  19055. s.ExpectedBucketOwner = &v
  19056. return s
  19057. }
  19058. func (s *GetBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
  19059. if s.Bucket == nil {
  19060. return nil, fmt.Errorf("member Bucket is nil")
  19061. }
  19062. return parseEndpointARN(*s.Bucket)
  19063. }
  19064. func (s *GetBucketVersioningInput) hasEndpointARN() bool {
  19065. if s.Bucket == nil {
  19066. return false
  19067. }
  19068. return arn.IsARN(*s.Bucket)
  19069. }
  19070. // updateArnableField updates the value of the input field that
  19071. // takes an ARN as an input. This method is useful to backfill
  19072. // the parsed resource name from ARN into the input member.
  19073. // It returns a pointer to a modified copy of input and an error.
  19074. // Note that original input is not modified.
  19075. func (s GetBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
  19076. if s.Bucket == nil {
  19077. return nil, fmt.Errorf("member Bucket is nil")
  19078. }
  19079. s.Bucket = aws.String(v)
  19080. return &s, nil
  19081. }
  19082. type GetBucketVersioningOutput struct {
  19083. _ struct{} `type:"structure"`
  19084. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  19085. // This element is only returned if the bucket has been configured with MFA
  19086. // delete. If the bucket has never been so configured, this element is not returned.
  19087. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  19088. // The versioning state of the bucket.
  19089. Status *string `type:"string" enum:"BucketVersioningStatus"`
  19090. }
  19091. // String returns the string representation.
  19092. //
  19093. // API parameter values that are decorated as "sensitive" in the API will not
  19094. // be included in the string output. The member name will be present, but the
  19095. // value will be replaced with "sensitive".
  19096. func (s GetBucketVersioningOutput) String() string {
  19097. return awsutil.Prettify(s)
  19098. }
  19099. // GoString returns the string representation.
  19100. //
  19101. // API parameter values that are decorated as "sensitive" in the API will not
  19102. // be included in the string output. The member name will be present, but the
  19103. // value will be replaced with "sensitive".
  19104. func (s GetBucketVersioningOutput) GoString() string {
  19105. return s.String()
  19106. }
  19107. // SetMFADelete sets the MFADelete field's value.
  19108. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  19109. s.MFADelete = &v
  19110. return s
  19111. }
  19112. // SetStatus sets the Status field's value.
  19113. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  19114. s.Status = &v
  19115. return s
  19116. }
  19117. type GetBucketWebsiteInput struct {
  19118. _ struct{} `locationName:"GetBucketWebsiteRequest" type:"structure"`
  19119. // The bucket name for which to get the website configuration.
  19120. //
  19121. // Bucket is a required field
  19122. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19123. // The account ID of the expected bucket owner. If the bucket is owned by a
  19124. // different account, the request fails with the HTTP status code 403 Forbidden
  19125. // (access denied).
  19126. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  19127. }
  19128. // String returns the string representation.
  19129. //
  19130. // API parameter values that are decorated as "sensitive" in the API will not
  19131. // be included in the string output. The member name will be present, but the
  19132. // value will be replaced with "sensitive".
  19133. func (s GetBucketWebsiteInput) String() string {
  19134. return awsutil.Prettify(s)
  19135. }
  19136. // GoString returns the string representation.
  19137. //
  19138. // API parameter values that are decorated as "sensitive" in the API will not
  19139. // be included in the string output. The member name will be present, but the
  19140. // value will be replaced with "sensitive".
  19141. func (s GetBucketWebsiteInput) GoString() string {
  19142. return s.String()
  19143. }
  19144. // Validate inspects the fields of the type to determine if they are valid.
  19145. func (s *GetBucketWebsiteInput) Validate() error {
  19146. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  19147. if s.Bucket == nil {
  19148. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19149. }
  19150. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19151. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19152. }
  19153. if invalidParams.Len() > 0 {
  19154. return invalidParams
  19155. }
  19156. return nil
  19157. }
  19158. // SetBucket sets the Bucket field's value.
  19159. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  19160. s.Bucket = &v
  19161. return s
  19162. }
  19163. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  19164. if s.Bucket == nil {
  19165. return v
  19166. }
  19167. return *s.Bucket
  19168. }
  19169. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  19170. func (s *GetBucketWebsiteInput) SetExpectedBucketOwner(v string) *GetBucketWebsiteInput {
  19171. s.ExpectedBucketOwner = &v
  19172. return s
  19173. }
  19174. func (s *GetBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
  19175. if s.Bucket == nil {
  19176. return nil, fmt.Errorf("member Bucket is nil")
  19177. }
  19178. return parseEndpointARN(*s.Bucket)
  19179. }
  19180. func (s *GetBucketWebsiteInput) hasEndpointARN() bool {
  19181. if s.Bucket == nil {
  19182. return false
  19183. }
  19184. return arn.IsARN(*s.Bucket)
  19185. }
  19186. // updateArnableField updates the value of the input field that
  19187. // takes an ARN as an input. This method is useful to backfill
  19188. // the parsed resource name from ARN into the input member.
  19189. // It returns a pointer to a modified copy of input and an error.
  19190. // Note that original input is not modified.
  19191. func (s GetBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
  19192. if s.Bucket == nil {
  19193. return nil, fmt.Errorf("member Bucket is nil")
  19194. }
  19195. s.Bucket = aws.String(v)
  19196. return &s, nil
  19197. }
  19198. type GetBucketWebsiteOutput struct {
  19199. _ struct{} `type:"structure"`
  19200. // The object key name of the website error document to use for 4XX class errors.
  19201. ErrorDocument *ErrorDocument `type:"structure"`
  19202. // The name of the index document for the website (for example index.html).
  19203. IndexDocument *IndexDocument `type:"structure"`
  19204. // Specifies the redirect behavior of all requests to a website endpoint of
  19205. // an Amazon S3 bucket.
  19206. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  19207. // Rules that define when a redirect is applied and the redirect behavior.
  19208. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  19209. }
  19210. // String returns the string representation.
  19211. //
  19212. // API parameter values that are decorated as "sensitive" in the API will not
  19213. // be included in the string output. The member name will be present, but the
  19214. // value will be replaced with "sensitive".
  19215. func (s GetBucketWebsiteOutput) String() string {
  19216. return awsutil.Prettify(s)
  19217. }
  19218. // GoString returns the string representation.
  19219. //
  19220. // API parameter values that are decorated as "sensitive" in the API will not
  19221. // be included in the string output. The member name will be present, but the
  19222. // value will be replaced with "sensitive".
  19223. func (s GetBucketWebsiteOutput) GoString() string {
  19224. return s.String()
  19225. }
  19226. // SetErrorDocument sets the ErrorDocument field's value.
  19227. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  19228. s.ErrorDocument = v
  19229. return s
  19230. }
  19231. // SetIndexDocument sets the IndexDocument field's value.
  19232. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  19233. s.IndexDocument = v
  19234. return s
  19235. }
  19236. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  19237. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  19238. s.RedirectAllRequestsTo = v
  19239. return s
  19240. }
  19241. // SetRoutingRules sets the RoutingRules field's value.
  19242. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  19243. s.RoutingRules = v
  19244. return s
  19245. }
  19246. type GetObjectAclInput struct {
  19247. _ struct{} `locationName:"GetObjectAclRequest" type:"structure"`
  19248. // The bucket name that contains the object for which to get the ACL information.
  19249. //
  19250. // When using this action with an access point, you must direct requests to
  19251. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  19252. // When using this action with an access point through the Amazon Web Services
  19253. // SDKs, you provide the access point ARN in place of the bucket name. For more
  19254. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  19255. // in the Amazon S3 User Guide.
  19256. //
  19257. // Bucket is a required field
  19258. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19259. // The account ID of the expected bucket owner. If the bucket is owned by a
  19260. // different account, the request fails with the HTTP status code 403 Forbidden
  19261. // (access denied).
  19262. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  19263. // The key of the object for which to get the ACL information.
  19264. //
  19265. // Key is a required field
  19266. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19267. // Confirms that the requester knows that they will be charged for the request.
  19268. // Bucket owners need not specify this parameter in their requests. For information
  19269. // about downloading objects from Requester Pays buckets, see Downloading Objects
  19270. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  19271. // in the Amazon S3 User Guide.
  19272. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  19273. // VersionId used to reference a specific version of the object.
  19274. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  19275. }
  19276. // String returns the string representation.
  19277. //
  19278. // API parameter values that are decorated as "sensitive" in the API will not
  19279. // be included in the string output. The member name will be present, but the
  19280. // value will be replaced with "sensitive".
  19281. func (s GetObjectAclInput) String() string {
  19282. return awsutil.Prettify(s)
  19283. }
  19284. // GoString returns the string representation.
  19285. //
  19286. // API parameter values that are decorated as "sensitive" in the API will not
  19287. // be included in the string output. The member name will be present, but the
  19288. // value will be replaced with "sensitive".
  19289. func (s GetObjectAclInput) GoString() string {
  19290. return s.String()
  19291. }
  19292. // Validate inspects the fields of the type to determine if they are valid.
  19293. func (s *GetObjectAclInput) Validate() error {
  19294. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  19295. if s.Bucket == nil {
  19296. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19297. }
  19298. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19299. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19300. }
  19301. if s.Key == nil {
  19302. invalidParams.Add(request.NewErrParamRequired("Key"))
  19303. }
  19304. if s.Key != nil && len(*s.Key) < 1 {
  19305. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19306. }
  19307. if invalidParams.Len() > 0 {
  19308. return invalidParams
  19309. }
  19310. return nil
  19311. }
  19312. // SetBucket sets the Bucket field's value.
  19313. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  19314. s.Bucket = &v
  19315. return s
  19316. }
  19317. func (s *GetObjectAclInput) getBucket() (v string) {
  19318. if s.Bucket == nil {
  19319. return v
  19320. }
  19321. return *s.Bucket
  19322. }
  19323. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  19324. func (s *GetObjectAclInput) SetExpectedBucketOwner(v string) *GetObjectAclInput {
  19325. s.ExpectedBucketOwner = &v
  19326. return s
  19327. }
  19328. // SetKey sets the Key field's value.
  19329. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  19330. s.Key = &v
  19331. return s
  19332. }
  19333. // SetRequestPayer sets the RequestPayer field's value.
  19334. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  19335. s.RequestPayer = &v
  19336. return s
  19337. }
  19338. // SetVersionId sets the VersionId field's value.
  19339. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  19340. s.VersionId = &v
  19341. return s
  19342. }
  19343. func (s *GetObjectAclInput) getEndpointARN() (arn.Resource, error) {
  19344. if s.Bucket == nil {
  19345. return nil, fmt.Errorf("member Bucket is nil")
  19346. }
  19347. return parseEndpointARN(*s.Bucket)
  19348. }
  19349. func (s *GetObjectAclInput) hasEndpointARN() bool {
  19350. if s.Bucket == nil {
  19351. return false
  19352. }
  19353. return arn.IsARN(*s.Bucket)
  19354. }
  19355. // updateArnableField updates the value of the input field that
  19356. // takes an ARN as an input. This method is useful to backfill
  19357. // the parsed resource name from ARN into the input member.
  19358. // It returns a pointer to a modified copy of input and an error.
  19359. // Note that original input is not modified.
  19360. func (s GetObjectAclInput) updateArnableField(v string) (interface{}, error) {
  19361. if s.Bucket == nil {
  19362. return nil, fmt.Errorf("member Bucket is nil")
  19363. }
  19364. s.Bucket = aws.String(v)
  19365. return &s, nil
  19366. }
  19367. type GetObjectAclOutput struct {
  19368. _ struct{} `type:"structure"`
  19369. // A list of grants.
  19370. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  19371. // Container for the bucket owner's display name and ID.
  19372. Owner *Owner `type:"structure"`
  19373. // If present, indicates that the requester was successfully charged for the
  19374. // request.
  19375. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  19376. }
  19377. // String returns the string representation.
  19378. //
  19379. // API parameter values that are decorated as "sensitive" in the API will not
  19380. // be included in the string output. The member name will be present, but the
  19381. // value will be replaced with "sensitive".
  19382. func (s GetObjectAclOutput) String() string {
  19383. return awsutil.Prettify(s)
  19384. }
  19385. // GoString returns the string representation.
  19386. //
  19387. // API parameter values that are decorated as "sensitive" in the API will not
  19388. // be included in the string output. The member name will be present, but the
  19389. // value will be replaced with "sensitive".
  19390. func (s GetObjectAclOutput) GoString() string {
  19391. return s.String()
  19392. }
  19393. // SetGrants sets the Grants field's value.
  19394. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  19395. s.Grants = v
  19396. return s
  19397. }
  19398. // SetOwner sets the Owner field's value.
  19399. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  19400. s.Owner = v
  19401. return s
  19402. }
  19403. // SetRequestCharged sets the RequestCharged field's value.
  19404. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  19405. s.RequestCharged = &v
  19406. return s
  19407. }
  19408. type GetObjectAttributesInput struct {
  19409. _ struct{} `locationName:"GetObjectAttributesRequest" type:"structure"`
  19410. // The name of the bucket that contains the object.
  19411. //
  19412. // When using this action with an access point, you must direct requests to
  19413. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  19414. // When using this action with an access point through the Amazon Web Services
  19415. // SDKs, you provide the access point ARN in place of the bucket name. For more
  19416. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  19417. // in the Amazon S3 User Guide.
  19418. //
  19419. // When using this action with Amazon S3 on Outposts, you must direct requests
  19420. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  19421. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  19422. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  19423. // you provide the Outposts bucket ARN in place of the bucket name. For more
  19424. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  19425. // in the Amazon S3 User Guide.
  19426. //
  19427. // Bucket is a required field
  19428. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19429. // The account ID of the expected bucket owner. If the bucket is owned by a
  19430. // different account, the request fails with the HTTP status code 403 Forbidden
  19431. // (access denied).
  19432. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  19433. // The object key.
  19434. //
  19435. // Key is a required field
  19436. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19437. // Sets the maximum number of parts to return.
  19438. MaxParts *int64 `location:"header" locationName:"x-amz-max-parts" type:"integer"`
  19439. // An XML header that specifies the fields at the root level that you want returned
  19440. // in the response. Fields that you do not specify are not returned.
  19441. //
  19442. // ObjectAttributes is a required field
  19443. ObjectAttributes []*string `location:"header" locationName:"x-amz-object-attributes" type:"list" required:"true" enum:"ObjectAttributes"`
  19444. // Specifies the part after which listing should begin. Only parts with higher
  19445. // part numbers will be listed.
  19446. PartNumberMarker *int64 `location:"header" locationName:"x-amz-part-number-marker" type:"integer"`
  19447. // Confirms that the requester knows that they will be charged for the request.
  19448. // Bucket owners need not specify this parameter in their requests. For information
  19449. // about downloading objects from Requester Pays buckets, see Downloading Objects
  19450. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  19451. // in the Amazon S3 User Guide.
  19452. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  19453. // Specifies the algorithm to use when encrypting the object (for example, AES256).
  19454. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19455. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  19456. // data. This value is used to store the object and then it is discarded; Amazon
  19457. // S3 does not store the encryption key. The key must be appropriate for use
  19458. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  19459. // header.
  19460. //
  19461. // SSECustomerKey is a sensitive parameter and its value will be
  19462. // replaced with "sensitive" in string returned by GetObjectAttributesInput's
  19463. // String and GoString methods.
  19464. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19465. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19466. // Amazon S3 uses this header for a message integrity check to ensure that the
  19467. // encryption key was transmitted without error.
  19468. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19469. // The version ID used to reference a specific version of the object.
  19470. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  19471. }
  19472. // String returns the string representation.
  19473. //
  19474. // API parameter values that are decorated as "sensitive" in the API will not
  19475. // be included in the string output. The member name will be present, but the
  19476. // value will be replaced with "sensitive".
  19477. func (s GetObjectAttributesInput) String() string {
  19478. return awsutil.Prettify(s)
  19479. }
  19480. // GoString returns the string representation.
  19481. //
  19482. // API parameter values that are decorated as "sensitive" in the API will not
  19483. // be included in the string output. The member name will be present, but the
  19484. // value will be replaced with "sensitive".
  19485. func (s GetObjectAttributesInput) GoString() string {
  19486. return s.String()
  19487. }
  19488. // Validate inspects the fields of the type to determine if they are valid.
  19489. func (s *GetObjectAttributesInput) Validate() error {
  19490. invalidParams := request.ErrInvalidParams{Context: "GetObjectAttributesInput"}
  19491. if s.Bucket == nil {
  19492. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19493. }
  19494. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19495. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19496. }
  19497. if s.Key == nil {
  19498. invalidParams.Add(request.NewErrParamRequired("Key"))
  19499. }
  19500. if s.Key != nil && len(*s.Key) < 1 {
  19501. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19502. }
  19503. if s.ObjectAttributes == nil {
  19504. invalidParams.Add(request.NewErrParamRequired("ObjectAttributes"))
  19505. }
  19506. if invalidParams.Len() > 0 {
  19507. return invalidParams
  19508. }
  19509. return nil
  19510. }
  19511. // SetBucket sets the Bucket field's value.
  19512. func (s *GetObjectAttributesInput) SetBucket(v string) *GetObjectAttributesInput {
  19513. s.Bucket = &v
  19514. return s
  19515. }
  19516. func (s *GetObjectAttributesInput) getBucket() (v string) {
  19517. if s.Bucket == nil {
  19518. return v
  19519. }
  19520. return *s.Bucket
  19521. }
  19522. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  19523. func (s *GetObjectAttributesInput) SetExpectedBucketOwner(v string) *GetObjectAttributesInput {
  19524. s.ExpectedBucketOwner = &v
  19525. return s
  19526. }
  19527. // SetKey sets the Key field's value.
  19528. func (s *GetObjectAttributesInput) SetKey(v string) *GetObjectAttributesInput {
  19529. s.Key = &v
  19530. return s
  19531. }
  19532. // SetMaxParts sets the MaxParts field's value.
  19533. func (s *GetObjectAttributesInput) SetMaxParts(v int64) *GetObjectAttributesInput {
  19534. s.MaxParts = &v
  19535. return s
  19536. }
  19537. // SetObjectAttributes sets the ObjectAttributes field's value.
  19538. func (s *GetObjectAttributesInput) SetObjectAttributes(v []*string) *GetObjectAttributesInput {
  19539. s.ObjectAttributes = v
  19540. return s
  19541. }
  19542. // SetPartNumberMarker sets the PartNumberMarker field's value.
  19543. func (s *GetObjectAttributesInput) SetPartNumberMarker(v int64) *GetObjectAttributesInput {
  19544. s.PartNumberMarker = &v
  19545. return s
  19546. }
  19547. // SetRequestPayer sets the RequestPayer field's value.
  19548. func (s *GetObjectAttributesInput) SetRequestPayer(v string) *GetObjectAttributesInput {
  19549. s.RequestPayer = &v
  19550. return s
  19551. }
  19552. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  19553. func (s *GetObjectAttributesInput) SetSSECustomerAlgorithm(v string) *GetObjectAttributesInput {
  19554. s.SSECustomerAlgorithm = &v
  19555. return s
  19556. }
  19557. // SetSSECustomerKey sets the SSECustomerKey field's value.
  19558. func (s *GetObjectAttributesInput) SetSSECustomerKey(v string) *GetObjectAttributesInput {
  19559. s.SSECustomerKey = &v
  19560. return s
  19561. }
  19562. func (s *GetObjectAttributesInput) getSSECustomerKey() (v string) {
  19563. if s.SSECustomerKey == nil {
  19564. return v
  19565. }
  19566. return *s.SSECustomerKey
  19567. }
  19568. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  19569. func (s *GetObjectAttributesInput) SetSSECustomerKeyMD5(v string) *GetObjectAttributesInput {
  19570. s.SSECustomerKeyMD5 = &v
  19571. return s
  19572. }
  19573. // SetVersionId sets the VersionId field's value.
  19574. func (s *GetObjectAttributesInput) SetVersionId(v string) *GetObjectAttributesInput {
  19575. s.VersionId = &v
  19576. return s
  19577. }
  19578. func (s *GetObjectAttributesInput) getEndpointARN() (arn.Resource, error) {
  19579. if s.Bucket == nil {
  19580. return nil, fmt.Errorf("member Bucket is nil")
  19581. }
  19582. return parseEndpointARN(*s.Bucket)
  19583. }
  19584. func (s *GetObjectAttributesInput) hasEndpointARN() bool {
  19585. if s.Bucket == nil {
  19586. return false
  19587. }
  19588. return arn.IsARN(*s.Bucket)
  19589. }
  19590. // updateArnableField updates the value of the input field that
  19591. // takes an ARN as an input. This method is useful to backfill
  19592. // the parsed resource name from ARN into the input member.
  19593. // It returns a pointer to a modified copy of input and an error.
  19594. // Note that original input is not modified.
  19595. func (s GetObjectAttributesInput) updateArnableField(v string) (interface{}, error) {
  19596. if s.Bucket == nil {
  19597. return nil, fmt.Errorf("member Bucket is nil")
  19598. }
  19599. s.Bucket = aws.String(v)
  19600. return &s, nil
  19601. }
  19602. type GetObjectAttributesOutput struct {
  19603. _ struct{} `type:"structure"`
  19604. // The checksum or digest of the object.
  19605. Checksum *Checksum `type:"structure"`
  19606. // Specifies whether the object retrieved was (true) or was not (false) a delete
  19607. // marker. If false, this response header does not appear in the response.
  19608. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  19609. // An ETag is an opaque identifier assigned by a web server to a specific version
  19610. // of a resource found at a URL.
  19611. ETag *string `type:"string"`
  19612. // The creation date of the object.
  19613. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  19614. // A collection of parts associated with a multipart upload.
  19615. ObjectParts *GetObjectAttributesParts `type:"structure"`
  19616. // The size of the object in bytes.
  19617. ObjectSize *int64 `type:"long"`
  19618. // If present, indicates that the requester was successfully charged for the
  19619. // request.
  19620. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  19621. // Provides the storage class information of the object. Amazon S3 returns this
  19622. // header for all objects except for S3 Standard storage class objects.
  19623. //
  19624. // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
  19625. StorageClass *string `type:"string" enum:"StorageClass"`
  19626. // The version ID of the object.
  19627. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  19628. }
  19629. // String returns the string representation.
  19630. //
  19631. // API parameter values that are decorated as "sensitive" in the API will not
  19632. // be included in the string output. The member name will be present, but the
  19633. // value will be replaced with "sensitive".
  19634. func (s GetObjectAttributesOutput) String() string {
  19635. return awsutil.Prettify(s)
  19636. }
  19637. // GoString returns the string representation.
  19638. //
  19639. // API parameter values that are decorated as "sensitive" in the API will not
  19640. // be included in the string output. The member name will be present, but the
  19641. // value will be replaced with "sensitive".
  19642. func (s GetObjectAttributesOutput) GoString() string {
  19643. return s.String()
  19644. }
  19645. // SetChecksum sets the Checksum field's value.
  19646. func (s *GetObjectAttributesOutput) SetChecksum(v *Checksum) *GetObjectAttributesOutput {
  19647. s.Checksum = v
  19648. return s
  19649. }
  19650. // SetDeleteMarker sets the DeleteMarker field's value.
  19651. func (s *GetObjectAttributesOutput) SetDeleteMarker(v bool) *GetObjectAttributesOutput {
  19652. s.DeleteMarker = &v
  19653. return s
  19654. }
  19655. // SetETag sets the ETag field's value.
  19656. func (s *GetObjectAttributesOutput) SetETag(v string) *GetObjectAttributesOutput {
  19657. s.ETag = &v
  19658. return s
  19659. }
  19660. // SetLastModified sets the LastModified field's value.
  19661. func (s *GetObjectAttributesOutput) SetLastModified(v time.Time) *GetObjectAttributesOutput {
  19662. s.LastModified = &v
  19663. return s
  19664. }
  19665. // SetObjectParts sets the ObjectParts field's value.
  19666. func (s *GetObjectAttributesOutput) SetObjectParts(v *GetObjectAttributesParts) *GetObjectAttributesOutput {
  19667. s.ObjectParts = v
  19668. return s
  19669. }
  19670. // SetObjectSize sets the ObjectSize field's value.
  19671. func (s *GetObjectAttributesOutput) SetObjectSize(v int64) *GetObjectAttributesOutput {
  19672. s.ObjectSize = &v
  19673. return s
  19674. }
  19675. // SetRequestCharged sets the RequestCharged field's value.
  19676. func (s *GetObjectAttributesOutput) SetRequestCharged(v string) *GetObjectAttributesOutput {
  19677. s.RequestCharged = &v
  19678. return s
  19679. }
  19680. // SetStorageClass sets the StorageClass field's value.
  19681. func (s *GetObjectAttributesOutput) SetStorageClass(v string) *GetObjectAttributesOutput {
  19682. s.StorageClass = &v
  19683. return s
  19684. }
  19685. // SetVersionId sets the VersionId field's value.
  19686. func (s *GetObjectAttributesOutput) SetVersionId(v string) *GetObjectAttributesOutput {
  19687. s.VersionId = &v
  19688. return s
  19689. }
  19690. // A collection of parts associated with a multipart upload.
  19691. type GetObjectAttributesParts struct {
  19692. _ struct{} `type:"structure"`
  19693. // Indicates whether the returned list of parts is truncated. A value of true
  19694. // indicates that the list was truncated. A list can be truncated if the number
  19695. // of parts exceeds the limit returned in the MaxParts element.
  19696. IsTruncated *bool `type:"boolean"`
  19697. // The maximum number of parts allowed in the response.
  19698. MaxParts *int64 `type:"integer"`
  19699. // When a list is truncated, this element specifies the last part in the list,
  19700. // as well as the value to use for the PartNumberMarker request parameter in
  19701. // a subsequent request.
  19702. NextPartNumberMarker *int64 `type:"integer"`
  19703. // The marker for the current part.
  19704. PartNumberMarker *int64 `type:"integer"`
  19705. // A container for elements related to a particular part. A response can contain
  19706. // zero or more Parts elements.
  19707. Parts []*ObjectPart `locationName:"Part" type:"list" flattened:"true"`
  19708. // The total number of parts.
  19709. TotalPartsCount *int64 `locationName:"PartsCount" type:"integer"`
  19710. }
  19711. // String returns the string representation.
  19712. //
  19713. // API parameter values that are decorated as "sensitive" in the API will not
  19714. // be included in the string output. The member name will be present, but the
  19715. // value will be replaced with "sensitive".
  19716. func (s GetObjectAttributesParts) String() string {
  19717. return awsutil.Prettify(s)
  19718. }
  19719. // GoString returns the string representation.
  19720. //
  19721. // API parameter values that are decorated as "sensitive" in the API will not
  19722. // be included in the string output. The member name will be present, but the
  19723. // value will be replaced with "sensitive".
  19724. func (s GetObjectAttributesParts) GoString() string {
  19725. return s.String()
  19726. }
  19727. // SetIsTruncated sets the IsTruncated field's value.
  19728. func (s *GetObjectAttributesParts) SetIsTruncated(v bool) *GetObjectAttributesParts {
  19729. s.IsTruncated = &v
  19730. return s
  19731. }
  19732. // SetMaxParts sets the MaxParts field's value.
  19733. func (s *GetObjectAttributesParts) SetMaxParts(v int64) *GetObjectAttributesParts {
  19734. s.MaxParts = &v
  19735. return s
  19736. }
  19737. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  19738. func (s *GetObjectAttributesParts) SetNextPartNumberMarker(v int64) *GetObjectAttributesParts {
  19739. s.NextPartNumberMarker = &v
  19740. return s
  19741. }
  19742. // SetPartNumberMarker sets the PartNumberMarker field's value.
  19743. func (s *GetObjectAttributesParts) SetPartNumberMarker(v int64) *GetObjectAttributesParts {
  19744. s.PartNumberMarker = &v
  19745. return s
  19746. }
  19747. // SetParts sets the Parts field's value.
  19748. func (s *GetObjectAttributesParts) SetParts(v []*ObjectPart) *GetObjectAttributesParts {
  19749. s.Parts = v
  19750. return s
  19751. }
  19752. // SetTotalPartsCount sets the TotalPartsCount field's value.
  19753. func (s *GetObjectAttributesParts) SetTotalPartsCount(v int64) *GetObjectAttributesParts {
  19754. s.TotalPartsCount = &v
  19755. return s
  19756. }
  19757. type GetObjectInput struct {
  19758. _ struct{} `locationName:"GetObjectRequest" type:"structure"`
  19759. // The bucket name containing the object.
  19760. //
  19761. // When using this action with an access point, you must direct requests to
  19762. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  19763. // When using this action with an access point through the Amazon Web Services
  19764. // SDKs, you provide the access point ARN in place of the bucket name. For more
  19765. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  19766. // in the Amazon S3 User Guide.
  19767. //
  19768. // When using an Object Lambda access point the hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.
  19769. //
  19770. // When using this action with Amazon S3 on Outposts, you must direct requests
  19771. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  19772. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  19773. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  19774. // you provide the Outposts bucket ARN in place of the bucket name. For more
  19775. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  19776. // in the Amazon S3 User Guide.
  19777. //
  19778. // Bucket is a required field
  19779. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19780. // To retrieve the checksum, this mode must be enabled.
  19781. //
  19782. // The AWS SDK for Go v1 does not support automatic response payload checksum
  19783. // validation. This feature is available in the AWS SDK for Go v2.
  19784. ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"`
  19785. // The account ID of the expected bucket owner. If the bucket is owned by a
  19786. // different account, the request fails with the HTTP status code 403 Forbidden
  19787. // (access denied).
  19788. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  19789. // Return the object only if its entity tag (ETag) is the same as the one specified;
  19790. // otherwise, return a 412 (precondition failed) error.
  19791. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  19792. // Return the object only if it has been modified since the specified time;
  19793. // otherwise, return a 304 (not modified) error.
  19794. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  19795. // Return the object only if its entity tag (ETag) is different from the one
  19796. // specified; otherwise, return a 304 (not modified) error.
  19797. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  19798. // Return the object only if it has not been modified since the specified time;
  19799. // otherwise, return a 412 (precondition failed) error.
  19800. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  19801. // Key of the object to get.
  19802. //
  19803. // Key is a required field
  19804. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19805. // Part number of the object being read. This is a positive integer between
  19806. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  19807. // Useful for downloading just a part of an object.
  19808. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  19809. // Downloads the specified range bytes of an object. For more information about
  19810. // the HTTP Range header, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
  19811. // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
  19812. //
  19813. // Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
  19814. Range *string `location:"header" locationName:"Range" type:"string"`
  19815. // Confirms that the requester knows that they will be charged for the request.
  19816. // Bucket owners need not specify this parameter in their requests. For information
  19817. // about downloading objects from Requester Pays buckets, see Downloading Objects
  19818. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  19819. // in the Amazon S3 User Guide.
  19820. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  19821. // Sets the Cache-Control header of the response.
  19822. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  19823. // Sets the Content-Disposition header of the response
  19824. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  19825. // Sets the Content-Encoding header of the response.
  19826. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  19827. // Sets the Content-Language header of the response.
  19828. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  19829. // Sets the Content-Type header of the response.
  19830. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  19831. // Sets the Expires header of the response.
  19832. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"`
  19833. // Specifies the algorithm to use to when decrypting the object (for example,
  19834. // AES256).
  19835. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19836. // Specifies the customer-provided encryption key for Amazon S3 used to encrypt
  19837. // the data. This value is used to decrypt the object when recovering it and
  19838. // must match the one used when storing the data. The key must be appropriate
  19839. // for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  19840. // header.
  19841. //
  19842. // SSECustomerKey is a sensitive parameter and its value will be
  19843. // replaced with "sensitive" in string returned by GetObjectInput's
  19844. // String and GoString methods.
  19845. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19846. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19847. // Amazon S3 uses this header for a message integrity check to ensure that the
  19848. // encryption key was transmitted without error.
  19849. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19850. // VersionId used to reference a specific version of the object.
  19851. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  19852. }
  19853. // String returns the string representation.
  19854. //
  19855. // API parameter values that are decorated as "sensitive" in the API will not
  19856. // be included in the string output. The member name will be present, but the
  19857. // value will be replaced with "sensitive".
  19858. func (s GetObjectInput) String() string {
  19859. return awsutil.Prettify(s)
  19860. }
  19861. // GoString returns the string representation.
  19862. //
  19863. // API parameter values that are decorated as "sensitive" in the API will not
  19864. // be included in the string output. The member name will be present, but the
  19865. // value will be replaced with "sensitive".
  19866. func (s GetObjectInput) GoString() string {
  19867. return s.String()
  19868. }
  19869. // Validate inspects the fields of the type to determine if they are valid.
  19870. func (s *GetObjectInput) Validate() error {
  19871. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  19872. if s.Bucket == nil {
  19873. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19874. }
  19875. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19876. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19877. }
  19878. if s.Key == nil {
  19879. invalidParams.Add(request.NewErrParamRequired("Key"))
  19880. }
  19881. if s.Key != nil && len(*s.Key) < 1 {
  19882. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19883. }
  19884. if invalidParams.Len() > 0 {
  19885. return invalidParams
  19886. }
  19887. return nil
  19888. }
  19889. // SetBucket sets the Bucket field's value.
  19890. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  19891. s.Bucket = &v
  19892. return s
  19893. }
  19894. func (s *GetObjectInput) getBucket() (v string) {
  19895. if s.Bucket == nil {
  19896. return v
  19897. }
  19898. return *s.Bucket
  19899. }
  19900. // SetChecksumMode sets the ChecksumMode field's value.
  19901. func (s *GetObjectInput) SetChecksumMode(v string) *GetObjectInput {
  19902. s.ChecksumMode = &v
  19903. return s
  19904. }
  19905. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  19906. func (s *GetObjectInput) SetExpectedBucketOwner(v string) *GetObjectInput {
  19907. s.ExpectedBucketOwner = &v
  19908. return s
  19909. }
  19910. // SetIfMatch sets the IfMatch field's value.
  19911. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  19912. s.IfMatch = &v
  19913. return s
  19914. }
  19915. // SetIfModifiedSince sets the IfModifiedSince field's value.
  19916. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  19917. s.IfModifiedSince = &v
  19918. return s
  19919. }
  19920. // SetIfNoneMatch sets the IfNoneMatch field's value.
  19921. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  19922. s.IfNoneMatch = &v
  19923. return s
  19924. }
  19925. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  19926. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  19927. s.IfUnmodifiedSince = &v
  19928. return s
  19929. }
  19930. // SetKey sets the Key field's value.
  19931. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  19932. s.Key = &v
  19933. return s
  19934. }
  19935. // SetPartNumber sets the PartNumber field's value.
  19936. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  19937. s.PartNumber = &v
  19938. return s
  19939. }
  19940. // SetRange sets the Range field's value.
  19941. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  19942. s.Range = &v
  19943. return s
  19944. }
  19945. // SetRequestPayer sets the RequestPayer field's value.
  19946. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  19947. s.RequestPayer = &v
  19948. return s
  19949. }
  19950. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  19951. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  19952. s.ResponseCacheControl = &v
  19953. return s
  19954. }
  19955. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  19956. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  19957. s.ResponseContentDisposition = &v
  19958. return s
  19959. }
  19960. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  19961. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  19962. s.ResponseContentEncoding = &v
  19963. return s
  19964. }
  19965. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  19966. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  19967. s.ResponseContentLanguage = &v
  19968. return s
  19969. }
  19970. // SetResponseContentType sets the ResponseContentType field's value.
  19971. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  19972. s.ResponseContentType = &v
  19973. return s
  19974. }
  19975. // SetResponseExpires sets the ResponseExpires field's value.
  19976. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  19977. s.ResponseExpires = &v
  19978. return s
  19979. }
  19980. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  19981. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  19982. s.SSECustomerAlgorithm = &v
  19983. return s
  19984. }
  19985. // SetSSECustomerKey sets the SSECustomerKey field's value.
  19986. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  19987. s.SSECustomerKey = &v
  19988. return s
  19989. }
  19990. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  19991. if s.SSECustomerKey == nil {
  19992. return v
  19993. }
  19994. return *s.SSECustomerKey
  19995. }
  19996. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  19997. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  19998. s.SSECustomerKeyMD5 = &v
  19999. return s
  20000. }
  20001. // SetVersionId sets the VersionId field's value.
  20002. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  20003. s.VersionId = &v
  20004. return s
  20005. }
  20006. func (s *GetObjectInput) getEndpointARN() (arn.Resource, error) {
  20007. if s.Bucket == nil {
  20008. return nil, fmt.Errorf("member Bucket is nil")
  20009. }
  20010. return parseEndpointARN(*s.Bucket)
  20011. }
  20012. func (s *GetObjectInput) hasEndpointARN() bool {
  20013. if s.Bucket == nil {
  20014. return false
  20015. }
  20016. return arn.IsARN(*s.Bucket)
  20017. }
  20018. // updateArnableField updates the value of the input field that
  20019. // takes an ARN as an input. This method is useful to backfill
  20020. // the parsed resource name from ARN into the input member.
  20021. // It returns a pointer to a modified copy of input and an error.
  20022. // Note that original input is not modified.
  20023. func (s GetObjectInput) updateArnableField(v string) (interface{}, error) {
  20024. if s.Bucket == nil {
  20025. return nil, fmt.Errorf("member Bucket is nil")
  20026. }
  20027. s.Bucket = aws.String(v)
  20028. return &s, nil
  20029. }
  20030. type GetObjectLegalHoldInput struct {
  20031. _ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"`
  20032. // The bucket name containing the object whose legal hold status you want to
  20033. // retrieve.
  20034. //
  20035. // When using this action with an access point, you must direct requests to
  20036. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  20037. // When using this action with an access point through the Amazon Web Services
  20038. // SDKs, you provide the access point ARN in place of the bucket name. For more
  20039. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  20040. // in the Amazon S3 User Guide.
  20041. //
  20042. // Bucket is a required field
  20043. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20044. // The account ID of the expected bucket owner. If the bucket is owned by a
  20045. // different account, the request fails with the HTTP status code 403 Forbidden
  20046. // (access denied).
  20047. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  20048. // The key name for the object whose legal hold status you want to retrieve.
  20049. //
  20050. // Key is a required field
  20051. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20052. // Confirms that the requester knows that they will be charged for the request.
  20053. // Bucket owners need not specify this parameter in their requests. For information
  20054. // about downloading objects from Requester Pays buckets, see Downloading Objects
  20055. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  20056. // in the Amazon S3 User Guide.
  20057. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20058. // The version ID of the object whose legal hold status you want to retrieve.
  20059. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  20060. }
  20061. // String returns the string representation.
  20062. //
  20063. // API parameter values that are decorated as "sensitive" in the API will not
  20064. // be included in the string output. The member name will be present, but the
  20065. // value will be replaced with "sensitive".
  20066. func (s GetObjectLegalHoldInput) String() string {
  20067. return awsutil.Prettify(s)
  20068. }
  20069. // GoString returns the string representation.
  20070. //
  20071. // API parameter values that are decorated as "sensitive" in the API will not
  20072. // be included in the string output. The member name will be present, but the
  20073. // value will be replaced with "sensitive".
  20074. func (s GetObjectLegalHoldInput) GoString() string {
  20075. return s.String()
  20076. }
  20077. // Validate inspects the fields of the type to determine if they are valid.
  20078. func (s *GetObjectLegalHoldInput) Validate() error {
  20079. invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
  20080. if s.Bucket == nil {
  20081. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20082. }
  20083. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20084. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20085. }
  20086. if s.Key == nil {
  20087. invalidParams.Add(request.NewErrParamRequired("Key"))
  20088. }
  20089. if s.Key != nil && len(*s.Key) < 1 {
  20090. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20091. }
  20092. if invalidParams.Len() > 0 {
  20093. return invalidParams
  20094. }
  20095. return nil
  20096. }
  20097. // SetBucket sets the Bucket field's value.
  20098. func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
  20099. s.Bucket = &v
  20100. return s
  20101. }
  20102. func (s *GetObjectLegalHoldInput) getBucket() (v string) {
  20103. if s.Bucket == nil {
  20104. return v
  20105. }
  20106. return *s.Bucket
  20107. }
  20108. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  20109. func (s *GetObjectLegalHoldInput) SetExpectedBucketOwner(v string) *GetObjectLegalHoldInput {
  20110. s.ExpectedBucketOwner = &v
  20111. return s
  20112. }
  20113. // SetKey sets the Key field's value.
  20114. func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
  20115. s.Key = &v
  20116. return s
  20117. }
  20118. // SetRequestPayer sets the RequestPayer field's value.
  20119. func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
  20120. s.RequestPayer = &v
  20121. return s
  20122. }
  20123. // SetVersionId sets the VersionId field's value.
  20124. func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
  20125. s.VersionId = &v
  20126. return s
  20127. }
  20128. func (s *GetObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
  20129. if s.Bucket == nil {
  20130. return nil, fmt.Errorf("member Bucket is nil")
  20131. }
  20132. return parseEndpointARN(*s.Bucket)
  20133. }
  20134. func (s *GetObjectLegalHoldInput) hasEndpointARN() bool {
  20135. if s.Bucket == nil {
  20136. return false
  20137. }
  20138. return arn.IsARN(*s.Bucket)
  20139. }
  20140. // updateArnableField updates the value of the input field that
  20141. // takes an ARN as an input. This method is useful to backfill
  20142. // the parsed resource name from ARN into the input member.
  20143. // It returns a pointer to a modified copy of input and an error.
  20144. // Note that original input is not modified.
  20145. func (s GetObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
  20146. if s.Bucket == nil {
  20147. return nil, fmt.Errorf("member Bucket is nil")
  20148. }
  20149. s.Bucket = aws.String(v)
  20150. return &s, nil
  20151. }
  20152. type GetObjectLegalHoldOutput struct {
  20153. _ struct{} `type:"structure" payload:"LegalHold"`
  20154. // The current legal hold status for the specified object.
  20155. LegalHold *ObjectLockLegalHold `type:"structure"`
  20156. }
  20157. // String returns the string representation.
  20158. //
  20159. // API parameter values that are decorated as "sensitive" in the API will not
  20160. // be included in the string output. The member name will be present, but the
  20161. // value will be replaced with "sensitive".
  20162. func (s GetObjectLegalHoldOutput) String() string {
  20163. return awsutil.Prettify(s)
  20164. }
  20165. // GoString returns the string representation.
  20166. //
  20167. // API parameter values that are decorated as "sensitive" in the API will not
  20168. // be included in the string output. The member name will be present, but the
  20169. // value will be replaced with "sensitive".
  20170. func (s GetObjectLegalHoldOutput) GoString() string {
  20171. return s.String()
  20172. }
  20173. // SetLegalHold sets the LegalHold field's value.
  20174. func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
  20175. s.LegalHold = v
  20176. return s
  20177. }
  20178. type GetObjectLockConfigurationInput struct {
  20179. _ struct{} `locationName:"GetObjectLockConfigurationRequest" type:"structure"`
  20180. // The bucket whose Object Lock configuration you want to retrieve.
  20181. //
  20182. // When using this action with an access point, you must direct requests to
  20183. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  20184. // When using this action with an access point through the Amazon Web Services
  20185. // SDKs, you provide the access point ARN in place of the bucket name. For more
  20186. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  20187. // in the Amazon S3 User Guide.
  20188. //
  20189. // Bucket is a required field
  20190. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20191. // The account ID of the expected bucket owner. If the bucket is owned by a
  20192. // different account, the request fails with the HTTP status code 403 Forbidden
  20193. // (access denied).
  20194. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  20195. }
  20196. // String returns the string representation.
  20197. //
  20198. // API parameter values that are decorated as "sensitive" in the API will not
  20199. // be included in the string output. The member name will be present, but the
  20200. // value will be replaced with "sensitive".
  20201. func (s GetObjectLockConfigurationInput) String() string {
  20202. return awsutil.Prettify(s)
  20203. }
  20204. // GoString returns the string representation.
  20205. //
  20206. // API parameter values that are decorated as "sensitive" in the API will not
  20207. // be included in the string output. The member name will be present, but the
  20208. // value will be replaced with "sensitive".
  20209. func (s GetObjectLockConfigurationInput) GoString() string {
  20210. return s.String()
  20211. }
  20212. // Validate inspects the fields of the type to determine if they are valid.
  20213. func (s *GetObjectLockConfigurationInput) Validate() error {
  20214. invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
  20215. if s.Bucket == nil {
  20216. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20217. }
  20218. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20219. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20220. }
  20221. if invalidParams.Len() > 0 {
  20222. return invalidParams
  20223. }
  20224. return nil
  20225. }
  20226. // SetBucket sets the Bucket field's value.
  20227. func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
  20228. s.Bucket = &v
  20229. return s
  20230. }
  20231. func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
  20232. if s.Bucket == nil {
  20233. return v
  20234. }
  20235. return *s.Bucket
  20236. }
  20237. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  20238. func (s *GetObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *GetObjectLockConfigurationInput {
  20239. s.ExpectedBucketOwner = &v
  20240. return s
  20241. }
  20242. func (s *GetObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
  20243. if s.Bucket == nil {
  20244. return nil, fmt.Errorf("member Bucket is nil")
  20245. }
  20246. return parseEndpointARN(*s.Bucket)
  20247. }
  20248. func (s *GetObjectLockConfigurationInput) hasEndpointARN() bool {
  20249. if s.Bucket == nil {
  20250. return false
  20251. }
  20252. return arn.IsARN(*s.Bucket)
  20253. }
  20254. // updateArnableField updates the value of the input field that
  20255. // takes an ARN as an input. This method is useful to backfill
  20256. // the parsed resource name from ARN into the input member.
  20257. // It returns a pointer to a modified copy of input and an error.
  20258. // Note that original input is not modified.
  20259. func (s GetObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
  20260. if s.Bucket == nil {
  20261. return nil, fmt.Errorf("member Bucket is nil")
  20262. }
  20263. s.Bucket = aws.String(v)
  20264. return &s, nil
  20265. }
  20266. type GetObjectLockConfigurationOutput struct {
  20267. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  20268. // The specified bucket's Object Lock configuration.
  20269. ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
  20270. }
  20271. // String returns the string representation.
  20272. //
  20273. // API parameter values that are decorated as "sensitive" in the API will not
  20274. // be included in the string output. The member name will be present, but the
  20275. // value will be replaced with "sensitive".
  20276. func (s GetObjectLockConfigurationOutput) String() string {
  20277. return awsutil.Prettify(s)
  20278. }
  20279. // GoString returns the string representation.
  20280. //
  20281. // API parameter values that are decorated as "sensitive" in the API will not
  20282. // be included in the string output. The member name will be present, but the
  20283. // value will be replaced with "sensitive".
  20284. func (s GetObjectLockConfigurationOutput) GoString() string {
  20285. return s.String()
  20286. }
  20287. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  20288. func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
  20289. s.ObjectLockConfiguration = v
  20290. return s
  20291. }
  20292. type GetObjectOutput struct {
  20293. _ struct{} `type:"structure" payload:"Body"`
  20294. // Indicates that a range of bytes was specified.
  20295. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  20296. // Object data.
  20297. Body io.ReadCloser `type:"blob"`
  20298. // Indicates whether the object uses an S3 Bucket Key for server-side encryption
  20299. // with Amazon Web Services KMS (SSE-KMS).
  20300. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  20301. // Specifies caching behavior along the request/reply chain.
  20302. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  20303. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  20304. // present if it was uploaded with the object. With multipart uploads, this
  20305. // may not be a checksum value of the object. For more information about how
  20306. // checksums are calculated with multipart uploads, see Checking object integrity
  20307. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  20308. // in the Amazon S3 User Guide.
  20309. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  20310. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  20311. // be present if it was uploaded with the object. With multipart uploads, this
  20312. // may not be a checksum value of the object. For more information about how
  20313. // checksums are calculated with multipart uploads, see Checking object integrity
  20314. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  20315. // in the Amazon S3 User Guide.
  20316. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  20317. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  20318. // present if it was uploaded with the object. With multipart uploads, this
  20319. // may not be a checksum value of the object. For more information about how
  20320. // checksums are calculated with multipart uploads, see Checking object integrity
  20321. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  20322. // in the Amazon S3 User Guide.
  20323. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  20324. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  20325. // be present if it was uploaded with the object. With multipart uploads, this
  20326. // may not be a checksum value of the object. For more information about how
  20327. // checksums are calculated with multipart uploads, see Checking object integrity
  20328. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  20329. // in the Amazon S3 User Guide.
  20330. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  20331. // Specifies presentational information for the object.
  20332. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  20333. // Specifies what content encodings have been applied to the object and thus
  20334. // what decoding mechanisms must be applied to obtain the media-type referenced
  20335. // by the Content-Type header field.
  20336. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  20337. // The language the content is in.
  20338. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  20339. // Size of the body in bytes.
  20340. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  20341. // The portion of the object returned in the response.
  20342. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  20343. // A standard MIME type describing the format of the object data.
  20344. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  20345. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  20346. // Marker. If false, this response header does not appear in the response.
  20347. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  20348. // An entity tag (ETag) is an opaque identifier assigned by a web server to
  20349. // a specific version of a resource found at a URL.
  20350. ETag *string `location:"header" locationName:"ETag" type:"string"`
  20351. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  20352. // includes this header. It includes the expiry-date and rule-id key-value pairs
  20353. // providing object expiration information. The value of the rule-id is URL-encoded.
  20354. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  20355. // The date and time at which the object is no longer cacheable.
  20356. Expires *string `location:"header" locationName:"Expires" type:"string"`
  20357. // Creation date of the object.
  20358. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  20359. // A map of metadata to store with the object in S3.
  20360. //
  20361. // By default unmarshaled keys are written as a map keys in following canonicalized format:
  20362. // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
  20363. // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
  20364. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  20365. // This is set to the number of metadata entries not returned in x-amz-meta
  20366. // headers. This can happen if you create metadata using an API like SOAP that
  20367. // supports more flexible metadata than the REST API. For example, using SOAP,
  20368. // you can create metadata whose values are not legal HTTP headers.
  20369. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  20370. // Indicates whether this object has an active legal hold. This field is only
  20371. // returned if you have permission to view an object's legal hold status.
  20372. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  20373. // The Object Lock mode currently in place for this object.
  20374. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  20375. // The date and time when this object's Object Lock will expire.
  20376. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  20377. // The count of parts this object has. This value is only returned if you specify
  20378. // partNumber in your request and the object was uploaded as a multipart upload.
  20379. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  20380. // Amazon S3 can return this if your request involves a bucket that is either
  20381. // a source or destination in a replication rule.
  20382. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  20383. // If present, indicates that the requester was successfully charged for the
  20384. // request.
  20385. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20386. // Provides information about object restoration action and expiration time
  20387. // of the restored object copy.
  20388. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  20389. // If server-side encryption with a customer-provided encryption key was requested,
  20390. // the response will include this header confirming the encryption algorithm
  20391. // used.
  20392. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20393. // If server-side encryption with a customer-provided encryption key was requested,
  20394. // the response will include this header to provide round-trip message integrity
  20395. // verification of the customer-provided encryption key.
  20396. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20397. // If present, specifies the ID of the Amazon Web Services Key Management Service
  20398. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  20399. // the object.
  20400. //
  20401. // SSEKMSKeyId is a sensitive parameter and its value will be
  20402. // replaced with "sensitive" in string returned by GetObjectOutput's
  20403. // String and GoString methods.
  20404. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20405. // The server-side encryption algorithm used when storing this object in Amazon
  20406. // S3 (for example, AES256, aws:kms).
  20407. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20408. // Provides storage class information of the object. Amazon S3 returns this
  20409. // header for all objects except for S3 Standard storage class objects.
  20410. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  20411. // The number of tags, if any, on the object.
  20412. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  20413. // Version of the object.
  20414. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  20415. // If the bucket is configured as a website, redirects requests for this object
  20416. // to another object in the same bucket or to an external URL. Amazon S3 stores
  20417. // the value of this header in the object metadata.
  20418. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  20419. }
  20420. // String returns the string representation.
  20421. //
  20422. // API parameter values that are decorated as "sensitive" in the API will not
  20423. // be included in the string output. The member name will be present, but the
  20424. // value will be replaced with "sensitive".
  20425. func (s GetObjectOutput) String() string {
  20426. return awsutil.Prettify(s)
  20427. }
  20428. // GoString returns the string representation.
  20429. //
  20430. // API parameter values that are decorated as "sensitive" in the API will not
  20431. // be included in the string output. The member name will be present, but the
  20432. // value will be replaced with "sensitive".
  20433. func (s GetObjectOutput) GoString() string {
  20434. return s.String()
  20435. }
  20436. // SetAcceptRanges sets the AcceptRanges field's value.
  20437. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  20438. s.AcceptRanges = &v
  20439. return s
  20440. }
  20441. // SetBody sets the Body field's value.
  20442. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  20443. s.Body = v
  20444. return s
  20445. }
  20446. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  20447. func (s *GetObjectOutput) SetBucketKeyEnabled(v bool) *GetObjectOutput {
  20448. s.BucketKeyEnabled = &v
  20449. return s
  20450. }
  20451. // SetCacheControl sets the CacheControl field's value.
  20452. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  20453. s.CacheControl = &v
  20454. return s
  20455. }
  20456. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  20457. func (s *GetObjectOutput) SetChecksumCRC32(v string) *GetObjectOutput {
  20458. s.ChecksumCRC32 = &v
  20459. return s
  20460. }
  20461. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  20462. func (s *GetObjectOutput) SetChecksumCRC32C(v string) *GetObjectOutput {
  20463. s.ChecksumCRC32C = &v
  20464. return s
  20465. }
  20466. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  20467. func (s *GetObjectOutput) SetChecksumSHA1(v string) *GetObjectOutput {
  20468. s.ChecksumSHA1 = &v
  20469. return s
  20470. }
  20471. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  20472. func (s *GetObjectOutput) SetChecksumSHA256(v string) *GetObjectOutput {
  20473. s.ChecksumSHA256 = &v
  20474. return s
  20475. }
  20476. // SetContentDisposition sets the ContentDisposition field's value.
  20477. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  20478. s.ContentDisposition = &v
  20479. return s
  20480. }
  20481. // SetContentEncoding sets the ContentEncoding field's value.
  20482. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  20483. s.ContentEncoding = &v
  20484. return s
  20485. }
  20486. // SetContentLanguage sets the ContentLanguage field's value.
  20487. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  20488. s.ContentLanguage = &v
  20489. return s
  20490. }
  20491. // SetContentLength sets the ContentLength field's value.
  20492. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  20493. s.ContentLength = &v
  20494. return s
  20495. }
  20496. // SetContentRange sets the ContentRange field's value.
  20497. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  20498. s.ContentRange = &v
  20499. return s
  20500. }
  20501. // SetContentType sets the ContentType field's value.
  20502. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  20503. s.ContentType = &v
  20504. return s
  20505. }
  20506. // SetDeleteMarker sets the DeleteMarker field's value.
  20507. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  20508. s.DeleteMarker = &v
  20509. return s
  20510. }
  20511. // SetETag sets the ETag field's value.
  20512. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  20513. s.ETag = &v
  20514. return s
  20515. }
  20516. // SetExpiration sets the Expiration field's value.
  20517. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  20518. s.Expiration = &v
  20519. return s
  20520. }
  20521. // SetExpires sets the Expires field's value.
  20522. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  20523. s.Expires = &v
  20524. return s
  20525. }
  20526. // SetLastModified sets the LastModified field's value.
  20527. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  20528. s.LastModified = &v
  20529. return s
  20530. }
  20531. // SetMetadata sets the Metadata field's value.
  20532. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  20533. s.Metadata = v
  20534. return s
  20535. }
  20536. // SetMissingMeta sets the MissingMeta field's value.
  20537. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  20538. s.MissingMeta = &v
  20539. return s
  20540. }
  20541. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  20542. func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
  20543. s.ObjectLockLegalHoldStatus = &v
  20544. return s
  20545. }
  20546. // SetObjectLockMode sets the ObjectLockMode field's value.
  20547. func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
  20548. s.ObjectLockMode = &v
  20549. return s
  20550. }
  20551. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  20552. func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
  20553. s.ObjectLockRetainUntilDate = &v
  20554. return s
  20555. }
  20556. // SetPartsCount sets the PartsCount field's value.
  20557. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  20558. s.PartsCount = &v
  20559. return s
  20560. }
  20561. // SetReplicationStatus sets the ReplicationStatus field's value.
  20562. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  20563. s.ReplicationStatus = &v
  20564. return s
  20565. }
  20566. // SetRequestCharged sets the RequestCharged field's value.
  20567. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  20568. s.RequestCharged = &v
  20569. return s
  20570. }
  20571. // SetRestore sets the Restore field's value.
  20572. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  20573. s.Restore = &v
  20574. return s
  20575. }
  20576. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20577. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  20578. s.SSECustomerAlgorithm = &v
  20579. return s
  20580. }
  20581. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20582. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  20583. s.SSECustomerKeyMD5 = &v
  20584. return s
  20585. }
  20586. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20587. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  20588. s.SSEKMSKeyId = &v
  20589. return s
  20590. }
  20591. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20592. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  20593. s.ServerSideEncryption = &v
  20594. return s
  20595. }
  20596. // SetStorageClass sets the StorageClass field's value.
  20597. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  20598. s.StorageClass = &v
  20599. return s
  20600. }
  20601. // SetTagCount sets the TagCount field's value.
  20602. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  20603. s.TagCount = &v
  20604. return s
  20605. }
  20606. // SetVersionId sets the VersionId field's value.
  20607. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  20608. s.VersionId = &v
  20609. return s
  20610. }
  20611. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  20612. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  20613. s.WebsiteRedirectLocation = &v
  20614. return s
  20615. }
  20616. type GetObjectRetentionInput struct {
  20617. _ struct{} `locationName:"GetObjectRetentionRequest" type:"structure"`
  20618. // The bucket name containing the object whose retention settings you want to
  20619. // retrieve.
  20620. //
  20621. // When using this action with an access point, you must direct requests to
  20622. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  20623. // When using this action with an access point through the Amazon Web Services
  20624. // SDKs, you provide the access point ARN in place of the bucket name. For more
  20625. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  20626. // in the Amazon S3 User Guide.
  20627. //
  20628. // Bucket is a required field
  20629. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20630. // The account ID of the expected bucket owner. If the bucket is owned by a
  20631. // different account, the request fails with the HTTP status code 403 Forbidden
  20632. // (access denied).
  20633. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  20634. // The key name for the object whose retention settings you want to retrieve.
  20635. //
  20636. // Key is a required field
  20637. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20638. // Confirms that the requester knows that they will be charged for the request.
  20639. // Bucket owners need not specify this parameter in their requests. For information
  20640. // about downloading objects from Requester Pays buckets, see Downloading Objects
  20641. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  20642. // in the Amazon S3 User Guide.
  20643. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20644. // The version ID for the object whose retention settings you want to retrieve.
  20645. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  20646. }
  20647. // String returns the string representation.
  20648. //
  20649. // API parameter values that are decorated as "sensitive" in the API will not
  20650. // be included in the string output. The member name will be present, but the
  20651. // value will be replaced with "sensitive".
  20652. func (s GetObjectRetentionInput) String() string {
  20653. return awsutil.Prettify(s)
  20654. }
  20655. // GoString returns the string representation.
  20656. //
  20657. // API parameter values that are decorated as "sensitive" in the API will not
  20658. // be included in the string output. The member name will be present, but the
  20659. // value will be replaced with "sensitive".
  20660. func (s GetObjectRetentionInput) GoString() string {
  20661. return s.String()
  20662. }
  20663. // Validate inspects the fields of the type to determine if they are valid.
  20664. func (s *GetObjectRetentionInput) Validate() error {
  20665. invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
  20666. if s.Bucket == nil {
  20667. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20668. }
  20669. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20670. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20671. }
  20672. if s.Key == nil {
  20673. invalidParams.Add(request.NewErrParamRequired("Key"))
  20674. }
  20675. if s.Key != nil && len(*s.Key) < 1 {
  20676. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20677. }
  20678. if invalidParams.Len() > 0 {
  20679. return invalidParams
  20680. }
  20681. return nil
  20682. }
  20683. // SetBucket sets the Bucket field's value.
  20684. func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
  20685. s.Bucket = &v
  20686. return s
  20687. }
  20688. func (s *GetObjectRetentionInput) getBucket() (v string) {
  20689. if s.Bucket == nil {
  20690. return v
  20691. }
  20692. return *s.Bucket
  20693. }
  20694. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  20695. func (s *GetObjectRetentionInput) SetExpectedBucketOwner(v string) *GetObjectRetentionInput {
  20696. s.ExpectedBucketOwner = &v
  20697. return s
  20698. }
  20699. // SetKey sets the Key field's value.
  20700. func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
  20701. s.Key = &v
  20702. return s
  20703. }
  20704. // SetRequestPayer sets the RequestPayer field's value.
  20705. func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
  20706. s.RequestPayer = &v
  20707. return s
  20708. }
  20709. // SetVersionId sets the VersionId field's value.
  20710. func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
  20711. s.VersionId = &v
  20712. return s
  20713. }
  20714. func (s *GetObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
  20715. if s.Bucket == nil {
  20716. return nil, fmt.Errorf("member Bucket is nil")
  20717. }
  20718. return parseEndpointARN(*s.Bucket)
  20719. }
  20720. func (s *GetObjectRetentionInput) hasEndpointARN() bool {
  20721. if s.Bucket == nil {
  20722. return false
  20723. }
  20724. return arn.IsARN(*s.Bucket)
  20725. }
  20726. // updateArnableField updates the value of the input field that
  20727. // takes an ARN as an input. This method is useful to backfill
  20728. // the parsed resource name from ARN into the input member.
  20729. // It returns a pointer to a modified copy of input and an error.
  20730. // Note that original input is not modified.
  20731. func (s GetObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
  20732. if s.Bucket == nil {
  20733. return nil, fmt.Errorf("member Bucket is nil")
  20734. }
  20735. s.Bucket = aws.String(v)
  20736. return &s, nil
  20737. }
  20738. type GetObjectRetentionOutput struct {
  20739. _ struct{} `type:"structure" payload:"Retention"`
  20740. // The container element for an object's retention settings.
  20741. Retention *ObjectLockRetention `type:"structure"`
  20742. }
  20743. // String returns the string representation.
  20744. //
  20745. // API parameter values that are decorated as "sensitive" in the API will not
  20746. // be included in the string output. The member name will be present, but the
  20747. // value will be replaced with "sensitive".
  20748. func (s GetObjectRetentionOutput) String() string {
  20749. return awsutil.Prettify(s)
  20750. }
  20751. // GoString returns the string representation.
  20752. //
  20753. // API parameter values that are decorated as "sensitive" in the API will not
  20754. // be included in the string output. The member name will be present, but the
  20755. // value will be replaced with "sensitive".
  20756. func (s GetObjectRetentionOutput) GoString() string {
  20757. return s.String()
  20758. }
  20759. // SetRetention sets the Retention field's value.
  20760. func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
  20761. s.Retention = v
  20762. return s
  20763. }
  20764. type GetObjectTaggingInput struct {
  20765. _ struct{} `locationName:"GetObjectTaggingRequest" type:"structure"`
  20766. // The bucket name containing the object for which to get the tagging information.
  20767. //
  20768. // When using this action with an access point, you must direct requests to
  20769. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  20770. // When using this action with an access point through the Amazon Web Services
  20771. // SDKs, you provide the access point ARN in place of the bucket name. For more
  20772. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  20773. // in the Amazon S3 User Guide.
  20774. //
  20775. // When using this action with Amazon S3 on Outposts, you must direct requests
  20776. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  20777. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  20778. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  20779. // you provide the Outposts bucket ARN in place of the bucket name. For more
  20780. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  20781. // in the Amazon S3 User Guide.
  20782. //
  20783. // Bucket is a required field
  20784. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20785. // The account ID of the expected bucket owner. If the bucket is owned by a
  20786. // different account, the request fails with the HTTP status code 403 Forbidden
  20787. // (access denied).
  20788. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  20789. // Object key for which to get the tagging information.
  20790. //
  20791. // Key is a required field
  20792. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20793. // Confirms that the requester knows that they will be charged for the request.
  20794. // Bucket owners need not specify this parameter in their requests. For information
  20795. // about downloading objects from Requester Pays buckets, see Downloading Objects
  20796. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  20797. // in the Amazon S3 User Guide.
  20798. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20799. // The versionId of the object for which to get the tagging information.
  20800. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  20801. }
  20802. // String returns the string representation.
  20803. //
  20804. // API parameter values that are decorated as "sensitive" in the API will not
  20805. // be included in the string output. The member name will be present, but the
  20806. // value will be replaced with "sensitive".
  20807. func (s GetObjectTaggingInput) String() string {
  20808. return awsutil.Prettify(s)
  20809. }
  20810. // GoString returns the string representation.
  20811. //
  20812. // API parameter values that are decorated as "sensitive" in the API will not
  20813. // be included in the string output. The member name will be present, but the
  20814. // value will be replaced with "sensitive".
  20815. func (s GetObjectTaggingInput) GoString() string {
  20816. return s.String()
  20817. }
  20818. // Validate inspects the fields of the type to determine if they are valid.
  20819. func (s *GetObjectTaggingInput) Validate() error {
  20820. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  20821. if s.Bucket == nil {
  20822. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20823. }
  20824. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20825. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20826. }
  20827. if s.Key == nil {
  20828. invalidParams.Add(request.NewErrParamRequired("Key"))
  20829. }
  20830. if s.Key != nil && len(*s.Key) < 1 {
  20831. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20832. }
  20833. if invalidParams.Len() > 0 {
  20834. return invalidParams
  20835. }
  20836. return nil
  20837. }
  20838. // SetBucket sets the Bucket field's value.
  20839. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  20840. s.Bucket = &v
  20841. return s
  20842. }
  20843. func (s *GetObjectTaggingInput) getBucket() (v string) {
  20844. if s.Bucket == nil {
  20845. return v
  20846. }
  20847. return *s.Bucket
  20848. }
  20849. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  20850. func (s *GetObjectTaggingInput) SetExpectedBucketOwner(v string) *GetObjectTaggingInput {
  20851. s.ExpectedBucketOwner = &v
  20852. return s
  20853. }
  20854. // SetKey sets the Key field's value.
  20855. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  20856. s.Key = &v
  20857. return s
  20858. }
  20859. // SetRequestPayer sets the RequestPayer field's value.
  20860. func (s *GetObjectTaggingInput) SetRequestPayer(v string) *GetObjectTaggingInput {
  20861. s.RequestPayer = &v
  20862. return s
  20863. }
  20864. // SetVersionId sets the VersionId field's value.
  20865. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  20866. s.VersionId = &v
  20867. return s
  20868. }
  20869. func (s *GetObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
  20870. if s.Bucket == nil {
  20871. return nil, fmt.Errorf("member Bucket is nil")
  20872. }
  20873. return parseEndpointARN(*s.Bucket)
  20874. }
  20875. func (s *GetObjectTaggingInput) hasEndpointARN() bool {
  20876. if s.Bucket == nil {
  20877. return false
  20878. }
  20879. return arn.IsARN(*s.Bucket)
  20880. }
  20881. // updateArnableField updates the value of the input field that
  20882. // takes an ARN as an input. This method is useful to backfill
  20883. // the parsed resource name from ARN into the input member.
  20884. // It returns a pointer to a modified copy of input and an error.
  20885. // Note that original input is not modified.
  20886. func (s GetObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
  20887. if s.Bucket == nil {
  20888. return nil, fmt.Errorf("member Bucket is nil")
  20889. }
  20890. s.Bucket = aws.String(v)
  20891. return &s, nil
  20892. }
  20893. type GetObjectTaggingOutput struct {
  20894. _ struct{} `type:"structure"`
  20895. // Contains the tag set.
  20896. //
  20897. // TagSet is a required field
  20898. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  20899. // The versionId of the object for which you got the tagging information.
  20900. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  20901. }
  20902. // String returns the string representation.
  20903. //
  20904. // API parameter values that are decorated as "sensitive" in the API will not
  20905. // be included in the string output. The member name will be present, but the
  20906. // value will be replaced with "sensitive".
  20907. func (s GetObjectTaggingOutput) String() string {
  20908. return awsutil.Prettify(s)
  20909. }
  20910. // GoString returns the string representation.
  20911. //
  20912. // API parameter values that are decorated as "sensitive" in the API will not
  20913. // be included in the string output. The member name will be present, but the
  20914. // value will be replaced with "sensitive".
  20915. func (s GetObjectTaggingOutput) GoString() string {
  20916. return s.String()
  20917. }
  20918. // SetTagSet sets the TagSet field's value.
  20919. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  20920. s.TagSet = v
  20921. return s
  20922. }
  20923. // SetVersionId sets the VersionId field's value.
  20924. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  20925. s.VersionId = &v
  20926. return s
  20927. }
  20928. type GetObjectTorrentInput struct {
  20929. _ struct{} `locationName:"GetObjectTorrentRequest" type:"structure"`
  20930. // The name of the bucket containing the object for which to get the torrent
  20931. // files.
  20932. //
  20933. // Bucket is a required field
  20934. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20935. // The account ID of the expected bucket owner. If the bucket is owned by a
  20936. // different account, the request fails with the HTTP status code 403 Forbidden
  20937. // (access denied).
  20938. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  20939. // The object key for which to get the information.
  20940. //
  20941. // Key is a required field
  20942. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20943. // Confirms that the requester knows that they will be charged for the request.
  20944. // Bucket owners need not specify this parameter in their requests. For information
  20945. // about downloading objects from Requester Pays buckets, see Downloading Objects
  20946. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  20947. // in the Amazon S3 User Guide.
  20948. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20949. }
  20950. // String returns the string representation.
  20951. //
  20952. // API parameter values that are decorated as "sensitive" in the API will not
  20953. // be included in the string output. The member name will be present, but the
  20954. // value will be replaced with "sensitive".
  20955. func (s GetObjectTorrentInput) String() string {
  20956. return awsutil.Prettify(s)
  20957. }
  20958. // GoString returns the string representation.
  20959. //
  20960. // API parameter values that are decorated as "sensitive" in the API will not
  20961. // be included in the string output. The member name will be present, but the
  20962. // value will be replaced with "sensitive".
  20963. func (s GetObjectTorrentInput) GoString() string {
  20964. return s.String()
  20965. }
  20966. // Validate inspects the fields of the type to determine if they are valid.
  20967. func (s *GetObjectTorrentInput) Validate() error {
  20968. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  20969. if s.Bucket == nil {
  20970. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20971. }
  20972. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20973. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20974. }
  20975. if s.Key == nil {
  20976. invalidParams.Add(request.NewErrParamRequired("Key"))
  20977. }
  20978. if s.Key != nil && len(*s.Key) < 1 {
  20979. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20980. }
  20981. if invalidParams.Len() > 0 {
  20982. return invalidParams
  20983. }
  20984. return nil
  20985. }
  20986. // SetBucket sets the Bucket field's value.
  20987. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  20988. s.Bucket = &v
  20989. return s
  20990. }
  20991. func (s *GetObjectTorrentInput) getBucket() (v string) {
  20992. if s.Bucket == nil {
  20993. return v
  20994. }
  20995. return *s.Bucket
  20996. }
  20997. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  20998. func (s *GetObjectTorrentInput) SetExpectedBucketOwner(v string) *GetObjectTorrentInput {
  20999. s.ExpectedBucketOwner = &v
  21000. return s
  21001. }
  21002. // SetKey sets the Key field's value.
  21003. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  21004. s.Key = &v
  21005. return s
  21006. }
  21007. // SetRequestPayer sets the RequestPayer field's value.
  21008. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  21009. s.RequestPayer = &v
  21010. return s
  21011. }
  21012. func (s *GetObjectTorrentInput) getEndpointARN() (arn.Resource, error) {
  21013. if s.Bucket == nil {
  21014. return nil, fmt.Errorf("member Bucket is nil")
  21015. }
  21016. return parseEndpointARN(*s.Bucket)
  21017. }
  21018. func (s *GetObjectTorrentInput) hasEndpointARN() bool {
  21019. if s.Bucket == nil {
  21020. return false
  21021. }
  21022. return arn.IsARN(*s.Bucket)
  21023. }
  21024. // updateArnableField updates the value of the input field that
  21025. // takes an ARN as an input. This method is useful to backfill
  21026. // the parsed resource name from ARN into the input member.
  21027. // It returns a pointer to a modified copy of input and an error.
  21028. // Note that original input is not modified.
  21029. func (s GetObjectTorrentInput) updateArnableField(v string) (interface{}, error) {
  21030. if s.Bucket == nil {
  21031. return nil, fmt.Errorf("member Bucket is nil")
  21032. }
  21033. s.Bucket = aws.String(v)
  21034. return &s, nil
  21035. }
  21036. type GetObjectTorrentOutput struct {
  21037. _ struct{} `type:"structure" payload:"Body"`
  21038. // A Bencoded dictionary as defined by the BitTorrent specification
  21039. Body io.ReadCloser `type:"blob"`
  21040. // If present, indicates that the requester was successfully charged for the
  21041. // request.
  21042. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  21043. }
  21044. // String returns the string representation.
  21045. //
  21046. // API parameter values that are decorated as "sensitive" in the API will not
  21047. // be included in the string output. The member name will be present, but the
  21048. // value will be replaced with "sensitive".
  21049. func (s GetObjectTorrentOutput) String() string {
  21050. return awsutil.Prettify(s)
  21051. }
  21052. // GoString returns the string representation.
  21053. //
  21054. // API parameter values that are decorated as "sensitive" in the API will not
  21055. // be included in the string output. The member name will be present, but the
  21056. // value will be replaced with "sensitive".
  21057. func (s GetObjectTorrentOutput) GoString() string {
  21058. return s.String()
  21059. }
  21060. // SetBody sets the Body field's value.
  21061. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  21062. s.Body = v
  21063. return s
  21064. }
  21065. // SetRequestCharged sets the RequestCharged field's value.
  21066. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  21067. s.RequestCharged = &v
  21068. return s
  21069. }
  21070. type GetPublicAccessBlockInput struct {
  21071. _ struct{} `locationName:"GetPublicAccessBlockRequest" type:"structure"`
  21072. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  21073. // want to retrieve.
  21074. //
  21075. // Bucket is a required field
  21076. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  21077. // The account ID of the expected bucket owner. If the bucket is owned by a
  21078. // different account, the request fails with the HTTP status code 403 Forbidden
  21079. // (access denied).
  21080. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  21081. }
  21082. // String returns the string representation.
  21083. //
  21084. // API parameter values that are decorated as "sensitive" in the API will not
  21085. // be included in the string output. The member name will be present, but the
  21086. // value will be replaced with "sensitive".
  21087. func (s GetPublicAccessBlockInput) String() string {
  21088. return awsutil.Prettify(s)
  21089. }
  21090. // GoString returns the string representation.
  21091. //
  21092. // API parameter values that are decorated as "sensitive" in the API will not
  21093. // be included in the string output. The member name will be present, but the
  21094. // value will be replaced with "sensitive".
  21095. func (s GetPublicAccessBlockInput) GoString() string {
  21096. return s.String()
  21097. }
  21098. // Validate inspects the fields of the type to determine if they are valid.
  21099. func (s *GetPublicAccessBlockInput) Validate() error {
  21100. invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
  21101. if s.Bucket == nil {
  21102. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  21103. }
  21104. if s.Bucket != nil && len(*s.Bucket) < 1 {
  21105. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  21106. }
  21107. if invalidParams.Len() > 0 {
  21108. return invalidParams
  21109. }
  21110. return nil
  21111. }
  21112. // SetBucket sets the Bucket field's value.
  21113. func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
  21114. s.Bucket = &v
  21115. return s
  21116. }
  21117. func (s *GetPublicAccessBlockInput) getBucket() (v string) {
  21118. if s.Bucket == nil {
  21119. return v
  21120. }
  21121. return *s.Bucket
  21122. }
  21123. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  21124. func (s *GetPublicAccessBlockInput) SetExpectedBucketOwner(v string) *GetPublicAccessBlockInput {
  21125. s.ExpectedBucketOwner = &v
  21126. return s
  21127. }
  21128. func (s *GetPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
  21129. if s.Bucket == nil {
  21130. return nil, fmt.Errorf("member Bucket is nil")
  21131. }
  21132. return parseEndpointARN(*s.Bucket)
  21133. }
  21134. func (s *GetPublicAccessBlockInput) hasEndpointARN() bool {
  21135. if s.Bucket == nil {
  21136. return false
  21137. }
  21138. return arn.IsARN(*s.Bucket)
  21139. }
  21140. // updateArnableField updates the value of the input field that
  21141. // takes an ARN as an input. This method is useful to backfill
  21142. // the parsed resource name from ARN into the input member.
  21143. // It returns a pointer to a modified copy of input and an error.
  21144. // Note that original input is not modified.
  21145. func (s GetPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
  21146. if s.Bucket == nil {
  21147. return nil, fmt.Errorf("member Bucket is nil")
  21148. }
  21149. s.Bucket = aws.String(v)
  21150. return &s, nil
  21151. }
  21152. type GetPublicAccessBlockOutput struct {
  21153. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  21154. // The PublicAccessBlock configuration currently in effect for this Amazon S3
  21155. // bucket.
  21156. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
  21157. }
  21158. // String returns the string representation.
  21159. //
  21160. // API parameter values that are decorated as "sensitive" in the API will not
  21161. // be included in the string output. The member name will be present, but the
  21162. // value will be replaced with "sensitive".
  21163. func (s GetPublicAccessBlockOutput) String() string {
  21164. return awsutil.Prettify(s)
  21165. }
  21166. // GoString returns the string representation.
  21167. //
  21168. // API parameter values that are decorated as "sensitive" in the API will not
  21169. // be included in the string output. The member name will be present, but the
  21170. // value will be replaced with "sensitive".
  21171. func (s GetPublicAccessBlockOutput) GoString() string {
  21172. return s.String()
  21173. }
  21174. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  21175. func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
  21176. s.PublicAccessBlockConfiguration = v
  21177. return s
  21178. }
  21179. // Container for S3 Glacier job parameters.
  21180. type GlacierJobParameters struct {
  21181. _ struct{} `type:"structure"`
  21182. // Retrieval tier at which the restore will be processed.
  21183. //
  21184. // Tier is a required field
  21185. Tier *string `type:"string" required:"true" enum:"Tier"`
  21186. }
  21187. // String returns the string representation.
  21188. //
  21189. // API parameter values that are decorated as "sensitive" in the API will not
  21190. // be included in the string output. The member name will be present, but the
  21191. // value will be replaced with "sensitive".
  21192. func (s GlacierJobParameters) String() string {
  21193. return awsutil.Prettify(s)
  21194. }
  21195. // GoString returns the string representation.
  21196. //
  21197. // API parameter values that are decorated as "sensitive" in the API will not
  21198. // be included in the string output. The member name will be present, but the
  21199. // value will be replaced with "sensitive".
  21200. func (s GlacierJobParameters) GoString() string {
  21201. return s.String()
  21202. }
  21203. // Validate inspects the fields of the type to determine if they are valid.
  21204. func (s *GlacierJobParameters) Validate() error {
  21205. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  21206. if s.Tier == nil {
  21207. invalidParams.Add(request.NewErrParamRequired("Tier"))
  21208. }
  21209. if invalidParams.Len() > 0 {
  21210. return invalidParams
  21211. }
  21212. return nil
  21213. }
  21214. // SetTier sets the Tier field's value.
  21215. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  21216. s.Tier = &v
  21217. return s
  21218. }
  21219. // Container for grant information.
  21220. type Grant struct {
  21221. _ struct{} `type:"structure"`
  21222. // The person being granted permissions.
  21223. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  21224. // Specifies the permission given to the grantee.
  21225. Permission *string `type:"string" enum:"Permission"`
  21226. }
  21227. // String returns the string representation.
  21228. //
  21229. // API parameter values that are decorated as "sensitive" in the API will not
  21230. // be included in the string output. The member name will be present, but the
  21231. // value will be replaced with "sensitive".
  21232. func (s Grant) String() string {
  21233. return awsutil.Prettify(s)
  21234. }
  21235. // GoString returns the string representation.
  21236. //
  21237. // API parameter values that are decorated as "sensitive" in the API will not
  21238. // be included in the string output. The member name will be present, but the
  21239. // value will be replaced with "sensitive".
  21240. func (s Grant) GoString() string {
  21241. return s.String()
  21242. }
  21243. // Validate inspects the fields of the type to determine if they are valid.
  21244. func (s *Grant) Validate() error {
  21245. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  21246. if s.Grantee != nil {
  21247. if err := s.Grantee.Validate(); err != nil {
  21248. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  21249. }
  21250. }
  21251. if invalidParams.Len() > 0 {
  21252. return invalidParams
  21253. }
  21254. return nil
  21255. }
  21256. // SetGrantee sets the Grantee field's value.
  21257. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  21258. s.Grantee = v
  21259. return s
  21260. }
  21261. // SetPermission sets the Permission field's value.
  21262. func (s *Grant) SetPermission(v string) *Grant {
  21263. s.Permission = &v
  21264. return s
  21265. }
  21266. // Container for the person being granted permissions.
  21267. type Grantee struct {
  21268. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  21269. // Screen name of the grantee.
  21270. DisplayName *string `type:"string"`
  21271. // Email address of the grantee.
  21272. //
  21273. // Using email addresses to specify a grantee is only supported in the following
  21274. // Amazon Web Services Regions:
  21275. //
  21276. // * US East (N. Virginia)
  21277. //
  21278. // * US West (N. California)
  21279. //
  21280. // * US West (Oregon)
  21281. //
  21282. // * Asia Pacific (Singapore)
  21283. //
  21284. // * Asia Pacific (Sydney)
  21285. //
  21286. // * Asia Pacific (Tokyo)
  21287. //
  21288. // * Europe (Ireland)
  21289. //
  21290. // * South America (São Paulo)
  21291. //
  21292. // For a list of all the Amazon S3 supported Regions and endpoints, see Regions
  21293. // and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
  21294. // in the Amazon Web Services General Reference.
  21295. EmailAddress *string `type:"string"`
  21296. // The canonical user ID of the grantee.
  21297. ID *string `type:"string"`
  21298. // Type of grantee
  21299. //
  21300. // Type is a required field
  21301. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  21302. // URI of the grantee group.
  21303. URI *string `type:"string"`
  21304. }
  21305. // String returns the string representation.
  21306. //
  21307. // API parameter values that are decorated as "sensitive" in the API will not
  21308. // be included in the string output. The member name will be present, but the
  21309. // value will be replaced with "sensitive".
  21310. func (s Grantee) String() string {
  21311. return awsutil.Prettify(s)
  21312. }
  21313. // GoString returns the string representation.
  21314. //
  21315. // API parameter values that are decorated as "sensitive" in the API will not
  21316. // be included in the string output. The member name will be present, but the
  21317. // value will be replaced with "sensitive".
  21318. func (s Grantee) GoString() string {
  21319. return s.String()
  21320. }
  21321. // Validate inspects the fields of the type to determine if they are valid.
  21322. func (s *Grantee) Validate() error {
  21323. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  21324. if s.Type == nil {
  21325. invalidParams.Add(request.NewErrParamRequired("Type"))
  21326. }
  21327. if invalidParams.Len() > 0 {
  21328. return invalidParams
  21329. }
  21330. return nil
  21331. }
  21332. // SetDisplayName sets the DisplayName field's value.
  21333. func (s *Grantee) SetDisplayName(v string) *Grantee {
  21334. s.DisplayName = &v
  21335. return s
  21336. }
  21337. // SetEmailAddress sets the EmailAddress field's value.
  21338. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  21339. s.EmailAddress = &v
  21340. return s
  21341. }
  21342. // SetID sets the ID field's value.
  21343. func (s *Grantee) SetID(v string) *Grantee {
  21344. s.ID = &v
  21345. return s
  21346. }
  21347. // SetType sets the Type field's value.
  21348. func (s *Grantee) SetType(v string) *Grantee {
  21349. s.Type = &v
  21350. return s
  21351. }
  21352. // SetURI sets the URI field's value.
  21353. func (s *Grantee) SetURI(v string) *Grantee {
  21354. s.URI = &v
  21355. return s
  21356. }
  21357. type HeadBucketInput struct {
  21358. _ struct{} `locationName:"HeadBucketRequest" type:"structure"`
  21359. // The bucket name.
  21360. //
  21361. // When using this action with an access point, you must direct requests to
  21362. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  21363. // When using this action with an access point through the Amazon Web Services
  21364. // SDKs, you provide the access point ARN in place of the bucket name. For more
  21365. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  21366. // in the Amazon S3 User Guide.
  21367. //
  21368. // When using this action with Amazon S3 on Outposts, you must direct requests
  21369. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  21370. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  21371. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  21372. // you provide the Outposts bucket ARN in place of the bucket name. For more
  21373. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  21374. // in the Amazon S3 User Guide.
  21375. //
  21376. // Bucket is a required field
  21377. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  21378. // The account ID of the expected bucket owner. If the bucket is owned by a
  21379. // different account, the request fails with the HTTP status code 403 Forbidden
  21380. // (access denied).
  21381. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  21382. }
  21383. // String returns the string representation.
  21384. //
  21385. // API parameter values that are decorated as "sensitive" in the API will not
  21386. // be included in the string output. The member name will be present, but the
  21387. // value will be replaced with "sensitive".
  21388. func (s HeadBucketInput) String() string {
  21389. return awsutil.Prettify(s)
  21390. }
  21391. // GoString returns the string representation.
  21392. //
  21393. // API parameter values that are decorated as "sensitive" in the API will not
  21394. // be included in the string output. The member name will be present, but the
  21395. // value will be replaced with "sensitive".
  21396. func (s HeadBucketInput) GoString() string {
  21397. return s.String()
  21398. }
  21399. // Validate inspects the fields of the type to determine if they are valid.
  21400. func (s *HeadBucketInput) Validate() error {
  21401. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  21402. if s.Bucket == nil {
  21403. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  21404. }
  21405. if s.Bucket != nil && len(*s.Bucket) < 1 {
  21406. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  21407. }
  21408. if invalidParams.Len() > 0 {
  21409. return invalidParams
  21410. }
  21411. return nil
  21412. }
  21413. // SetBucket sets the Bucket field's value.
  21414. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  21415. s.Bucket = &v
  21416. return s
  21417. }
  21418. func (s *HeadBucketInput) getBucket() (v string) {
  21419. if s.Bucket == nil {
  21420. return v
  21421. }
  21422. return *s.Bucket
  21423. }
  21424. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  21425. func (s *HeadBucketInput) SetExpectedBucketOwner(v string) *HeadBucketInput {
  21426. s.ExpectedBucketOwner = &v
  21427. return s
  21428. }
  21429. func (s *HeadBucketInput) getEndpointARN() (arn.Resource, error) {
  21430. if s.Bucket == nil {
  21431. return nil, fmt.Errorf("member Bucket is nil")
  21432. }
  21433. return parseEndpointARN(*s.Bucket)
  21434. }
  21435. func (s *HeadBucketInput) hasEndpointARN() bool {
  21436. if s.Bucket == nil {
  21437. return false
  21438. }
  21439. return arn.IsARN(*s.Bucket)
  21440. }
  21441. // updateArnableField updates the value of the input field that
  21442. // takes an ARN as an input. This method is useful to backfill
  21443. // the parsed resource name from ARN into the input member.
  21444. // It returns a pointer to a modified copy of input and an error.
  21445. // Note that original input is not modified.
  21446. func (s HeadBucketInput) updateArnableField(v string) (interface{}, error) {
  21447. if s.Bucket == nil {
  21448. return nil, fmt.Errorf("member Bucket is nil")
  21449. }
  21450. s.Bucket = aws.String(v)
  21451. return &s, nil
  21452. }
  21453. type HeadBucketOutput struct {
  21454. _ struct{} `type:"structure"`
  21455. }
  21456. // String returns the string representation.
  21457. //
  21458. // API parameter values that are decorated as "sensitive" in the API will not
  21459. // be included in the string output. The member name will be present, but the
  21460. // value will be replaced with "sensitive".
  21461. func (s HeadBucketOutput) String() string {
  21462. return awsutil.Prettify(s)
  21463. }
  21464. // GoString returns the string representation.
  21465. //
  21466. // API parameter values that are decorated as "sensitive" in the API will not
  21467. // be included in the string output. The member name will be present, but the
  21468. // value will be replaced with "sensitive".
  21469. func (s HeadBucketOutput) GoString() string {
  21470. return s.String()
  21471. }
  21472. type HeadObjectInput struct {
  21473. _ struct{} `locationName:"HeadObjectRequest" type:"structure"`
  21474. // The name of the bucket containing the object.
  21475. //
  21476. // When using this action with an access point, you must direct requests to
  21477. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  21478. // When using this action with an access point through the Amazon Web Services
  21479. // SDKs, you provide the access point ARN in place of the bucket name. For more
  21480. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  21481. // in the Amazon S3 User Guide.
  21482. //
  21483. // When using this action with Amazon S3 on Outposts, you must direct requests
  21484. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  21485. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  21486. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  21487. // you provide the Outposts bucket ARN in place of the bucket name. For more
  21488. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  21489. // in the Amazon S3 User Guide.
  21490. //
  21491. // Bucket is a required field
  21492. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  21493. // To retrieve the checksum, this parameter must be enabled.
  21494. //
  21495. // In addition, if you enable ChecksumMode and the object is encrypted with
  21496. // Amazon Web Services Key Management Service (Amazon Web Services KMS), you
  21497. // must have permission to use the kms:Decrypt action for the request to succeed.
  21498. ChecksumMode *string `location:"header" locationName:"x-amz-checksum-mode" type:"string" enum:"ChecksumMode"`
  21499. // The account ID of the expected bucket owner. If the bucket is owned by a
  21500. // different account, the request fails with the HTTP status code 403 Forbidden
  21501. // (access denied).
  21502. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  21503. // Return the object only if its entity tag (ETag) is the same as the one specified;
  21504. // otherwise, return a 412 (precondition failed) error.
  21505. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  21506. // Return the object only if it has been modified since the specified time;
  21507. // otherwise, return a 304 (not modified) error.
  21508. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  21509. // Return the object only if its entity tag (ETag) is different from the one
  21510. // specified; otherwise, return a 304 (not modified) error.
  21511. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  21512. // Return the object only if it has not been modified since the specified time;
  21513. // otherwise, return a 412 (precondition failed) error.
  21514. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  21515. // The object key.
  21516. //
  21517. // Key is a required field
  21518. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  21519. // Part number of the object being read. This is a positive integer between
  21520. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  21521. // Useful querying about the size of the part and the number of parts in this
  21522. // object.
  21523. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  21524. // Because HeadObject returns only the metadata for an object, this parameter
  21525. // has no effect.
  21526. Range *string `location:"header" locationName:"Range" type:"string"`
  21527. // Confirms that the requester knows that they will be charged for the request.
  21528. // Bucket owners need not specify this parameter in their requests. For information
  21529. // about downloading objects from Requester Pays buckets, see Downloading Objects
  21530. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  21531. // in the Amazon S3 User Guide.
  21532. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  21533. // Specifies the algorithm to use to when encrypting the object (for example,
  21534. // AES256).
  21535. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  21536. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  21537. // data. This value is used to store the object and then it is discarded; Amazon
  21538. // S3 does not store the encryption key. The key must be appropriate for use
  21539. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  21540. // header.
  21541. //
  21542. // SSECustomerKey is a sensitive parameter and its value will be
  21543. // replaced with "sensitive" in string returned by HeadObjectInput's
  21544. // String and GoString methods.
  21545. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  21546. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  21547. // Amazon S3 uses this header for a message integrity check to ensure that the
  21548. // encryption key was transmitted without error.
  21549. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  21550. // VersionId used to reference a specific version of the object.
  21551. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  21552. }
  21553. // String returns the string representation.
  21554. //
  21555. // API parameter values that are decorated as "sensitive" in the API will not
  21556. // be included in the string output. The member name will be present, but the
  21557. // value will be replaced with "sensitive".
  21558. func (s HeadObjectInput) String() string {
  21559. return awsutil.Prettify(s)
  21560. }
  21561. // GoString returns the string representation.
  21562. //
  21563. // API parameter values that are decorated as "sensitive" in the API will not
  21564. // be included in the string output. The member name will be present, but the
  21565. // value will be replaced with "sensitive".
  21566. func (s HeadObjectInput) GoString() string {
  21567. return s.String()
  21568. }
  21569. // Validate inspects the fields of the type to determine if they are valid.
  21570. func (s *HeadObjectInput) Validate() error {
  21571. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  21572. if s.Bucket == nil {
  21573. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  21574. }
  21575. if s.Bucket != nil && len(*s.Bucket) < 1 {
  21576. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  21577. }
  21578. if s.Key == nil {
  21579. invalidParams.Add(request.NewErrParamRequired("Key"))
  21580. }
  21581. if s.Key != nil && len(*s.Key) < 1 {
  21582. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  21583. }
  21584. if invalidParams.Len() > 0 {
  21585. return invalidParams
  21586. }
  21587. return nil
  21588. }
  21589. // SetBucket sets the Bucket field's value.
  21590. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  21591. s.Bucket = &v
  21592. return s
  21593. }
  21594. func (s *HeadObjectInput) getBucket() (v string) {
  21595. if s.Bucket == nil {
  21596. return v
  21597. }
  21598. return *s.Bucket
  21599. }
  21600. // SetChecksumMode sets the ChecksumMode field's value.
  21601. func (s *HeadObjectInput) SetChecksumMode(v string) *HeadObjectInput {
  21602. s.ChecksumMode = &v
  21603. return s
  21604. }
  21605. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  21606. func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput {
  21607. s.ExpectedBucketOwner = &v
  21608. return s
  21609. }
  21610. // SetIfMatch sets the IfMatch field's value.
  21611. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  21612. s.IfMatch = &v
  21613. return s
  21614. }
  21615. // SetIfModifiedSince sets the IfModifiedSince field's value.
  21616. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  21617. s.IfModifiedSince = &v
  21618. return s
  21619. }
  21620. // SetIfNoneMatch sets the IfNoneMatch field's value.
  21621. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  21622. s.IfNoneMatch = &v
  21623. return s
  21624. }
  21625. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  21626. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  21627. s.IfUnmodifiedSince = &v
  21628. return s
  21629. }
  21630. // SetKey sets the Key field's value.
  21631. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  21632. s.Key = &v
  21633. return s
  21634. }
  21635. // SetPartNumber sets the PartNumber field's value.
  21636. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  21637. s.PartNumber = &v
  21638. return s
  21639. }
  21640. // SetRange sets the Range field's value.
  21641. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  21642. s.Range = &v
  21643. return s
  21644. }
  21645. // SetRequestPayer sets the RequestPayer field's value.
  21646. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  21647. s.RequestPayer = &v
  21648. return s
  21649. }
  21650. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  21651. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  21652. s.SSECustomerAlgorithm = &v
  21653. return s
  21654. }
  21655. // SetSSECustomerKey sets the SSECustomerKey field's value.
  21656. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  21657. s.SSECustomerKey = &v
  21658. return s
  21659. }
  21660. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  21661. if s.SSECustomerKey == nil {
  21662. return v
  21663. }
  21664. return *s.SSECustomerKey
  21665. }
  21666. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  21667. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  21668. s.SSECustomerKeyMD5 = &v
  21669. return s
  21670. }
  21671. // SetVersionId sets the VersionId field's value.
  21672. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  21673. s.VersionId = &v
  21674. return s
  21675. }
  21676. func (s *HeadObjectInput) getEndpointARN() (arn.Resource, error) {
  21677. if s.Bucket == nil {
  21678. return nil, fmt.Errorf("member Bucket is nil")
  21679. }
  21680. return parseEndpointARN(*s.Bucket)
  21681. }
  21682. func (s *HeadObjectInput) hasEndpointARN() bool {
  21683. if s.Bucket == nil {
  21684. return false
  21685. }
  21686. return arn.IsARN(*s.Bucket)
  21687. }
  21688. // updateArnableField updates the value of the input field that
  21689. // takes an ARN as an input. This method is useful to backfill
  21690. // the parsed resource name from ARN into the input member.
  21691. // It returns a pointer to a modified copy of input and an error.
  21692. // Note that original input is not modified.
  21693. func (s HeadObjectInput) updateArnableField(v string) (interface{}, error) {
  21694. if s.Bucket == nil {
  21695. return nil, fmt.Errorf("member Bucket is nil")
  21696. }
  21697. s.Bucket = aws.String(v)
  21698. return &s, nil
  21699. }
  21700. type HeadObjectOutput struct {
  21701. _ struct{} `type:"structure"`
  21702. // Indicates that a range of bytes was specified.
  21703. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  21704. // The archive state of the head object.
  21705. ArchiveStatus *string `location:"header" locationName:"x-amz-archive-status" type:"string" enum:"ArchiveStatus"`
  21706. // Indicates whether the object uses an S3 Bucket Key for server-side encryption
  21707. // with Amazon Web Services KMS (SSE-KMS).
  21708. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  21709. // Specifies caching behavior along the request/reply chain.
  21710. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  21711. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  21712. // present if it was uploaded with the object. With multipart uploads, this
  21713. // may not be a checksum value of the object. For more information about how
  21714. // checksums are calculated with multipart uploads, see Checking object integrity
  21715. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  21716. // in the Amazon S3 User Guide.
  21717. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  21718. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  21719. // be present if it was uploaded with the object. With multipart uploads, this
  21720. // may not be a checksum value of the object. For more information about how
  21721. // checksums are calculated with multipart uploads, see Checking object integrity
  21722. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  21723. // in the Amazon S3 User Guide.
  21724. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  21725. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  21726. // present if it was uploaded with the object. With multipart uploads, this
  21727. // may not be a checksum value of the object. For more information about how
  21728. // checksums are calculated with multipart uploads, see Checking object integrity
  21729. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  21730. // in the Amazon S3 User Guide.
  21731. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  21732. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  21733. // be present if it was uploaded with the object. With multipart uploads, this
  21734. // may not be a checksum value of the object. For more information about how
  21735. // checksums are calculated with multipart uploads, see Checking object integrity
  21736. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  21737. // in the Amazon S3 User Guide.
  21738. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  21739. // Specifies presentational information for the object.
  21740. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  21741. // Specifies what content encodings have been applied to the object and thus
  21742. // what decoding mechanisms must be applied to obtain the media-type referenced
  21743. // by the Content-Type header field.
  21744. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  21745. // The language the content is in.
  21746. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  21747. // Size of the body in bytes.
  21748. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  21749. // A standard MIME type describing the format of the object data.
  21750. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  21751. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  21752. // Marker. If false, this response header does not appear in the response.
  21753. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  21754. // An entity tag (ETag) is an opaque identifier assigned by a web server to
  21755. // a specific version of a resource found at a URL.
  21756. ETag *string `location:"header" locationName:"ETag" type:"string"`
  21757. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  21758. // includes this header. It includes the expiry-date and rule-id key-value pairs
  21759. // providing object expiration information. The value of the rule-id is URL-encoded.
  21760. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  21761. // The date and time at which the object is no longer cacheable.
  21762. Expires *string `location:"header" locationName:"Expires" type:"string"`
  21763. // Creation date of the object.
  21764. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  21765. // A map of metadata to store with the object in S3.
  21766. //
  21767. // By default unmarshaled keys are written as a map keys in following canonicalized format:
  21768. // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
  21769. // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
  21770. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  21771. // This is set to the number of metadata entries not returned in x-amz-meta
  21772. // headers. This can happen if you create metadata using an API like SOAP that
  21773. // supports more flexible metadata than the REST API. For example, using SOAP,
  21774. // you can create metadata whose values are not legal HTTP headers.
  21775. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  21776. // Specifies whether a legal hold is in effect for this object. This header
  21777. // is only returned if the requester has the s3:GetObjectLegalHold permission.
  21778. // This header is not returned if the specified version of this object has never
  21779. // had a legal hold applied. For more information about S3 Object Lock, see
  21780. // Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  21781. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  21782. // The Object Lock mode, if any, that's in effect for this object. This header
  21783. // is only returned if the requester has the s3:GetObjectRetention permission.
  21784. // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  21785. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  21786. // The date and time when the Object Lock retention period expires. This header
  21787. // is only returned if the requester has the s3:GetObjectRetention permission.
  21788. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  21789. // The count of parts this object has. This value is only returned if you specify
  21790. // partNumber in your request and the object was uploaded as a multipart upload.
  21791. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  21792. // Amazon S3 can return this header if your request involves a bucket that is
  21793. // either a source or a destination in a replication rule.
  21794. //
  21795. // In replication, you have a source bucket on which you configure replication
  21796. // and destination bucket or buckets where Amazon S3 stores object replicas.
  21797. // When you request an object (GetObject) or object metadata (HeadObject) from
  21798. // these buckets, Amazon S3 will return the x-amz-replication-status header
  21799. // in the response as follows:
  21800. //
  21801. // * If requesting an object from the source bucket, Amazon S3 will return
  21802. // the x-amz-replication-status header if the object in your request is eligible
  21803. // for replication. For example, suppose that in your replication configuration,
  21804. // you specify object prefix TaxDocs requesting Amazon S3 to replicate objects
  21805. // with key prefix TaxDocs. Any objects you upload with this key name prefix,
  21806. // for example TaxDocs/document1.pdf, are eligible for replication. For any
  21807. // object request with this key name prefix, Amazon S3 will return the x-amz-replication-status
  21808. // header with value PENDING, COMPLETED or FAILED indicating object replication
  21809. // status.
  21810. //
  21811. // * If requesting an object from a destination bucket, Amazon S3 will return
  21812. // the x-amz-replication-status header with value REPLICA if the object in
  21813. // your request is a replica that Amazon S3 created and there is no replica
  21814. // modification replication in progress.
  21815. //
  21816. // * When replicating objects to multiple destination buckets, the x-amz-replication-status
  21817. // header acts differently. The header of the source object will only return
  21818. // a value of COMPLETED when replication is successful to all destinations.
  21819. // The header will remain at value PENDING until replication has completed
  21820. // for all destinations. If one or more destinations fails replication the
  21821. // header will return FAILED.
  21822. //
  21823. // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
  21824. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  21825. // If present, indicates that the requester was successfully charged for the
  21826. // request.
  21827. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  21828. // If the object is an archived object (an object whose storage class is GLACIER),
  21829. // the response includes this header if either the archive restoration is in
  21830. // progress (see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
  21831. // or an archive copy is already restored.
  21832. //
  21833. // If an archive copy is already restored, the header value indicates when Amazon
  21834. // S3 is scheduled to delete the object copy. For example:
  21835. //
  21836. // x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00
  21837. // GMT"
  21838. //
  21839. // If the object restoration is in progress, the header returns the value ongoing-request="true".
  21840. //
  21841. // For more information about archiving objects, see Transitioning Objects:
  21842. // General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations).
  21843. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  21844. // If server-side encryption with a customer-provided encryption key was requested,
  21845. // the response will include this header confirming the encryption algorithm
  21846. // used.
  21847. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  21848. // If server-side encryption with a customer-provided encryption key was requested,
  21849. // the response will include this header to provide round-trip message integrity
  21850. // verification of the customer-provided encryption key.
  21851. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  21852. // If present, specifies the ID of the Amazon Web Services Key Management Service
  21853. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  21854. // the object.
  21855. //
  21856. // SSEKMSKeyId is a sensitive parameter and its value will be
  21857. // replaced with "sensitive" in string returned by HeadObjectOutput's
  21858. // String and GoString methods.
  21859. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  21860. // If the object is stored using server-side encryption either with an Amazon
  21861. // Web Services KMS key or an Amazon S3-managed encryption key, the response
  21862. // includes this header with the value of the server-side encryption algorithm
  21863. // used when storing this object in Amazon S3 (for example, AES256, aws:kms).
  21864. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  21865. // Provides storage class information of the object. Amazon S3 returns this
  21866. // header for all objects except for S3 Standard storage class objects.
  21867. //
  21868. // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
  21869. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  21870. // Version of the object.
  21871. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  21872. // If the bucket is configured as a website, redirects requests for this object
  21873. // to another object in the same bucket or to an external URL. Amazon S3 stores
  21874. // the value of this header in the object metadata.
  21875. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  21876. }
  21877. // String returns the string representation.
  21878. //
  21879. // API parameter values that are decorated as "sensitive" in the API will not
  21880. // be included in the string output. The member name will be present, but the
  21881. // value will be replaced with "sensitive".
  21882. func (s HeadObjectOutput) String() string {
  21883. return awsutil.Prettify(s)
  21884. }
  21885. // GoString returns the string representation.
  21886. //
  21887. // API parameter values that are decorated as "sensitive" in the API will not
  21888. // be included in the string output. The member name will be present, but the
  21889. // value will be replaced with "sensitive".
  21890. func (s HeadObjectOutput) GoString() string {
  21891. return s.String()
  21892. }
  21893. // SetAcceptRanges sets the AcceptRanges field's value.
  21894. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  21895. s.AcceptRanges = &v
  21896. return s
  21897. }
  21898. // SetArchiveStatus sets the ArchiveStatus field's value.
  21899. func (s *HeadObjectOutput) SetArchiveStatus(v string) *HeadObjectOutput {
  21900. s.ArchiveStatus = &v
  21901. return s
  21902. }
  21903. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  21904. func (s *HeadObjectOutput) SetBucketKeyEnabled(v bool) *HeadObjectOutput {
  21905. s.BucketKeyEnabled = &v
  21906. return s
  21907. }
  21908. // SetCacheControl sets the CacheControl field's value.
  21909. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  21910. s.CacheControl = &v
  21911. return s
  21912. }
  21913. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  21914. func (s *HeadObjectOutput) SetChecksumCRC32(v string) *HeadObjectOutput {
  21915. s.ChecksumCRC32 = &v
  21916. return s
  21917. }
  21918. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  21919. func (s *HeadObjectOutput) SetChecksumCRC32C(v string) *HeadObjectOutput {
  21920. s.ChecksumCRC32C = &v
  21921. return s
  21922. }
  21923. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  21924. func (s *HeadObjectOutput) SetChecksumSHA1(v string) *HeadObjectOutput {
  21925. s.ChecksumSHA1 = &v
  21926. return s
  21927. }
  21928. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  21929. func (s *HeadObjectOutput) SetChecksumSHA256(v string) *HeadObjectOutput {
  21930. s.ChecksumSHA256 = &v
  21931. return s
  21932. }
  21933. // SetContentDisposition sets the ContentDisposition field's value.
  21934. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  21935. s.ContentDisposition = &v
  21936. return s
  21937. }
  21938. // SetContentEncoding sets the ContentEncoding field's value.
  21939. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  21940. s.ContentEncoding = &v
  21941. return s
  21942. }
  21943. // SetContentLanguage sets the ContentLanguage field's value.
  21944. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  21945. s.ContentLanguage = &v
  21946. return s
  21947. }
  21948. // SetContentLength sets the ContentLength field's value.
  21949. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  21950. s.ContentLength = &v
  21951. return s
  21952. }
  21953. // SetContentType sets the ContentType field's value.
  21954. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  21955. s.ContentType = &v
  21956. return s
  21957. }
  21958. // SetDeleteMarker sets the DeleteMarker field's value.
  21959. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  21960. s.DeleteMarker = &v
  21961. return s
  21962. }
  21963. // SetETag sets the ETag field's value.
  21964. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  21965. s.ETag = &v
  21966. return s
  21967. }
  21968. // SetExpiration sets the Expiration field's value.
  21969. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  21970. s.Expiration = &v
  21971. return s
  21972. }
  21973. // SetExpires sets the Expires field's value.
  21974. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  21975. s.Expires = &v
  21976. return s
  21977. }
  21978. // SetLastModified sets the LastModified field's value.
  21979. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  21980. s.LastModified = &v
  21981. return s
  21982. }
  21983. // SetMetadata sets the Metadata field's value.
  21984. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  21985. s.Metadata = v
  21986. return s
  21987. }
  21988. // SetMissingMeta sets the MissingMeta field's value.
  21989. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  21990. s.MissingMeta = &v
  21991. return s
  21992. }
  21993. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  21994. func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
  21995. s.ObjectLockLegalHoldStatus = &v
  21996. return s
  21997. }
  21998. // SetObjectLockMode sets the ObjectLockMode field's value.
  21999. func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
  22000. s.ObjectLockMode = &v
  22001. return s
  22002. }
  22003. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  22004. func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
  22005. s.ObjectLockRetainUntilDate = &v
  22006. return s
  22007. }
  22008. // SetPartsCount sets the PartsCount field's value.
  22009. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  22010. s.PartsCount = &v
  22011. return s
  22012. }
  22013. // SetReplicationStatus sets the ReplicationStatus field's value.
  22014. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  22015. s.ReplicationStatus = &v
  22016. return s
  22017. }
  22018. // SetRequestCharged sets the RequestCharged field's value.
  22019. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  22020. s.RequestCharged = &v
  22021. return s
  22022. }
  22023. // SetRestore sets the Restore field's value.
  22024. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  22025. s.Restore = &v
  22026. return s
  22027. }
  22028. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  22029. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  22030. s.SSECustomerAlgorithm = &v
  22031. return s
  22032. }
  22033. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  22034. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  22035. s.SSECustomerKeyMD5 = &v
  22036. return s
  22037. }
  22038. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  22039. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  22040. s.SSEKMSKeyId = &v
  22041. return s
  22042. }
  22043. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  22044. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  22045. s.ServerSideEncryption = &v
  22046. return s
  22047. }
  22048. // SetStorageClass sets the StorageClass field's value.
  22049. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  22050. s.StorageClass = &v
  22051. return s
  22052. }
  22053. // SetVersionId sets the VersionId field's value.
  22054. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  22055. s.VersionId = &v
  22056. return s
  22057. }
  22058. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  22059. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  22060. s.WebsiteRedirectLocation = &v
  22061. return s
  22062. }
  22063. // Container for the Suffix element.
  22064. type IndexDocument struct {
  22065. _ struct{} `type:"structure"`
  22066. // A suffix that is appended to a request that is for a directory on the website
  22067. // endpoint (for example,if the suffix is index.html and you make a request
  22068. // to samplebucket/images/ the data that is returned will be for the object
  22069. // with the key name images/index.html) The suffix must not be empty and must
  22070. // not include a slash character.
  22071. //
  22072. // Replacement must be made for object keys containing special characters (such
  22073. // as carriage returns) when using XML requests. For more information, see XML
  22074. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  22075. //
  22076. // Suffix is a required field
  22077. Suffix *string `type:"string" required:"true"`
  22078. }
  22079. // String returns the string representation.
  22080. //
  22081. // API parameter values that are decorated as "sensitive" in the API will not
  22082. // be included in the string output. The member name will be present, but the
  22083. // value will be replaced with "sensitive".
  22084. func (s IndexDocument) String() string {
  22085. return awsutil.Prettify(s)
  22086. }
  22087. // GoString returns the string representation.
  22088. //
  22089. // API parameter values that are decorated as "sensitive" in the API will not
  22090. // be included in the string output. The member name will be present, but the
  22091. // value will be replaced with "sensitive".
  22092. func (s IndexDocument) GoString() string {
  22093. return s.String()
  22094. }
  22095. // Validate inspects the fields of the type to determine if they are valid.
  22096. func (s *IndexDocument) Validate() error {
  22097. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  22098. if s.Suffix == nil {
  22099. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  22100. }
  22101. if invalidParams.Len() > 0 {
  22102. return invalidParams
  22103. }
  22104. return nil
  22105. }
  22106. // SetSuffix sets the Suffix field's value.
  22107. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  22108. s.Suffix = &v
  22109. return s
  22110. }
  22111. // Container element that identifies who initiated the multipart upload.
  22112. type Initiator struct {
  22113. _ struct{} `type:"structure"`
  22114. // Name of the Principal.
  22115. DisplayName *string `type:"string"`
  22116. // If the principal is an Amazon Web Services account, it provides the Canonical
  22117. // User ID. If the principal is an IAM User, it provides a user ARN value.
  22118. ID *string `type:"string"`
  22119. }
  22120. // String returns the string representation.
  22121. //
  22122. // API parameter values that are decorated as "sensitive" in the API will not
  22123. // be included in the string output. The member name will be present, but the
  22124. // value will be replaced with "sensitive".
  22125. func (s Initiator) String() string {
  22126. return awsutil.Prettify(s)
  22127. }
  22128. // GoString returns the string representation.
  22129. //
  22130. // API parameter values that are decorated as "sensitive" in the API will not
  22131. // be included in the string output. The member name will be present, but the
  22132. // value will be replaced with "sensitive".
  22133. func (s Initiator) GoString() string {
  22134. return s.String()
  22135. }
  22136. // SetDisplayName sets the DisplayName field's value.
  22137. func (s *Initiator) SetDisplayName(v string) *Initiator {
  22138. s.DisplayName = &v
  22139. return s
  22140. }
  22141. // SetID sets the ID field's value.
  22142. func (s *Initiator) SetID(v string) *Initiator {
  22143. s.ID = &v
  22144. return s
  22145. }
  22146. // Describes the serialization format of the object.
  22147. type InputSerialization struct {
  22148. _ struct{} `type:"structure"`
  22149. // Describes the serialization of a CSV-encoded object.
  22150. CSV *CSVInput `type:"structure"`
  22151. // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
  22152. // Value: NONE.
  22153. CompressionType *string `type:"string" enum:"CompressionType"`
  22154. // Specifies JSON as object's input serialization format.
  22155. JSON *JSONInput `type:"structure"`
  22156. // Specifies Parquet as object's input serialization format.
  22157. Parquet *ParquetInput `type:"structure"`
  22158. }
  22159. // String returns the string representation.
  22160. //
  22161. // API parameter values that are decorated as "sensitive" in the API will not
  22162. // be included in the string output. The member name will be present, but the
  22163. // value will be replaced with "sensitive".
  22164. func (s InputSerialization) String() string {
  22165. return awsutil.Prettify(s)
  22166. }
  22167. // GoString returns the string representation.
  22168. //
  22169. // API parameter values that are decorated as "sensitive" in the API will not
  22170. // be included in the string output. The member name will be present, but the
  22171. // value will be replaced with "sensitive".
  22172. func (s InputSerialization) GoString() string {
  22173. return s.String()
  22174. }
  22175. // SetCSV sets the CSV field's value.
  22176. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  22177. s.CSV = v
  22178. return s
  22179. }
  22180. // SetCompressionType sets the CompressionType field's value.
  22181. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  22182. s.CompressionType = &v
  22183. return s
  22184. }
  22185. // SetJSON sets the JSON field's value.
  22186. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  22187. s.JSON = v
  22188. return s
  22189. }
  22190. // SetParquet sets the Parquet field's value.
  22191. func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
  22192. s.Parquet = v
  22193. return s
  22194. }
  22195. // A container for specifying S3 Intelligent-Tiering filters. The filters determine
  22196. // the subset of objects to which the rule applies.
  22197. type IntelligentTieringAndOperator struct {
  22198. _ struct{} `type:"structure"`
  22199. // An object key name prefix that identifies the subset of objects to which
  22200. // the configuration applies.
  22201. Prefix *string `type:"string"`
  22202. // All of these tags must exist in the object's tag set in order for the configuration
  22203. // to apply.
  22204. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  22205. }
  22206. // String returns the string representation.
  22207. //
  22208. // API parameter values that are decorated as "sensitive" in the API will not
  22209. // be included in the string output. The member name will be present, but the
  22210. // value will be replaced with "sensitive".
  22211. func (s IntelligentTieringAndOperator) String() string {
  22212. return awsutil.Prettify(s)
  22213. }
  22214. // GoString returns the string representation.
  22215. //
  22216. // API parameter values that are decorated as "sensitive" in the API will not
  22217. // be included in the string output. The member name will be present, but the
  22218. // value will be replaced with "sensitive".
  22219. func (s IntelligentTieringAndOperator) GoString() string {
  22220. return s.String()
  22221. }
  22222. // Validate inspects the fields of the type to determine if they are valid.
  22223. func (s *IntelligentTieringAndOperator) Validate() error {
  22224. invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringAndOperator"}
  22225. if s.Tags != nil {
  22226. for i, v := range s.Tags {
  22227. if v == nil {
  22228. continue
  22229. }
  22230. if err := v.Validate(); err != nil {
  22231. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  22232. }
  22233. }
  22234. }
  22235. if invalidParams.Len() > 0 {
  22236. return invalidParams
  22237. }
  22238. return nil
  22239. }
  22240. // SetPrefix sets the Prefix field's value.
  22241. func (s *IntelligentTieringAndOperator) SetPrefix(v string) *IntelligentTieringAndOperator {
  22242. s.Prefix = &v
  22243. return s
  22244. }
  22245. // SetTags sets the Tags field's value.
  22246. func (s *IntelligentTieringAndOperator) SetTags(v []*Tag) *IntelligentTieringAndOperator {
  22247. s.Tags = v
  22248. return s
  22249. }
  22250. // Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.
  22251. //
  22252. // For information about the S3 Intelligent-Tiering storage class, see Storage
  22253. // class for automatically optimizing frequently and infrequently accessed objects
  22254. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
  22255. type IntelligentTieringConfiguration struct {
  22256. _ struct{} `type:"structure"`
  22257. // Specifies a bucket filter. The configuration only includes objects that meet
  22258. // the filter's criteria.
  22259. Filter *IntelligentTieringFilter `type:"structure"`
  22260. // The ID used to identify the S3 Intelligent-Tiering configuration.
  22261. //
  22262. // Id is a required field
  22263. Id *string `type:"string" required:"true"`
  22264. // Specifies the status of the configuration.
  22265. //
  22266. // Status is a required field
  22267. Status *string `type:"string" required:"true" enum:"IntelligentTieringStatus"`
  22268. // Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
  22269. //
  22270. // Tierings is a required field
  22271. Tierings []*Tiering `locationName:"Tiering" type:"list" flattened:"true" required:"true"`
  22272. }
  22273. // String returns the string representation.
  22274. //
  22275. // API parameter values that are decorated as "sensitive" in the API will not
  22276. // be included in the string output. The member name will be present, but the
  22277. // value will be replaced with "sensitive".
  22278. func (s IntelligentTieringConfiguration) String() string {
  22279. return awsutil.Prettify(s)
  22280. }
  22281. // GoString returns the string representation.
  22282. //
  22283. // API parameter values that are decorated as "sensitive" in the API will not
  22284. // be included in the string output. The member name will be present, but the
  22285. // value will be replaced with "sensitive".
  22286. func (s IntelligentTieringConfiguration) GoString() string {
  22287. return s.String()
  22288. }
  22289. // Validate inspects the fields of the type to determine if they are valid.
  22290. func (s *IntelligentTieringConfiguration) Validate() error {
  22291. invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringConfiguration"}
  22292. if s.Id == nil {
  22293. invalidParams.Add(request.NewErrParamRequired("Id"))
  22294. }
  22295. if s.Status == nil {
  22296. invalidParams.Add(request.NewErrParamRequired("Status"))
  22297. }
  22298. if s.Tierings == nil {
  22299. invalidParams.Add(request.NewErrParamRequired("Tierings"))
  22300. }
  22301. if s.Filter != nil {
  22302. if err := s.Filter.Validate(); err != nil {
  22303. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  22304. }
  22305. }
  22306. if s.Tierings != nil {
  22307. for i, v := range s.Tierings {
  22308. if v == nil {
  22309. continue
  22310. }
  22311. if err := v.Validate(); err != nil {
  22312. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tierings", i), err.(request.ErrInvalidParams))
  22313. }
  22314. }
  22315. }
  22316. if invalidParams.Len() > 0 {
  22317. return invalidParams
  22318. }
  22319. return nil
  22320. }
  22321. // SetFilter sets the Filter field's value.
  22322. func (s *IntelligentTieringConfiguration) SetFilter(v *IntelligentTieringFilter) *IntelligentTieringConfiguration {
  22323. s.Filter = v
  22324. return s
  22325. }
  22326. // SetId sets the Id field's value.
  22327. func (s *IntelligentTieringConfiguration) SetId(v string) *IntelligentTieringConfiguration {
  22328. s.Id = &v
  22329. return s
  22330. }
  22331. // SetStatus sets the Status field's value.
  22332. func (s *IntelligentTieringConfiguration) SetStatus(v string) *IntelligentTieringConfiguration {
  22333. s.Status = &v
  22334. return s
  22335. }
  22336. // SetTierings sets the Tierings field's value.
  22337. func (s *IntelligentTieringConfiguration) SetTierings(v []*Tiering) *IntelligentTieringConfiguration {
  22338. s.Tierings = v
  22339. return s
  22340. }
  22341. // The Filter is used to identify objects that the S3 Intelligent-Tiering configuration
  22342. // applies to.
  22343. type IntelligentTieringFilter struct {
  22344. _ struct{} `type:"structure"`
  22345. // A conjunction (logical AND) of predicates, which is used in evaluating a
  22346. // metrics filter. The operator must have at least two predicates, and an object
  22347. // must match all of the predicates in order for the filter to apply.
  22348. And *IntelligentTieringAndOperator `type:"structure"`
  22349. // An object key name prefix that identifies the subset of objects to which
  22350. // the rule applies.
  22351. //
  22352. // Replacement must be made for object keys containing special characters (such
  22353. // as carriage returns) when using XML requests. For more information, see XML
  22354. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  22355. Prefix *string `type:"string"`
  22356. // A container of a key value name pair.
  22357. Tag *Tag `type:"structure"`
  22358. }
  22359. // String returns the string representation.
  22360. //
  22361. // API parameter values that are decorated as "sensitive" in the API will not
  22362. // be included in the string output. The member name will be present, but the
  22363. // value will be replaced with "sensitive".
  22364. func (s IntelligentTieringFilter) String() string {
  22365. return awsutil.Prettify(s)
  22366. }
  22367. // GoString returns the string representation.
  22368. //
  22369. // API parameter values that are decorated as "sensitive" in the API will not
  22370. // be included in the string output. The member name will be present, but the
  22371. // value will be replaced with "sensitive".
  22372. func (s IntelligentTieringFilter) GoString() string {
  22373. return s.String()
  22374. }
  22375. // Validate inspects the fields of the type to determine if they are valid.
  22376. func (s *IntelligentTieringFilter) Validate() error {
  22377. invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringFilter"}
  22378. if s.And != nil {
  22379. if err := s.And.Validate(); err != nil {
  22380. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  22381. }
  22382. }
  22383. if s.Tag != nil {
  22384. if err := s.Tag.Validate(); err != nil {
  22385. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  22386. }
  22387. }
  22388. if invalidParams.Len() > 0 {
  22389. return invalidParams
  22390. }
  22391. return nil
  22392. }
  22393. // SetAnd sets the And field's value.
  22394. func (s *IntelligentTieringFilter) SetAnd(v *IntelligentTieringAndOperator) *IntelligentTieringFilter {
  22395. s.And = v
  22396. return s
  22397. }
  22398. // SetPrefix sets the Prefix field's value.
  22399. func (s *IntelligentTieringFilter) SetPrefix(v string) *IntelligentTieringFilter {
  22400. s.Prefix = &v
  22401. return s
  22402. }
  22403. // SetTag sets the Tag field's value.
  22404. func (s *IntelligentTieringFilter) SetTag(v *Tag) *IntelligentTieringFilter {
  22405. s.Tag = v
  22406. return s
  22407. }
  22408. // Specifies the inventory configuration for an Amazon S3 bucket. For more information,
  22409. // see GET Bucket inventory (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
  22410. // in the Amazon S3 API Reference.
  22411. type InventoryConfiguration struct {
  22412. _ struct{} `type:"structure"`
  22413. // Contains information about where to publish the inventory results.
  22414. //
  22415. // Destination is a required field
  22416. Destination *InventoryDestination `type:"structure" required:"true"`
  22417. // Specifies an inventory filter. The inventory only includes objects that meet
  22418. // the filter's criteria.
  22419. Filter *InventoryFilter `type:"structure"`
  22420. // The ID used to identify the inventory configuration.
  22421. //
  22422. // Id is a required field
  22423. Id *string `type:"string" required:"true"`
  22424. // Object versions to include in the inventory list. If set to All, the list
  22425. // includes all the object versions, which adds the version-related fields VersionId,
  22426. // IsLatest, and DeleteMarker to the list. If set to Current, the list does
  22427. // not contain these version-related fields.
  22428. //
  22429. // IncludedObjectVersions is a required field
  22430. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  22431. // Specifies whether the inventory is enabled or disabled. If set to True, an
  22432. // inventory list is generated. If set to False, no inventory list is generated.
  22433. //
  22434. // IsEnabled is a required field
  22435. IsEnabled *bool `type:"boolean" required:"true"`
  22436. // Contains the optional fields that are included in the inventory results.
  22437. OptionalFields []*string `locationNameList:"Field" type:"list" enum:"InventoryOptionalField"`
  22438. // Specifies the schedule for generating inventory results.
  22439. //
  22440. // Schedule is a required field
  22441. Schedule *InventorySchedule `type:"structure" required:"true"`
  22442. }
  22443. // String returns the string representation.
  22444. //
  22445. // API parameter values that are decorated as "sensitive" in the API will not
  22446. // be included in the string output. The member name will be present, but the
  22447. // value will be replaced with "sensitive".
  22448. func (s InventoryConfiguration) String() string {
  22449. return awsutil.Prettify(s)
  22450. }
  22451. // GoString returns the string representation.
  22452. //
  22453. // API parameter values that are decorated as "sensitive" in the API will not
  22454. // be included in the string output. The member name will be present, but the
  22455. // value will be replaced with "sensitive".
  22456. func (s InventoryConfiguration) GoString() string {
  22457. return s.String()
  22458. }
  22459. // Validate inspects the fields of the type to determine if they are valid.
  22460. func (s *InventoryConfiguration) Validate() error {
  22461. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  22462. if s.Destination == nil {
  22463. invalidParams.Add(request.NewErrParamRequired("Destination"))
  22464. }
  22465. if s.Id == nil {
  22466. invalidParams.Add(request.NewErrParamRequired("Id"))
  22467. }
  22468. if s.IncludedObjectVersions == nil {
  22469. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  22470. }
  22471. if s.IsEnabled == nil {
  22472. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  22473. }
  22474. if s.Schedule == nil {
  22475. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  22476. }
  22477. if s.Destination != nil {
  22478. if err := s.Destination.Validate(); err != nil {
  22479. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  22480. }
  22481. }
  22482. if s.Filter != nil {
  22483. if err := s.Filter.Validate(); err != nil {
  22484. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  22485. }
  22486. }
  22487. if s.Schedule != nil {
  22488. if err := s.Schedule.Validate(); err != nil {
  22489. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  22490. }
  22491. }
  22492. if invalidParams.Len() > 0 {
  22493. return invalidParams
  22494. }
  22495. return nil
  22496. }
  22497. // SetDestination sets the Destination field's value.
  22498. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  22499. s.Destination = v
  22500. return s
  22501. }
  22502. // SetFilter sets the Filter field's value.
  22503. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  22504. s.Filter = v
  22505. return s
  22506. }
  22507. // SetId sets the Id field's value.
  22508. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  22509. s.Id = &v
  22510. return s
  22511. }
  22512. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  22513. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  22514. s.IncludedObjectVersions = &v
  22515. return s
  22516. }
  22517. // SetIsEnabled sets the IsEnabled field's value.
  22518. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  22519. s.IsEnabled = &v
  22520. return s
  22521. }
  22522. // SetOptionalFields sets the OptionalFields field's value.
  22523. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  22524. s.OptionalFields = v
  22525. return s
  22526. }
  22527. // SetSchedule sets the Schedule field's value.
  22528. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  22529. s.Schedule = v
  22530. return s
  22531. }
  22532. // Specifies the inventory configuration for an Amazon S3 bucket.
  22533. type InventoryDestination struct {
  22534. _ struct{} `type:"structure"`
  22535. // Contains the bucket name, file format, bucket owner (optional), and prefix
  22536. // (optional) where inventory results are published.
  22537. //
  22538. // S3BucketDestination is a required field
  22539. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  22540. }
  22541. // String returns the string representation.
  22542. //
  22543. // API parameter values that are decorated as "sensitive" in the API will not
  22544. // be included in the string output. The member name will be present, but the
  22545. // value will be replaced with "sensitive".
  22546. func (s InventoryDestination) String() string {
  22547. return awsutil.Prettify(s)
  22548. }
  22549. // GoString returns the string representation.
  22550. //
  22551. // API parameter values that are decorated as "sensitive" in the API will not
  22552. // be included in the string output. The member name will be present, but the
  22553. // value will be replaced with "sensitive".
  22554. func (s InventoryDestination) GoString() string {
  22555. return s.String()
  22556. }
  22557. // Validate inspects the fields of the type to determine if they are valid.
  22558. func (s *InventoryDestination) Validate() error {
  22559. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  22560. if s.S3BucketDestination == nil {
  22561. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  22562. }
  22563. if s.S3BucketDestination != nil {
  22564. if err := s.S3BucketDestination.Validate(); err != nil {
  22565. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  22566. }
  22567. }
  22568. if invalidParams.Len() > 0 {
  22569. return invalidParams
  22570. }
  22571. return nil
  22572. }
  22573. // SetS3BucketDestination sets the S3BucketDestination field's value.
  22574. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  22575. s.S3BucketDestination = v
  22576. return s
  22577. }
  22578. // Contains the type of server-side encryption used to encrypt the inventory
  22579. // results.
  22580. type InventoryEncryption struct {
  22581. _ struct{} `type:"structure"`
  22582. // Specifies the use of SSE-KMS to encrypt delivered inventory reports.
  22583. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  22584. // Specifies the use of SSE-S3 to encrypt delivered inventory reports.
  22585. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  22586. }
  22587. // String returns the string representation.
  22588. //
  22589. // API parameter values that are decorated as "sensitive" in the API will not
  22590. // be included in the string output. The member name will be present, but the
  22591. // value will be replaced with "sensitive".
  22592. func (s InventoryEncryption) String() string {
  22593. return awsutil.Prettify(s)
  22594. }
  22595. // GoString returns the string representation.
  22596. //
  22597. // API parameter values that are decorated as "sensitive" in the API will not
  22598. // be included in the string output. The member name will be present, but the
  22599. // value will be replaced with "sensitive".
  22600. func (s InventoryEncryption) GoString() string {
  22601. return s.String()
  22602. }
  22603. // Validate inspects the fields of the type to determine if they are valid.
  22604. func (s *InventoryEncryption) Validate() error {
  22605. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  22606. if s.SSEKMS != nil {
  22607. if err := s.SSEKMS.Validate(); err != nil {
  22608. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  22609. }
  22610. }
  22611. if invalidParams.Len() > 0 {
  22612. return invalidParams
  22613. }
  22614. return nil
  22615. }
  22616. // SetSSEKMS sets the SSEKMS field's value.
  22617. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  22618. s.SSEKMS = v
  22619. return s
  22620. }
  22621. // SetSSES3 sets the SSES3 field's value.
  22622. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  22623. s.SSES3 = v
  22624. return s
  22625. }
  22626. // Specifies an inventory filter. The inventory only includes objects that meet
  22627. // the filter's criteria.
  22628. type InventoryFilter struct {
  22629. _ struct{} `type:"structure"`
  22630. // The prefix that an object must have to be included in the inventory results.
  22631. //
  22632. // Prefix is a required field
  22633. Prefix *string `type:"string" required:"true"`
  22634. }
  22635. // String returns the string representation.
  22636. //
  22637. // API parameter values that are decorated as "sensitive" in the API will not
  22638. // be included in the string output. The member name will be present, but the
  22639. // value will be replaced with "sensitive".
  22640. func (s InventoryFilter) String() string {
  22641. return awsutil.Prettify(s)
  22642. }
  22643. // GoString returns the string representation.
  22644. //
  22645. // API parameter values that are decorated as "sensitive" in the API will not
  22646. // be included in the string output. The member name will be present, but the
  22647. // value will be replaced with "sensitive".
  22648. func (s InventoryFilter) GoString() string {
  22649. return s.String()
  22650. }
  22651. // Validate inspects the fields of the type to determine if they are valid.
  22652. func (s *InventoryFilter) Validate() error {
  22653. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  22654. if s.Prefix == nil {
  22655. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  22656. }
  22657. if invalidParams.Len() > 0 {
  22658. return invalidParams
  22659. }
  22660. return nil
  22661. }
  22662. // SetPrefix sets the Prefix field's value.
  22663. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  22664. s.Prefix = &v
  22665. return s
  22666. }
  22667. // Contains the bucket name, file format, bucket owner (optional), and prefix
  22668. // (optional) where inventory results are published.
  22669. type InventoryS3BucketDestination struct {
  22670. _ struct{} `type:"structure"`
  22671. // The account ID that owns the destination S3 bucket. If no account ID is provided,
  22672. // the owner is not validated before exporting data.
  22673. //
  22674. // Although this value is optional, we strongly recommend that you set it to
  22675. // help prevent problems if the destination bucket ownership changes.
  22676. AccountId *string `type:"string"`
  22677. // The Amazon Resource Name (ARN) of the bucket where inventory results will
  22678. // be published.
  22679. //
  22680. // Bucket is a required field
  22681. Bucket *string `type:"string" required:"true"`
  22682. // Contains the type of server-side encryption used to encrypt the inventory
  22683. // results.
  22684. Encryption *InventoryEncryption `type:"structure"`
  22685. // Specifies the output format of the inventory results.
  22686. //
  22687. // Format is a required field
  22688. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  22689. // The prefix that is prepended to all inventory results.
  22690. Prefix *string `type:"string"`
  22691. }
  22692. // String returns the string representation.
  22693. //
  22694. // API parameter values that are decorated as "sensitive" in the API will not
  22695. // be included in the string output. The member name will be present, but the
  22696. // value will be replaced with "sensitive".
  22697. func (s InventoryS3BucketDestination) String() string {
  22698. return awsutil.Prettify(s)
  22699. }
  22700. // GoString returns the string representation.
  22701. //
  22702. // API parameter values that are decorated as "sensitive" in the API will not
  22703. // be included in the string output. The member name will be present, but the
  22704. // value will be replaced with "sensitive".
  22705. func (s InventoryS3BucketDestination) GoString() string {
  22706. return s.String()
  22707. }
  22708. // Validate inspects the fields of the type to determine if they are valid.
  22709. func (s *InventoryS3BucketDestination) Validate() error {
  22710. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  22711. if s.Bucket == nil {
  22712. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  22713. }
  22714. if s.Format == nil {
  22715. invalidParams.Add(request.NewErrParamRequired("Format"))
  22716. }
  22717. if s.Encryption != nil {
  22718. if err := s.Encryption.Validate(); err != nil {
  22719. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  22720. }
  22721. }
  22722. if invalidParams.Len() > 0 {
  22723. return invalidParams
  22724. }
  22725. return nil
  22726. }
  22727. // SetAccountId sets the AccountId field's value.
  22728. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  22729. s.AccountId = &v
  22730. return s
  22731. }
  22732. // SetBucket sets the Bucket field's value.
  22733. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  22734. s.Bucket = &v
  22735. return s
  22736. }
  22737. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  22738. if s.Bucket == nil {
  22739. return v
  22740. }
  22741. return *s.Bucket
  22742. }
  22743. // SetEncryption sets the Encryption field's value.
  22744. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  22745. s.Encryption = v
  22746. return s
  22747. }
  22748. // SetFormat sets the Format field's value.
  22749. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  22750. s.Format = &v
  22751. return s
  22752. }
  22753. // SetPrefix sets the Prefix field's value.
  22754. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  22755. s.Prefix = &v
  22756. return s
  22757. }
  22758. // Specifies the schedule for generating inventory results.
  22759. type InventorySchedule struct {
  22760. _ struct{} `type:"structure"`
  22761. // Specifies how frequently inventory results are produced.
  22762. //
  22763. // Frequency is a required field
  22764. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  22765. }
  22766. // String returns the string representation.
  22767. //
  22768. // API parameter values that are decorated as "sensitive" in the API will not
  22769. // be included in the string output. The member name will be present, but the
  22770. // value will be replaced with "sensitive".
  22771. func (s InventorySchedule) String() string {
  22772. return awsutil.Prettify(s)
  22773. }
  22774. // GoString returns the string representation.
  22775. //
  22776. // API parameter values that are decorated as "sensitive" in the API will not
  22777. // be included in the string output. The member name will be present, but the
  22778. // value will be replaced with "sensitive".
  22779. func (s InventorySchedule) GoString() string {
  22780. return s.String()
  22781. }
  22782. // Validate inspects the fields of the type to determine if they are valid.
  22783. func (s *InventorySchedule) Validate() error {
  22784. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  22785. if s.Frequency == nil {
  22786. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  22787. }
  22788. if invalidParams.Len() > 0 {
  22789. return invalidParams
  22790. }
  22791. return nil
  22792. }
  22793. // SetFrequency sets the Frequency field's value.
  22794. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  22795. s.Frequency = &v
  22796. return s
  22797. }
  22798. // Specifies JSON as object's input serialization format.
  22799. type JSONInput struct {
  22800. _ struct{} `type:"structure"`
  22801. // The type of JSON. Valid values: Document, Lines.
  22802. Type *string `type:"string" enum:"JSONType"`
  22803. }
  22804. // String returns the string representation.
  22805. //
  22806. // API parameter values that are decorated as "sensitive" in the API will not
  22807. // be included in the string output. The member name will be present, but the
  22808. // value will be replaced with "sensitive".
  22809. func (s JSONInput) String() string {
  22810. return awsutil.Prettify(s)
  22811. }
  22812. // GoString returns the string representation.
  22813. //
  22814. // API parameter values that are decorated as "sensitive" in the API will not
  22815. // be included in the string output. The member name will be present, but the
  22816. // value will be replaced with "sensitive".
  22817. func (s JSONInput) GoString() string {
  22818. return s.String()
  22819. }
  22820. // SetType sets the Type field's value.
  22821. func (s *JSONInput) SetType(v string) *JSONInput {
  22822. s.Type = &v
  22823. return s
  22824. }
  22825. // Specifies JSON as request's output serialization format.
  22826. type JSONOutput struct {
  22827. _ struct{} `type:"structure"`
  22828. // The value used to separate individual records in the output. If no value
  22829. // is specified, Amazon S3 uses a newline character ('\n').
  22830. RecordDelimiter *string `type:"string"`
  22831. }
  22832. // String returns the string representation.
  22833. //
  22834. // API parameter values that are decorated as "sensitive" in the API will not
  22835. // be included in the string output. The member name will be present, but the
  22836. // value will be replaced with "sensitive".
  22837. func (s JSONOutput) String() string {
  22838. return awsutil.Prettify(s)
  22839. }
  22840. // GoString returns the string representation.
  22841. //
  22842. // API parameter values that are decorated as "sensitive" in the API will not
  22843. // be included in the string output. The member name will be present, but the
  22844. // value will be replaced with "sensitive".
  22845. func (s JSONOutput) GoString() string {
  22846. return s.String()
  22847. }
  22848. // SetRecordDelimiter sets the RecordDelimiter field's value.
  22849. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  22850. s.RecordDelimiter = &v
  22851. return s
  22852. }
  22853. // A container for object key name prefix and suffix filtering rules.
  22854. type KeyFilter struct {
  22855. _ struct{} `type:"structure"`
  22856. // A list of containers for the key-value pair that defines the criteria for
  22857. // the filter rule.
  22858. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  22859. }
  22860. // String returns the string representation.
  22861. //
  22862. // API parameter values that are decorated as "sensitive" in the API will not
  22863. // be included in the string output. The member name will be present, but the
  22864. // value will be replaced with "sensitive".
  22865. func (s KeyFilter) String() string {
  22866. return awsutil.Prettify(s)
  22867. }
  22868. // GoString returns the string representation.
  22869. //
  22870. // API parameter values that are decorated as "sensitive" in the API will not
  22871. // be included in the string output. The member name will be present, but the
  22872. // value will be replaced with "sensitive".
  22873. func (s KeyFilter) GoString() string {
  22874. return s.String()
  22875. }
  22876. // SetFilterRules sets the FilterRules field's value.
  22877. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  22878. s.FilterRules = v
  22879. return s
  22880. }
  22881. // A container for specifying the configuration for Lambda notifications.
  22882. type LambdaFunctionConfiguration struct {
  22883. _ struct{} `type:"structure"`
  22884. // The Amazon S3 bucket event for which to invoke the Lambda function. For more
  22885. // information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  22886. // in the Amazon S3 User Guide.
  22887. //
  22888. // Events is a required field
  22889. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"`
  22890. // Specifies object key name filtering rules. For information about key name
  22891. // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  22892. // in the Amazon S3 User Guide.
  22893. Filter *NotificationConfigurationFilter `type:"structure"`
  22894. // An optional unique identifier for configurations in a notification configuration.
  22895. // If you don't provide one, Amazon S3 will assign an ID.
  22896. Id *string `type:"string"`
  22897. // The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes
  22898. // when the specified event type occurs.
  22899. //
  22900. // LambdaFunctionArn is a required field
  22901. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  22902. }
  22903. // String returns the string representation.
  22904. //
  22905. // API parameter values that are decorated as "sensitive" in the API will not
  22906. // be included in the string output. The member name will be present, but the
  22907. // value will be replaced with "sensitive".
  22908. func (s LambdaFunctionConfiguration) String() string {
  22909. return awsutil.Prettify(s)
  22910. }
  22911. // GoString returns the string representation.
  22912. //
  22913. // API parameter values that are decorated as "sensitive" in the API will not
  22914. // be included in the string output. The member name will be present, but the
  22915. // value will be replaced with "sensitive".
  22916. func (s LambdaFunctionConfiguration) GoString() string {
  22917. return s.String()
  22918. }
  22919. // Validate inspects the fields of the type to determine if they are valid.
  22920. func (s *LambdaFunctionConfiguration) Validate() error {
  22921. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  22922. if s.Events == nil {
  22923. invalidParams.Add(request.NewErrParamRequired("Events"))
  22924. }
  22925. if s.LambdaFunctionArn == nil {
  22926. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  22927. }
  22928. if invalidParams.Len() > 0 {
  22929. return invalidParams
  22930. }
  22931. return nil
  22932. }
  22933. // SetEvents sets the Events field's value.
  22934. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  22935. s.Events = v
  22936. return s
  22937. }
  22938. // SetFilter sets the Filter field's value.
  22939. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  22940. s.Filter = v
  22941. return s
  22942. }
  22943. // SetId sets the Id field's value.
  22944. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  22945. s.Id = &v
  22946. return s
  22947. }
  22948. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  22949. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  22950. s.LambdaFunctionArn = &v
  22951. return s
  22952. }
  22953. // Container for lifecycle rules. You can add as many as 1000 rules.
  22954. type LifecycleConfiguration struct {
  22955. _ struct{} `type:"structure"`
  22956. // Specifies lifecycle configuration rules for an Amazon S3 bucket.
  22957. //
  22958. // Rules is a required field
  22959. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  22960. }
  22961. // String returns the string representation.
  22962. //
  22963. // API parameter values that are decorated as "sensitive" in the API will not
  22964. // be included in the string output. The member name will be present, but the
  22965. // value will be replaced with "sensitive".
  22966. func (s LifecycleConfiguration) String() string {
  22967. return awsutil.Prettify(s)
  22968. }
  22969. // GoString returns the string representation.
  22970. //
  22971. // API parameter values that are decorated as "sensitive" in the API will not
  22972. // be included in the string output. The member name will be present, but the
  22973. // value will be replaced with "sensitive".
  22974. func (s LifecycleConfiguration) GoString() string {
  22975. return s.String()
  22976. }
  22977. // Validate inspects the fields of the type to determine if they are valid.
  22978. func (s *LifecycleConfiguration) Validate() error {
  22979. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  22980. if s.Rules == nil {
  22981. invalidParams.Add(request.NewErrParamRequired("Rules"))
  22982. }
  22983. if s.Rules != nil {
  22984. for i, v := range s.Rules {
  22985. if v == nil {
  22986. continue
  22987. }
  22988. if err := v.Validate(); err != nil {
  22989. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  22990. }
  22991. }
  22992. }
  22993. if invalidParams.Len() > 0 {
  22994. return invalidParams
  22995. }
  22996. return nil
  22997. }
  22998. // SetRules sets the Rules field's value.
  22999. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  23000. s.Rules = v
  23001. return s
  23002. }
  23003. // Container for the expiration for the lifecycle of the object.
  23004. type LifecycleExpiration struct {
  23005. _ struct{} `type:"structure"`
  23006. // Indicates at what date the object is to be moved or deleted. Should be in
  23007. // GMT ISO 8601 Format.
  23008. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  23009. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  23010. // The value must be a non-zero positive integer.
  23011. Days *int64 `type:"integer"`
  23012. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  23013. // versions. If set to true, the delete marker will be expired; if set to false
  23014. // the policy takes no action. This cannot be specified with Days or Date in
  23015. // a Lifecycle Expiration Policy.
  23016. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  23017. }
  23018. // String returns the string representation.
  23019. //
  23020. // API parameter values that are decorated as "sensitive" in the API will not
  23021. // be included in the string output. The member name will be present, but the
  23022. // value will be replaced with "sensitive".
  23023. func (s LifecycleExpiration) String() string {
  23024. return awsutil.Prettify(s)
  23025. }
  23026. // GoString returns the string representation.
  23027. //
  23028. // API parameter values that are decorated as "sensitive" in the API will not
  23029. // be included in the string output. The member name will be present, but the
  23030. // value will be replaced with "sensitive".
  23031. func (s LifecycleExpiration) GoString() string {
  23032. return s.String()
  23033. }
  23034. // SetDate sets the Date field's value.
  23035. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  23036. s.Date = &v
  23037. return s
  23038. }
  23039. // SetDays sets the Days field's value.
  23040. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  23041. s.Days = &v
  23042. return s
  23043. }
  23044. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  23045. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  23046. s.ExpiredObjectDeleteMarker = &v
  23047. return s
  23048. }
  23049. // A lifecycle rule for individual objects in an Amazon S3 bucket.
  23050. type LifecycleRule struct {
  23051. _ struct{} `type:"structure"`
  23052. // Specifies the days since the initiation of an incomplete multipart upload
  23053. // that Amazon S3 will wait before permanently removing all parts of the upload.
  23054. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  23055. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
  23056. // in the Amazon S3 User Guide.
  23057. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  23058. // Specifies the expiration for the lifecycle of the object in the form of date,
  23059. // days and, whether the object has a delete marker.
  23060. Expiration *LifecycleExpiration `type:"structure"`
  23061. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  23062. // A Filter must have exactly one of Prefix, Tag, or And specified. Filter is
  23063. // required if the LifecycleRule does not contain a Prefix element.
  23064. Filter *LifecycleRuleFilter `type:"structure"`
  23065. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  23066. ID *string `type:"string"`
  23067. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  23068. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  23069. // configuration action on a bucket that has versioning enabled (or suspended)
  23070. // to request that Amazon S3 delete noncurrent object versions at a specific
  23071. // period in the object's lifetime.
  23072. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  23073. // Specifies the transition rule for the lifecycle rule that describes when
  23074. // noncurrent objects transition to a specific storage class. If your bucket
  23075. // is versioning-enabled (or versioning is suspended), you can set this action
  23076. // to request that Amazon S3 transition noncurrent object versions to a specific
  23077. // storage class at a set period in the object's lifetime.
  23078. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  23079. // Prefix identifying one or more objects to which the rule applies. This is
  23080. // no longer used; use Filter instead.
  23081. //
  23082. // Replacement must be made for object keys containing special characters (such
  23083. // as carriage returns) when using XML requests. For more information, see XML
  23084. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  23085. //
  23086. // Deprecated: Prefix has been deprecated
  23087. Prefix *string `deprecated:"true" type:"string"`
  23088. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  23089. // is not currently being applied.
  23090. //
  23091. // Status is a required field
  23092. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  23093. // Specifies when an Amazon S3 object transitions to a specified storage class.
  23094. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  23095. }
  23096. // String returns the string representation.
  23097. //
  23098. // API parameter values that are decorated as "sensitive" in the API will not
  23099. // be included in the string output. The member name will be present, but the
  23100. // value will be replaced with "sensitive".
  23101. func (s LifecycleRule) String() string {
  23102. return awsutil.Prettify(s)
  23103. }
  23104. // GoString returns the string representation.
  23105. //
  23106. // API parameter values that are decorated as "sensitive" in the API will not
  23107. // be included in the string output. The member name will be present, but the
  23108. // value will be replaced with "sensitive".
  23109. func (s LifecycleRule) GoString() string {
  23110. return s.String()
  23111. }
  23112. // Validate inspects the fields of the type to determine if they are valid.
  23113. func (s *LifecycleRule) Validate() error {
  23114. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  23115. if s.Status == nil {
  23116. invalidParams.Add(request.NewErrParamRequired("Status"))
  23117. }
  23118. if s.Filter != nil {
  23119. if err := s.Filter.Validate(); err != nil {
  23120. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  23121. }
  23122. }
  23123. if invalidParams.Len() > 0 {
  23124. return invalidParams
  23125. }
  23126. return nil
  23127. }
  23128. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  23129. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  23130. s.AbortIncompleteMultipartUpload = v
  23131. return s
  23132. }
  23133. // SetExpiration sets the Expiration field's value.
  23134. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  23135. s.Expiration = v
  23136. return s
  23137. }
  23138. // SetFilter sets the Filter field's value.
  23139. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  23140. s.Filter = v
  23141. return s
  23142. }
  23143. // SetID sets the ID field's value.
  23144. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  23145. s.ID = &v
  23146. return s
  23147. }
  23148. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  23149. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  23150. s.NoncurrentVersionExpiration = v
  23151. return s
  23152. }
  23153. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  23154. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  23155. s.NoncurrentVersionTransitions = v
  23156. return s
  23157. }
  23158. // SetPrefix sets the Prefix field's value.
  23159. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  23160. s.Prefix = &v
  23161. return s
  23162. }
  23163. // SetStatus sets the Status field's value.
  23164. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  23165. s.Status = &v
  23166. return s
  23167. }
  23168. // SetTransitions sets the Transitions field's value.
  23169. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  23170. s.Transitions = v
  23171. return s
  23172. }
  23173. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  23174. // more predicates. The Lifecycle Rule will apply to any object matching all
  23175. // of the predicates configured inside the And operator.
  23176. type LifecycleRuleAndOperator struct {
  23177. _ struct{} `type:"structure"`
  23178. // Minimum object size to which the rule applies.
  23179. ObjectSizeGreaterThan *int64 `type:"long"`
  23180. // Maximum object size to which the rule applies.
  23181. ObjectSizeLessThan *int64 `type:"long"`
  23182. // Prefix identifying one or more objects to which the rule applies.
  23183. Prefix *string `type:"string"`
  23184. // All of these tags must exist in the object's tag set in order for the rule
  23185. // to apply.
  23186. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  23187. }
  23188. // String returns the string representation.
  23189. //
  23190. // API parameter values that are decorated as "sensitive" in the API will not
  23191. // be included in the string output. The member name will be present, but the
  23192. // value will be replaced with "sensitive".
  23193. func (s LifecycleRuleAndOperator) String() string {
  23194. return awsutil.Prettify(s)
  23195. }
  23196. // GoString returns the string representation.
  23197. //
  23198. // API parameter values that are decorated as "sensitive" in the API will not
  23199. // be included in the string output. The member name will be present, but the
  23200. // value will be replaced with "sensitive".
  23201. func (s LifecycleRuleAndOperator) GoString() string {
  23202. return s.String()
  23203. }
  23204. // Validate inspects the fields of the type to determine if they are valid.
  23205. func (s *LifecycleRuleAndOperator) Validate() error {
  23206. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  23207. if s.Tags != nil {
  23208. for i, v := range s.Tags {
  23209. if v == nil {
  23210. continue
  23211. }
  23212. if err := v.Validate(); err != nil {
  23213. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  23214. }
  23215. }
  23216. }
  23217. if invalidParams.Len() > 0 {
  23218. return invalidParams
  23219. }
  23220. return nil
  23221. }
  23222. // SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
  23223. func (s *LifecycleRuleAndOperator) SetObjectSizeGreaterThan(v int64) *LifecycleRuleAndOperator {
  23224. s.ObjectSizeGreaterThan = &v
  23225. return s
  23226. }
  23227. // SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
  23228. func (s *LifecycleRuleAndOperator) SetObjectSizeLessThan(v int64) *LifecycleRuleAndOperator {
  23229. s.ObjectSizeLessThan = &v
  23230. return s
  23231. }
  23232. // SetPrefix sets the Prefix field's value.
  23233. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  23234. s.Prefix = &v
  23235. return s
  23236. }
  23237. // SetTags sets the Tags field's value.
  23238. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  23239. s.Tags = v
  23240. return s
  23241. }
  23242. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  23243. // A Filter must have exactly one of Prefix, Tag, or And specified.
  23244. type LifecycleRuleFilter struct {
  23245. _ struct{} `type:"structure"`
  23246. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  23247. // more predicates. The Lifecycle Rule will apply to any object matching all
  23248. // of the predicates configured inside the And operator.
  23249. And *LifecycleRuleAndOperator `type:"structure"`
  23250. // Minimum object size to which the rule applies.
  23251. ObjectSizeGreaterThan *int64 `type:"long"`
  23252. // Maximum object size to which the rule applies.
  23253. ObjectSizeLessThan *int64 `type:"long"`
  23254. // Prefix identifying one or more objects to which the rule applies.
  23255. //
  23256. // Replacement must be made for object keys containing special characters (such
  23257. // as carriage returns) when using XML requests. For more information, see XML
  23258. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  23259. Prefix *string `type:"string"`
  23260. // This tag must exist in the object's tag set in order for the rule to apply.
  23261. Tag *Tag `type:"structure"`
  23262. }
  23263. // String returns the string representation.
  23264. //
  23265. // API parameter values that are decorated as "sensitive" in the API will not
  23266. // be included in the string output. The member name will be present, but the
  23267. // value will be replaced with "sensitive".
  23268. func (s LifecycleRuleFilter) String() string {
  23269. return awsutil.Prettify(s)
  23270. }
  23271. // GoString returns the string representation.
  23272. //
  23273. // API parameter values that are decorated as "sensitive" in the API will not
  23274. // be included in the string output. The member name will be present, but the
  23275. // value will be replaced with "sensitive".
  23276. func (s LifecycleRuleFilter) GoString() string {
  23277. return s.String()
  23278. }
  23279. // Validate inspects the fields of the type to determine if they are valid.
  23280. func (s *LifecycleRuleFilter) Validate() error {
  23281. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  23282. if s.And != nil {
  23283. if err := s.And.Validate(); err != nil {
  23284. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  23285. }
  23286. }
  23287. if s.Tag != nil {
  23288. if err := s.Tag.Validate(); err != nil {
  23289. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  23290. }
  23291. }
  23292. if invalidParams.Len() > 0 {
  23293. return invalidParams
  23294. }
  23295. return nil
  23296. }
  23297. // SetAnd sets the And field's value.
  23298. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  23299. s.And = v
  23300. return s
  23301. }
  23302. // SetObjectSizeGreaterThan sets the ObjectSizeGreaterThan field's value.
  23303. func (s *LifecycleRuleFilter) SetObjectSizeGreaterThan(v int64) *LifecycleRuleFilter {
  23304. s.ObjectSizeGreaterThan = &v
  23305. return s
  23306. }
  23307. // SetObjectSizeLessThan sets the ObjectSizeLessThan field's value.
  23308. func (s *LifecycleRuleFilter) SetObjectSizeLessThan(v int64) *LifecycleRuleFilter {
  23309. s.ObjectSizeLessThan = &v
  23310. return s
  23311. }
  23312. // SetPrefix sets the Prefix field's value.
  23313. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  23314. s.Prefix = &v
  23315. return s
  23316. }
  23317. // SetTag sets the Tag field's value.
  23318. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  23319. s.Tag = v
  23320. return s
  23321. }
  23322. type ListBucketAnalyticsConfigurationsInput struct {
  23323. _ struct{} `locationName:"ListBucketAnalyticsConfigurationsRequest" type:"structure"`
  23324. // The name of the bucket from which analytics configurations are retrieved.
  23325. //
  23326. // Bucket is a required field
  23327. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  23328. // The ContinuationToken that represents a placeholder from where this request
  23329. // should begin.
  23330. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  23331. // The account ID of the expected bucket owner. If the bucket is owned by a
  23332. // different account, the request fails with the HTTP status code 403 Forbidden
  23333. // (access denied).
  23334. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  23335. }
  23336. // String returns the string representation.
  23337. //
  23338. // API parameter values that are decorated as "sensitive" in the API will not
  23339. // be included in the string output. The member name will be present, but the
  23340. // value will be replaced with "sensitive".
  23341. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  23342. return awsutil.Prettify(s)
  23343. }
  23344. // GoString returns the string representation.
  23345. //
  23346. // API parameter values that are decorated as "sensitive" in the API will not
  23347. // be included in the string output. The member name will be present, but the
  23348. // value will be replaced with "sensitive".
  23349. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  23350. return s.String()
  23351. }
  23352. // Validate inspects the fields of the type to determine if they are valid.
  23353. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  23354. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  23355. if s.Bucket == nil {
  23356. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  23357. }
  23358. if s.Bucket != nil && len(*s.Bucket) < 1 {
  23359. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  23360. }
  23361. if invalidParams.Len() > 0 {
  23362. return invalidParams
  23363. }
  23364. return nil
  23365. }
  23366. // SetBucket sets the Bucket field's value.
  23367. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  23368. s.Bucket = &v
  23369. return s
  23370. }
  23371. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  23372. if s.Bucket == nil {
  23373. return v
  23374. }
  23375. return *s.Bucket
  23376. }
  23377. // SetContinuationToken sets the ContinuationToken field's value.
  23378. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  23379. s.ContinuationToken = &v
  23380. return s
  23381. }
  23382. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  23383. func (s *ListBucketAnalyticsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketAnalyticsConfigurationsInput {
  23384. s.ExpectedBucketOwner = &v
  23385. return s
  23386. }
  23387. func (s *ListBucketAnalyticsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
  23388. if s.Bucket == nil {
  23389. return nil, fmt.Errorf("member Bucket is nil")
  23390. }
  23391. return parseEndpointARN(*s.Bucket)
  23392. }
  23393. func (s *ListBucketAnalyticsConfigurationsInput) hasEndpointARN() bool {
  23394. if s.Bucket == nil {
  23395. return false
  23396. }
  23397. return arn.IsARN(*s.Bucket)
  23398. }
  23399. // updateArnableField updates the value of the input field that
  23400. // takes an ARN as an input. This method is useful to backfill
  23401. // the parsed resource name from ARN into the input member.
  23402. // It returns a pointer to a modified copy of input and an error.
  23403. // Note that original input is not modified.
  23404. func (s ListBucketAnalyticsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
  23405. if s.Bucket == nil {
  23406. return nil, fmt.Errorf("member Bucket is nil")
  23407. }
  23408. s.Bucket = aws.String(v)
  23409. return &s, nil
  23410. }
  23411. type ListBucketAnalyticsConfigurationsOutput struct {
  23412. _ struct{} `type:"structure"`
  23413. // The list of analytics configurations for a bucket.
  23414. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  23415. // The marker that is used as a starting point for this analytics configuration
  23416. // list response. This value is present if it was sent in the request.
  23417. ContinuationToken *string `type:"string"`
  23418. // Indicates whether the returned list of analytics configurations is complete.
  23419. // A value of true indicates that the list is not complete and the NextContinuationToken
  23420. // will be provided for a subsequent request.
  23421. IsTruncated *bool `type:"boolean"`
  23422. // NextContinuationToken is sent when isTruncated is true, which indicates that
  23423. // there are more analytics configurations to list. The next request must include
  23424. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  23425. NextContinuationToken *string `type:"string"`
  23426. }
  23427. // String returns the string representation.
  23428. //
  23429. // API parameter values that are decorated as "sensitive" in the API will not
  23430. // be included in the string output. The member name will be present, but the
  23431. // value will be replaced with "sensitive".
  23432. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  23433. return awsutil.Prettify(s)
  23434. }
  23435. // GoString returns the string representation.
  23436. //
  23437. // API parameter values that are decorated as "sensitive" in the API will not
  23438. // be included in the string output. The member name will be present, but the
  23439. // value will be replaced with "sensitive".
  23440. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  23441. return s.String()
  23442. }
  23443. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  23444. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  23445. s.AnalyticsConfigurationList = v
  23446. return s
  23447. }
  23448. // SetContinuationToken sets the ContinuationToken field's value.
  23449. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  23450. s.ContinuationToken = &v
  23451. return s
  23452. }
  23453. // SetIsTruncated sets the IsTruncated field's value.
  23454. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  23455. s.IsTruncated = &v
  23456. return s
  23457. }
  23458. // SetNextContinuationToken sets the NextContinuationToken field's value.
  23459. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  23460. s.NextContinuationToken = &v
  23461. return s
  23462. }
  23463. type ListBucketIntelligentTieringConfigurationsInput struct {
  23464. _ struct{} `locationName:"ListBucketIntelligentTieringConfigurationsRequest" type:"structure"`
  23465. // The name of the Amazon S3 bucket whose configuration you want to modify or
  23466. // retrieve.
  23467. //
  23468. // Bucket is a required field
  23469. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  23470. // The ContinuationToken that represents a placeholder from where this request
  23471. // should begin.
  23472. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  23473. }
  23474. // String returns the string representation.
  23475. //
  23476. // API parameter values that are decorated as "sensitive" in the API will not
  23477. // be included in the string output. The member name will be present, but the
  23478. // value will be replaced with "sensitive".
  23479. func (s ListBucketIntelligentTieringConfigurationsInput) String() string {
  23480. return awsutil.Prettify(s)
  23481. }
  23482. // GoString returns the string representation.
  23483. //
  23484. // API parameter values that are decorated as "sensitive" in the API will not
  23485. // be included in the string output. The member name will be present, but the
  23486. // value will be replaced with "sensitive".
  23487. func (s ListBucketIntelligentTieringConfigurationsInput) GoString() string {
  23488. return s.String()
  23489. }
  23490. // Validate inspects the fields of the type to determine if they are valid.
  23491. func (s *ListBucketIntelligentTieringConfigurationsInput) Validate() error {
  23492. invalidParams := request.ErrInvalidParams{Context: "ListBucketIntelligentTieringConfigurationsInput"}
  23493. if s.Bucket == nil {
  23494. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  23495. }
  23496. if s.Bucket != nil && len(*s.Bucket) < 1 {
  23497. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  23498. }
  23499. if invalidParams.Len() > 0 {
  23500. return invalidParams
  23501. }
  23502. return nil
  23503. }
  23504. // SetBucket sets the Bucket field's value.
  23505. func (s *ListBucketIntelligentTieringConfigurationsInput) SetBucket(v string) *ListBucketIntelligentTieringConfigurationsInput {
  23506. s.Bucket = &v
  23507. return s
  23508. }
  23509. func (s *ListBucketIntelligentTieringConfigurationsInput) getBucket() (v string) {
  23510. if s.Bucket == nil {
  23511. return v
  23512. }
  23513. return *s.Bucket
  23514. }
  23515. // SetContinuationToken sets the ContinuationToken field's value.
  23516. func (s *ListBucketIntelligentTieringConfigurationsInput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsInput {
  23517. s.ContinuationToken = &v
  23518. return s
  23519. }
  23520. func (s *ListBucketIntelligentTieringConfigurationsInput) getEndpointARN() (arn.Resource, error) {
  23521. if s.Bucket == nil {
  23522. return nil, fmt.Errorf("member Bucket is nil")
  23523. }
  23524. return parseEndpointARN(*s.Bucket)
  23525. }
  23526. func (s *ListBucketIntelligentTieringConfigurationsInput) hasEndpointARN() bool {
  23527. if s.Bucket == nil {
  23528. return false
  23529. }
  23530. return arn.IsARN(*s.Bucket)
  23531. }
  23532. // updateArnableField updates the value of the input field that
  23533. // takes an ARN as an input. This method is useful to backfill
  23534. // the parsed resource name from ARN into the input member.
  23535. // It returns a pointer to a modified copy of input and an error.
  23536. // Note that original input is not modified.
  23537. func (s ListBucketIntelligentTieringConfigurationsInput) updateArnableField(v string) (interface{}, error) {
  23538. if s.Bucket == nil {
  23539. return nil, fmt.Errorf("member Bucket is nil")
  23540. }
  23541. s.Bucket = aws.String(v)
  23542. return &s, nil
  23543. }
  23544. type ListBucketIntelligentTieringConfigurationsOutput struct {
  23545. _ struct{} `type:"structure"`
  23546. // The ContinuationToken that represents a placeholder from where this request
  23547. // should begin.
  23548. ContinuationToken *string `type:"string"`
  23549. // The list of S3 Intelligent-Tiering configurations for a bucket.
  23550. IntelligentTieringConfigurationList []*IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"list" flattened:"true"`
  23551. // Indicates whether the returned list of analytics configurations is complete.
  23552. // A value of true indicates that the list is not complete and the NextContinuationToken
  23553. // will be provided for a subsequent request.
  23554. IsTruncated *bool `type:"boolean"`
  23555. // The marker used to continue this inventory configuration listing. Use the
  23556. // NextContinuationToken from this response to continue the listing in a subsequent
  23557. // request. The continuation token is an opaque value that Amazon S3 understands.
  23558. NextContinuationToken *string `type:"string"`
  23559. }
  23560. // String returns the string representation.
  23561. //
  23562. // API parameter values that are decorated as "sensitive" in the API will not
  23563. // be included in the string output. The member name will be present, but the
  23564. // value will be replaced with "sensitive".
  23565. func (s ListBucketIntelligentTieringConfigurationsOutput) String() string {
  23566. return awsutil.Prettify(s)
  23567. }
  23568. // GoString returns the string representation.
  23569. //
  23570. // API parameter values that are decorated as "sensitive" in the API will not
  23571. // be included in the string output. The member name will be present, but the
  23572. // value will be replaced with "sensitive".
  23573. func (s ListBucketIntelligentTieringConfigurationsOutput) GoString() string {
  23574. return s.String()
  23575. }
  23576. // SetContinuationToken sets the ContinuationToken field's value.
  23577. func (s *ListBucketIntelligentTieringConfigurationsOutput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
  23578. s.ContinuationToken = &v
  23579. return s
  23580. }
  23581. // SetIntelligentTieringConfigurationList sets the IntelligentTieringConfigurationList field's value.
  23582. func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIntelligentTieringConfigurationList(v []*IntelligentTieringConfiguration) *ListBucketIntelligentTieringConfigurationsOutput {
  23583. s.IntelligentTieringConfigurationList = v
  23584. return s
  23585. }
  23586. // SetIsTruncated sets the IsTruncated field's value.
  23587. func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIsTruncated(v bool) *ListBucketIntelligentTieringConfigurationsOutput {
  23588. s.IsTruncated = &v
  23589. return s
  23590. }
  23591. // SetNextContinuationToken sets the NextContinuationToken field's value.
  23592. func (s *ListBucketIntelligentTieringConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
  23593. s.NextContinuationToken = &v
  23594. return s
  23595. }
  23596. type ListBucketInventoryConfigurationsInput struct {
  23597. _ struct{} `locationName:"ListBucketInventoryConfigurationsRequest" type:"structure"`
  23598. // The name of the bucket containing the inventory configurations to retrieve.
  23599. //
  23600. // Bucket is a required field
  23601. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  23602. // The marker used to continue an inventory configuration listing that has been
  23603. // truncated. Use the NextContinuationToken from a previously truncated list
  23604. // response to continue the listing. The continuation token is an opaque value
  23605. // that Amazon S3 understands.
  23606. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  23607. // The account ID of the expected bucket owner. If the bucket is owned by a
  23608. // different account, the request fails with the HTTP status code 403 Forbidden
  23609. // (access denied).
  23610. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  23611. }
  23612. // String returns the string representation.
  23613. //
  23614. // API parameter values that are decorated as "sensitive" in the API will not
  23615. // be included in the string output. The member name will be present, but the
  23616. // value will be replaced with "sensitive".
  23617. func (s ListBucketInventoryConfigurationsInput) String() string {
  23618. return awsutil.Prettify(s)
  23619. }
  23620. // GoString returns the string representation.
  23621. //
  23622. // API parameter values that are decorated as "sensitive" in the API will not
  23623. // be included in the string output. The member name will be present, but the
  23624. // value will be replaced with "sensitive".
  23625. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  23626. return s.String()
  23627. }
  23628. // Validate inspects the fields of the type to determine if they are valid.
  23629. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  23630. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  23631. if s.Bucket == nil {
  23632. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  23633. }
  23634. if s.Bucket != nil && len(*s.Bucket) < 1 {
  23635. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  23636. }
  23637. if invalidParams.Len() > 0 {
  23638. return invalidParams
  23639. }
  23640. return nil
  23641. }
  23642. // SetBucket sets the Bucket field's value.
  23643. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  23644. s.Bucket = &v
  23645. return s
  23646. }
  23647. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  23648. if s.Bucket == nil {
  23649. return v
  23650. }
  23651. return *s.Bucket
  23652. }
  23653. // SetContinuationToken sets the ContinuationToken field's value.
  23654. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  23655. s.ContinuationToken = &v
  23656. return s
  23657. }
  23658. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  23659. func (s *ListBucketInventoryConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketInventoryConfigurationsInput {
  23660. s.ExpectedBucketOwner = &v
  23661. return s
  23662. }
  23663. func (s *ListBucketInventoryConfigurationsInput) getEndpointARN() (arn.Resource, error) {
  23664. if s.Bucket == nil {
  23665. return nil, fmt.Errorf("member Bucket is nil")
  23666. }
  23667. return parseEndpointARN(*s.Bucket)
  23668. }
  23669. func (s *ListBucketInventoryConfigurationsInput) hasEndpointARN() bool {
  23670. if s.Bucket == nil {
  23671. return false
  23672. }
  23673. return arn.IsARN(*s.Bucket)
  23674. }
  23675. // updateArnableField updates the value of the input field that
  23676. // takes an ARN as an input. This method is useful to backfill
  23677. // the parsed resource name from ARN into the input member.
  23678. // It returns a pointer to a modified copy of input and an error.
  23679. // Note that original input is not modified.
  23680. func (s ListBucketInventoryConfigurationsInput) updateArnableField(v string) (interface{}, error) {
  23681. if s.Bucket == nil {
  23682. return nil, fmt.Errorf("member Bucket is nil")
  23683. }
  23684. s.Bucket = aws.String(v)
  23685. return &s, nil
  23686. }
  23687. type ListBucketInventoryConfigurationsOutput struct {
  23688. _ struct{} `type:"structure"`
  23689. // If sent in the request, the marker that is used as a starting point for this
  23690. // inventory configuration list response.
  23691. ContinuationToken *string `type:"string"`
  23692. // The list of inventory configurations for a bucket.
  23693. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  23694. // Tells whether the returned list of inventory configurations is complete.
  23695. // A value of true indicates that the list is not complete and the NextContinuationToken
  23696. // is provided for a subsequent request.
  23697. IsTruncated *bool `type:"boolean"`
  23698. // The marker used to continue this inventory configuration listing. Use the
  23699. // NextContinuationToken from this response to continue the listing in a subsequent
  23700. // request. The continuation token is an opaque value that Amazon S3 understands.
  23701. NextContinuationToken *string `type:"string"`
  23702. }
  23703. // String returns the string representation.
  23704. //
  23705. // API parameter values that are decorated as "sensitive" in the API will not
  23706. // be included in the string output. The member name will be present, but the
  23707. // value will be replaced with "sensitive".
  23708. func (s ListBucketInventoryConfigurationsOutput) String() string {
  23709. return awsutil.Prettify(s)
  23710. }
  23711. // GoString returns the string representation.
  23712. //
  23713. // API parameter values that are decorated as "sensitive" in the API will not
  23714. // be included in the string output. The member name will be present, but the
  23715. // value will be replaced with "sensitive".
  23716. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  23717. return s.String()
  23718. }
  23719. // SetContinuationToken sets the ContinuationToken field's value.
  23720. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  23721. s.ContinuationToken = &v
  23722. return s
  23723. }
  23724. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  23725. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  23726. s.InventoryConfigurationList = v
  23727. return s
  23728. }
  23729. // SetIsTruncated sets the IsTruncated field's value.
  23730. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  23731. s.IsTruncated = &v
  23732. return s
  23733. }
  23734. // SetNextContinuationToken sets the NextContinuationToken field's value.
  23735. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  23736. s.NextContinuationToken = &v
  23737. return s
  23738. }
  23739. type ListBucketMetricsConfigurationsInput struct {
  23740. _ struct{} `locationName:"ListBucketMetricsConfigurationsRequest" type:"structure"`
  23741. // The name of the bucket containing the metrics configurations to retrieve.
  23742. //
  23743. // Bucket is a required field
  23744. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  23745. // The marker that is used to continue a metrics configuration listing that
  23746. // has been truncated. Use the NextContinuationToken from a previously truncated
  23747. // list response to continue the listing. The continuation token is an opaque
  23748. // value that Amazon S3 understands.
  23749. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  23750. // The account ID of the expected bucket owner. If the bucket is owned by a
  23751. // different account, the request fails with the HTTP status code 403 Forbidden
  23752. // (access denied).
  23753. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  23754. }
  23755. // String returns the string representation.
  23756. //
  23757. // API parameter values that are decorated as "sensitive" in the API will not
  23758. // be included in the string output. The member name will be present, but the
  23759. // value will be replaced with "sensitive".
  23760. func (s ListBucketMetricsConfigurationsInput) String() string {
  23761. return awsutil.Prettify(s)
  23762. }
  23763. // GoString returns the string representation.
  23764. //
  23765. // API parameter values that are decorated as "sensitive" in the API will not
  23766. // be included in the string output. The member name will be present, but the
  23767. // value will be replaced with "sensitive".
  23768. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  23769. return s.String()
  23770. }
  23771. // Validate inspects the fields of the type to determine if they are valid.
  23772. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  23773. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  23774. if s.Bucket == nil {
  23775. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  23776. }
  23777. if s.Bucket != nil && len(*s.Bucket) < 1 {
  23778. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  23779. }
  23780. if invalidParams.Len() > 0 {
  23781. return invalidParams
  23782. }
  23783. return nil
  23784. }
  23785. // SetBucket sets the Bucket field's value.
  23786. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  23787. s.Bucket = &v
  23788. return s
  23789. }
  23790. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  23791. if s.Bucket == nil {
  23792. return v
  23793. }
  23794. return *s.Bucket
  23795. }
  23796. // SetContinuationToken sets the ContinuationToken field's value.
  23797. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  23798. s.ContinuationToken = &v
  23799. return s
  23800. }
  23801. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  23802. func (s *ListBucketMetricsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketMetricsConfigurationsInput {
  23803. s.ExpectedBucketOwner = &v
  23804. return s
  23805. }
  23806. func (s *ListBucketMetricsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
  23807. if s.Bucket == nil {
  23808. return nil, fmt.Errorf("member Bucket is nil")
  23809. }
  23810. return parseEndpointARN(*s.Bucket)
  23811. }
  23812. func (s *ListBucketMetricsConfigurationsInput) hasEndpointARN() bool {
  23813. if s.Bucket == nil {
  23814. return false
  23815. }
  23816. return arn.IsARN(*s.Bucket)
  23817. }
  23818. // updateArnableField updates the value of the input field that
  23819. // takes an ARN as an input. This method is useful to backfill
  23820. // the parsed resource name from ARN into the input member.
  23821. // It returns a pointer to a modified copy of input and an error.
  23822. // Note that original input is not modified.
  23823. func (s ListBucketMetricsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
  23824. if s.Bucket == nil {
  23825. return nil, fmt.Errorf("member Bucket is nil")
  23826. }
  23827. s.Bucket = aws.String(v)
  23828. return &s, nil
  23829. }
  23830. type ListBucketMetricsConfigurationsOutput struct {
  23831. _ struct{} `type:"structure"`
  23832. // The marker that is used as a starting point for this metrics configuration
  23833. // list response. This value is present if it was sent in the request.
  23834. ContinuationToken *string `type:"string"`
  23835. // Indicates whether the returned list of metrics configurations is complete.
  23836. // A value of true indicates that the list is not complete and the NextContinuationToken
  23837. // will be provided for a subsequent request.
  23838. IsTruncated *bool `type:"boolean"`
  23839. // The list of metrics configurations for a bucket.
  23840. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  23841. // The marker used to continue a metrics configuration listing that has been
  23842. // truncated. Use the NextContinuationToken from a previously truncated list
  23843. // response to continue the listing. The continuation token is an opaque value
  23844. // that Amazon S3 understands.
  23845. NextContinuationToken *string `type:"string"`
  23846. }
  23847. // String returns the string representation.
  23848. //
  23849. // API parameter values that are decorated as "sensitive" in the API will not
  23850. // be included in the string output. The member name will be present, but the
  23851. // value will be replaced with "sensitive".
  23852. func (s ListBucketMetricsConfigurationsOutput) String() string {
  23853. return awsutil.Prettify(s)
  23854. }
  23855. // GoString returns the string representation.
  23856. //
  23857. // API parameter values that are decorated as "sensitive" in the API will not
  23858. // be included in the string output. The member name will be present, but the
  23859. // value will be replaced with "sensitive".
  23860. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  23861. return s.String()
  23862. }
  23863. // SetContinuationToken sets the ContinuationToken field's value.
  23864. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  23865. s.ContinuationToken = &v
  23866. return s
  23867. }
  23868. // SetIsTruncated sets the IsTruncated field's value.
  23869. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  23870. s.IsTruncated = &v
  23871. return s
  23872. }
  23873. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  23874. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  23875. s.MetricsConfigurationList = v
  23876. return s
  23877. }
  23878. // SetNextContinuationToken sets the NextContinuationToken field's value.
  23879. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  23880. s.NextContinuationToken = &v
  23881. return s
  23882. }
  23883. type ListBucketsInput struct {
  23884. _ struct{} `type:"structure"`
  23885. }
  23886. // String returns the string representation.
  23887. //
  23888. // API parameter values that are decorated as "sensitive" in the API will not
  23889. // be included in the string output. The member name will be present, but the
  23890. // value will be replaced with "sensitive".
  23891. func (s ListBucketsInput) String() string {
  23892. return awsutil.Prettify(s)
  23893. }
  23894. // GoString returns the string representation.
  23895. //
  23896. // API parameter values that are decorated as "sensitive" in the API will not
  23897. // be included in the string output. The member name will be present, but the
  23898. // value will be replaced with "sensitive".
  23899. func (s ListBucketsInput) GoString() string {
  23900. return s.String()
  23901. }
  23902. type ListBucketsOutput struct {
  23903. _ struct{} `type:"structure"`
  23904. // The list of buckets owned by the requester.
  23905. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  23906. // The owner of the buckets listed.
  23907. Owner *Owner `type:"structure"`
  23908. }
  23909. // String returns the string representation.
  23910. //
  23911. // API parameter values that are decorated as "sensitive" in the API will not
  23912. // be included in the string output. The member name will be present, but the
  23913. // value will be replaced with "sensitive".
  23914. func (s ListBucketsOutput) String() string {
  23915. return awsutil.Prettify(s)
  23916. }
  23917. // GoString returns the string representation.
  23918. //
  23919. // API parameter values that are decorated as "sensitive" in the API will not
  23920. // be included in the string output. The member name will be present, but the
  23921. // value will be replaced with "sensitive".
  23922. func (s ListBucketsOutput) GoString() string {
  23923. return s.String()
  23924. }
  23925. // SetBuckets sets the Buckets field's value.
  23926. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  23927. s.Buckets = v
  23928. return s
  23929. }
  23930. // SetOwner sets the Owner field's value.
  23931. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  23932. s.Owner = v
  23933. return s
  23934. }
  23935. type ListMultipartUploadsInput struct {
  23936. _ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"`
  23937. // The name of the bucket to which the multipart upload was initiated.
  23938. //
  23939. // When using this action with an access point, you must direct requests to
  23940. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  23941. // When using this action with an access point through the Amazon Web Services
  23942. // SDKs, you provide the access point ARN in place of the bucket name. For more
  23943. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  23944. // in the Amazon S3 User Guide.
  23945. //
  23946. // When using this action with Amazon S3 on Outposts, you must direct requests
  23947. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  23948. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  23949. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  23950. // you provide the Outposts bucket ARN in place of the bucket name. For more
  23951. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  23952. // in the Amazon S3 User Guide.
  23953. //
  23954. // Bucket is a required field
  23955. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  23956. // Character you use to group keys.
  23957. //
  23958. // All keys that contain the same string between the prefix, if specified, and
  23959. // the first occurrence of the delimiter after the prefix are grouped under
  23960. // a single result element, CommonPrefixes. If you don't specify the prefix
  23961. // parameter, then the substring starts at the beginning of the key. The keys
  23962. // that are grouped under CommonPrefixes result element are not returned elsewhere
  23963. // in the response.
  23964. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  23965. // Requests Amazon S3 to encode the object keys in the response and specifies
  23966. // the encoding method to use. An object key may contain any Unicode character;
  23967. // however, XML 1.0 parser cannot parse some characters, such as characters
  23968. // with an ASCII value from 0 to 10. For characters that are not supported in
  23969. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  23970. // keys in the response.
  23971. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  23972. // The account ID of the expected bucket owner. If the bucket is owned by a
  23973. // different account, the request fails with the HTTP status code 403 Forbidden
  23974. // (access denied).
  23975. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  23976. // Together with upload-id-marker, this parameter specifies the multipart upload
  23977. // after which listing should begin.
  23978. //
  23979. // If upload-id-marker is not specified, only the keys lexicographically greater
  23980. // than the specified key-marker will be included in the list.
  23981. //
  23982. // If upload-id-marker is specified, any multipart uploads for a key equal to
  23983. // the key-marker might also be included, provided those multipart uploads have
  23984. // upload IDs lexicographically greater than the specified upload-id-marker.
  23985. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  23986. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  23987. // in the response body. 1,000 is the maximum number of uploads that can be
  23988. // returned in a response.
  23989. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  23990. // Lists in-progress uploads only for those keys that begin with the specified
  23991. // prefix. You can use prefixes to separate a bucket into different grouping
  23992. // of keys. (You can think of using prefix to make groups in the same way you'd
  23993. // use a folder in a file system.)
  23994. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  23995. // Together with key-marker, specifies the multipart upload after which listing
  23996. // should begin. If key-marker is not specified, the upload-id-marker parameter
  23997. // is ignored. Otherwise, any multipart uploads for a key equal to the key-marker
  23998. // might be included in the list only if they have an upload ID lexicographically
  23999. // greater than the specified upload-id-marker.
  24000. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  24001. }
  24002. // String returns the string representation.
  24003. //
  24004. // API parameter values that are decorated as "sensitive" in the API will not
  24005. // be included in the string output. The member name will be present, but the
  24006. // value will be replaced with "sensitive".
  24007. func (s ListMultipartUploadsInput) String() string {
  24008. return awsutil.Prettify(s)
  24009. }
  24010. // GoString returns the string representation.
  24011. //
  24012. // API parameter values that are decorated as "sensitive" in the API will not
  24013. // be included in the string output. The member name will be present, but the
  24014. // value will be replaced with "sensitive".
  24015. func (s ListMultipartUploadsInput) GoString() string {
  24016. return s.String()
  24017. }
  24018. // Validate inspects the fields of the type to determine if they are valid.
  24019. func (s *ListMultipartUploadsInput) Validate() error {
  24020. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  24021. if s.Bucket == nil {
  24022. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  24023. }
  24024. if s.Bucket != nil && len(*s.Bucket) < 1 {
  24025. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  24026. }
  24027. if invalidParams.Len() > 0 {
  24028. return invalidParams
  24029. }
  24030. return nil
  24031. }
  24032. // SetBucket sets the Bucket field's value.
  24033. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  24034. s.Bucket = &v
  24035. return s
  24036. }
  24037. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  24038. if s.Bucket == nil {
  24039. return v
  24040. }
  24041. return *s.Bucket
  24042. }
  24043. // SetDelimiter sets the Delimiter field's value.
  24044. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  24045. s.Delimiter = &v
  24046. return s
  24047. }
  24048. // SetEncodingType sets the EncodingType field's value.
  24049. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  24050. s.EncodingType = &v
  24051. return s
  24052. }
  24053. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  24054. func (s *ListMultipartUploadsInput) SetExpectedBucketOwner(v string) *ListMultipartUploadsInput {
  24055. s.ExpectedBucketOwner = &v
  24056. return s
  24057. }
  24058. // SetKeyMarker sets the KeyMarker field's value.
  24059. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  24060. s.KeyMarker = &v
  24061. return s
  24062. }
  24063. // SetMaxUploads sets the MaxUploads field's value.
  24064. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  24065. s.MaxUploads = &v
  24066. return s
  24067. }
  24068. // SetPrefix sets the Prefix field's value.
  24069. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  24070. s.Prefix = &v
  24071. return s
  24072. }
  24073. // SetUploadIdMarker sets the UploadIdMarker field's value.
  24074. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  24075. s.UploadIdMarker = &v
  24076. return s
  24077. }
  24078. func (s *ListMultipartUploadsInput) getEndpointARN() (arn.Resource, error) {
  24079. if s.Bucket == nil {
  24080. return nil, fmt.Errorf("member Bucket is nil")
  24081. }
  24082. return parseEndpointARN(*s.Bucket)
  24083. }
  24084. func (s *ListMultipartUploadsInput) hasEndpointARN() bool {
  24085. if s.Bucket == nil {
  24086. return false
  24087. }
  24088. return arn.IsARN(*s.Bucket)
  24089. }
  24090. // updateArnableField updates the value of the input field that
  24091. // takes an ARN as an input. This method is useful to backfill
  24092. // the parsed resource name from ARN into the input member.
  24093. // It returns a pointer to a modified copy of input and an error.
  24094. // Note that original input is not modified.
  24095. func (s ListMultipartUploadsInput) updateArnableField(v string) (interface{}, error) {
  24096. if s.Bucket == nil {
  24097. return nil, fmt.Errorf("member Bucket is nil")
  24098. }
  24099. s.Bucket = aws.String(v)
  24100. return &s, nil
  24101. }
  24102. type ListMultipartUploadsOutput struct {
  24103. _ struct{} `type:"structure"`
  24104. // The name of the bucket to which the multipart upload was initiated. Does
  24105. // not return the access point ARN or access point alias if used.
  24106. Bucket *string `type:"string"`
  24107. // If you specify a delimiter in the request, then the result returns each distinct
  24108. // key prefix containing the delimiter in a CommonPrefixes element. The distinct
  24109. // key prefixes are returned in the Prefix child element.
  24110. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  24111. // Contains the delimiter you specified in the request. If you don't specify
  24112. // a delimiter in your request, this element is absent from the response.
  24113. Delimiter *string `type:"string"`
  24114. // Encoding type used by Amazon S3 to encode object keys in the response.
  24115. //
  24116. // If you specify encoding-type request parameter, Amazon S3 includes this element
  24117. // in the response, and returns encoded key name values in the following response
  24118. // elements:
  24119. //
  24120. // Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.
  24121. EncodingType *string `type:"string" enum:"EncodingType"`
  24122. // Indicates whether the returned list of multipart uploads is truncated. A
  24123. // value of true indicates that the list was truncated. The list can be truncated
  24124. // if the number of multipart uploads exceeds the limit allowed or specified
  24125. // by max uploads.
  24126. IsTruncated *bool `type:"boolean"`
  24127. // The key at or after which the listing began.
  24128. KeyMarker *string `type:"string"`
  24129. // Maximum number of multipart uploads that could have been included in the
  24130. // response.
  24131. MaxUploads *int64 `type:"integer"`
  24132. // When a list is truncated, this element specifies the value that should be
  24133. // used for the key-marker request parameter in a subsequent request.
  24134. NextKeyMarker *string `type:"string"`
  24135. // When a list is truncated, this element specifies the value that should be
  24136. // used for the upload-id-marker request parameter in a subsequent request.
  24137. NextUploadIdMarker *string `type:"string"`
  24138. // When a prefix is provided in the request, this field contains the specified
  24139. // prefix. The result contains only keys starting with the specified prefix.
  24140. Prefix *string `type:"string"`
  24141. // Upload ID after which listing began.
  24142. UploadIdMarker *string `type:"string"`
  24143. // Container for elements related to a particular multipart upload. A response
  24144. // can contain zero or more Upload elements.
  24145. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  24146. }
  24147. // String returns the string representation.
  24148. //
  24149. // API parameter values that are decorated as "sensitive" in the API will not
  24150. // be included in the string output. The member name will be present, but the
  24151. // value will be replaced with "sensitive".
  24152. func (s ListMultipartUploadsOutput) String() string {
  24153. return awsutil.Prettify(s)
  24154. }
  24155. // GoString returns the string representation.
  24156. //
  24157. // API parameter values that are decorated as "sensitive" in the API will not
  24158. // be included in the string output. The member name will be present, but the
  24159. // value will be replaced with "sensitive".
  24160. func (s ListMultipartUploadsOutput) GoString() string {
  24161. return s.String()
  24162. }
  24163. // SetBucket sets the Bucket field's value.
  24164. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  24165. s.Bucket = &v
  24166. return s
  24167. }
  24168. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  24169. if s.Bucket == nil {
  24170. return v
  24171. }
  24172. return *s.Bucket
  24173. }
  24174. // SetCommonPrefixes sets the CommonPrefixes field's value.
  24175. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  24176. s.CommonPrefixes = v
  24177. return s
  24178. }
  24179. // SetDelimiter sets the Delimiter field's value.
  24180. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  24181. s.Delimiter = &v
  24182. return s
  24183. }
  24184. // SetEncodingType sets the EncodingType field's value.
  24185. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  24186. s.EncodingType = &v
  24187. return s
  24188. }
  24189. // SetIsTruncated sets the IsTruncated field's value.
  24190. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  24191. s.IsTruncated = &v
  24192. return s
  24193. }
  24194. // SetKeyMarker sets the KeyMarker field's value.
  24195. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  24196. s.KeyMarker = &v
  24197. return s
  24198. }
  24199. // SetMaxUploads sets the MaxUploads field's value.
  24200. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  24201. s.MaxUploads = &v
  24202. return s
  24203. }
  24204. // SetNextKeyMarker sets the NextKeyMarker field's value.
  24205. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  24206. s.NextKeyMarker = &v
  24207. return s
  24208. }
  24209. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  24210. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  24211. s.NextUploadIdMarker = &v
  24212. return s
  24213. }
  24214. // SetPrefix sets the Prefix field's value.
  24215. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  24216. s.Prefix = &v
  24217. return s
  24218. }
  24219. // SetUploadIdMarker sets the UploadIdMarker field's value.
  24220. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  24221. s.UploadIdMarker = &v
  24222. return s
  24223. }
  24224. // SetUploads sets the Uploads field's value.
  24225. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  24226. s.Uploads = v
  24227. return s
  24228. }
  24229. type ListObjectVersionsInput struct {
  24230. _ struct{} `locationName:"ListObjectVersionsRequest" type:"structure"`
  24231. // The bucket name that contains the objects.
  24232. //
  24233. // Bucket is a required field
  24234. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  24235. // A delimiter is a character that you specify to group keys. All keys that
  24236. // contain the same string between the prefix and the first occurrence of the
  24237. // delimiter are grouped under a single result element in CommonPrefixes. These
  24238. // groups are counted as one result against the max-keys limitation. These keys
  24239. // are not returned elsewhere in the response.
  24240. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  24241. // Requests Amazon S3 to encode the object keys in the response and specifies
  24242. // the encoding method to use. An object key may contain any Unicode character;
  24243. // however, XML 1.0 parser cannot parse some characters, such as characters
  24244. // with an ASCII value from 0 to 10. For characters that are not supported in
  24245. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  24246. // keys in the response.
  24247. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  24248. // The account ID of the expected bucket owner. If the bucket is owned by a
  24249. // different account, the request fails with the HTTP status code 403 Forbidden
  24250. // (access denied).
  24251. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  24252. // Specifies the key to start with when listing objects in a bucket.
  24253. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  24254. // Sets the maximum number of keys returned in the response. By default the
  24255. // action returns up to 1,000 key names. The response might contain fewer keys
  24256. // but will never contain more. If additional keys satisfy the search criteria,
  24257. // but were not returned because max-keys was exceeded, the response contains
  24258. // <isTruncated>true</isTruncated>. To return the additional keys, see key-marker
  24259. // and version-id-marker.
  24260. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  24261. // Use this parameter to select only those keys that begin with the specified
  24262. // prefix. You can use prefixes to separate a bucket into different groupings
  24263. // of keys. (You can think of using prefix to make groups in the same way you'd
  24264. // use a folder in a file system.) You can use prefix with delimiter to roll
  24265. // up numerous objects into a single result under CommonPrefixes.
  24266. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  24267. // Specifies the object version you want to start listing from.
  24268. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  24269. }
  24270. // String returns the string representation.
  24271. //
  24272. // API parameter values that are decorated as "sensitive" in the API will not
  24273. // be included in the string output. The member name will be present, but the
  24274. // value will be replaced with "sensitive".
  24275. func (s ListObjectVersionsInput) String() string {
  24276. return awsutil.Prettify(s)
  24277. }
  24278. // GoString returns the string representation.
  24279. //
  24280. // API parameter values that are decorated as "sensitive" in the API will not
  24281. // be included in the string output. The member name will be present, but the
  24282. // value will be replaced with "sensitive".
  24283. func (s ListObjectVersionsInput) GoString() string {
  24284. return s.String()
  24285. }
  24286. // Validate inspects the fields of the type to determine if they are valid.
  24287. func (s *ListObjectVersionsInput) Validate() error {
  24288. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  24289. if s.Bucket == nil {
  24290. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  24291. }
  24292. if s.Bucket != nil && len(*s.Bucket) < 1 {
  24293. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  24294. }
  24295. if invalidParams.Len() > 0 {
  24296. return invalidParams
  24297. }
  24298. return nil
  24299. }
  24300. // SetBucket sets the Bucket field's value.
  24301. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  24302. s.Bucket = &v
  24303. return s
  24304. }
  24305. func (s *ListObjectVersionsInput) getBucket() (v string) {
  24306. if s.Bucket == nil {
  24307. return v
  24308. }
  24309. return *s.Bucket
  24310. }
  24311. // SetDelimiter sets the Delimiter field's value.
  24312. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  24313. s.Delimiter = &v
  24314. return s
  24315. }
  24316. // SetEncodingType sets the EncodingType field's value.
  24317. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  24318. s.EncodingType = &v
  24319. return s
  24320. }
  24321. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  24322. func (s *ListObjectVersionsInput) SetExpectedBucketOwner(v string) *ListObjectVersionsInput {
  24323. s.ExpectedBucketOwner = &v
  24324. return s
  24325. }
  24326. // SetKeyMarker sets the KeyMarker field's value.
  24327. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  24328. s.KeyMarker = &v
  24329. return s
  24330. }
  24331. // SetMaxKeys sets the MaxKeys field's value.
  24332. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  24333. s.MaxKeys = &v
  24334. return s
  24335. }
  24336. // SetPrefix sets the Prefix field's value.
  24337. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  24338. s.Prefix = &v
  24339. return s
  24340. }
  24341. // SetVersionIdMarker sets the VersionIdMarker field's value.
  24342. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  24343. s.VersionIdMarker = &v
  24344. return s
  24345. }
  24346. func (s *ListObjectVersionsInput) getEndpointARN() (arn.Resource, error) {
  24347. if s.Bucket == nil {
  24348. return nil, fmt.Errorf("member Bucket is nil")
  24349. }
  24350. return parseEndpointARN(*s.Bucket)
  24351. }
  24352. func (s *ListObjectVersionsInput) hasEndpointARN() bool {
  24353. if s.Bucket == nil {
  24354. return false
  24355. }
  24356. return arn.IsARN(*s.Bucket)
  24357. }
  24358. // updateArnableField updates the value of the input field that
  24359. // takes an ARN as an input. This method is useful to backfill
  24360. // the parsed resource name from ARN into the input member.
  24361. // It returns a pointer to a modified copy of input and an error.
  24362. // Note that original input is not modified.
  24363. func (s ListObjectVersionsInput) updateArnableField(v string) (interface{}, error) {
  24364. if s.Bucket == nil {
  24365. return nil, fmt.Errorf("member Bucket is nil")
  24366. }
  24367. s.Bucket = aws.String(v)
  24368. return &s, nil
  24369. }
  24370. type ListObjectVersionsOutput struct {
  24371. _ struct{} `type:"structure"`
  24372. // All of the keys rolled up into a common prefix count as a single return when
  24373. // calculating the number of returns.
  24374. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  24375. // Container for an object that is a delete marker.
  24376. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  24377. // The delimiter grouping the included keys. A delimiter is a character that
  24378. // you specify to group keys. All keys that contain the same string between
  24379. // the prefix and the first occurrence of the delimiter are grouped under a
  24380. // single result element in CommonPrefixes. These groups are counted as one
  24381. // result against the max-keys limitation. These keys are not returned elsewhere
  24382. // in the response.
  24383. Delimiter *string `type:"string"`
  24384. // Encoding type used by Amazon S3 to encode object key names in the XML response.
  24385. //
  24386. // If you specify encoding-type request parameter, Amazon S3 includes this element
  24387. // in the response, and returns encoded key name values in the following response
  24388. // elements:
  24389. //
  24390. // KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.
  24391. EncodingType *string `type:"string" enum:"EncodingType"`
  24392. // A flag that indicates whether Amazon S3 returned all of the results that
  24393. // satisfied the search criteria. If your results were truncated, you can make
  24394. // a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  24395. // response parameters as a starting place in another request to return the
  24396. // rest of the results.
  24397. IsTruncated *bool `type:"boolean"`
  24398. // Marks the last key returned in a truncated response.
  24399. KeyMarker *string `type:"string"`
  24400. // Specifies the maximum number of objects to return.
  24401. MaxKeys *int64 `type:"integer"`
  24402. // The bucket name.
  24403. Name *string `type:"string"`
  24404. // When the number of responses exceeds the value of MaxKeys, NextKeyMarker
  24405. // specifies the first key not returned that satisfies the search criteria.
  24406. // Use this value for the key-marker request parameter in a subsequent request.
  24407. NextKeyMarker *string `type:"string"`
  24408. // When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker
  24409. // specifies the first object version not returned that satisfies the search
  24410. // criteria. Use this value for the version-id-marker request parameter in a
  24411. // subsequent request.
  24412. NextVersionIdMarker *string `type:"string"`
  24413. // Selects objects that start with the value supplied by this parameter.
  24414. Prefix *string `type:"string"`
  24415. // Marks the last version of the key returned in a truncated response.
  24416. VersionIdMarker *string `type:"string"`
  24417. // Container for version information.
  24418. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  24419. }
  24420. // String returns the string representation.
  24421. //
  24422. // API parameter values that are decorated as "sensitive" in the API will not
  24423. // be included in the string output. The member name will be present, but the
  24424. // value will be replaced with "sensitive".
  24425. func (s ListObjectVersionsOutput) String() string {
  24426. return awsutil.Prettify(s)
  24427. }
  24428. // GoString returns the string representation.
  24429. //
  24430. // API parameter values that are decorated as "sensitive" in the API will not
  24431. // be included in the string output. The member name will be present, but the
  24432. // value will be replaced with "sensitive".
  24433. func (s ListObjectVersionsOutput) GoString() string {
  24434. return s.String()
  24435. }
  24436. // SetCommonPrefixes sets the CommonPrefixes field's value.
  24437. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  24438. s.CommonPrefixes = v
  24439. return s
  24440. }
  24441. // SetDeleteMarkers sets the DeleteMarkers field's value.
  24442. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  24443. s.DeleteMarkers = v
  24444. return s
  24445. }
  24446. // SetDelimiter sets the Delimiter field's value.
  24447. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  24448. s.Delimiter = &v
  24449. return s
  24450. }
  24451. // SetEncodingType sets the EncodingType field's value.
  24452. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  24453. s.EncodingType = &v
  24454. return s
  24455. }
  24456. // SetIsTruncated sets the IsTruncated field's value.
  24457. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  24458. s.IsTruncated = &v
  24459. return s
  24460. }
  24461. // SetKeyMarker sets the KeyMarker field's value.
  24462. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  24463. s.KeyMarker = &v
  24464. return s
  24465. }
  24466. // SetMaxKeys sets the MaxKeys field's value.
  24467. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  24468. s.MaxKeys = &v
  24469. return s
  24470. }
  24471. // SetName sets the Name field's value.
  24472. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  24473. s.Name = &v
  24474. return s
  24475. }
  24476. // SetNextKeyMarker sets the NextKeyMarker field's value.
  24477. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  24478. s.NextKeyMarker = &v
  24479. return s
  24480. }
  24481. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  24482. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  24483. s.NextVersionIdMarker = &v
  24484. return s
  24485. }
  24486. // SetPrefix sets the Prefix field's value.
  24487. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  24488. s.Prefix = &v
  24489. return s
  24490. }
  24491. // SetVersionIdMarker sets the VersionIdMarker field's value.
  24492. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  24493. s.VersionIdMarker = &v
  24494. return s
  24495. }
  24496. // SetVersions sets the Versions field's value.
  24497. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  24498. s.Versions = v
  24499. return s
  24500. }
  24501. type ListObjectsInput struct {
  24502. _ struct{} `locationName:"ListObjectsRequest" type:"structure"`
  24503. // The name of the bucket containing the objects.
  24504. //
  24505. // When using this action with an access point, you must direct requests to
  24506. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  24507. // When using this action with an access point through the Amazon Web Services
  24508. // SDKs, you provide the access point ARN in place of the bucket name. For more
  24509. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  24510. // in the Amazon S3 User Guide.
  24511. //
  24512. // When using this action with Amazon S3 on Outposts, you must direct requests
  24513. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  24514. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  24515. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  24516. // you provide the Outposts bucket ARN in place of the bucket name. For more
  24517. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  24518. // in the Amazon S3 User Guide.
  24519. //
  24520. // Bucket is a required field
  24521. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  24522. // A delimiter is a character you use to group keys.
  24523. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  24524. // Requests Amazon S3 to encode the object keys in the response and specifies
  24525. // the encoding method to use. An object key may contain any Unicode character;
  24526. // however, XML 1.0 parser cannot parse some characters, such as characters
  24527. // with an ASCII value from 0 to 10. For characters that are not supported in
  24528. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  24529. // keys in the response.
  24530. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  24531. // The account ID of the expected bucket owner. If the bucket is owned by a
  24532. // different account, the request fails with the HTTP status code 403 Forbidden
  24533. // (access denied).
  24534. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  24535. // Marker is where you want Amazon S3 to start listing from. Amazon S3 starts
  24536. // listing after this specified key. Marker can be any key in the bucket.
  24537. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  24538. // Sets the maximum number of keys returned in the response. By default the
  24539. // action returns up to 1,000 key names. The response might contain fewer keys
  24540. // but will never contain more.
  24541. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  24542. // Limits the response to keys that begin with the specified prefix.
  24543. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  24544. // Confirms that the requester knows that she or he will be charged for the
  24545. // list objects request. Bucket owners need not specify this parameter in their
  24546. // requests.
  24547. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  24548. }
  24549. // String returns the string representation.
  24550. //
  24551. // API parameter values that are decorated as "sensitive" in the API will not
  24552. // be included in the string output. The member name will be present, but the
  24553. // value will be replaced with "sensitive".
  24554. func (s ListObjectsInput) String() string {
  24555. return awsutil.Prettify(s)
  24556. }
  24557. // GoString returns the string representation.
  24558. //
  24559. // API parameter values that are decorated as "sensitive" in the API will not
  24560. // be included in the string output. The member name will be present, but the
  24561. // value will be replaced with "sensitive".
  24562. func (s ListObjectsInput) GoString() string {
  24563. return s.String()
  24564. }
  24565. // Validate inspects the fields of the type to determine if they are valid.
  24566. func (s *ListObjectsInput) Validate() error {
  24567. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  24568. if s.Bucket == nil {
  24569. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  24570. }
  24571. if s.Bucket != nil && len(*s.Bucket) < 1 {
  24572. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  24573. }
  24574. if invalidParams.Len() > 0 {
  24575. return invalidParams
  24576. }
  24577. return nil
  24578. }
  24579. // SetBucket sets the Bucket field's value.
  24580. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  24581. s.Bucket = &v
  24582. return s
  24583. }
  24584. func (s *ListObjectsInput) getBucket() (v string) {
  24585. if s.Bucket == nil {
  24586. return v
  24587. }
  24588. return *s.Bucket
  24589. }
  24590. // SetDelimiter sets the Delimiter field's value.
  24591. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  24592. s.Delimiter = &v
  24593. return s
  24594. }
  24595. // SetEncodingType sets the EncodingType field's value.
  24596. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  24597. s.EncodingType = &v
  24598. return s
  24599. }
  24600. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  24601. func (s *ListObjectsInput) SetExpectedBucketOwner(v string) *ListObjectsInput {
  24602. s.ExpectedBucketOwner = &v
  24603. return s
  24604. }
  24605. // SetMarker sets the Marker field's value.
  24606. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  24607. s.Marker = &v
  24608. return s
  24609. }
  24610. // SetMaxKeys sets the MaxKeys field's value.
  24611. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  24612. s.MaxKeys = &v
  24613. return s
  24614. }
  24615. // SetPrefix sets the Prefix field's value.
  24616. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  24617. s.Prefix = &v
  24618. return s
  24619. }
  24620. // SetRequestPayer sets the RequestPayer field's value.
  24621. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  24622. s.RequestPayer = &v
  24623. return s
  24624. }
  24625. func (s *ListObjectsInput) getEndpointARN() (arn.Resource, error) {
  24626. if s.Bucket == nil {
  24627. return nil, fmt.Errorf("member Bucket is nil")
  24628. }
  24629. return parseEndpointARN(*s.Bucket)
  24630. }
  24631. func (s *ListObjectsInput) hasEndpointARN() bool {
  24632. if s.Bucket == nil {
  24633. return false
  24634. }
  24635. return arn.IsARN(*s.Bucket)
  24636. }
  24637. // updateArnableField updates the value of the input field that
  24638. // takes an ARN as an input. This method is useful to backfill
  24639. // the parsed resource name from ARN into the input member.
  24640. // It returns a pointer to a modified copy of input and an error.
  24641. // Note that original input is not modified.
  24642. func (s ListObjectsInput) updateArnableField(v string) (interface{}, error) {
  24643. if s.Bucket == nil {
  24644. return nil, fmt.Errorf("member Bucket is nil")
  24645. }
  24646. s.Bucket = aws.String(v)
  24647. return &s, nil
  24648. }
  24649. type ListObjectsOutput struct {
  24650. _ struct{} `type:"structure"`
  24651. // All of the keys (up to 1,000) rolled up in a common prefix count as a single
  24652. // return when calculating the number of returns.
  24653. //
  24654. // A response can contain CommonPrefixes only if you specify a delimiter.
  24655. //
  24656. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  24657. // next occurrence of the string specified by the delimiter.
  24658. //
  24659. // CommonPrefixes lists keys that act like subdirectories in the directory specified
  24660. // by Prefix.
  24661. //
  24662. // For example, if the prefix is notes/ and the delimiter is a slash (/) as
  24663. // in notes/summer/july, the common prefix is notes/summer/. All of the keys
  24664. // that roll up into a common prefix count as a single return when calculating
  24665. // the number of returns.
  24666. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  24667. // Metadata about each object returned.
  24668. Contents []*Object `type:"list" flattened:"true"`
  24669. // Causes keys that contain the same string between the prefix and the first
  24670. // occurrence of the delimiter to be rolled up into a single result element
  24671. // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
  24672. // in the response. Each rolled-up result counts as only one return against
  24673. // the MaxKeys value.
  24674. Delimiter *string `type:"string"`
  24675. // Encoding type used by Amazon S3 to encode object keys in the response.
  24676. EncodingType *string `type:"string" enum:"EncodingType"`
  24677. // A flag that indicates whether Amazon S3 returned all of the results that
  24678. // satisfied the search criteria.
  24679. IsTruncated *bool `type:"boolean"`
  24680. // Indicates where in the bucket listing begins. Marker is included in the response
  24681. // if it was sent with the request.
  24682. Marker *string `type:"string"`
  24683. // The maximum number of keys returned in the response body.
  24684. MaxKeys *int64 `type:"integer"`
  24685. // The bucket name.
  24686. Name *string `type:"string"`
  24687. // When response is truncated (the IsTruncated element value in the response
  24688. // is true), you can use the key name in this field as marker in the subsequent
  24689. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  24690. // order Note: This element is returned only if you have delimiter request parameter
  24691. // specified. If response does not include the NextMarker and it is truncated,
  24692. // you can use the value of the last Key in the response as the marker in the
  24693. // subsequent request to get the next set of object keys.
  24694. NextMarker *string `type:"string"`
  24695. // Keys that begin with the indicated prefix.
  24696. Prefix *string `type:"string"`
  24697. }
  24698. // String returns the string representation.
  24699. //
  24700. // API parameter values that are decorated as "sensitive" in the API will not
  24701. // be included in the string output. The member name will be present, but the
  24702. // value will be replaced with "sensitive".
  24703. func (s ListObjectsOutput) String() string {
  24704. return awsutil.Prettify(s)
  24705. }
  24706. // GoString returns the string representation.
  24707. //
  24708. // API parameter values that are decorated as "sensitive" in the API will not
  24709. // be included in the string output. The member name will be present, but the
  24710. // value will be replaced with "sensitive".
  24711. func (s ListObjectsOutput) GoString() string {
  24712. return s.String()
  24713. }
  24714. // SetCommonPrefixes sets the CommonPrefixes field's value.
  24715. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  24716. s.CommonPrefixes = v
  24717. return s
  24718. }
  24719. // SetContents sets the Contents field's value.
  24720. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  24721. s.Contents = v
  24722. return s
  24723. }
  24724. // SetDelimiter sets the Delimiter field's value.
  24725. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  24726. s.Delimiter = &v
  24727. return s
  24728. }
  24729. // SetEncodingType sets the EncodingType field's value.
  24730. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  24731. s.EncodingType = &v
  24732. return s
  24733. }
  24734. // SetIsTruncated sets the IsTruncated field's value.
  24735. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  24736. s.IsTruncated = &v
  24737. return s
  24738. }
  24739. // SetMarker sets the Marker field's value.
  24740. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  24741. s.Marker = &v
  24742. return s
  24743. }
  24744. // SetMaxKeys sets the MaxKeys field's value.
  24745. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  24746. s.MaxKeys = &v
  24747. return s
  24748. }
  24749. // SetName sets the Name field's value.
  24750. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  24751. s.Name = &v
  24752. return s
  24753. }
  24754. // SetNextMarker sets the NextMarker field's value.
  24755. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  24756. s.NextMarker = &v
  24757. return s
  24758. }
  24759. // SetPrefix sets the Prefix field's value.
  24760. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  24761. s.Prefix = &v
  24762. return s
  24763. }
  24764. type ListObjectsV2Input struct {
  24765. _ struct{} `locationName:"ListObjectsV2Request" type:"structure"`
  24766. // Bucket name to list.
  24767. //
  24768. // When using this action with an access point, you must direct requests to
  24769. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  24770. // When using this action with an access point through the Amazon Web Services
  24771. // SDKs, you provide the access point ARN in place of the bucket name. For more
  24772. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  24773. // in the Amazon S3 User Guide.
  24774. //
  24775. // When using this action with Amazon S3 on Outposts, you must direct requests
  24776. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  24777. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  24778. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  24779. // you provide the Outposts bucket ARN in place of the bucket name. For more
  24780. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  24781. // in the Amazon S3 User Guide.
  24782. //
  24783. // Bucket is a required field
  24784. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  24785. // ContinuationToken indicates Amazon S3 that the list is being continued on
  24786. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  24787. // key.
  24788. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  24789. // A delimiter is a character you use to group keys.
  24790. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  24791. // Encoding type used by Amazon S3 to encode object keys in the response.
  24792. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  24793. // The account ID of the expected bucket owner. If the bucket is owned by a
  24794. // different account, the request fails with the HTTP status code 403 Forbidden
  24795. // (access denied).
  24796. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  24797. // The owner field is not present in listV2 by default, if you want to return
  24798. // owner field with each key in the result then set the fetch owner field to
  24799. // true.
  24800. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  24801. // Sets the maximum number of keys returned in the response. By default the
  24802. // action returns up to 1,000 key names. The response might contain fewer keys
  24803. // but will never contain more.
  24804. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  24805. // Limits the response to keys that begin with the specified prefix.
  24806. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  24807. // Confirms that the requester knows that she or he will be charged for the
  24808. // list objects request in V2 style. Bucket owners need not specify this parameter
  24809. // in their requests.
  24810. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  24811. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  24812. // listing after this specified key. StartAfter can be any key in the bucket.
  24813. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  24814. }
  24815. // String returns the string representation.
  24816. //
  24817. // API parameter values that are decorated as "sensitive" in the API will not
  24818. // be included in the string output. The member name will be present, but the
  24819. // value will be replaced with "sensitive".
  24820. func (s ListObjectsV2Input) String() string {
  24821. return awsutil.Prettify(s)
  24822. }
  24823. // GoString returns the string representation.
  24824. //
  24825. // API parameter values that are decorated as "sensitive" in the API will not
  24826. // be included in the string output. The member name will be present, but the
  24827. // value will be replaced with "sensitive".
  24828. func (s ListObjectsV2Input) GoString() string {
  24829. return s.String()
  24830. }
  24831. // Validate inspects the fields of the type to determine if they are valid.
  24832. func (s *ListObjectsV2Input) Validate() error {
  24833. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  24834. if s.Bucket == nil {
  24835. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  24836. }
  24837. if s.Bucket != nil && len(*s.Bucket) < 1 {
  24838. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  24839. }
  24840. if invalidParams.Len() > 0 {
  24841. return invalidParams
  24842. }
  24843. return nil
  24844. }
  24845. // SetBucket sets the Bucket field's value.
  24846. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  24847. s.Bucket = &v
  24848. return s
  24849. }
  24850. func (s *ListObjectsV2Input) getBucket() (v string) {
  24851. if s.Bucket == nil {
  24852. return v
  24853. }
  24854. return *s.Bucket
  24855. }
  24856. // SetContinuationToken sets the ContinuationToken field's value.
  24857. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  24858. s.ContinuationToken = &v
  24859. return s
  24860. }
  24861. // SetDelimiter sets the Delimiter field's value.
  24862. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  24863. s.Delimiter = &v
  24864. return s
  24865. }
  24866. // SetEncodingType sets the EncodingType field's value.
  24867. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  24868. s.EncodingType = &v
  24869. return s
  24870. }
  24871. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  24872. func (s *ListObjectsV2Input) SetExpectedBucketOwner(v string) *ListObjectsV2Input {
  24873. s.ExpectedBucketOwner = &v
  24874. return s
  24875. }
  24876. // SetFetchOwner sets the FetchOwner field's value.
  24877. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  24878. s.FetchOwner = &v
  24879. return s
  24880. }
  24881. // SetMaxKeys sets the MaxKeys field's value.
  24882. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  24883. s.MaxKeys = &v
  24884. return s
  24885. }
  24886. // SetPrefix sets the Prefix field's value.
  24887. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  24888. s.Prefix = &v
  24889. return s
  24890. }
  24891. // SetRequestPayer sets the RequestPayer field's value.
  24892. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  24893. s.RequestPayer = &v
  24894. return s
  24895. }
  24896. // SetStartAfter sets the StartAfter field's value.
  24897. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  24898. s.StartAfter = &v
  24899. return s
  24900. }
  24901. func (s *ListObjectsV2Input) getEndpointARN() (arn.Resource, error) {
  24902. if s.Bucket == nil {
  24903. return nil, fmt.Errorf("member Bucket is nil")
  24904. }
  24905. return parseEndpointARN(*s.Bucket)
  24906. }
  24907. func (s *ListObjectsV2Input) hasEndpointARN() bool {
  24908. if s.Bucket == nil {
  24909. return false
  24910. }
  24911. return arn.IsARN(*s.Bucket)
  24912. }
  24913. // updateArnableField updates the value of the input field that
  24914. // takes an ARN as an input. This method is useful to backfill
  24915. // the parsed resource name from ARN into the input member.
  24916. // It returns a pointer to a modified copy of input and an error.
  24917. // Note that original input is not modified.
  24918. func (s ListObjectsV2Input) updateArnableField(v string) (interface{}, error) {
  24919. if s.Bucket == nil {
  24920. return nil, fmt.Errorf("member Bucket is nil")
  24921. }
  24922. s.Bucket = aws.String(v)
  24923. return &s, nil
  24924. }
  24925. type ListObjectsV2Output struct {
  24926. _ struct{} `type:"structure"`
  24927. // All of the keys (up to 1,000) rolled up into a common prefix count as a single
  24928. // return when calculating the number of returns.
  24929. //
  24930. // A response can contain CommonPrefixes only if you specify a delimiter.
  24931. //
  24932. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  24933. // next occurrence of the string specified by a delimiter.
  24934. //
  24935. // CommonPrefixes lists keys that act like subdirectories in the directory specified
  24936. // by Prefix.
  24937. //
  24938. // For example, if the prefix is notes/ and the delimiter is a slash (/) as
  24939. // in notes/summer/july, the common prefix is notes/summer/. All of the keys
  24940. // that roll up into a common prefix count as a single return when calculating
  24941. // the number of returns.
  24942. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  24943. // Metadata about each object returned.
  24944. Contents []*Object `type:"list" flattened:"true"`
  24945. // If ContinuationToken was sent with the request, it is included in the response.
  24946. ContinuationToken *string `type:"string"`
  24947. // Causes keys that contain the same string between the prefix and the first
  24948. // occurrence of the delimiter to be rolled up into a single result element
  24949. // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
  24950. // in the response. Each rolled-up result counts as only one return against
  24951. // the MaxKeys value.
  24952. Delimiter *string `type:"string"`
  24953. // Encoding type used by Amazon S3 to encode object key names in the XML response.
  24954. //
  24955. // If you specify the encoding-type request parameter, Amazon S3 includes this
  24956. // element in the response, and returns encoded key name values in the following
  24957. // response elements:
  24958. //
  24959. // Delimiter, Prefix, Key, and StartAfter.
  24960. EncodingType *string `type:"string" enum:"EncodingType"`
  24961. // Set to false if all of the results were returned. Set to true if more keys
  24962. // are available to return. If the number of results exceeds that specified
  24963. // by MaxKeys, all of the results might not be returned.
  24964. IsTruncated *bool `type:"boolean"`
  24965. // KeyCount is the number of keys returned with this request. KeyCount will
  24966. // always be less than or equals to MaxKeys field. Say you ask for 50 keys,
  24967. // your result will include less than equals 50 keys
  24968. KeyCount *int64 `type:"integer"`
  24969. // Sets the maximum number of keys returned in the response. By default the
  24970. // action returns up to 1,000 key names. The response might contain fewer keys
  24971. // but will never contain more.
  24972. MaxKeys *int64 `type:"integer"`
  24973. // The bucket name.
  24974. //
  24975. // When using this action with an access point, you must direct requests to
  24976. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  24977. // When using this action with an access point through the Amazon Web Services
  24978. // SDKs, you provide the access point ARN in place of the bucket name. For more
  24979. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  24980. // in the Amazon S3 User Guide.
  24981. //
  24982. // When using this action with Amazon S3 on Outposts, you must direct requests
  24983. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  24984. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  24985. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  24986. // you provide the Outposts bucket ARN in place of the bucket name. For more
  24987. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  24988. // in the Amazon S3 User Guide.
  24989. Name *string `type:"string"`
  24990. // NextContinuationToken is sent when isTruncated is true, which means there
  24991. // are more keys in the bucket that can be listed. The next list requests to
  24992. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  24993. // is obfuscated and is not a real key
  24994. NextContinuationToken *string `type:"string"`
  24995. // Keys that begin with the indicated prefix.
  24996. Prefix *string `type:"string"`
  24997. // If StartAfter was sent with the request, it is included in the response.
  24998. StartAfter *string `type:"string"`
  24999. }
  25000. // String returns the string representation.
  25001. //
  25002. // API parameter values that are decorated as "sensitive" in the API will not
  25003. // be included in the string output. The member name will be present, but the
  25004. // value will be replaced with "sensitive".
  25005. func (s ListObjectsV2Output) String() string {
  25006. return awsutil.Prettify(s)
  25007. }
  25008. // GoString returns the string representation.
  25009. //
  25010. // API parameter values that are decorated as "sensitive" in the API will not
  25011. // be included in the string output. The member name will be present, but the
  25012. // value will be replaced with "sensitive".
  25013. func (s ListObjectsV2Output) GoString() string {
  25014. return s.String()
  25015. }
  25016. // SetCommonPrefixes sets the CommonPrefixes field's value.
  25017. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  25018. s.CommonPrefixes = v
  25019. return s
  25020. }
  25021. // SetContents sets the Contents field's value.
  25022. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  25023. s.Contents = v
  25024. return s
  25025. }
  25026. // SetContinuationToken sets the ContinuationToken field's value.
  25027. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  25028. s.ContinuationToken = &v
  25029. return s
  25030. }
  25031. // SetDelimiter sets the Delimiter field's value.
  25032. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  25033. s.Delimiter = &v
  25034. return s
  25035. }
  25036. // SetEncodingType sets the EncodingType field's value.
  25037. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  25038. s.EncodingType = &v
  25039. return s
  25040. }
  25041. // SetIsTruncated sets the IsTruncated field's value.
  25042. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  25043. s.IsTruncated = &v
  25044. return s
  25045. }
  25046. // SetKeyCount sets the KeyCount field's value.
  25047. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  25048. s.KeyCount = &v
  25049. return s
  25050. }
  25051. // SetMaxKeys sets the MaxKeys field's value.
  25052. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  25053. s.MaxKeys = &v
  25054. return s
  25055. }
  25056. // SetName sets the Name field's value.
  25057. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  25058. s.Name = &v
  25059. return s
  25060. }
  25061. // SetNextContinuationToken sets the NextContinuationToken field's value.
  25062. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  25063. s.NextContinuationToken = &v
  25064. return s
  25065. }
  25066. // SetPrefix sets the Prefix field's value.
  25067. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  25068. s.Prefix = &v
  25069. return s
  25070. }
  25071. // SetStartAfter sets the StartAfter field's value.
  25072. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  25073. s.StartAfter = &v
  25074. return s
  25075. }
  25076. type ListPartsInput struct {
  25077. _ struct{} `locationName:"ListPartsRequest" type:"structure"`
  25078. // The name of the bucket to which the parts are being uploaded.
  25079. //
  25080. // When using this action with an access point, you must direct requests to
  25081. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  25082. // When using this action with an access point through the Amazon Web Services
  25083. // SDKs, you provide the access point ARN in place of the bucket name. For more
  25084. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  25085. // in the Amazon S3 User Guide.
  25086. //
  25087. // When using this action with Amazon S3 on Outposts, you must direct requests
  25088. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  25089. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  25090. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  25091. // you provide the Outposts bucket ARN in place of the bucket name. For more
  25092. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  25093. // in the Amazon S3 User Guide.
  25094. //
  25095. // Bucket is a required field
  25096. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  25097. // The account ID of the expected bucket owner. If the bucket is owned by a
  25098. // different account, the request fails with the HTTP status code 403 Forbidden
  25099. // (access denied).
  25100. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  25101. // Object key for which the multipart upload was initiated.
  25102. //
  25103. // Key is a required field
  25104. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  25105. // Sets the maximum number of parts to return.
  25106. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  25107. // Specifies the part after which listing should begin. Only parts with higher
  25108. // part numbers will be listed.
  25109. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  25110. // Confirms that the requester knows that they will be charged for the request.
  25111. // Bucket owners need not specify this parameter in their requests. For information
  25112. // about downloading objects from Requester Pays buckets, see Downloading Objects
  25113. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  25114. // in the Amazon S3 User Guide.
  25115. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  25116. // The server-side encryption (SSE) algorithm used to encrypt the object. This
  25117. // parameter is needed only when the object was created using a checksum algorithm.
  25118. // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  25119. // in the Amazon S3 User Guide.
  25120. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  25121. // The server-side encryption (SSE) customer managed key. This parameter is
  25122. // needed only when the object was created using a checksum algorithm. For more
  25123. // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  25124. // in the Amazon S3 User Guide.
  25125. //
  25126. // SSECustomerKey is a sensitive parameter and its value will be
  25127. // replaced with "sensitive" in string returned by ListPartsInput's
  25128. // String and GoString methods.
  25129. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  25130. // The MD5 server-side encryption (SSE) customer managed key. This parameter
  25131. // is needed only when the object was created using a checksum algorithm. For
  25132. // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  25133. // in the Amazon S3 User Guide.
  25134. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  25135. // Upload ID identifying the multipart upload whose parts are being listed.
  25136. //
  25137. // UploadId is a required field
  25138. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  25139. }
  25140. // String returns the string representation.
  25141. //
  25142. // API parameter values that are decorated as "sensitive" in the API will not
  25143. // be included in the string output. The member name will be present, but the
  25144. // value will be replaced with "sensitive".
  25145. func (s ListPartsInput) String() string {
  25146. return awsutil.Prettify(s)
  25147. }
  25148. // GoString returns the string representation.
  25149. //
  25150. // API parameter values that are decorated as "sensitive" in the API will not
  25151. // be included in the string output. The member name will be present, but the
  25152. // value will be replaced with "sensitive".
  25153. func (s ListPartsInput) GoString() string {
  25154. return s.String()
  25155. }
  25156. // Validate inspects the fields of the type to determine if they are valid.
  25157. func (s *ListPartsInput) Validate() error {
  25158. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  25159. if s.Bucket == nil {
  25160. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  25161. }
  25162. if s.Bucket != nil && len(*s.Bucket) < 1 {
  25163. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  25164. }
  25165. if s.Key == nil {
  25166. invalidParams.Add(request.NewErrParamRequired("Key"))
  25167. }
  25168. if s.Key != nil && len(*s.Key) < 1 {
  25169. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  25170. }
  25171. if s.UploadId == nil {
  25172. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  25173. }
  25174. if invalidParams.Len() > 0 {
  25175. return invalidParams
  25176. }
  25177. return nil
  25178. }
  25179. // SetBucket sets the Bucket field's value.
  25180. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  25181. s.Bucket = &v
  25182. return s
  25183. }
  25184. func (s *ListPartsInput) getBucket() (v string) {
  25185. if s.Bucket == nil {
  25186. return v
  25187. }
  25188. return *s.Bucket
  25189. }
  25190. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  25191. func (s *ListPartsInput) SetExpectedBucketOwner(v string) *ListPartsInput {
  25192. s.ExpectedBucketOwner = &v
  25193. return s
  25194. }
  25195. // SetKey sets the Key field's value.
  25196. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  25197. s.Key = &v
  25198. return s
  25199. }
  25200. // SetMaxParts sets the MaxParts field's value.
  25201. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  25202. s.MaxParts = &v
  25203. return s
  25204. }
  25205. // SetPartNumberMarker sets the PartNumberMarker field's value.
  25206. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  25207. s.PartNumberMarker = &v
  25208. return s
  25209. }
  25210. // SetRequestPayer sets the RequestPayer field's value.
  25211. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  25212. s.RequestPayer = &v
  25213. return s
  25214. }
  25215. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  25216. func (s *ListPartsInput) SetSSECustomerAlgorithm(v string) *ListPartsInput {
  25217. s.SSECustomerAlgorithm = &v
  25218. return s
  25219. }
  25220. // SetSSECustomerKey sets the SSECustomerKey field's value.
  25221. func (s *ListPartsInput) SetSSECustomerKey(v string) *ListPartsInput {
  25222. s.SSECustomerKey = &v
  25223. return s
  25224. }
  25225. func (s *ListPartsInput) getSSECustomerKey() (v string) {
  25226. if s.SSECustomerKey == nil {
  25227. return v
  25228. }
  25229. return *s.SSECustomerKey
  25230. }
  25231. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  25232. func (s *ListPartsInput) SetSSECustomerKeyMD5(v string) *ListPartsInput {
  25233. s.SSECustomerKeyMD5 = &v
  25234. return s
  25235. }
  25236. // SetUploadId sets the UploadId field's value.
  25237. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  25238. s.UploadId = &v
  25239. return s
  25240. }
  25241. func (s *ListPartsInput) getEndpointARN() (arn.Resource, error) {
  25242. if s.Bucket == nil {
  25243. return nil, fmt.Errorf("member Bucket is nil")
  25244. }
  25245. return parseEndpointARN(*s.Bucket)
  25246. }
  25247. func (s *ListPartsInput) hasEndpointARN() bool {
  25248. if s.Bucket == nil {
  25249. return false
  25250. }
  25251. return arn.IsARN(*s.Bucket)
  25252. }
  25253. // updateArnableField updates the value of the input field that
  25254. // takes an ARN as an input. This method is useful to backfill
  25255. // the parsed resource name from ARN into the input member.
  25256. // It returns a pointer to a modified copy of input and an error.
  25257. // Note that original input is not modified.
  25258. func (s ListPartsInput) updateArnableField(v string) (interface{}, error) {
  25259. if s.Bucket == nil {
  25260. return nil, fmt.Errorf("member Bucket is nil")
  25261. }
  25262. s.Bucket = aws.String(v)
  25263. return &s, nil
  25264. }
  25265. type ListPartsOutput struct {
  25266. _ struct{} `type:"structure"`
  25267. // If the bucket has a lifecycle rule configured with an action to abort incomplete
  25268. // multipart uploads and the prefix in the lifecycle rule matches the object
  25269. // name in the request, then the response includes this header indicating when
  25270. // the initiated multipart upload will become eligible for abort operation.
  25271. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  25272. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
  25273. //
  25274. // The response will also include the x-amz-abort-rule-id header that will provide
  25275. // the ID of the lifecycle configuration rule that defines this action.
  25276. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  25277. // This header is returned along with the x-amz-abort-date header. It identifies
  25278. // applicable lifecycle configuration rule that defines the action to abort
  25279. // incomplete multipart uploads.
  25280. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  25281. // The name of the bucket to which the multipart upload was initiated. Does
  25282. // not return the access point ARN or access point alias if used.
  25283. Bucket *string `type:"string"`
  25284. // The algorithm that was used to create a checksum of the object.
  25285. ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"`
  25286. // Container element that identifies who initiated the multipart upload. If
  25287. // the initiator is an Amazon Web Services account, this element provides the
  25288. // same information as the Owner element. If the initiator is an IAM User, this
  25289. // element provides the user ARN and display name.
  25290. Initiator *Initiator `type:"structure"`
  25291. // Indicates whether the returned list of parts is truncated. A true value indicates
  25292. // that the list was truncated. A list can be truncated if the number of parts
  25293. // exceeds the limit returned in the MaxParts element.
  25294. IsTruncated *bool `type:"boolean"`
  25295. // Object key for which the multipart upload was initiated.
  25296. Key *string `min:"1" type:"string"`
  25297. // Maximum number of parts that were allowed in the response.
  25298. MaxParts *int64 `type:"integer"`
  25299. // When a list is truncated, this element specifies the last part in the list,
  25300. // as well as the value to use for the part-number-marker request parameter
  25301. // in a subsequent request.
  25302. NextPartNumberMarker *int64 `type:"integer"`
  25303. // Container element that identifies the object owner, after the object is created.
  25304. // If multipart upload is initiated by an IAM user, this element provides the
  25305. // parent account ID and display name.
  25306. Owner *Owner `type:"structure"`
  25307. // When a list is truncated, this element specifies the last part in the list,
  25308. // as well as the value to use for the part-number-marker request parameter
  25309. // in a subsequent request.
  25310. PartNumberMarker *int64 `type:"integer"`
  25311. // Container for elements related to a particular part. A response can contain
  25312. // zero or more Part elements.
  25313. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  25314. // If present, indicates that the requester was successfully charged for the
  25315. // request.
  25316. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  25317. // Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
  25318. // object.
  25319. StorageClass *string `type:"string" enum:"StorageClass"`
  25320. // Upload ID identifying the multipart upload whose parts are being listed.
  25321. UploadId *string `type:"string"`
  25322. }
  25323. // String returns the string representation.
  25324. //
  25325. // API parameter values that are decorated as "sensitive" in the API will not
  25326. // be included in the string output. The member name will be present, but the
  25327. // value will be replaced with "sensitive".
  25328. func (s ListPartsOutput) String() string {
  25329. return awsutil.Prettify(s)
  25330. }
  25331. // GoString returns the string representation.
  25332. //
  25333. // API parameter values that are decorated as "sensitive" in the API will not
  25334. // be included in the string output. The member name will be present, but the
  25335. // value will be replaced with "sensitive".
  25336. func (s ListPartsOutput) GoString() string {
  25337. return s.String()
  25338. }
  25339. // SetAbortDate sets the AbortDate field's value.
  25340. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  25341. s.AbortDate = &v
  25342. return s
  25343. }
  25344. // SetAbortRuleId sets the AbortRuleId field's value.
  25345. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  25346. s.AbortRuleId = &v
  25347. return s
  25348. }
  25349. // SetBucket sets the Bucket field's value.
  25350. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  25351. s.Bucket = &v
  25352. return s
  25353. }
  25354. func (s *ListPartsOutput) getBucket() (v string) {
  25355. if s.Bucket == nil {
  25356. return v
  25357. }
  25358. return *s.Bucket
  25359. }
  25360. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  25361. func (s *ListPartsOutput) SetChecksumAlgorithm(v string) *ListPartsOutput {
  25362. s.ChecksumAlgorithm = &v
  25363. return s
  25364. }
  25365. // SetInitiator sets the Initiator field's value.
  25366. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  25367. s.Initiator = v
  25368. return s
  25369. }
  25370. // SetIsTruncated sets the IsTruncated field's value.
  25371. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  25372. s.IsTruncated = &v
  25373. return s
  25374. }
  25375. // SetKey sets the Key field's value.
  25376. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  25377. s.Key = &v
  25378. return s
  25379. }
  25380. // SetMaxParts sets the MaxParts field's value.
  25381. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  25382. s.MaxParts = &v
  25383. return s
  25384. }
  25385. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  25386. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  25387. s.NextPartNumberMarker = &v
  25388. return s
  25389. }
  25390. // SetOwner sets the Owner field's value.
  25391. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  25392. s.Owner = v
  25393. return s
  25394. }
  25395. // SetPartNumberMarker sets the PartNumberMarker field's value.
  25396. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  25397. s.PartNumberMarker = &v
  25398. return s
  25399. }
  25400. // SetParts sets the Parts field's value.
  25401. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  25402. s.Parts = v
  25403. return s
  25404. }
  25405. // SetRequestCharged sets the RequestCharged field's value.
  25406. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  25407. s.RequestCharged = &v
  25408. return s
  25409. }
  25410. // SetStorageClass sets the StorageClass field's value.
  25411. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  25412. s.StorageClass = &v
  25413. return s
  25414. }
  25415. // SetUploadId sets the UploadId field's value.
  25416. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  25417. s.UploadId = &v
  25418. return s
  25419. }
  25420. // Describes an Amazon S3 location that will receive the results of the restore
  25421. // request.
  25422. type Location struct {
  25423. _ struct{} `type:"structure"`
  25424. // A list of grants that control access to the staged results.
  25425. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  25426. // The name of the bucket where the restore results will be placed.
  25427. //
  25428. // BucketName is a required field
  25429. BucketName *string `type:"string" required:"true"`
  25430. // The canned ACL to apply to the restore results.
  25431. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  25432. // Contains the type of server-side encryption used.
  25433. Encryption *Encryption `type:"structure"`
  25434. // The prefix that is prepended to the restore results for this request.
  25435. //
  25436. // Prefix is a required field
  25437. Prefix *string `type:"string" required:"true"`
  25438. // The class of storage used to store the restore results.
  25439. StorageClass *string `type:"string" enum:"StorageClass"`
  25440. // The tag-set that is applied to the restore results.
  25441. Tagging *Tagging `type:"structure"`
  25442. // A list of metadata to store with the restore results in S3.
  25443. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  25444. }
  25445. // String returns the string representation.
  25446. //
  25447. // API parameter values that are decorated as "sensitive" in the API will not
  25448. // be included in the string output. The member name will be present, but the
  25449. // value will be replaced with "sensitive".
  25450. func (s Location) String() string {
  25451. return awsutil.Prettify(s)
  25452. }
  25453. // GoString returns the string representation.
  25454. //
  25455. // API parameter values that are decorated as "sensitive" in the API will not
  25456. // be included in the string output. The member name will be present, but the
  25457. // value will be replaced with "sensitive".
  25458. func (s Location) GoString() string {
  25459. return s.String()
  25460. }
  25461. // Validate inspects the fields of the type to determine if they are valid.
  25462. func (s *Location) Validate() error {
  25463. invalidParams := request.ErrInvalidParams{Context: "Location"}
  25464. if s.BucketName == nil {
  25465. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  25466. }
  25467. if s.Prefix == nil {
  25468. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  25469. }
  25470. if s.AccessControlList != nil {
  25471. for i, v := range s.AccessControlList {
  25472. if v == nil {
  25473. continue
  25474. }
  25475. if err := v.Validate(); err != nil {
  25476. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  25477. }
  25478. }
  25479. }
  25480. if s.Encryption != nil {
  25481. if err := s.Encryption.Validate(); err != nil {
  25482. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  25483. }
  25484. }
  25485. if s.Tagging != nil {
  25486. if err := s.Tagging.Validate(); err != nil {
  25487. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  25488. }
  25489. }
  25490. if invalidParams.Len() > 0 {
  25491. return invalidParams
  25492. }
  25493. return nil
  25494. }
  25495. // SetAccessControlList sets the AccessControlList field's value.
  25496. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  25497. s.AccessControlList = v
  25498. return s
  25499. }
  25500. // SetBucketName sets the BucketName field's value.
  25501. func (s *Location) SetBucketName(v string) *Location {
  25502. s.BucketName = &v
  25503. return s
  25504. }
  25505. // SetCannedACL sets the CannedACL field's value.
  25506. func (s *Location) SetCannedACL(v string) *Location {
  25507. s.CannedACL = &v
  25508. return s
  25509. }
  25510. // SetEncryption sets the Encryption field's value.
  25511. func (s *Location) SetEncryption(v *Encryption) *Location {
  25512. s.Encryption = v
  25513. return s
  25514. }
  25515. // SetPrefix sets the Prefix field's value.
  25516. func (s *Location) SetPrefix(v string) *Location {
  25517. s.Prefix = &v
  25518. return s
  25519. }
  25520. // SetStorageClass sets the StorageClass field's value.
  25521. func (s *Location) SetStorageClass(v string) *Location {
  25522. s.StorageClass = &v
  25523. return s
  25524. }
  25525. // SetTagging sets the Tagging field's value.
  25526. func (s *Location) SetTagging(v *Tagging) *Location {
  25527. s.Tagging = v
  25528. return s
  25529. }
  25530. // SetUserMetadata sets the UserMetadata field's value.
  25531. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  25532. s.UserMetadata = v
  25533. return s
  25534. }
  25535. // Describes where logs are stored and the prefix that Amazon S3 assigns to
  25536. // all log object keys for a bucket. For more information, see PUT Bucket logging
  25537. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
  25538. // in the Amazon S3 API Reference.
  25539. type LoggingEnabled struct {
  25540. _ struct{} `type:"structure"`
  25541. // Specifies the bucket where you want Amazon S3 to store server access logs.
  25542. // You can have your logs delivered to any bucket that you own, including the
  25543. // same bucket that is being logged. You can also configure multiple buckets
  25544. // to deliver their logs to the same target bucket. In this case, you should
  25545. // choose a different TargetPrefix for each source bucket so that the delivered
  25546. // log files can be distinguished by key.
  25547. //
  25548. // TargetBucket is a required field
  25549. TargetBucket *string `type:"string" required:"true"`
  25550. // Container for granting information.
  25551. //
  25552. // Buckets that use the bucket owner enforced setting for Object Ownership don't
  25553. // support target grants. For more information, see Permissions for server access
  25554. // log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
  25555. // in the Amazon S3 User Guide.
  25556. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  25557. // A prefix for all log object keys. If you store log files from multiple Amazon
  25558. // S3 buckets in a single bucket, you can use a prefix to distinguish which
  25559. // log files came from which bucket.
  25560. //
  25561. // TargetPrefix is a required field
  25562. TargetPrefix *string `type:"string" required:"true"`
  25563. }
  25564. // String returns the string representation.
  25565. //
  25566. // API parameter values that are decorated as "sensitive" in the API will not
  25567. // be included in the string output. The member name will be present, but the
  25568. // value will be replaced with "sensitive".
  25569. func (s LoggingEnabled) String() string {
  25570. return awsutil.Prettify(s)
  25571. }
  25572. // GoString returns the string representation.
  25573. //
  25574. // API parameter values that are decorated as "sensitive" in the API will not
  25575. // be included in the string output. The member name will be present, but the
  25576. // value will be replaced with "sensitive".
  25577. func (s LoggingEnabled) GoString() string {
  25578. return s.String()
  25579. }
  25580. // Validate inspects the fields of the type to determine if they are valid.
  25581. func (s *LoggingEnabled) Validate() error {
  25582. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  25583. if s.TargetBucket == nil {
  25584. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  25585. }
  25586. if s.TargetPrefix == nil {
  25587. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  25588. }
  25589. if s.TargetGrants != nil {
  25590. for i, v := range s.TargetGrants {
  25591. if v == nil {
  25592. continue
  25593. }
  25594. if err := v.Validate(); err != nil {
  25595. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  25596. }
  25597. }
  25598. }
  25599. if invalidParams.Len() > 0 {
  25600. return invalidParams
  25601. }
  25602. return nil
  25603. }
  25604. // SetTargetBucket sets the TargetBucket field's value.
  25605. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  25606. s.TargetBucket = &v
  25607. return s
  25608. }
  25609. // SetTargetGrants sets the TargetGrants field's value.
  25610. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  25611. s.TargetGrants = v
  25612. return s
  25613. }
  25614. // SetTargetPrefix sets the TargetPrefix field's value.
  25615. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  25616. s.TargetPrefix = &v
  25617. return s
  25618. }
  25619. // A metadata key-value pair to store with an object.
  25620. type MetadataEntry struct {
  25621. _ struct{} `type:"structure"`
  25622. // Name of the Object.
  25623. Name *string `type:"string"`
  25624. // Value of the Object.
  25625. Value *string `type:"string"`
  25626. }
  25627. // String returns the string representation.
  25628. //
  25629. // API parameter values that are decorated as "sensitive" in the API will not
  25630. // be included in the string output. The member name will be present, but the
  25631. // value will be replaced with "sensitive".
  25632. func (s MetadataEntry) String() string {
  25633. return awsutil.Prettify(s)
  25634. }
  25635. // GoString returns the string representation.
  25636. //
  25637. // API parameter values that are decorated as "sensitive" in the API will not
  25638. // be included in the string output. The member name will be present, but the
  25639. // value will be replaced with "sensitive".
  25640. func (s MetadataEntry) GoString() string {
  25641. return s.String()
  25642. }
  25643. // SetName sets the Name field's value.
  25644. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  25645. s.Name = &v
  25646. return s
  25647. }
  25648. // SetValue sets the Value field's value.
  25649. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  25650. s.Value = &v
  25651. return s
  25652. }
  25653. // A container specifying replication metrics-related settings enabling replication
  25654. // metrics and events.
  25655. type Metrics struct {
  25656. _ struct{} `type:"structure"`
  25657. // A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold
  25658. // event.
  25659. EventThreshold *ReplicationTimeValue `type:"structure"`
  25660. // Specifies whether the replication metrics are enabled.
  25661. //
  25662. // Status is a required field
  25663. Status *string `type:"string" required:"true" enum:"MetricsStatus"`
  25664. }
  25665. // String returns the string representation.
  25666. //
  25667. // API parameter values that are decorated as "sensitive" in the API will not
  25668. // be included in the string output. The member name will be present, but the
  25669. // value will be replaced with "sensitive".
  25670. func (s Metrics) String() string {
  25671. return awsutil.Prettify(s)
  25672. }
  25673. // GoString returns the string representation.
  25674. //
  25675. // API parameter values that are decorated as "sensitive" in the API will not
  25676. // be included in the string output. The member name will be present, but the
  25677. // value will be replaced with "sensitive".
  25678. func (s Metrics) GoString() string {
  25679. return s.String()
  25680. }
  25681. // Validate inspects the fields of the type to determine if they are valid.
  25682. func (s *Metrics) Validate() error {
  25683. invalidParams := request.ErrInvalidParams{Context: "Metrics"}
  25684. if s.Status == nil {
  25685. invalidParams.Add(request.NewErrParamRequired("Status"))
  25686. }
  25687. if invalidParams.Len() > 0 {
  25688. return invalidParams
  25689. }
  25690. return nil
  25691. }
  25692. // SetEventThreshold sets the EventThreshold field's value.
  25693. func (s *Metrics) SetEventThreshold(v *ReplicationTimeValue) *Metrics {
  25694. s.EventThreshold = v
  25695. return s
  25696. }
  25697. // SetStatus sets the Status field's value.
  25698. func (s *Metrics) SetStatus(v string) *Metrics {
  25699. s.Status = &v
  25700. return s
  25701. }
  25702. // A conjunction (logical AND) of predicates, which is used in evaluating a
  25703. // metrics filter. The operator must have at least two predicates, and an object
  25704. // must match all of the predicates in order for the filter to apply.
  25705. type MetricsAndOperator struct {
  25706. _ struct{} `type:"structure"`
  25707. // The access point ARN used when evaluating an AND predicate.
  25708. AccessPointArn *string `type:"string"`
  25709. // The prefix used when evaluating an AND predicate.
  25710. Prefix *string `type:"string"`
  25711. // The list of tags used when evaluating an AND predicate.
  25712. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  25713. }
  25714. // String returns the string representation.
  25715. //
  25716. // API parameter values that are decorated as "sensitive" in the API will not
  25717. // be included in the string output. The member name will be present, but the
  25718. // value will be replaced with "sensitive".
  25719. func (s MetricsAndOperator) String() string {
  25720. return awsutil.Prettify(s)
  25721. }
  25722. // GoString returns the string representation.
  25723. //
  25724. // API parameter values that are decorated as "sensitive" in the API will not
  25725. // be included in the string output. The member name will be present, but the
  25726. // value will be replaced with "sensitive".
  25727. func (s MetricsAndOperator) GoString() string {
  25728. return s.String()
  25729. }
  25730. // Validate inspects the fields of the type to determine if they are valid.
  25731. func (s *MetricsAndOperator) Validate() error {
  25732. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  25733. if s.Tags != nil {
  25734. for i, v := range s.Tags {
  25735. if v == nil {
  25736. continue
  25737. }
  25738. if err := v.Validate(); err != nil {
  25739. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  25740. }
  25741. }
  25742. }
  25743. if invalidParams.Len() > 0 {
  25744. return invalidParams
  25745. }
  25746. return nil
  25747. }
  25748. // SetAccessPointArn sets the AccessPointArn field's value.
  25749. func (s *MetricsAndOperator) SetAccessPointArn(v string) *MetricsAndOperator {
  25750. s.AccessPointArn = &v
  25751. return s
  25752. }
  25753. // SetPrefix sets the Prefix field's value.
  25754. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  25755. s.Prefix = &v
  25756. return s
  25757. }
  25758. // SetTags sets the Tags field's value.
  25759. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  25760. s.Tags = v
  25761. return s
  25762. }
  25763. // Specifies a metrics configuration for the CloudWatch request metrics (specified
  25764. // by the metrics configuration ID) from an Amazon S3 bucket. If you're updating
  25765. // an existing metrics configuration, note that this is a full replacement of
  25766. // the existing metrics configuration. If you don't include the elements you
  25767. // want to keep, they are erased. For more information, see PutBucketMetricsConfiguration
  25768. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html).
  25769. type MetricsConfiguration struct {
  25770. _ struct{} `type:"structure"`
  25771. // Specifies a metrics configuration filter. The metrics configuration will
  25772. // only include objects that meet the filter's criteria. A filter must be a
  25773. // prefix, an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
  25774. Filter *MetricsFilter `type:"structure"`
  25775. // The ID used to identify the metrics configuration.
  25776. //
  25777. // Id is a required field
  25778. Id *string `type:"string" required:"true"`
  25779. }
  25780. // String returns the string representation.
  25781. //
  25782. // API parameter values that are decorated as "sensitive" in the API will not
  25783. // be included in the string output. The member name will be present, but the
  25784. // value will be replaced with "sensitive".
  25785. func (s MetricsConfiguration) String() string {
  25786. return awsutil.Prettify(s)
  25787. }
  25788. // GoString returns the string representation.
  25789. //
  25790. // API parameter values that are decorated as "sensitive" in the API will not
  25791. // be included in the string output. The member name will be present, but the
  25792. // value will be replaced with "sensitive".
  25793. func (s MetricsConfiguration) GoString() string {
  25794. return s.String()
  25795. }
  25796. // Validate inspects the fields of the type to determine if they are valid.
  25797. func (s *MetricsConfiguration) Validate() error {
  25798. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  25799. if s.Id == nil {
  25800. invalidParams.Add(request.NewErrParamRequired("Id"))
  25801. }
  25802. if s.Filter != nil {
  25803. if err := s.Filter.Validate(); err != nil {
  25804. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  25805. }
  25806. }
  25807. if invalidParams.Len() > 0 {
  25808. return invalidParams
  25809. }
  25810. return nil
  25811. }
  25812. // SetFilter sets the Filter field's value.
  25813. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  25814. s.Filter = v
  25815. return s
  25816. }
  25817. // SetId sets the Id field's value.
  25818. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  25819. s.Id = &v
  25820. return s
  25821. }
  25822. // Specifies a metrics configuration filter. The metrics configuration only
  25823. // includes objects that meet the filter's criteria. A filter must be a prefix,
  25824. // an object tag, an access point ARN, or a conjunction (MetricsAndOperator).
  25825. // For more information, see PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html).
  25826. type MetricsFilter struct {
  25827. _ struct{} `type:"structure"`
  25828. // The access point ARN used when evaluating a metrics filter.
  25829. AccessPointArn *string `type:"string"`
  25830. // A conjunction (logical AND) of predicates, which is used in evaluating a
  25831. // metrics filter. The operator must have at least two predicates, and an object
  25832. // must match all of the predicates in order for the filter to apply.
  25833. And *MetricsAndOperator `type:"structure"`
  25834. // The prefix used when evaluating a metrics filter.
  25835. Prefix *string `type:"string"`
  25836. // The tag used when evaluating a metrics filter.
  25837. Tag *Tag `type:"structure"`
  25838. }
  25839. // String returns the string representation.
  25840. //
  25841. // API parameter values that are decorated as "sensitive" in the API will not
  25842. // be included in the string output. The member name will be present, but the
  25843. // value will be replaced with "sensitive".
  25844. func (s MetricsFilter) String() string {
  25845. return awsutil.Prettify(s)
  25846. }
  25847. // GoString returns the string representation.
  25848. //
  25849. // API parameter values that are decorated as "sensitive" in the API will not
  25850. // be included in the string output. The member name will be present, but the
  25851. // value will be replaced with "sensitive".
  25852. func (s MetricsFilter) GoString() string {
  25853. return s.String()
  25854. }
  25855. // Validate inspects the fields of the type to determine if they are valid.
  25856. func (s *MetricsFilter) Validate() error {
  25857. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  25858. if s.And != nil {
  25859. if err := s.And.Validate(); err != nil {
  25860. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  25861. }
  25862. }
  25863. if s.Tag != nil {
  25864. if err := s.Tag.Validate(); err != nil {
  25865. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  25866. }
  25867. }
  25868. if invalidParams.Len() > 0 {
  25869. return invalidParams
  25870. }
  25871. return nil
  25872. }
  25873. // SetAccessPointArn sets the AccessPointArn field's value.
  25874. func (s *MetricsFilter) SetAccessPointArn(v string) *MetricsFilter {
  25875. s.AccessPointArn = &v
  25876. return s
  25877. }
  25878. // SetAnd sets the And field's value.
  25879. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  25880. s.And = v
  25881. return s
  25882. }
  25883. // SetPrefix sets the Prefix field's value.
  25884. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  25885. s.Prefix = &v
  25886. return s
  25887. }
  25888. // SetTag sets the Tag field's value.
  25889. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  25890. s.Tag = v
  25891. return s
  25892. }
  25893. // Container for the MultipartUpload for the Amazon S3 object.
  25894. type MultipartUpload struct {
  25895. _ struct{} `type:"structure"`
  25896. // The algorithm that was used to create a checksum of the object.
  25897. ChecksumAlgorithm *string `type:"string" enum:"ChecksumAlgorithm"`
  25898. // Date and time at which the multipart upload was initiated.
  25899. Initiated *time.Time `type:"timestamp"`
  25900. // Identifies who initiated the multipart upload.
  25901. Initiator *Initiator `type:"structure"`
  25902. // Key of the object for which the multipart upload was initiated.
  25903. Key *string `min:"1" type:"string"`
  25904. // Specifies the owner of the object that is part of the multipart upload.
  25905. Owner *Owner `type:"structure"`
  25906. // The class of storage used to store the object.
  25907. StorageClass *string `type:"string" enum:"StorageClass"`
  25908. // Upload ID that identifies the multipart upload.
  25909. UploadId *string `type:"string"`
  25910. }
  25911. // String returns the string representation.
  25912. //
  25913. // API parameter values that are decorated as "sensitive" in the API will not
  25914. // be included in the string output. The member name will be present, but the
  25915. // value will be replaced with "sensitive".
  25916. func (s MultipartUpload) String() string {
  25917. return awsutil.Prettify(s)
  25918. }
  25919. // GoString returns the string representation.
  25920. //
  25921. // API parameter values that are decorated as "sensitive" in the API will not
  25922. // be included in the string output. The member name will be present, but the
  25923. // value will be replaced with "sensitive".
  25924. func (s MultipartUpload) GoString() string {
  25925. return s.String()
  25926. }
  25927. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  25928. func (s *MultipartUpload) SetChecksumAlgorithm(v string) *MultipartUpload {
  25929. s.ChecksumAlgorithm = &v
  25930. return s
  25931. }
  25932. // SetInitiated sets the Initiated field's value.
  25933. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  25934. s.Initiated = &v
  25935. return s
  25936. }
  25937. // SetInitiator sets the Initiator field's value.
  25938. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  25939. s.Initiator = v
  25940. return s
  25941. }
  25942. // SetKey sets the Key field's value.
  25943. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  25944. s.Key = &v
  25945. return s
  25946. }
  25947. // SetOwner sets the Owner field's value.
  25948. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  25949. s.Owner = v
  25950. return s
  25951. }
  25952. // SetStorageClass sets the StorageClass field's value.
  25953. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  25954. s.StorageClass = &v
  25955. return s
  25956. }
  25957. // SetUploadId sets the UploadId field's value.
  25958. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  25959. s.UploadId = &v
  25960. return s
  25961. }
  25962. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  25963. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  25964. // configuration action on a bucket that has versioning enabled (or suspended)
  25965. // to request that Amazon S3 delete noncurrent object versions at a specific
  25966. // period in the object's lifetime.
  25967. type NoncurrentVersionExpiration struct {
  25968. _ struct{} `type:"structure"`
  25969. // Specifies how many noncurrent versions Amazon S3 will retain. If there are
  25970. // this many more recent noncurrent versions, Amazon S3 will take the associated
  25971. // action. For more information about noncurrent versions, see Lifecycle configuration
  25972. // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
  25973. // in the Amazon S3 User Guide.
  25974. NewerNoncurrentVersions *int64 `type:"integer"`
  25975. // Specifies the number of days an object is noncurrent before Amazon S3 can
  25976. // perform the associated action. The value must be a non-zero positive integer.
  25977. // For information about the noncurrent days calculations, see How Amazon S3
  25978. // Calculates When an Object Became Noncurrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
  25979. // in the Amazon S3 User Guide.
  25980. NoncurrentDays *int64 `type:"integer"`
  25981. }
  25982. // String returns the string representation.
  25983. //
  25984. // API parameter values that are decorated as "sensitive" in the API will not
  25985. // be included in the string output. The member name will be present, but the
  25986. // value will be replaced with "sensitive".
  25987. func (s NoncurrentVersionExpiration) String() string {
  25988. return awsutil.Prettify(s)
  25989. }
  25990. // GoString returns the string representation.
  25991. //
  25992. // API parameter values that are decorated as "sensitive" in the API will not
  25993. // be included in the string output. The member name will be present, but the
  25994. // value will be replaced with "sensitive".
  25995. func (s NoncurrentVersionExpiration) GoString() string {
  25996. return s.String()
  25997. }
  25998. // SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
  25999. func (s *NoncurrentVersionExpiration) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionExpiration {
  26000. s.NewerNoncurrentVersions = &v
  26001. return s
  26002. }
  26003. // SetNoncurrentDays sets the NoncurrentDays field's value.
  26004. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  26005. s.NoncurrentDays = &v
  26006. return s
  26007. }
  26008. // Container for the transition rule that describes when noncurrent objects
  26009. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
  26010. // GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled
  26011. // (or versioning is suspended), you can set this action to request that Amazon
  26012. // S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA,
  26013. // INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
  26014. // a specific period in the object's lifetime.
  26015. type NoncurrentVersionTransition struct {
  26016. _ struct{} `type:"structure"`
  26017. // Specifies how many noncurrent versions Amazon S3 will retain. If there are
  26018. // this many more recent noncurrent versions, Amazon S3 will take the associated
  26019. // action. For more information about noncurrent versions, see Lifecycle configuration
  26020. // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html)
  26021. // in the Amazon S3 User Guide.
  26022. NewerNoncurrentVersions *int64 `type:"integer"`
  26023. // Specifies the number of days an object is noncurrent before Amazon S3 can
  26024. // perform the associated action. For information about the noncurrent days
  26025. // calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent
  26026. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
  26027. // in the Amazon S3 User Guide.
  26028. NoncurrentDays *int64 `type:"integer"`
  26029. // The class of storage used to store the object.
  26030. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  26031. }
  26032. // String returns the string representation.
  26033. //
  26034. // API parameter values that are decorated as "sensitive" in the API will not
  26035. // be included in the string output. The member name will be present, but the
  26036. // value will be replaced with "sensitive".
  26037. func (s NoncurrentVersionTransition) String() string {
  26038. return awsutil.Prettify(s)
  26039. }
  26040. // GoString returns the string representation.
  26041. //
  26042. // API parameter values that are decorated as "sensitive" in the API will not
  26043. // be included in the string output. The member name will be present, but the
  26044. // value will be replaced with "sensitive".
  26045. func (s NoncurrentVersionTransition) GoString() string {
  26046. return s.String()
  26047. }
  26048. // SetNewerNoncurrentVersions sets the NewerNoncurrentVersions field's value.
  26049. func (s *NoncurrentVersionTransition) SetNewerNoncurrentVersions(v int64) *NoncurrentVersionTransition {
  26050. s.NewerNoncurrentVersions = &v
  26051. return s
  26052. }
  26053. // SetNoncurrentDays sets the NoncurrentDays field's value.
  26054. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  26055. s.NoncurrentDays = &v
  26056. return s
  26057. }
  26058. // SetStorageClass sets the StorageClass field's value.
  26059. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  26060. s.StorageClass = &v
  26061. return s
  26062. }
  26063. // A container for specifying the notification configuration of the bucket.
  26064. // If this element is empty, notifications are turned off for the bucket.
  26065. type NotificationConfiguration struct {
  26066. _ struct{} `type:"structure"`
  26067. // Enables delivery of events to Amazon EventBridge.
  26068. EventBridgeConfiguration *EventBridgeConfiguration `type:"structure"`
  26069. // Describes the Lambda functions to invoke and the events for which to invoke
  26070. // them.
  26071. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  26072. // The Amazon Simple Queue Service queues to publish messages to and the events
  26073. // for which to publish messages.
  26074. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  26075. // The topic to which notifications are sent and the events for which notifications
  26076. // are generated.
  26077. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  26078. }
  26079. // String returns the string representation.
  26080. //
  26081. // API parameter values that are decorated as "sensitive" in the API will not
  26082. // be included in the string output. The member name will be present, but the
  26083. // value will be replaced with "sensitive".
  26084. func (s NotificationConfiguration) String() string {
  26085. return awsutil.Prettify(s)
  26086. }
  26087. // GoString returns the string representation.
  26088. //
  26089. // API parameter values that are decorated as "sensitive" in the API will not
  26090. // be included in the string output. The member name will be present, but the
  26091. // value will be replaced with "sensitive".
  26092. func (s NotificationConfiguration) GoString() string {
  26093. return s.String()
  26094. }
  26095. // Validate inspects the fields of the type to determine if they are valid.
  26096. func (s *NotificationConfiguration) Validate() error {
  26097. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  26098. if s.LambdaFunctionConfigurations != nil {
  26099. for i, v := range s.LambdaFunctionConfigurations {
  26100. if v == nil {
  26101. continue
  26102. }
  26103. if err := v.Validate(); err != nil {
  26104. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  26105. }
  26106. }
  26107. }
  26108. if s.QueueConfigurations != nil {
  26109. for i, v := range s.QueueConfigurations {
  26110. if v == nil {
  26111. continue
  26112. }
  26113. if err := v.Validate(); err != nil {
  26114. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  26115. }
  26116. }
  26117. }
  26118. if s.TopicConfigurations != nil {
  26119. for i, v := range s.TopicConfigurations {
  26120. if v == nil {
  26121. continue
  26122. }
  26123. if err := v.Validate(); err != nil {
  26124. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  26125. }
  26126. }
  26127. }
  26128. if invalidParams.Len() > 0 {
  26129. return invalidParams
  26130. }
  26131. return nil
  26132. }
  26133. // SetEventBridgeConfiguration sets the EventBridgeConfiguration field's value.
  26134. func (s *NotificationConfiguration) SetEventBridgeConfiguration(v *EventBridgeConfiguration) *NotificationConfiguration {
  26135. s.EventBridgeConfiguration = v
  26136. return s
  26137. }
  26138. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  26139. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  26140. s.LambdaFunctionConfigurations = v
  26141. return s
  26142. }
  26143. // SetQueueConfigurations sets the QueueConfigurations field's value.
  26144. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  26145. s.QueueConfigurations = v
  26146. return s
  26147. }
  26148. // SetTopicConfigurations sets the TopicConfigurations field's value.
  26149. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  26150. s.TopicConfigurations = v
  26151. return s
  26152. }
  26153. type NotificationConfigurationDeprecated struct {
  26154. _ struct{} `type:"structure"`
  26155. // Container for specifying the Lambda notification configuration.
  26156. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  26157. // This data type is deprecated. This data type specifies the configuration
  26158. // for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue
  26159. // when Amazon S3 detects specified events.
  26160. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  26161. // This data type is deprecated. A container for specifying the configuration
  26162. // for publication of messages to an Amazon Simple Notification Service (Amazon
  26163. // SNS) topic when Amazon S3 detects specified events.
  26164. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  26165. }
  26166. // String returns the string representation.
  26167. //
  26168. // API parameter values that are decorated as "sensitive" in the API will not
  26169. // be included in the string output. The member name will be present, but the
  26170. // value will be replaced with "sensitive".
  26171. func (s NotificationConfigurationDeprecated) String() string {
  26172. return awsutil.Prettify(s)
  26173. }
  26174. // GoString returns the string representation.
  26175. //
  26176. // API parameter values that are decorated as "sensitive" in the API will not
  26177. // be included in the string output. The member name will be present, but the
  26178. // value will be replaced with "sensitive".
  26179. func (s NotificationConfigurationDeprecated) GoString() string {
  26180. return s.String()
  26181. }
  26182. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  26183. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  26184. s.CloudFunctionConfiguration = v
  26185. return s
  26186. }
  26187. // SetQueueConfiguration sets the QueueConfiguration field's value.
  26188. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  26189. s.QueueConfiguration = v
  26190. return s
  26191. }
  26192. // SetTopicConfiguration sets the TopicConfiguration field's value.
  26193. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  26194. s.TopicConfiguration = v
  26195. return s
  26196. }
  26197. // Specifies object key name filtering rules. For information about key name
  26198. // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  26199. // in the Amazon S3 User Guide.
  26200. type NotificationConfigurationFilter struct {
  26201. _ struct{} `type:"structure"`
  26202. // A container for object key name prefix and suffix filtering rules.
  26203. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  26204. }
  26205. // String returns the string representation.
  26206. //
  26207. // API parameter values that are decorated as "sensitive" in the API will not
  26208. // be included in the string output. The member name will be present, but the
  26209. // value will be replaced with "sensitive".
  26210. func (s NotificationConfigurationFilter) String() string {
  26211. return awsutil.Prettify(s)
  26212. }
  26213. // GoString returns the string representation.
  26214. //
  26215. // API parameter values that are decorated as "sensitive" in the API will not
  26216. // be included in the string output. The member name will be present, but the
  26217. // value will be replaced with "sensitive".
  26218. func (s NotificationConfigurationFilter) GoString() string {
  26219. return s.String()
  26220. }
  26221. // SetKey sets the Key field's value.
  26222. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  26223. s.Key = v
  26224. return s
  26225. }
  26226. // An object consists of data and its descriptive metadata.
  26227. type Object struct {
  26228. _ struct{} `type:"structure"`
  26229. // The algorithm that was used to create a checksum of the object.
  26230. ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"`
  26231. // The entity tag is a hash of the object. The ETag reflects changes only to
  26232. // the contents of an object, not its metadata. The ETag may or may not be an
  26233. // MD5 digest of the object data. Whether or not it is depends on how the object
  26234. // was created and how it is encrypted as described below:
  26235. //
  26236. // * Objects created by the PUT Object, POST Object, or Copy operation, or
  26237. // through the Amazon Web Services Management Console, and are encrypted
  26238. // by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object
  26239. // data.
  26240. //
  26241. // * Objects created by the PUT Object, POST Object, or Copy operation, or
  26242. // through the Amazon Web Services Management Console, and are encrypted
  26243. // by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object
  26244. // data.
  26245. //
  26246. // * If an object is created by either the Multipart Upload or Part Copy
  26247. // operation, the ETag is not an MD5 digest, regardless of the method of
  26248. // encryption. If an object is larger than 16 MB, the Amazon Web Services
  26249. // Management Console will upload or copy that object as a Multipart Upload,
  26250. // and therefore the ETag will not be an MD5 digest.
  26251. ETag *string `type:"string"`
  26252. // The name that you assign to an object. You use the object key to retrieve
  26253. // the object.
  26254. Key *string `min:"1" type:"string"`
  26255. // Creation date of the object.
  26256. LastModified *time.Time `type:"timestamp"`
  26257. // The owner of the object
  26258. Owner *Owner `type:"structure"`
  26259. // Size in bytes of the object
  26260. Size *int64 `type:"integer"`
  26261. // The class of storage used to store the object.
  26262. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  26263. }
  26264. // String returns the string representation.
  26265. //
  26266. // API parameter values that are decorated as "sensitive" in the API will not
  26267. // be included in the string output. The member name will be present, but the
  26268. // value will be replaced with "sensitive".
  26269. func (s Object) String() string {
  26270. return awsutil.Prettify(s)
  26271. }
  26272. // GoString returns the string representation.
  26273. //
  26274. // API parameter values that are decorated as "sensitive" in the API will not
  26275. // be included in the string output. The member name will be present, but the
  26276. // value will be replaced with "sensitive".
  26277. func (s Object) GoString() string {
  26278. return s.String()
  26279. }
  26280. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  26281. func (s *Object) SetChecksumAlgorithm(v []*string) *Object {
  26282. s.ChecksumAlgorithm = v
  26283. return s
  26284. }
  26285. // SetETag sets the ETag field's value.
  26286. func (s *Object) SetETag(v string) *Object {
  26287. s.ETag = &v
  26288. return s
  26289. }
  26290. // SetKey sets the Key field's value.
  26291. func (s *Object) SetKey(v string) *Object {
  26292. s.Key = &v
  26293. return s
  26294. }
  26295. // SetLastModified sets the LastModified field's value.
  26296. func (s *Object) SetLastModified(v time.Time) *Object {
  26297. s.LastModified = &v
  26298. return s
  26299. }
  26300. // SetOwner sets the Owner field's value.
  26301. func (s *Object) SetOwner(v *Owner) *Object {
  26302. s.Owner = v
  26303. return s
  26304. }
  26305. // SetSize sets the Size field's value.
  26306. func (s *Object) SetSize(v int64) *Object {
  26307. s.Size = &v
  26308. return s
  26309. }
  26310. // SetStorageClass sets the StorageClass field's value.
  26311. func (s *Object) SetStorageClass(v string) *Object {
  26312. s.StorageClass = &v
  26313. return s
  26314. }
  26315. // Object Identifier is unique value to identify objects.
  26316. type ObjectIdentifier struct {
  26317. _ struct{} `type:"structure"`
  26318. // Key name of the object.
  26319. //
  26320. // Replacement must be made for object keys containing special characters (such
  26321. // as carriage returns) when using XML requests. For more information, see XML
  26322. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  26323. //
  26324. // Key is a required field
  26325. Key *string `min:"1" type:"string" required:"true"`
  26326. // VersionId for the specific version of the object to delete.
  26327. VersionId *string `type:"string"`
  26328. }
  26329. // String returns the string representation.
  26330. //
  26331. // API parameter values that are decorated as "sensitive" in the API will not
  26332. // be included in the string output. The member name will be present, but the
  26333. // value will be replaced with "sensitive".
  26334. func (s ObjectIdentifier) String() string {
  26335. return awsutil.Prettify(s)
  26336. }
  26337. // GoString returns the string representation.
  26338. //
  26339. // API parameter values that are decorated as "sensitive" in the API will not
  26340. // be included in the string output. The member name will be present, but the
  26341. // value will be replaced with "sensitive".
  26342. func (s ObjectIdentifier) GoString() string {
  26343. return s.String()
  26344. }
  26345. // Validate inspects the fields of the type to determine if they are valid.
  26346. func (s *ObjectIdentifier) Validate() error {
  26347. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  26348. if s.Key == nil {
  26349. invalidParams.Add(request.NewErrParamRequired("Key"))
  26350. }
  26351. if s.Key != nil && len(*s.Key) < 1 {
  26352. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  26353. }
  26354. if invalidParams.Len() > 0 {
  26355. return invalidParams
  26356. }
  26357. return nil
  26358. }
  26359. // SetKey sets the Key field's value.
  26360. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  26361. s.Key = &v
  26362. return s
  26363. }
  26364. // SetVersionId sets the VersionId field's value.
  26365. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  26366. s.VersionId = &v
  26367. return s
  26368. }
  26369. // The container element for Object Lock configuration parameters.
  26370. type ObjectLockConfiguration struct {
  26371. _ struct{} `type:"structure"`
  26372. // Indicates whether this bucket has an Object Lock configuration enabled. Enable
  26373. // ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
  26374. ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
  26375. // Specifies the Object Lock rule for the specified object. Enable the this
  26376. // rule when you apply ObjectLockConfiguration to a bucket. Bucket settings
  26377. // require both a mode and a period. The period can be either Days or Years
  26378. // but you must select one. You cannot specify Days and Years at the same time.
  26379. Rule *ObjectLockRule `type:"structure"`
  26380. }
  26381. // String returns the string representation.
  26382. //
  26383. // API parameter values that are decorated as "sensitive" in the API will not
  26384. // be included in the string output. The member name will be present, but the
  26385. // value will be replaced with "sensitive".
  26386. func (s ObjectLockConfiguration) String() string {
  26387. return awsutil.Prettify(s)
  26388. }
  26389. // GoString returns the string representation.
  26390. //
  26391. // API parameter values that are decorated as "sensitive" in the API will not
  26392. // be included in the string output. The member name will be present, but the
  26393. // value will be replaced with "sensitive".
  26394. func (s ObjectLockConfiguration) GoString() string {
  26395. return s.String()
  26396. }
  26397. // SetObjectLockEnabled sets the ObjectLockEnabled field's value.
  26398. func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
  26399. s.ObjectLockEnabled = &v
  26400. return s
  26401. }
  26402. // SetRule sets the Rule field's value.
  26403. func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
  26404. s.Rule = v
  26405. return s
  26406. }
  26407. // A legal hold configuration for an object.
  26408. type ObjectLockLegalHold struct {
  26409. _ struct{} `type:"structure"`
  26410. // Indicates whether the specified object has a legal hold in place.
  26411. Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
  26412. }
  26413. // String returns the string representation.
  26414. //
  26415. // API parameter values that are decorated as "sensitive" in the API will not
  26416. // be included in the string output. The member name will be present, but the
  26417. // value will be replaced with "sensitive".
  26418. func (s ObjectLockLegalHold) String() string {
  26419. return awsutil.Prettify(s)
  26420. }
  26421. // GoString returns the string representation.
  26422. //
  26423. // API parameter values that are decorated as "sensitive" in the API will not
  26424. // be included in the string output. The member name will be present, but the
  26425. // value will be replaced with "sensitive".
  26426. func (s ObjectLockLegalHold) GoString() string {
  26427. return s.String()
  26428. }
  26429. // SetStatus sets the Status field's value.
  26430. func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
  26431. s.Status = &v
  26432. return s
  26433. }
  26434. // A Retention configuration for an object.
  26435. type ObjectLockRetention struct {
  26436. _ struct{} `type:"structure"`
  26437. // Indicates the Retention mode for the specified object.
  26438. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  26439. // The date on which this Object Lock Retention will expire.
  26440. RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  26441. }
  26442. // String returns the string representation.
  26443. //
  26444. // API parameter values that are decorated as "sensitive" in the API will not
  26445. // be included in the string output. The member name will be present, but the
  26446. // value will be replaced with "sensitive".
  26447. func (s ObjectLockRetention) String() string {
  26448. return awsutil.Prettify(s)
  26449. }
  26450. // GoString returns the string representation.
  26451. //
  26452. // API parameter values that are decorated as "sensitive" in the API will not
  26453. // be included in the string output. The member name will be present, but the
  26454. // value will be replaced with "sensitive".
  26455. func (s ObjectLockRetention) GoString() string {
  26456. return s.String()
  26457. }
  26458. // SetMode sets the Mode field's value.
  26459. func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
  26460. s.Mode = &v
  26461. return s
  26462. }
  26463. // SetRetainUntilDate sets the RetainUntilDate field's value.
  26464. func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
  26465. s.RetainUntilDate = &v
  26466. return s
  26467. }
  26468. // The container element for an Object Lock rule.
  26469. type ObjectLockRule struct {
  26470. _ struct{} `type:"structure"`
  26471. // The default Object Lock retention mode and period that you want to apply
  26472. // to new objects placed in the specified bucket. Bucket settings require both
  26473. // a mode and a period. The period can be either Days or Years but you must
  26474. // select one. You cannot specify Days and Years at the same time.
  26475. DefaultRetention *DefaultRetention `type:"structure"`
  26476. }
  26477. // String returns the string representation.
  26478. //
  26479. // API parameter values that are decorated as "sensitive" in the API will not
  26480. // be included in the string output. The member name will be present, but the
  26481. // value will be replaced with "sensitive".
  26482. func (s ObjectLockRule) String() string {
  26483. return awsutil.Prettify(s)
  26484. }
  26485. // GoString returns the string representation.
  26486. //
  26487. // API parameter values that are decorated as "sensitive" in the API will not
  26488. // be included in the string output. The member name will be present, but the
  26489. // value will be replaced with "sensitive".
  26490. func (s ObjectLockRule) GoString() string {
  26491. return s.String()
  26492. }
  26493. // SetDefaultRetention sets the DefaultRetention field's value.
  26494. func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
  26495. s.DefaultRetention = v
  26496. return s
  26497. }
  26498. // A container for elements related to an individual part.
  26499. type ObjectPart struct {
  26500. _ struct{} `type:"structure"`
  26501. // This header can be used as a data integrity check to verify that the data
  26502. // received is the same data that was originally sent. This header specifies
  26503. // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
  26504. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  26505. // in the Amazon S3 User Guide.
  26506. ChecksumCRC32 *string `type:"string"`
  26507. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  26508. // be present if it was uploaded with the object. With multipart uploads, this
  26509. // may not be a checksum value of the object. For more information about how
  26510. // checksums are calculated with multipart uploads, see Checking object integrity
  26511. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  26512. // in the Amazon S3 User Guide.
  26513. ChecksumCRC32C *string `type:"string"`
  26514. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  26515. // present if it was uploaded with the object. With multipart uploads, this
  26516. // may not be a checksum value of the object. For more information about how
  26517. // checksums are calculated with multipart uploads, see Checking object integrity
  26518. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  26519. // in the Amazon S3 User Guide.
  26520. ChecksumSHA1 *string `type:"string"`
  26521. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  26522. // be present if it was uploaded with the object. With multipart uploads, this
  26523. // may not be a checksum value of the object. For more information about how
  26524. // checksums are calculated with multipart uploads, see Checking object integrity
  26525. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  26526. // in the Amazon S3 User Guide.
  26527. ChecksumSHA256 *string `type:"string"`
  26528. // The part number identifying the part. This value is a positive integer between
  26529. // 1 and 10,000.
  26530. PartNumber *int64 `type:"integer"`
  26531. // The size of the uploaded part in bytes.
  26532. Size *int64 `type:"integer"`
  26533. }
  26534. // String returns the string representation.
  26535. //
  26536. // API parameter values that are decorated as "sensitive" in the API will not
  26537. // be included in the string output. The member name will be present, but the
  26538. // value will be replaced with "sensitive".
  26539. func (s ObjectPart) String() string {
  26540. return awsutil.Prettify(s)
  26541. }
  26542. // GoString returns the string representation.
  26543. //
  26544. // API parameter values that are decorated as "sensitive" in the API will not
  26545. // be included in the string output. The member name will be present, but the
  26546. // value will be replaced with "sensitive".
  26547. func (s ObjectPart) GoString() string {
  26548. return s.String()
  26549. }
  26550. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  26551. func (s *ObjectPart) SetChecksumCRC32(v string) *ObjectPart {
  26552. s.ChecksumCRC32 = &v
  26553. return s
  26554. }
  26555. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  26556. func (s *ObjectPart) SetChecksumCRC32C(v string) *ObjectPart {
  26557. s.ChecksumCRC32C = &v
  26558. return s
  26559. }
  26560. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  26561. func (s *ObjectPart) SetChecksumSHA1(v string) *ObjectPart {
  26562. s.ChecksumSHA1 = &v
  26563. return s
  26564. }
  26565. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  26566. func (s *ObjectPart) SetChecksumSHA256(v string) *ObjectPart {
  26567. s.ChecksumSHA256 = &v
  26568. return s
  26569. }
  26570. // SetPartNumber sets the PartNumber field's value.
  26571. func (s *ObjectPart) SetPartNumber(v int64) *ObjectPart {
  26572. s.PartNumber = &v
  26573. return s
  26574. }
  26575. // SetSize sets the Size field's value.
  26576. func (s *ObjectPart) SetSize(v int64) *ObjectPart {
  26577. s.Size = &v
  26578. return s
  26579. }
  26580. // The version of an object.
  26581. type ObjectVersion struct {
  26582. _ struct{} `type:"structure"`
  26583. // The algorithm that was used to create a checksum of the object.
  26584. ChecksumAlgorithm []*string `type:"list" flattened:"true" enum:"ChecksumAlgorithm"`
  26585. // The entity tag is an MD5 hash of that version of the object.
  26586. ETag *string `type:"string"`
  26587. // Specifies whether the object is (true) or is not (false) the latest version
  26588. // of an object.
  26589. IsLatest *bool `type:"boolean"`
  26590. // The object key.
  26591. Key *string `min:"1" type:"string"`
  26592. // Date and time the object was last modified.
  26593. LastModified *time.Time `type:"timestamp"`
  26594. // Specifies the owner of the object.
  26595. Owner *Owner `type:"structure"`
  26596. // Size in bytes of the object.
  26597. Size *int64 `type:"integer"`
  26598. // The class of storage used to store the object.
  26599. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  26600. // Version ID of an object.
  26601. VersionId *string `type:"string"`
  26602. }
  26603. // String returns the string representation.
  26604. //
  26605. // API parameter values that are decorated as "sensitive" in the API will not
  26606. // be included in the string output. The member name will be present, but the
  26607. // value will be replaced with "sensitive".
  26608. func (s ObjectVersion) String() string {
  26609. return awsutil.Prettify(s)
  26610. }
  26611. // GoString returns the string representation.
  26612. //
  26613. // API parameter values that are decorated as "sensitive" in the API will not
  26614. // be included in the string output. The member name will be present, but the
  26615. // value will be replaced with "sensitive".
  26616. func (s ObjectVersion) GoString() string {
  26617. return s.String()
  26618. }
  26619. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  26620. func (s *ObjectVersion) SetChecksumAlgorithm(v []*string) *ObjectVersion {
  26621. s.ChecksumAlgorithm = v
  26622. return s
  26623. }
  26624. // SetETag sets the ETag field's value.
  26625. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  26626. s.ETag = &v
  26627. return s
  26628. }
  26629. // SetIsLatest sets the IsLatest field's value.
  26630. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  26631. s.IsLatest = &v
  26632. return s
  26633. }
  26634. // SetKey sets the Key field's value.
  26635. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  26636. s.Key = &v
  26637. return s
  26638. }
  26639. // SetLastModified sets the LastModified field's value.
  26640. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  26641. s.LastModified = &v
  26642. return s
  26643. }
  26644. // SetOwner sets the Owner field's value.
  26645. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  26646. s.Owner = v
  26647. return s
  26648. }
  26649. // SetSize sets the Size field's value.
  26650. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  26651. s.Size = &v
  26652. return s
  26653. }
  26654. // SetStorageClass sets the StorageClass field's value.
  26655. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  26656. s.StorageClass = &v
  26657. return s
  26658. }
  26659. // SetVersionId sets the VersionId field's value.
  26660. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  26661. s.VersionId = &v
  26662. return s
  26663. }
  26664. // Describes the location where the restore job's output is stored.
  26665. type OutputLocation struct {
  26666. _ struct{} `type:"structure"`
  26667. // Describes an S3 location that will receive the results of the restore request.
  26668. S3 *Location `type:"structure"`
  26669. }
  26670. // String returns the string representation.
  26671. //
  26672. // API parameter values that are decorated as "sensitive" in the API will not
  26673. // be included in the string output. The member name will be present, but the
  26674. // value will be replaced with "sensitive".
  26675. func (s OutputLocation) String() string {
  26676. return awsutil.Prettify(s)
  26677. }
  26678. // GoString returns the string representation.
  26679. //
  26680. // API parameter values that are decorated as "sensitive" in the API will not
  26681. // be included in the string output. The member name will be present, but the
  26682. // value will be replaced with "sensitive".
  26683. func (s OutputLocation) GoString() string {
  26684. return s.String()
  26685. }
  26686. // Validate inspects the fields of the type to determine if they are valid.
  26687. func (s *OutputLocation) Validate() error {
  26688. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  26689. if s.S3 != nil {
  26690. if err := s.S3.Validate(); err != nil {
  26691. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  26692. }
  26693. }
  26694. if invalidParams.Len() > 0 {
  26695. return invalidParams
  26696. }
  26697. return nil
  26698. }
  26699. // SetS3 sets the S3 field's value.
  26700. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  26701. s.S3 = v
  26702. return s
  26703. }
  26704. // Describes how results of the Select job are serialized.
  26705. type OutputSerialization struct {
  26706. _ struct{} `type:"structure"`
  26707. // Describes the serialization of CSV-encoded Select results.
  26708. CSV *CSVOutput `type:"structure"`
  26709. // Specifies JSON as request's output serialization format.
  26710. JSON *JSONOutput `type:"structure"`
  26711. }
  26712. // String returns the string representation.
  26713. //
  26714. // API parameter values that are decorated as "sensitive" in the API will not
  26715. // be included in the string output. The member name will be present, but the
  26716. // value will be replaced with "sensitive".
  26717. func (s OutputSerialization) String() string {
  26718. return awsutil.Prettify(s)
  26719. }
  26720. // GoString returns the string representation.
  26721. //
  26722. // API parameter values that are decorated as "sensitive" in the API will not
  26723. // be included in the string output. The member name will be present, but the
  26724. // value will be replaced with "sensitive".
  26725. func (s OutputSerialization) GoString() string {
  26726. return s.String()
  26727. }
  26728. // SetCSV sets the CSV field's value.
  26729. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  26730. s.CSV = v
  26731. return s
  26732. }
  26733. // SetJSON sets the JSON field's value.
  26734. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  26735. s.JSON = v
  26736. return s
  26737. }
  26738. // Container for the owner's display name and ID.
  26739. type Owner struct {
  26740. _ struct{} `type:"structure"`
  26741. // Container for the display name of the owner.
  26742. DisplayName *string `type:"string"`
  26743. // Container for the ID of the owner.
  26744. ID *string `type:"string"`
  26745. }
  26746. // String returns the string representation.
  26747. //
  26748. // API parameter values that are decorated as "sensitive" in the API will not
  26749. // be included in the string output. The member name will be present, but the
  26750. // value will be replaced with "sensitive".
  26751. func (s Owner) String() string {
  26752. return awsutil.Prettify(s)
  26753. }
  26754. // GoString returns the string representation.
  26755. //
  26756. // API parameter values that are decorated as "sensitive" in the API will not
  26757. // be included in the string output. The member name will be present, but the
  26758. // value will be replaced with "sensitive".
  26759. func (s Owner) GoString() string {
  26760. return s.String()
  26761. }
  26762. // SetDisplayName sets the DisplayName field's value.
  26763. func (s *Owner) SetDisplayName(v string) *Owner {
  26764. s.DisplayName = &v
  26765. return s
  26766. }
  26767. // SetID sets the ID field's value.
  26768. func (s *Owner) SetID(v string) *Owner {
  26769. s.ID = &v
  26770. return s
  26771. }
  26772. // The container element for a bucket's ownership controls.
  26773. type OwnershipControls struct {
  26774. _ struct{} `type:"structure"`
  26775. // The container element for an ownership control rule.
  26776. //
  26777. // Rules is a required field
  26778. Rules []*OwnershipControlsRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  26779. }
  26780. // String returns the string representation.
  26781. //
  26782. // API parameter values that are decorated as "sensitive" in the API will not
  26783. // be included in the string output. The member name will be present, but the
  26784. // value will be replaced with "sensitive".
  26785. func (s OwnershipControls) String() string {
  26786. return awsutil.Prettify(s)
  26787. }
  26788. // GoString returns the string representation.
  26789. //
  26790. // API parameter values that are decorated as "sensitive" in the API will not
  26791. // be included in the string output. The member name will be present, but the
  26792. // value will be replaced with "sensitive".
  26793. func (s OwnershipControls) GoString() string {
  26794. return s.String()
  26795. }
  26796. // Validate inspects the fields of the type to determine if they are valid.
  26797. func (s *OwnershipControls) Validate() error {
  26798. invalidParams := request.ErrInvalidParams{Context: "OwnershipControls"}
  26799. if s.Rules == nil {
  26800. invalidParams.Add(request.NewErrParamRequired("Rules"))
  26801. }
  26802. if s.Rules != nil {
  26803. for i, v := range s.Rules {
  26804. if v == nil {
  26805. continue
  26806. }
  26807. if err := v.Validate(); err != nil {
  26808. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  26809. }
  26810. }
  26811. }
  26812. if invalidParams.Len() > 0 {
  26813. return invalidParams
  26814. }
  26815. return nil
  26816. }
  26817. // SetRules sets the Rules field's value.
  26818. func (s *OwnershipControls) SetRules(v []*OwnershipControlsRule) *OwnershipControls {
  26819. s.Rules = v
  26820. return s
  26821. }
  26822. // The container element for an ownership control rule.
  26823. type OwnershipControlsRule struct {
  26824. _ struct{} `type:"structure"`
  26825. // The container element for object ownership for a bucket's ownership controls.
  26826. //
  26827. // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
  26828. // the bucket owner if the objects are uploaded with the bucket-owner-full-control
  26829. // canned ACL.
  26830. //
  26831. // ObjectWriter - The uploading account will own the object if the object is
  26832. // uploaded with the bucket-owner-full-control canned ACL.
  26833. //
  26834. // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
  26835. // affect permissions. The bucket owner automatically owns and has full control
  26836. // over every object in the bucket. The bucket only accepts PUT requests that
  26837. // don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
  26838. // canned ACL or an equivalent form of this ACL expressed in the XML format.
  26839. //
  26840. // ObjectOwnership is a required field
  26841. ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"`
  26842. }
  26843. // String returns the string representation.
  26844. //
  26845. // API parameter values that are decorated as "sensitive" in the API will not
  26846. // be included in the string output. The member name will be present, but the
  26847. // value will be replaced with "sensitive".
  26848. func (s OwnershipControlsRule) String() string {
  26849. return awsutil.Prettify(s)
  26850. }
  26851. // GoString returns the string representation.
  26852. //
  26853. // API parameter values that are decorated as "sensitive" in the API will not
  26854. // be included in the string output. The member name will be present, but the
  26855. // value will be replaced with "sensitive".
  26856. func (s OwnershipControlsRule) GoString() string {
  26857. return s.String()
  26858. }
  26859. // Validate inspects the fields of the type to determine if they are valid.
  26860. func (s *OwnershipControlsRule) Validate() error {
  26861. invalidParams := request.ErrInvalidParams{Context: "OwnershipControlsRule"}
  26862. if s.ObjectOwnership == nil {
  26863. invalidParams.Add(request.NewErrParamRequired("ObjectOwnership"))
  26864. }
  26865. if invalidParams.Len() > 0 {
  26866. return invalidParams
  26867. }
  26868. return nil
  26869. }
  26870. // SetObjectOwnership sets the ObjectOwnership field's value.
  26871. func (s *OwnershipControlsRule) SetObjectOwnership(v string) *OwnershipControlsRule {
  26872. s.ObjectOwnership = &v
  26873. return s
  26874. }
  26875. // Container for Parquet.
  26876. type ParquetInput struct {
  26877. _ struct{} `type:"structure"`
  26878. }
  26879. // String returns the string representation.
  26880. //
  26881. // API parameter values that are decorated as "sensitive" in the API will not
  26882. // be included in the string output. The member name will be present, but the
  26883. // value will be replaced with "sensitive".
  26884. func (s ParquetInput) String() string {
  26885. return awsutil.Prettify(s)
  26886. }
  26887. // GoString returns the string representation.
  26888. //
  26889. // API parameter values that are decorated as "sensitive" in the API will not
  26890. // be included in the string output. The member name will be present, but the
  26891. // value will be replaced with "sensitive".
  26892. func (s ParquetInput) GoString() string {
  26893. return s.String()
  26894. }
  26895. // Container for elements related to a part.
  26896. type Part struct {
  26897. _ struct{} `type:"structure"`
  26898. // This header can be used as a data integrity check to verify that the data
  26899. // received is the same data that was originally sent. This header specifies
  26900. // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
  26901. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  26902. // in the Amazon S3 User Guide.
  26903. ChecksumCRC32 *string `type:"string"`
  26904. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  26905. // be present if it was uploaded with the object. With multipart uploads, this
  26906. // may not be a checksum value of the object. For more information about how
  26907. // checksums are calculated with multipart uploads, see Checking object integrity
  26908. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  26909. // in the Amazon S3 User Guide.
  26910. ChecksumCRC32C *string `type:"string"`
  26911. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  26912. // present if it was uploaded with the object. With multipart uploads, this
  26913. // may not be a checksum value of the object. For more information about how
  26914. // checksums are calculated with multipart uploads, see Checking object integrity
  26915. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  26916. // in the Amazon S3 User Guide.
  26917. ChecksumSHA1 *string `type:"string"`
  26918. // This header can be used as a data integrity check to verify that the data
  26919. // received is the same data that was originally sent. This header specifies
  26920. // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
  26921. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  26922. // in the Amazon S3 User Guide.
  26923. ChecksumSHA256 *string `type:"string"`
  26924. // Entity tag returned when the part was uploaded.
  26925. ETag *string `type:"string"`
  26926. // Date and time at which the part was uploaded.
  26927. LastModified *time.Time `type:"timestamp"`
  26928. // Part number identifying the part. This is a positive integer between 1 and
  26929. // 10,000.
  26930. PartNumber *int64 `type:"integer"`
  26931. // Size in bytes of the uploaded part data.
  26932. Size *int64 `type:"integer"`
  26933. }
  26934. // String returns the string representation.
  26935. //
  26936. // API parameter values that are decorated as "sensitive" in the API will not
  26937. // be included in the string output. The member name will be present, but the
  26938. // value will be replaced with "sensitive".
  26939. func (s Part) String() string {
  26940. return awsutil.Prettify(s)
  26941. }
  26942. // GoString returns the string representation.
  26943. //
  26944. // API parameter values that are decorated as "sensitive" in the API will not
  26945. // be included in the string output. The member name will be present, but the
  26946. // value will be replaced with "sensitive".
  26947. func (s Part) GoString() string {
  26948. return s.String()
  26949. }
  26950. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  26951. func (s *Part) SetChecksumCRC32(v string) *Part {
  26952. s.ChecksumCRC32 = &v
  26953. return s
  26954. }
  26955. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  26956. func (s *Part) SetChecksumCRC32C(v string) *Part {
  26957. s.ChecksumCRC32C = &v
  26958. return s
  26959. }
  26960. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  26961. func (s *Part) SetChecksumSHA1(v string) *Part {
  26962. s.ChecksumSHA1 = &v
  26963. return s
  26964. }
  26965. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  26966. func (s *Part) SetChecksumSHA256(v string) *Part {
  26967. s.ChecksumSHA256 = &v
  26968. return s
  26969. }
  26970. // SetETag sets the ETag field's value.
  26971. func (s *Part) SetETag(v string) *Part {
  26972. s.ETag = &v
  26973. return s
  26974. }
  26975. // SetLastModified sets the LastModified field's value.
  26976. func (s *Part) SetLastModified(v time.Time) *Part {
  26977. s.LastModified = &v
  26978. return s
  26979. }
  26980. // SetPartNumber sets the PartNumber field's value.
  26981. func (s *Part) SetPartNumber(v int64) *Part {
  26982. s.PartNumber = &v
  26983. return s
  26984. }
  26985. // SetSize sets the Size field's value.
  26986. func (s *Part) SetSize(v int64) *Part {
  26987. s.Size = &v
  26988. return s
  26989. }
  26990. // The container element for a bucket's policy status.
  26991. type PolicyStatus struct {
  26992. _ struct{} `type:"structure"`
  26993. // The policy status for this bucket. TRUE indicates that this bucket is public.
  26994. // FALSE indicates that the bucket is not public.
  26995. IsPublic *bool `locationName:"IsPublic" type:"boolean"`
  26996. }
  26997. // String returns the string representation.
  26998. //
  26999. // API parameter values that are decorated as "sensitive" in the API will not
  27000. // be included in the string output. The member name will be present, but the
  27001. // value will be replaced with "sensitive".
  27002. func (s PolicyStatus) String() string {
  27003. return awsutil.Prettify(s)
  27004. }
  27005. // GoString returns the string representation.
  27006. //
  27007. // API parameter values that are decorated as "sensitive" in the API will not
  27008. // be included in the string output. The member name will be present, but the
  27009. // value will be replaced with "sensitive".
  27010. func (s PolicyStatus) GoString() string {
  27011. return s.String()
  27012. }
  27013. // SetIsPublic sets the IsPublic field's value.
  27014. func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
  27015. s.IsPublic = &v
  27016. return s
  27017. }
  27018. // This data type contains information about progress of an operation.
  27019. type Progress struct {
  27020. _ struct{} `type:"structure"`
  27021. // The current number of uncompressed object bytes processed.
  27022. BytesProcessed *int64 `type:"long"`
  27023. // The current number of bytes of records payload data returned.
  27024. BytesReturned *int64 `type:"long"`
  27025. // The current number of object bytes scanned.
  27026. BytesScanned *int64 `type:"long"`
  27027. }
  27028. // String returns the string representation.
  27029. //
  27030. // API parameter values that are decorated as "sensitive" in the API will not
  27031. // be included in the string output. The member name will be present, but the
  27032. // value will be replaced with "sensitive".
  27033. func (s Progress) String() string {
  27034. return awsutil.Prettify(s)
  27035. }
  27036. // GoString returns the string representation.
  27037. //
  27038. // API parameter values that are decorated as "sensitive" in the API will not
  27039. // be included in the string output. The member name will be present, but the
  27040. // value will be replaced with "sensitive".
  27041. func (s Progress) GoString() string {
  27042. return s.String()
  27043. }
  27044. // SetBytesProcessed sets the BytesProcessed field's value.
  27045. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  27046. s.BytesProcessed = &v
  27047. return s
  27048. }
  27049. // SetBytesReturned sets the BytesReturned field's value.
  27050. func (s *Progress) SetBytesReturned(v int64) *Progress {
  27051. s.BytesReturned = &v
  27052. return s
  27053. }
  27054. // SetBytesScanned sets the BytesScanned field's value.
  27055. func (s *Progress) SetBytesScanned(v int64) *Progress {
  27056. s.BytesScanned = &v
  27057. return s
  27058. }
  27059. // This data type contains information about the progress event of an operation.
  27060. type ProgressEvent struct {
  27061. _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
  27062. // The Progress event details.
  27063. Details *Progress `locationName:"Details" type:"structure"`
  27064. }
  27065. // String returns the string representation.
  27066. //
  27067. // API parameter values that are decorated as "sensitive" in the API will not
  27068. // be included in the string output. The member name will be present, but the
  27069. // value will be replaced with "sensitive".
  27070. func (s ProgressEvent) String() string {
  27071. return awsutil.Prettify(s)
  27072. }
  27073. // GoString returns the string representation.
  27074. //
  27075. // API parameter values that are decorated as "sensitive" in the API will not
  27076. // be included in the string output. The member name will be present, but the
  27077. // value will be replaced with "sensitive".
  27078. func (s ProgressEvent) GoString() string {
  27079. return s.String()
  27080. }
  27081. // SetDetails sets the Details field's value.
  27082. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  27083. s.Details = v
  27084. return s
  27085. }
  27086. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  27087. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  27088. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  27089. // This method is only used internally within the SDK's EventStream handling.
  27090. func (s *ProgressEvent) UnmarshalEvent(
  27091. payloadUnmarshaler protocol.PayloadUnmarshaler,
  27092. msg eventstream.Message,
  27093. ) error {
  27094. if err := payloadUnmarshaler.UnmarshalPayload(
  27095. bytes.NewReader(msg.Payload), s,
  27096. ); err != nil {
  27097. return err
  27098. }
  27099. return nil
  27100. }
  27101. // MarshalEvent marshals the type into an stream event value. This method
  27102. // should only used internally within the SDK's EventStream handling.
  27103. func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  27104. msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  27105. var buf bytes.Buffer
  27106. if err = pm.MarshalPayload(&buf, s); err != nil {
  27107. return eventstream.Message{}, err
  27108. }
  27109. msg.Payload = buf.Bytes()
  27110. return msg, err
  27111. }
  27112. // The PublicAccessBlock configuration that you want to apply to this Amazon
  27113. // S3 bucket. You can enable the configuration options in any combination. For
  27114. // more information about when Amazon S3 considers a bucket or object public,
  27115. // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
  27116. // in the Amazon S3 User Guide.
  27117. type PublicAccessBlockConfiguration struct {
  27118. _ struct{} `type:"structure"`
  27119. // Specifies whether Amazon S3 should block public access control lists (ACLs)
  27120. // for this bucket and objects in this bucket. Setting this element to TRUE
  27121. // causes the following behavior:
  27122. //
  27123. // * PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is
  27124. // public.
  27125. //
  27126. // * PUT Object calls fail if the request includes a public ACL.
  27127. //
  27128. // * PUT Bucket calls fail if the request includes a public ACL.
  27129. //
  27130. // Enabling this setting doesn't affect existing policies or ACLs.
  27131. BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
  27132. // Specifies whether Amazon S3 should block public bucket policies for this
  27133. // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
  27134. // PUT Bucket policy if the specified bucket policy allows public access.
  27135. //
  27136. // Enabling this setting doesn't affect existing bucket policies.
  27137. BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
  27138. // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
  27139. // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
  27140. // ignore all public ACLs on this bucket and objects in this bucket.
  27141. //
  27142. // Enabling this setting doesn't affect the persistence of any existing ACLs
  27143. // and doesn't prevent new public ACLs from being set.
  27144. IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
  27145. // Specifies whether Amazon S3 should restrict public bucket policies for this
  27146. // bucket. Setting this element to TRUE restricts access to this bucket to only
  27147. // Amazon Web Service principals and authorized users within this account if
  27148. // the bucket has a public policy.
  27149. //
  27150. // Enabling this setting doesn't affect previously stored bucket policies, except
  27151. // that public and cross-account access within any public bucket policy, including
  27152. // non-public delegation to specific accounts, is blocked.
  27153. RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
  27154. }
  27155. // String returns the string representation.
  27156. //
  27157. // API parameter values that are decorated as "sensitive" in the API will not
  27158. // be included in the string output. The member name will be present, but the
  27159. // value will be replaced with "sensitive".
  27160. func (s PublicAccessBlockConfiguration) String() string {
  27161. return awsutil.Prettify(s)
  27162. }
  27163. // GoString returns the string representation.
  27164. //
  27165. // API parameter values that are decorated as "sensitive" in the API will not
  27166. // be included in the string output. The member name will be present, but the
  27167. // value will be replaced with "sensitive".
  27168. func (s PublicAccessBlockConfiguration) GoString() string {
  27169. return s.String()
  27170. }
  27171. // SetBlockPublicAcls sets the BlockPublicAcls field's value.
  27172. func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
  27173. s.BlockPublicAcls = &v
  27174. return s
  27175. }
  27176. // SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
  27177. func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
  27178. s.BlockPublicPolicy = &v
  27179. return s
  27180. }
  27181. // SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
  27182. func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
  27183. s.IgnorePublicAcls = &v
  27184. return s
  27185. }
  27186. // SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
  27187. func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
  27188. s.RestrictPublicBuckets = &v
  27189. return s
  27190. }
  27191. type PutBucketAccelerateConfigurationInput struct {
  27192. _ struct{} `locationName:"PutBucketAccelerateConfigurationRequest" type:"structure" payload:"AccelerateConfiguration"`
  27193. // Container for setting the transfer acceleration state.
  27194. //
  27195. // AccelerateConfiguration is a required field
  27196. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27197. // The name of the bucket for which the accelerate configuration is set.
  27198. //
  27199. // Bucket is a required field
  27200. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27201. // Indicates the algorithm used to create the checksum for the object when using
  27202. // the SDK. This header will not provide any additional functionality if not
  27203. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  27204. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  27205. // the HTTP status code 400 Bad Request. For more information, see Checking
  27206. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  27207. // in the Amazon S3 User Guide.
  27208. //
  27209. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  27210. // parameter.
  27211. //
  27212. // The AWS SDK for Go v1 does not support automatic computing request payload
  27213. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  27214. // is specified for this parameter, the matching algorithm's checksum member
  27215. // must be populated with the algorithm's checksum of the request payload.
  27216. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  27217. // The account ID of the expected bucket owner. If the bucket is owned by a
  27218. // different account, the request fails with the HTTP status code 403 Forbidden
  27219. // (access denied).
  27220. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  27221. }
  27222. // String returns the string representation.
  27223. //
  27224. // API parameter values that are decorated as "sensitive" in the API will not
  27225. // be included in the string output. The member name will be present, but the
  27226. // value will be replaced with "sensitive".
  27227. func (s PutBucketAccelerateConfigurationInput) String() string {
  27228. return awsutil.Prettify(s)
  27229. }
  27230. // GoString returns the string representation.
  27231. //
  27232. // API parameter values that are decorated as "sensitive" in the API will not
  27233. // be included in the string output. The member name will be present, but the
  27234. // value will be replaced with "sensitive".
  27235. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  27236. return s.String()
  27237. }
  27238. // Validate inspects the fields of the type to determine if they are valid.
  27239. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  27240. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  27241. if s.AccelerateConfiguration == nil {
  27242. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  27243. }
  27244. if s.Bucket == nil {
  27245. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27246. }
  27247. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27248. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27249. }
  27250. if invalidParams.Len() > 0 {
  27251. return invalidParams
  27252. }
  27253. return nil
  27254. }
  27255. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  27256. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  27257. s.AccelerateConfiguration = v
  27258. return s
  27259. }
  27260. // SetBucket sets the Bucket field's value.
  27261. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  27262. s.Bucket = &v
  27263. return s
  27264. }
  27265. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  27266. if s.Bucket == nil {
  27267. return v
  27268. }
  27269. return *s.Bucket
  27270. }
  27271. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  27272. func (s *PutBucketAccelerateConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketAccelerateConfigurationInput {
  27273. s.ChecksumAlgorithm = &v
  27274. return s
  27275. }
  27276. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  27277. func (s *PutBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAccelerateConfigurationInput {
  27278. s.ExpectedBucketOwner = &v
  27279. return s
  27280. }
  27281. func (s *PutBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
  27282. if s.Bucket == nil {
  27283. return nil, fmt.Errorf("member Bucket is nil")
  27284. }
  27285. return parseEndpointARN(*s.Bucket)
  27286. }
  27287. func (s *PutBucketAccelerateConfigurationInput) hasEndpointARN() bool {
  27288. if s.Bucket == nil {
  27289. return false
  27290. }
  27291. return arn.IsARN(*s.Bucket)
  27292. }
  27293. // updateArnableField updates the value of the input field that
  27294. // takes an ARN as an input. This method is useful to backfill
  27295. // the parsed resource name from ARN into the input member.
  27296. // It returns a pointer to a modified copy of input and an error.
  27297. // Note that original input is not modified.
  27298. func (s PutBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
  27299. if s.Bucket == nil {
  27300. return nil, fmt.Errorf("member Bucket is nil")
  27301. }
  27302. s.Bucket = aws.String(v)
  27303. return &s, nil
  27304. }
  27305. type PutBucketAccelerateConfigurationOutput struct {
  27306. _ struct{} `type:"structure"`
  27307. }
  27308. // String returns the string representation.
  27309. //
  27310. // API parameter values that are decorated as "sensitive" in the API will not
  27311. // be included in the string output. The member name will be present, but the
  27312. // value will be replaced with "sensitive".
  27313. func (s PutBucketAccelerateConfigurationOutput) String() string {
  27314. return awsutil.Prettify(s)
  27315. }
  27316. // GoString returns the string representation.
  27317. //
  27318. // API parameter values that are decorated as "sensitive" in the API will not
  27319. // be included in the string output. The member name will be present, but the
  27320. // value will be replaced with "sensitive".
  27321. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  27322. return s.String()
  27323. }
  27324. type PutBucketAclInput struct {
  27325. _ struct{} `locationName:"PutBucketAclRequest" type:"structure" payload:"AccessControlPolicy"`
  27326. // The canned ACL to apply to the bucket.
  27327. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  27328. // Contains the elements that set the ACL permissions for an object per grantee.
  27329. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27330. // The bucket to which to apply the ACL.
  27331. //
  27332. // Bucket is a required field
  27333. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27334. // Indicates the algorithm used to create the checksum for the object when using
  27335. // the SDK. This header will not provide any additional functionality if not
  27336. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  27337. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  27338. // the HTTP status code 400 Bad Request. For more information, see Checking
  27339. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  27340. // in the Amazon S3 User Guide.
  27341. //
  27342. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  27343. // parameter.
  27344. //
  27345. // The AWS SDK for Go v1 does not support automatic computing request payload
  27346. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  27347. // is specified for this parameter, the matching algorithm's checksum member
  27348. // must be populated with the algorithm's checksum of the request payload.
  27349. //
  27350. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  27351. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  27352. // to be used.
  27353. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  27354. // The account ID of the expected bucket owner. If the bucket is owned by a
  27355. // different account, the request fails with the HTTP status code 403 Forbidden
  27356. // (access denied).
  27357. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  27358. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  27359. // bucket.
  27360. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  27361. // Allows grantee to list the objects in the bucket.
  27362. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  27363. // Allows grantee to read the bucket ACL.
  27364. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  27365. // Allows grantee to create new objects in the bucket.
  27366. //
  27367. // For the bucket and object owners of existing objects, also allows deletions
  27368. // and overwrites of those objects.
  27369. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  27370. // Allows grantee to write the ACL for the applicable bucket.
  27371. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  27372. }
  27373. // String returns the string representation.
  27374. //
  27375. // API parameter values that are decorated as "sensitive" in the API will not
  27376. // be included in the string output. The member name will be present, but the
  27377. // value will be replaced with "sensitive".
  27378. func (s PutBucketAclInput) String() string {
  27379. return awsutil.Prettify(s)
  27380. }
  27381. // GoString returns the string representation.
  27382. //
  27383. // API parameter values that are decorated as "sensitive" in the API will not
  27384. // be included in the string output. The member name will be present, but the
  27385. // value will be replaced with "sensitive".
  27386. func (s PutBucketAclInput) GoString() string {
  27387. return s.String()
  27388. }
  27389. // Validate inspects the fields of the type to determine if they are valid.
  27390. func (s *PutBucketAclInput) Validate() error {
  27391. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  27392. if s.Bucket == nil {
  27393. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27394. }
  27395. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27396. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27397. }
  27398. if s.AccessControlPolicy != nil {
  27399. if err := s.AccessControlPolicy.Validate(); err != nil {
  27400. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  27401. }
  27402. }
  27403. if invalidParams.Len() > 0 {
  27404. return invalidParams
  27405. }
  27406. return nil
  27407. }
  27408. // SetACL sets the ACL field's value.
  27409. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  27410. s.ACL = &v
  27411. return s
  27412. }
  27413. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  27414. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  27415. s.AccessControlPolicy = v
  27416. return s
  27417. }
  27418. // SetBucket sets the Bucket field's value.
  27419. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  27420. s.Bucket = &v
  27421. return s
  27422. }
  27423. func (s *PutBucketAclInput) getBucket() (v string) {
  27424. if s.Bucket == nil {
  27425. return v
  27426. }
  27427. return *s.Bucket
  27428. }
  27429. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  27430. func (s *PutBucketAclInput) SetChecksumAlgorithm(v string) *PutBucketAclInput {
  27431. s.ChecksumAlgorithm = &v
  27432. return s
  27433. }
  27434. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  27435. func (s *PutBucketAclInput) SetExpectedBucketOwner(v string) *PutBucketAclInput {
  27436. s.ExpectedBucketOwner = &v
  27437. return s
  27438. }
  27439. // SetGrantFullControl sets the GrantFullControl field's value.
  27440. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  27441. s.GrantFullControl = &v
  27442. return s
  27443. }
  27444. // SetGrantRead sets the GrantRead field's value.
  27445. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  27446. s.GrantRead = &v
  27447. return s
  27448. }
  27449. // SetGrantReadACP sets the GrantReadACP field's value.
  27450. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  27451. s.GrantReadACP = &v
  27452. return s
  27453. }
  27454. // SetGrantWrite sets the GrantWrite field's value.
  27455. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  27456. s.GrantWrite = &v
  27457. return s
  27458. }
  27459. // SetGrantWriteACP sets the GrantWriteACP field's value.
  27460. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  27461. s.GrantWriteACP = &v
  27462. return s
  27463. }
  27464. func (s *PutBucketAclInput) getEndpointARN() (arn.Resource, error) {
  27465. if s.Bucket == nil {
  27466. return nil, fmt.Errorf("member Bucket is nil")
  27467. }
  27468. return parseEndpointARN(*s.Bucket)
  27469. }
  27470. func (s *PutBucketAclInput) hasEndpointARN() bool {
  27471. if s.Bucket == nil {
  27472. return false
  27473. }
  27474. return arn.IsARN(*s.Bucket)
  27475. }
  27476. // updateArnableField updates the value of the input field that
  27477. // takes an ARN as an input. This method is useful to backfill
  27478. // the parsed resource name from ARN into the input member.
  27479. // It returns a pointer to a modified copy of input and an error.
  27480. // Note that original input is not modified.
  27481. func (s PutBucketAclInput) updateArnableField(v string) (interface{}, error) {
  27482. if s.Bucket == nil {
  27483. return nil, fmt.Errorf("member Bucket is nil")
  27484. }
  27485. s.Bucket = aws.String(v)
  27486. return &s, nil
  27487. }
  27488. type PutBucketAclOutput struct {
  27489. _ struct{} `type:"structure"`
  27490. }
  27491. // String returns the string representation.
  27492. //
  27493. // API parameter values that are decorated as "sensitive" in the API will not
  27494. // be included in the string output. The member name will be present, but the
  27495. // value will be replaced with "sensitive".
  27496. func (s PutBucketAclOutput) String() string {
  27497. return awsutil.Prettify(s)
  27498. }
  27499. // GoString returns the string representation.
  27500. //
  27501. // API parameter values that are decorated as "sensitive" in the API will not
  27502. // be included in the string output. The member name will be present, but the
  27503. // value will be replaced with "sensitive".
  27504. func (s PutBucketAclOutput) GoString() string {
  27505. return s.String()
  27506. }
  27507. type PutBucketAnalyticsConfigurationInput struct {
  27508. _ struct{} `locationName:"PutBucketAnalyticsConfigurationRequest" type:"structure" payload:"AnalyticsConfiguration"`
  27509. // The configuration and any analyses for the analytics filter.
  27510. //
  27511. // AnalyticsConfiguration is a required field
  27512. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27513. // The name of the bucket to which an analytics configuration is stored.
  27514. //
  27515. // Bucket is a required field
  27516. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27517. // The account ID of the expected bucket owner. If the bucket is owned by a
  27518. // different account, the request fails with the HTTP status code 403 Forbidden
  27519. // (access denied).
  27520. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  27521. // The ID that identifies the analytics configuration.
  27522. //
  27523. // Id is a required field
  27524. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  27525. }
  27526. // String returns the string representation.
  27527. //
  27528. // API parameter values that are decorated as "sensitive" in the API will not
  27529. // be included in the string output. The member name will be present, but the
  27530. // value will be replaced with "sensitive".
  27531. func (s PutBucketAnalyticsConfigurationInput) String() string {
  27532. return awsutil.Prettify(s)
  27533. }
  27534. // GoString returns the string representation.
  27535. //
  27536. // API parameter values that are decorated as "sensitive" in the API will not
  27537. // be included in the string output. The member name will be present, but the
  27538. // value will be replaced with "sensitive".
  27539. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  27540. return s.String()
  27541. }
  27542. // Validate inspects the fields of the type to determine if they are valid.
  27543. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  27544. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  27545. if s.AnalyticsConfiguration == nil {
  27546. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  27547. }
  27548. if s.Bucket == nil {
  27549. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27550. }
  27551. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27552. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27553. }
  27554. if s.Id == nil {
  27555. invalidParams.Add(request.NewErrParamRequired("Id"))
  27556. }
  27557. if s.AnalyticsConfiguration != nil {
  27558. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  27559. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  27560. }
  27561. }
  27562. if invalidParams.Len() > 0 {
  27563. return invalidParams
  27564. }
  27565. return nil
  27566. }
  27567. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  27568. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  27569. s.AnalyticsConfiguration = v
  27570. return s
  27571. }
  27572. // SetBucket sets the Bucket field's value.
  27573. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  27574. s.Bucket = &v
  27575. return s
  27576. }
  27577. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  27578. if s.Bucket == nil {
  27579. return v
  27580. }
  27581. return *s.Bucket
  27582. }
  27583. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  27584. func (s *PutBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAnalyticsConfigurationInput {
  27585. s.ExpectedBucketOwner = &v
  27586. return s
  27587. }
  27588. // SetId sets the Id field's value.
  27589. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  27590. s.Id = &v
  27591. return s
  27592. }
  27593. func (s *PutBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  27594. if s.Bucket == nil {
  27595. return nil, fmt.Errorf("member Bucket is nil")
  27596. }
  27597. return parseEndpointARN(*s.Bucket)
  27598. }
  27599. func (s *PutBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
  27600. if s.Bucket == nil {
  27601. return false
  27602. }
  27603. return arn.IsARN(*s.Bucket)
  27604. }
  27605. // updateArnableField updates the value of the input field that
  27606. // takes an ARN as an input. This method is useful to backfill
  27607. // the parsed resource name from ARN into the input member.
  27608. // It returns a pointer to a modified copy of input and an error.
  27609. // Note that original input is not modified.
  27610. func (s PutBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  27611. if s.Bucket == nil {
  27612. return nil, fmt.Errorf("member Bucket is nil")
  27613. }
  27614. s.Bucket = aws.String(v)
  27615. return &s, nil
  27616. }
  27617. type PutBucketAnalyticsConfigurationOutput struct {
  27618. _ struct{} `type:"structure"`
  27619. }
  27620. // String returns the string representation.
  27621. //
  27622. // API parameter values that are decorated as "sensitive" in the API will not
  27623. // be included in the string output. The member name will be present, but the
  27624. // value will be replaced with "sensitive".
  27625. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  27626. return awsutil.Prettify(s)
  27627. }
  27628. // GoString returns the string representation.
  27629. //
  27630. // API parameter values that are decorated as "sensitive" in the API will not
  27631. // be included in the string output. The member name will be present, but the
  27632. // value will be replaced with "sensitive".
  27633. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  27634. return s.String()
  27635. }
  27636. type PutBucketCorsInput struct {
  27637. _ struct{} `locationName:"PutBucketCorsRequest" type:"structure" payload:"CORSConfiguration"`
  27638. // Specifies the bucket impacted by the corsconfiguration.
  27639. //
  27640. // Bucket is a required field
  27641. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27642. // Describes the cross-origin access configuration for objects in an Amazon
  27643. // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
  27644. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
  27645. // S3 User Guide.
  27646. //
  27647. // CORSConfiguration is a required field
  27648. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27649. // Indicates the algorithm used to create the checksum for the object when using
  27650. // the SDK. This header will not provide any additional functionality if not
  27651. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  27652. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  27653. // the HTTP status code 400 Bad Request. For more information, see Checking
  27654. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  27655. // in the Amazon S3 User Guide.
  27656. //
  27657. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  27658. // parameter.
  27659. //
  27660. // The AWS SDK for Go v1 does not support automatic computing request payload
  27661. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  27662. // is specified for this parameter, the matching algorithm's checksum member
  27663. // must be populated with the algorithm's checksum of the request payload.
  27664. //
  27665. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  27666. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  27667. // to be used.
  27668. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  27669. // The account ID of the expected bucket owner. If the bucket is owned by a
  27670. // different account, the request fails with the HTTP status code 403 Forbidden
  27671. // (access denied).
  27672. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  27673. }
  27674. // String returns the string representation.
  27675. //
  27676. // API parameter values that are decorated as "sensitive" in the API will not
  27677. // be included in the string output. The member name will be present, but the
  27678. // value will be replaced with "sensitive".
  27679. func (s PutBucketCorsInput) String() string {
  27680. return awsutil.Prettify(s)
  27681. }
  27682. // GoString returns the string representation.
  27683. //
  27684. // API parameter values that are decorated as "sensitive" in the API will not
  27685. // be included in the string output. The member name will be present, but the
  27686. // value will be replaced with "sensitive".
  27687. func (s PutBucketCorsInput) GoString() string {
  27688. return s.String()
  27689. }
  27690. // Validate inspects the fields of the type to determine if they are valid.
  27691. func (s *PutBucketCorsInput) Validate() error {
  27692. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  27693. if s.Bucket == nil {
  27694. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27695. }
  27696. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27697. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27698. }
  27699. if s.CORSConfiguration == nil {
  27700. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  27701. }
  27702. if s.CORSConfiguration != nil {
  27703. if err := s.CORSConfiguration.Validate(); err != nil {
  27704. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  27705. }
  27706. }
  27707. if invalidParams.Len() > 0 {
  27708. return invalidParams
  27709. }
  27710. return nil
  27711. }
  27712. // SetBucket sets the Bucket field's value.
  27713. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  27714. s.Bucket = &v
  27715. return s
  27716. }
  27717. func (s *PutBucketCorsInput) getBucket() (v string) {
  27718. if s.Bucket == nil {
  27719. return v
  27720. }
  27721. return *s.Bucket
  27722. }
  27723. // SetCORSConfiguration sets the CORSConfiguration field's value.
  27724. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  27725. s.CORSConfiguration = v
  27726. return s
  27727. }
  27728. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  27729. func (s *PutBucketCorsInput) SetChecksumAlgorithm(v string) *PutBucketCorsInput {
  27730. s.ChecksumAlgorithm = &v
  27731. return s
  27732. }
  27733. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  27734. func (s *PutBucketCorsInput) SetExpectedBucketOwner(v string) *PutBucketCorsInput {
  27735. s.ExpectedBucketOwner = &v
  27736. return s
  27737. }
  27738. func (s *PutBucketCorsInput) getEndpointARN() (arn.Resource, error) {
  27739. if s.Bucket == nil {
  27740. return nil, fmt.Errorf("member Bucket is nil")
  27741. }
  27742. return parseEndpointARN(*s.Bucket)
  27743. }
  27744. func (s *PutBucketCorsInput) hasEndpointARN() bool {
  27745. if s.Bucket == nil {
  27746. return false
  27747. }
  27748. return arn.IsARN(*s.Bucket)
  27749. }
  27750. // updateArnableField updates the value of the input field that
  27751. // takes an ARN as an input. This method is useful to backfill
  27752. // the parsed resource name from ARN into the input member.
  27753. // It returns a pointer to a modified copy of input and an error.
  27754. // Note that original input is not modified.
  27755. func (s PutBucketCorsInput) updateArnableField(v string) (interface{}, error) {
  27756. if s.Bucket == nil {
  27757. return nil, fmt.Errorf("member Bucket is nil")
  27758. }
  27759. s.Bucket = aws.String(v)
  27760. return &s, nil
  27761. }
  27762. type PutBucketCorsOutput struct {
  27763. _ struct{} `type:"structure"`
  27764. }
  27765. // String returns the string representation.
  27766. //
  27767. // API parameter values that are decorated as "sensitive" in the API will not
  27768. // be included in the string output. The member name will be present, but the
  27769. // value will be replaced with "sensitive".
  27770. func (s PutBucketCorsOutput) String() string {
  27771. return awsutil.Prettify(s)
  27772. }
  27773. // GoString returns the string representation.
  27774. //
  27775. // API parameter values that are decorated as "sensitive" in the API will not
  27776. // be included in the string output. The member name will be present, but the
  27777. // value will be replaced with "sensitive".
  27778. func (s PutBucketCorsOutput) GoString() string {
  27779. return s.String()
  27780. }
  27781. type PutBucketEncryptionInput struct {
  27782. _ struct{} `locationName:"PutBucketEncryptionRequest" type:"structure" payload:"ServerSideEncryptionConfiguration"`
  27783. // Specifies default encryption for a bucket using server-side encryption with
  27784. // Amazon S3-managed keys (SSE-S3) or customer managed keys (SSE-KMS). For information
  27785. // about the Amazon S3 default encryption feature, see Amazon S3 Default Bucket
  27786. // Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
  27787. // in the Amazon S3 User Guide.
  27788. //
  27789. // Bucket is a required field
  27790. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27791. // Indicates the algorithm used to create the checksum for the object when using
  27792. // the SDK. This header will not provide any additional functionality if not
  27793. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  27794. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  27795. // the HTTP status code 400 Bad Request. For more information, see Checking
  27796. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  27797. // in the Amazon S3 User Guide.
  27798. //
  27799. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  27800. // parameter.
  27801. //
  27802. // The AWS SDK for Go v1 does not support automatic computing request payload
  27803. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  27804. // is specified for this parameter, the matching algorithm's checksum member
  27805. // must be populated with the algorithm's checksum of the request payload.
  27806. //
  27807. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  27808. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  27809. // to be used.
  27810. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  27811. // The account ID of the expected bucket owner. If the bucket is owned by a
  27812. // different account, the request fails with the HTTP status code 403 Forbidden
  27813. // (access denied).
  27814. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  27815. // Specifies the default server-side-encryption configuration.
  27816. //
  27817. // ServerSideEncryptionConfiguration is a required field
  27818. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27819. }
  27820. // String returns the string representation.
  27821. //
  27822. // API parameter values that are decorated as "sensitive" in the API will not
  27823. // be included in the string output. The member name will be present, but the
  27824. // value will be replaced with "sensitive".
  27825. func (s PutBucketEncryptionInput) String() string {
  27826. return awsutil.Prettify(s)
  27827. }
  27828. // GoString returns the string representation.
  27829. //
  27830. // API parameter values that are decorated as "sensitive" in the API will not
  27831. // be included in the string output. The member name will be present, but the
  27832. // value will be replaced with "sensitive".
  27833. func (s PutBucketEncryptionInput) GoString() string {
  27834. return s.String()
  27835. }
  27836. // Validate inspects the fields of the type to determine if they are valid.
  27837. func (s *PutBucketEncryptionInput) Validate() error {
  27838. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  27839. if s.Bucket == nil {
  27840. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27841. }
  27842. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27843. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27844. }
  27845. if s.ServerSideEncryptionConfiguration == nil {
  27846. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  27847. }
  27848. if s.ServerSideEncryptionConfiguration != nil {
  27849. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  27850. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  27851. }
  27852. }
  27853. if invalidParams.Len() > 0 {
  27854. return invalidParams
  27855. }
  27856. return nil
  27857. }
  27858. // SetBucket sets the Bucket field's value.
  27859. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  27860. s.Bucket = &v
  27861. return s
  27862. }
  27863. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  27864. if s.Bucket == nil {
  27865. return v
  27866. }
  27867. return *s.Bucket
  27868. }
  27869. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  27870. func (s *PutBucketEncryptionInput) SetChecksumAlgorithm(v string) *PutBucketEncryptionInput {
  27871. s.ChecksumAlgorithm = &v
  27872. return s
  27873. }
  27874. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  27875. func (s *PutBucketEncryptionInput) SetExpectedBucketOwner(v string) *PutBucketEncryptionInput {
  27876. s.ExpectedBucketOwner = &v
  27877. return s
  27878. }
  27879. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  27880. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  27881. s.ServerSideEncryptionConfiguration = v
  27882. return s
  27883. }
  27884. func (s *PutBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
  27885. if s.Bucket == nil {
  27886. return nil, fmt.Errorf("member Bucket is nil")
  27887. }
  27888. return parseEndpointARN(*s.Bucket)
  27889. }
  27890. func (s *PutBucketEncryptionInput) hasEndpointARN() bool {
  27891. if s.Bucket == nil {
  27892. return false
  27893. }
  27894. return arn.IsARN(*s.Bucket)
  27895. }
  27896. // updateArnableField updates the value of the input field that
  27897. // takes an ARN as an input. This method is useful to backfill
  27898. // the parsed resource name from ARN into the input member.
  27899. // It returns a pointer to a modified copy of input and an error.
  27900. // Note that original input is not modified.
  27901. func (s PutBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
  27902. if s.Bucket == nil {
  27903. return nil, fmt.Errorf("member Bucket is nil")
  27904. }
  27905. s.Bucket = aws.String(v)
  27906. return &s, nil
  27907. }
  27908. type PutBucketEncryptionOutput struct {
  27909. _ struct{} `type:"structure"`
  27910. }
  27911. // String returns the string representation.
  27912. //
  27913. // API parameter values that are decorated as "sensitive" in the API will not
  27914. // be included in the string output. The member name will be present, but the
  27915. // value will be replaced with "sensitive".
  27916. func (s PutBucketEncryptionOutput) String() string {
  27917. return awsutil.Prettify(s)
  27918. }
  27919. // GoString returns the string representation.
  27920. //
  27921. // API parameter values that are decorated as "sensitive" in the API will not
  27922. // be included in the string output. The member name will be present, but the
  27923. // value will be replaced with "sensitive".
  27924. func (s PutBucketEncryptionOutput) GoString() string {
  27925. return s.String()
  27926. }
  27927. type PutBucketIntelligentTieringConfigurationInput struct {
  27928. _ struct{} `locationName:"PutBucketIntelligentTieringConfigurationRequest" type:"structure" payload:"IntelligentTieringConfiguration"`
  27929. // The name of the Amazon S3 bucket whose configuration you want to modify or
  27930. // retrieve.
  27931. //
  27932. // Bucket is a required field
  27933. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  27934. // The ID used to identify the S3 Intelligent-Tiering configuration.
  27935. //
  27936. // Id is a required field
  27937. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  27938. // Container for S3 Intelligent-Tiering configuration.
  27939. //
  27940. // IntelligentTieringConfiguration is a required field
  27941. IntelligentTieringConfiguration *IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  27942. }
  27943. // String returns the string representation.
  27944. //
  27945. // API parameter values that are decorated as "sensitive" in the API will not
  27946. // be included in the string output. The member name will be present, but the
  27947. // value will be replaced with "sensitive".
  27948. func (s PutBucketIntelligentTieringConfigurationInput) String() string {
  27949. return awsutil.Prettify(s)
  27950. }
  27951. // GoString returns the string representation.
  27952. //
  27953. // API parameter values that are decorated as "sensitive" in the API will not
  27954. // be included in the string output. The member name will be present, but the
  27955. // value will be replaced with "sensitive".
  27956. func (s PutBucketIntelligentTieringConfigurationInput) GoString() string {
  27957. return s.String()
  27958. }
  27959. // Validate inspects the fields of the type to determine if they are valid.
  27960. func (s *PutBucketIntelligentTieringConfigurationInput) Validate() error {
  27961. invalidParams := request.ErrInvalidParams{Context: "PutBucketIntelligentTieringConfigurationInput"}
  27962. if s.Bucket == nil {
  27963. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  27964. }
  27965. if s.Bucket != nil && len(*s.Bucket) < 1 {
  27966. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  27967. }
  27968. if s.Id == nil {
  27969. invalidParams.Add(request.NewErrParamRequired("Id"))
  27970. }
  27971. if s.IntelligentTieringConfiguration == nil {
  27972. invalidParams.Add(request.NewErrParamRequired("IntelligentTieringConfiguration"))
  27973. }
  27974. if s.IntelligentTieringConfiguration != nil {
  27975. if err := s.IntelligentTieringConfiguration.Validate(); err != nil {
  27976. invalidParams.AddNested("IntelligentTieringConfiguration", err.(request.ErrInvalidParams))
  27977. }
  27978. }
  27979. if invalidParams.Len() > 0 {
  27980. return invalidParams
  27981. }
  27982. return nil
  27983. }
  27984. // SetBucket sets the Bucket field's value.
  27985. func (s *PutBucketIntelligentTieringConfigurationInput) SetBucket(v string) *PutBucketIntelligentTieringConfigurationInput {
  27986. s.Bucket = &v
  27987. return s
  27988. }
  27989. func (s *PutBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
  27990. if s.Bucket == nil {
  27991. return v
  27992. }
  27993. return *s.Bucket
  27994. }
  27995. // SetId sets the Id field's value.
  27996. func (s *PutBucketIntelligentTieringConfigurationInput) SetId(v string) *PutBucketIntelligentTieringConfigurationInput {
  27997. s.Id = &v
  27998. return s
  27999. }
  28000. // SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
  28001. func (s *PutBucketIntelligentTieringConfigurationInput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *PutBucketIntelligentTieringConfigurationInput {
  28002. s.IntelligentTieringConfiguration = v
  28003. return s
  28004. }
  28005. func (s *PutBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
  28006. if s.Bucket == nil {
  28007. return nil, fmt.Errorf("member Bucket is nil")
  28008. }
  28009. return parseEndpointARN(*s.Bucket)
  28010. }
  28011. func (s *PutBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
  28012. if s.Bucket == nil {
  28013. return false
  28014. }
  28015. return arn.IsARN(*s.Bucket)
  28016. }
  28017. // updateArnableField updates the value of the input field that
  28018. // takes an ARN as an input. This method is useful to backfill
  28019. // the parsed resource name from ARN into the input member.
  28020. // It returns a pointer to a modified copy of input and an error.
  28021. // Note that original input is not modified.
  28022. func (s PutBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
  28023. if s.Bucket == nil {
  28024. return nil, fmt.Errorf("member Bucket is nil")
  28025. }
  28026. s.Bucket = aws.String(v)
  28027. return &s, nil
  28028. }
  28029. type PutBucketIntelligentTieringConfigurationOutput struct {
  28030. _ struct{} `type:"structure"`
  28031. }
  28032. // String returns the string representation.
  28033. //
  28034. // API parameter values that are decorated as "sensitive" in the API will not
  28035. // be included in the string output. The member name will be present, but the
  28036. // value will be replaced with "sensitive".
  28037. func (s PutBucketIntelligentTieringConfigurationOutput) String() string {
  28038. return awsutil.Prettify(s)
  28039. }
  28040. // GoString returns the string representation.
  28041. //
  28042. // API parameter values that are decorated as "sensitive" in the API will not
  28043. // be included in the string output. The member name will be present, but the
  28044. // value will be replaced with "sensitive".
  28045. func (s PutBucketIntelligentTieringConfigurationOutput) GoString() string {
  28046. return s.String()
  28047. }
  28048. type PutBucketInventoryConfigurationInput struct {
  28049. _ struct{} `locationName:"PutBucketInventoryConfigurationRequest" type:"structure" payload:"InventoryConfiguration"`
  28050. // The name of the bucket where the inventory configuration will be stored.
  28051. //
  28052. // Bucket is a required field
  28053. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28054. // The account ID of the expected bucket owner. If the bucket is owned by a
  28055. // different account, the request fails with the HTTP status code 403 Forbidden
  28056. // (access denied).
  28057. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28058. // The ID used to identify the inventory configuration.
  28059. //
  28060. // Id is a required field
  28061. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  28062. // Specifies the inventory configuration.
  28063. //
  28064. // InventoryConfiguration is a required field
  28065. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28066. }
  28067. // String returns the string representation.
  28068. //
  28069. // API parameter values that are decorated as "sensitive" in the API will not
  28070. // be included in the string output. The member name will be present, but the
  28071. // value will be replaced with "sensitive".
  28072. func (s PutBucketInventoryConfigurationInput) String() string {
  28073. return awsutil.Prettify(s)
  28074. }
  28075. // GoString returns the string representation.
  28076. //
  28077. // API parameter values that are decorated as "sensitive" in the API will not
  28078. // be included in the string output. The member name will be present, but the
  28079. // value will be replaced with "sensitive".
  28080. func (s PutBucketInventoryConfigurationInput) GoString() string {
  28081. return s.String()
  28082. }
  28083. // Validate inspects the fields of the type to determine if they are valid.
  28084. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  28085. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  28086. if s.Bucket == nil {
  28087. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28088. }
  28089. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28090. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28091. }
  28092. if s.Id == nil {
  28093. invalidParams.Add(request.NewErrParamRequired("Id"))
  28094. }
  28095. if s.InventoryConfiguration == nil {
  28096. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  28097. }
  28098. if s.InventoryConfiguration != nil {
  28099. if err := s.InventoryConfiguration.Validate(); err != nil {
  28100. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  28101. }
  28102. }
  28103. if invalidParams.Len() > 0 {
  28104. return invalidParams
  28105. }
  28106. return nil
  28107. }
  28108. // SetBucket sets the Bucket field's value.
  28109. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  28110. s.Bucket = &v
  28111. return s
  28112. }
  28113. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  28114. if s.Bucket == nil {
  28115. return v
  28116. }
  28117. return *s.Bucket
  28118. }
  28119. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28120. func (s *PutBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketInventoryConfigurationInput {
  28121. s.ExpectedBucketOwner = &v
  28122. return s
  28123. }
  28124. // SetId sets the Id field's value.
  28125. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  28126. s.Id = &v
  28127. return s
  28128. }
  28129. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  28130. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  28131. s.InventoryConfiguration = v
  28132. return s
  28133. }
  28134. func (s *PutBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
  28135. if s.Bucket == nil {
  28136. return nil, fmt.Errorf("member Bucket is nil")
  28137. }
  28138. return parseEndpointARN(*s.Bucket)
  28139. }
  28140. func (s *PutBucketInventoryConfigurationInput) hasEndpointARN() bool {
  28141. if s.Bucket == nil {
  28142. return false
  28143. }
  28144. return arn.IsARN(*s.Bucket)
  28145. }
  28146. // updateArnableField updates the value of the input field that
  28147. // takes an ARN as an input. This method is useful to backfill
  28148. // the parsed resource name from ARN into the input member.
  28149. // It returns a pointer to a modified copy of input and an error.
  28150. // Note that original input is not modified.
  28151. func (s PutBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
  28152. if s.Bucket == nil {
  28153. return nil, fmt.Errorf("member Bucket is nil")
  28154. }
  28155. s.Bucket = aws.String(v)
  28156. return &s, nil
  28157. }
  28158. type PutBucketInventoryConfigurationOutput struct {
  28159. _ struct{} `type:"structure"`
  28160. }
  28161. // String returns the string representation.
  28162. //
  28163. // API parameter values that are decorated as "sensitive" in the API will not
  28164. // be included in the string output. The member name will be present, but the
  28165. // value will be replaced with "sensitive".
  28166. func (s PutBucketInventoryConfigurationOutput) String() string {
  28167. return awsutil.Prettify(s)
  28168. }
  28169. // GoString returns the string representation.
  28170. //
  28171. // API parameter values that are decorated as "sensitive" in the API will not
  28172. // be included in the string output. The member name will be present, but the
  28173. // value will be replaced with "sensitive".
  28174. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  28175. return s.String()
  28176. }
  28177. type PutBucketLifecycleConfigurationInput struct {
  28178. _ struct{} `locationName:"PutBucketLifecycleConfigurationRequest" type:"structure" payload:"LifecycleConfiguration"`
  28179. // The name of the bucket for which to set the configuration.
  28180. //
  28181. // Bucket is a required field
  28182. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28183. // Indicates the algorithm used to create the checksum for the object when using
  28184. // the SDK. This header will not provide any additional functionality if not
  28185. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  28186. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  28187. // the HTTP status code 400 Bad Request. For more information, see Checking
  28188. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  28189. // in the Amazon S3 User Guide.
  28190. //
  28191. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  28192. // parameter.
  28193. //
  28194. // The AWS SDK for Go v1 does not support automatic computing request payload
  28195. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  28196. // is specified for this parameter, the matching algorithm's checksum member
  28197. // must be populated with the algorithm's checksum of the request payload.
  28198. //
  28199. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  28200. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  28201. // to be used.
  28202. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  28203. // The account ID of the expected bucket owner. If the bucket is owned by a
  28204. // different account, the request fails with the HTTP status code 403 Forbidden
  28205. // (access denied).
  28206. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28207. // Container for lifecycle rules. You can add as many as 1,000 rules.
  28208. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28209. }
  28210. // String returns the string representation.
  28211. //
  28212. // API parameter values that are decorated as "sensitive" in the API will not
  28213. // be included in the string output. The member name will be present, but the
  28214. // value will be replaced with "sensitive".
  28215. func (s PutBucketLifecycleConfigurationInput) String() string {
  28216. return awsutil.Prettify(s)
  28217. }
  28218. // GoString returns the string representation.
  28219. //
  28220. // API parameter values that are decorated as "sensitive" in the API will not
  28221. // be included in the string output. The member name will be present, but the
  28222. // value will be replaced with "sensitive".
  28223. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  28224. return s.String()
  28225. }
  28226. // Validate inspects the fields of the type to determine if they are valid.
  28227. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  28228. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  28229. if s.Bucket == nil {
  28230. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28231. }
  28232. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28233. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28234. }
  28235. if s.LifecycleConfiguration != nil {
  28236. if err := s.LifecycleConfiguration.Validate(); err != nil {
  28237. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  28238. }
  28239. }
  28240. if invalidParams.Len() > 0 {
  28241. return invalidParams
  28242. }
  28243. return nil
  28244. }
  28245. // SetBucket sets the Bucket field's value.
  28246. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  28247. s.Bucket = &v
  28248. return s
  28249. }
  28250. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  28251. if s.Bucket == nil {
  28252. return v
  28253. }
  28254. return *s.Bucket
  28255. }
  28256. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  28257. func (s *PutBucketLifecycleConfigurationInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleConfigurationInput {
  28258. s.ChecksumAlgorithm = &v
  28259. return s
  28260. }
  28261. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28262. func (s *PutBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleConfigurationInput {
  28263. s.ExpectedBucketOwner = &v
  28264. return s
  28265. }
  28266. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  28267. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  28268. s.LifecycleConfiguration = v
  28269. return s
  28270. }
  28271. func (s *PutBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
  28272. if s.Bucket == nil {
  28273. return nil, fmt.Errorf("member Bucket is nil")
  28274. }
  28275. return parseEndpointARN(*s.Bucket)
  28276. }
  28277. func (s *PutBucketLifecycleConfigurationInput) hasEndpointARN() bool {
  28278. if s.Bucket == nil {
  28279. return false
  28280. }
  28281. return arn.IsARN(*s.Bucket)
  28282. }
  28283. // updateArnableField updates the value of the input field that
  28284. // takes an ARN as an input. This method is useful to backfill
  28285. // the parsed resource name from ARN into the input member.
  28286. // It returns a pointer to a modified copy of input and an error.
  28287. // Note that original input is not modified.
  28288. func (s PutBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
  28289. if s.Bucket == nil {
  28290. return nil, fmt.Errorf("member Bucket is nil")
  28291. }
  28292. s.Bucket = aws.String(v)
  28293. return &s, nil
  28294. }
  28295. type PutBucketLifecycleConfigurationOutput struct {
  28296. _ struct{} `type:"structure"`
  28297. }
  28298. // String returns the string representation.
  28299. //
  28300. // API parameter values that are decorated as "sensitive" in the API will not
  28301. // be included in the string output. The member name will be present, but the
  28302. // value will be replaced with "sensitive".
  28303. func (s PutBucketLifecycleConfigurationOutput) String() string {
  28304. return awsutil.Prettify(s)
  28305. }
  28306. // GoString returns the string representation.
  28307. //
  28308. // API parameter values that are decorated as "sensitive" in the API will not
  28309. // be included in the string output. The member name will be present, but the
  28310. // value will be replaced with "sensitive".
  28311. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  28312. return s.String()
  28313. }
  28314. type PutBucketLifecycleInput struct {
  28315. _ struct{} `locationName:"PutBucketLifecycleRequest" type:"structure" payload:"LifecycleConfiguration"`
  28316. // Bucket is a required field
  28317. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28318. // Indicates the algorithm used to create the checksum for the object when using
  28319. // the SDK. This header will not provide any additional functionality if not
  28320. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  28321. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  28322. // the HTTP status code 400 Bad Request. For more information, see Checking
  28323. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  28324. // in the Amazon S3 User Guide.
  28325. //
  28326. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  28327. // parameter.
  28328. //
  28329. // The AWS SDK for Go v1 does not support automatic computing request payload
  28330. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  28331. // is specified for this parameter, the matching algorithm's checksum member
  28332. // must be populated with the algorithm's checksum of the request payload.
  28333. //
  28334. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  28335. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  28336. // to be used.
  28337. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  28338. // The account ID of the expected bucket owner. If the bucket is owned by a
  28339. // different account, the request fails with the HTTP status code 403 Forbidden
  28340. // (access denied).
  28341. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28342. // Container for lifecycle rules. You can add as many as 1000 rules.
  28343. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28344. }
  28345. // String returns the string representation.
  28346. //
  28347. // API parameter values that are decorated as "sensitive" in the API will not
  28348. // be included in the string output. The member name will be present, but the
  28349. // value will be replaced with "sensitive".
  28350. func (s PutBucketLifecycleInput) String() string {
  28351. return awsutil.Prettify(s)
  28352. }
  28353. // GoString returns the string representation.
  28354. //
  28355. // API parameter values that are decorated as "sensitive" in the API will not
  28356. // be included in the string output. The member name will be present, but the
  28357. // value will be replaced with "sensitive".
  28358. func (s PutBucketLifecycleInput) GoString() string {
  28359. return s.String()
  28360. }
  28361. // Validate inspects the fields of the type to determine if they are valid.
  28362. func (s *PutBucketLifecycleInput) Validate() error {
  28363. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  28364. if s.Bucket == nil {
  28365. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28366. }
  28367. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28368. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28369. }
  28370. if s.LifecycleConfiguration != nil {
  28371. if err := s.LifecycleConfiguration.Validate(); err != nil {
  28372. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  28373. }
  28374. }
  28375. if invalidParams.Len() > 0 {
  28376. return invalidParams
  28377. }
  28378. return nil
  28379. }
  28380. // SetBucket sets the Bucket field's value.
  28381. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  28382. s.Bucket = &v
  28383. return s
  28384. }
  28385. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  28386. if s.Bucket == nil {
  28387. return v
  28388. }
  28389. return *s.Bucket
  28390. }
  28391. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  28392. func (s *PutBucketLifecycleInput) SetChecksumAlgorithm(v string) *PutBucketLifecycleInput {
  28393. s.ChecksumAlgorithm = &v
  28394. return s
  28395. }
  28396. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28397. func (s *PutBucketLifecycleInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleInput {
  28398. s.ExpectedBucketOwner = &v
  28399. return s
  28400. }
  28401. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  28402. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  28403. s.LifecycleConfiguration = v
  28404. return s
  28405. }
  28406. func (s *PutBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
  28407. if s.Bucket == nil {
  28408. return nil, fmt.Errorf("member Bucket is nil")
  28409. }
  28410. return parseEndpointARN(*s.Bucket)
  28411. }
  28412. func (s *PutBucketLifecycleInput) hasEndpointARN() bool {
  28413. if s.Bucket == nil {
  28414. return false
  28415. }
  28416. return arn.IsARN(*s.Bucket)
  28417. }
  28418. // updateArnableField updates the value of the input field that
  28419. // takes an ARN as an input. This method is useful to backfill
  28420. // the parsed resource name from ARN into the input member.
  28421. // It returns a pointer to a modified copy of input and an error.
  28422. // Note that original input is not modified.
  28423. func (s PutBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
  28424. if s.Bucket == nil {
  28425. return nil, fmt.Errorf("member Bucket is nil")
  28426. }
  28427. s.Bucket = aws.String(v)
  28428. return &s, nil
  28429. }
  28430. type PutBucketLifecycleOutput struct {
  28431. _ struct{} `type:"structure"`
  28432. }
  28433. // String returns the string representation.
  28434. //
  28435. // API parameter values that are decorated as "sensitive" in the API will not
  28436. // be included in the string output. The member name will be present, but the
  28437. // value will be replaced with "sensitive".
  28438. func (s PutBucketLifecycleOutput) String() string {
  28439. return awsutil.Prettify(s)
  28440. }
  28441. // GoString returns the string representation.
  28442. //
  28443. // API parameter values that are decorated as "sensitive" in the API will not
  28444. // be included in the string output. The member name will be present, but the
  28445. // value will be replaced with "sensitive".
  28446. func (s PutBucketLifecycleOutput) GoString() string {
  28447. return s.String()
  28448. }
  28449. type PutBucketLoggingInput struct {
  28450. _ struct{} `locationName:"PutBucketLoggingRequest" type:"structure" payload:"BucketLoggingStatus"`
  28451. // The name of the bucket for which to set the logging parameters.
  28452. //
  28453. // Bucket is a required field
  28454. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28455. // Container for logging status information.
  28456. //
  28457. // BucketLoggingStatus is a required field
  28458. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28459. // Indicates the algorithm used to create the checksum for the object when using
  28460. // the SDK. This header will not provide any additional functionality if not
  28461. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  28462. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  28463. // the HTTP status code 400 Bad Request. For more information, see Checking
  28464. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  28465. // in the Amazon S3 User Guide.
  28466. //
  28467. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  28468. // parameter.
  28469. //
  28470. // The AWS SDK for Go v1 does not support automatic computing request payload
  28471. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  28472. // is specified for this parameter, the matching algorithm's checksum member
  28473. // must be populated with the algorithm's checksum of the request payload.
  28474. //
  28475. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  28476. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  28477. // to be used.
  28478. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  28479. // The account ID of the expected bucket owner. If the bucket is owned by a
  28480. // different account, the request fails with the HTTP status code 403 Forbidden
  28481. // (access denied).
  28482. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28483. }
  28484. // String returns the string representation.
  28485. //
  28486. // API parameter values that are decorated as "sensitive" in the API will not
  28487. // be included in the string output. The member name will be present, but the
  28488. // value will be replaced with "sensitive".
  28489. func (s PutBucketLoggingInput) String() string {
  28490. return awsutil.Prettify(s)
  28491. }
  28492. // GoString returns the string representation.
  28493. //
  28494. // API parameter values that are decorated as "sensitive" in the API will not
  28495. // be included in the string output. The member name will be present, but the
  28496. // value will be replaced with "sensitive".
  28497. func (s PutBucketLoggingInput) GoString() string {
  28498. return s.String()
  28499. }
  28500. // Validate inspects the fields of the type to determine if they are valid.
  28501. func (s *PutBucketLoggingInput) Validate() error {
  28502. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  28503. if s.Bucket == nil {
  28504. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28505. }
  28506. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28507. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28508. }
  28509. if s.BucketLoggingStatus == nil {
  28510. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  28511. }
  28512. if s.BucketLoggingStatus != nil {
  28513. if err := s.BucketLoggingStatus.Validate(); err != nil {
  28514. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  28515. }
  28516. }
  28517. if invalidParams.Len() > 0 {
  28518. return invalidParams
  28519. }
  28520. return nil
  28521. }
  28522. // SetBucket sets the Bucket field's value.
  28523. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  28524. s.Bucket = &v
  28525. return s
  28526. }
  28527. func (s *PutBucketLoggingInput) getBucket() (v string) {
  28528. if s.Bucket == nil {
  28529. return v
  28530. }
  28531. return *s.Bucket
  28532. }
  28533. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  28534. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  28535. s.BucketLoggingStatus = v
  28536. return s
  28537. }
  28538. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  28539. func (s *PutBucketLoggingInput) SetChecksumAlgorithm(v string) *PutBucketLoggingInput {
  28540. s.ChecksumAlgorithm = &v
  28541. return s
  28542. }
  28543. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28544. func (s *PutBucketLoggingInput) SetExpectedBucketOwner(v string) *PutBucketLoggingInput {
  28545. s.ExpectedBucketOwner = &v
  28546. return s
  28547. }
  28548. func (s *PutBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
  28549. if s.Bucket == nil {
  28550. return nil, fmt.Errorf("member Bucket is nil")
  28551. }
  28552. return parseEndpointARN(*s.Bucket)
  28553. }
  28554. func (s *PutBucketLoggingInput) hasEndpointARN() bool {
  28555. if s.Bucket == nil {
  28556. return false
  28557. }
  28558. return arn.IsARN(*s.Bucket)
  28559. }
  28560. // updateArnableField updates the value of the input field that
  28561. // takes an ARN as an input. This method is useful to backfill
  28562. // the parsed resource name from ARN into the input member.
  28563. // It returns a pointer to a modified copy of input and an error.
  28564. // Note that original input is not modified.
  28565. func (s PutBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
  28566. if s.Bucket == nil {
  28567. return nil, fmt.Errorf("member Bucket is nil")
  28568. }
  28569. s.Bucket = aws.String(v)
  28570. return &s, nil
  28571. }
  28572. type PutBucketLoggingOutput struct {
  28573. _ struct{} `type:"structure"`
  28574. }
  28575. // String returns the string representation.
  28576. //
  28577. // API parameter values that are decorated as "sensitive" in the API will not
  28578. // be included in the string output. The member name will be present, but the
  28579. // value will be replaced with "sensitive".
  28580. func (s PutBucketLoggingOutput) String() string {
  28581. return awsutil.Prettify(s)
  28582. }
  28583. // GoString returns the string representation.
  28584. //
  28585. // API parameter values that are decorated as "sensitive" in the API will not
  28586. // be included in the string output. The member name will be present, but the
  28587. // value will be replaced with "sensitive".
  28588. func (s PutBucketLoggingOutput) GoString() string {
  28589. return s.String()
  28590. }
  28591. type PutBucketMetricsConfigurationInput struct {
  28592. _ struct{} `locationName:"PutBucketMetricsConfigurationRequest" type:"structure" payload:"MetricsConfiguration"`
  28593. // The name of the bucket for which the metrics configuration is set.
  28594. //
  28595. // Bucket is a required field
  28596. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28597. // The account ID of the expected bucket owner. If the bucket is owned by a
  28598. // different account, the request fails with the HTTP status code 403 Forbidden
  28599. // (access denied).
  28600. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28601. // The ID used to identify the metrics configuration.
  28602. //
  28603. // Id is a required field
  28604. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  28605. // Specifies the metrics configuration.
  28606. //
  28607. // MetricsConfiguration is a required field
  28608. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28609. }
  28610. // String returns the string representation.
  28611. //
  28612. // API parameter values that are decorated as "sensitive" in the API will not
  28613. // be included in the string output. The member name will be present, but the
  28614. // value will be replaced with "sensitive".
  28615. func (s PutBucketMetricsConfigurationInput) String() string {
  28616. return awsutil.Prettify(s)
  28617. }
  28618. // GoString returns the string representation.
  28619. //
  28620. // API parameter values that are decorated as "sensitive" in the API will not
  28621. // be included in the string output. The member name will be present, but the
  28622. // value will be replaced with "sensitive".
  28623. func (s PutBucketMetricsConfigurationInput) GoString() string {
  28624. return s.String()
  28625. }
  28626. // Validate inspects the fields of the type to determine if they are valid.
  28627. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  28628. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  28629. if s.Bucket == nil {
  28630. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28631. }
  28632. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28633. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28634. }
  28635. if s.Id == nil {
  28636. invalidParams.Add(request.NewErrParamRequired("Id"))
  28637. }
  28638. if s.MetricsConfiguration == nil {
  28639. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  28640. }
  28641. if s.MetricsConfiguration != nil {
  28642. if err := s.MetricsConfiguration.Validate(); err != nil {
  28643. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  28644. }
  28645. }
  28646. if invalidParams.Len() > 0 {
  28647. return invalidParams
  28648. }
  28649. return nil
  28650. }
  28651. // SetBucket sets the Bucket field's value.
  28652. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  28653. s.Bucket = &v
  28654. return s
  28655. }
  28656. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  28657. if s.Bucket == nil {
  28658. return v
  28659. }
  28660. return *s.Bucket
  28661. }
  28662. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28663. func (s *PutBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketMetricsConfigurationInput {
  28664. s.ExpectedBucketOwner = &v
  28665. return s
  28666. }
  28667. // SetId sets the Id field's value.
  28668. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  28669. s.Id = &v
  28670. return s
  28671. }
  28672. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  28673. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  28674. s.MetricsConfiguration = v
  28675. return s
  28676. }
  28677. func (s *PutBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
  28678. if s.Bucket == nil {
  28679. return nil, fmt.Errorf("member Bucket is nil")
  28680. }
  28681. return parseEndpointARN(*s.Bucket)
  28682. }
  28683. func (s *PutBucketMetricsConfigurationInput) hasEndpointARN() bool {
  28684. if s.Bucket == nil {
  28685. return false
  28686. }
  28687. return arn.IsARN(*s.Bucket)
  28688. }
  28689. // updateArnableField updates the value of the input field that
  28690. // takes an ARN as an input. This method is useful to backfill
  28691. // the parsed resource name from ARN into the input member.
  28692. // It returns a pointer to a modified copy of input and an error.
  28693. // Note that original input is not modified.
  28694. func (s PutBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
  28695. if s.Bucket == nil {
  28696. return nil, fmt.Errorf("member Bucket is nil")
  28697. }
  28698. s.Bucket = aws.String(v)
  28699. return &s, nil
  28700. }
  28701. type PutBucketMetricsConfigurationOutput struct {
  28702. _ struct{} `type:"structure"`
  28703. }
  28704. // String returns the string representation.
  28705. //
  28706. // API parameter values that are decorated as "sensitive" in the API will not
  28707. // be included in the string output. The member name will be present, but the
  28708. // value will be replaced with "sensitive".
  28709. func (s PutBucketMetricsConfigurationOutput) String() string {
  28710. return awsutil.Prettify(s)
  28711. }
  28712. // GoString returns the string representation.
  28713. //
  28714. // API parameter values that are decorated as "sensitive" in the API will not
  28715. // be included in the string output. The member name will be present, but the
  28716. // value will be replaced with "sensitive".
  28717. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  28718. return s.String()
  28719. }
  28720. type PutBucketNotificationConfigurationInput struct {
  28721. _ struct{} `locationName:"PutBucketNotificationConfigurationRequest" type:"structure" payload:"NotificationConfiguration"`
  28722. // The name of the bucket.
  28723. //
  28724. // Bucket is a required field
  28725. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28726. // The account ID of the expected bucket owner. If the bucket is owned by a
  28727. // different account, the request fails with the HTTP status code 403 Forbidden
  28728. // (access denied).
  28729. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28730. // A container for specifying the notification configuration of the bucket.
  28731. // If this element is empty, notifications are turned off for the bucket.
  28732. //
  28733. // NotificationConfiguration is a required field
  28734. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28735. // Skips validation of Amazon SQS, Amazon SNS, and Lambda destinations. True
  28736. // or false value.
  28737. SkipDestinationValidation *bool `location:"header" locationName:"x-amz-skip-destination-validation" type:"boolean"`
  28738. }
  28739. // String returns the string representation.
  28740. //
  28741. // API parameter values that are decorated as "sensitive" in the API will not
  28742. // be included in the string output. The member name will be present, but the
  28743. // value will be replaced with "sensitive".
  28744. func (s PutBucketNotificationConfigurationInput) String() string {
  28745. return awsutil.Prettify(s)
  28746. }
  28747. // GoString returns the string representation.
  28748. //
  28749. // API parameter values that are decorated as "sensitive" in the API will not
  28750. // be included in the string output. The member name will be present, but the
  28751. // value will be replaced with "sensitive".
  28752. func (s PutBucketNotificationConfigurationInput) GoString() string {
  28753. return s.String()
  28754. }
  28755. // Validate inspects the fields of the type to determine if they are valid.
  28756. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  28757. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  28758. if s.Bucket == nil {
  28759. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28760. }
  28761. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28762. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28763. }
  28764. if s.NotificationConfiguration == nil {
  28765. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  28766. }
  28767. if s.NotificationConfiguration != nil {
  28768. if err := s.NotificationConfiguration.Validate(); err != nil {
  28769. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  28770. }
  28771. }
  28772. if invalidParams.Len() > 0 {
  28773. return invalidParams
  28774. }
  28775. return nil
  28776. }
  28777. // SetBucket sets the Bucket field's value.
  28778. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  28779. s.Bucket = &v
  28780. return s
  28781. }
  28782. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  28783. if s.Bucket == nil {
  28784. return v
  28785. }
  28786. return *s.Bucket
  28787. }
  28788. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28789. func (s *PutBucketNotificationConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationConfigurationInput {
  28790. s.ExpectedBucketOwner = &v
  28791. return s
  28792. }
  28793. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  28794. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  28795. s.NotificationConfiguration = v
  28796. return s
  28797. }
  28798. // SetSkipDestinationValidation sets the SkipDestinationValidation field's value.
  28799. func (s *PutBucketNotificationConfigurationInput) SetSkipDestinationValidation(v bool) *PutBucketNotificationConfigurationInput {
  28800. s.SkipDestinationValidation = &v
  28801. return s
  28802. }
  28803. func (s *PutBucketNotificationConfigurationInput) getEndpointARN() (arn.Resource, error) {
  28804. if s.Bucket == nil {
  28805. return nil, fmt.Errorf("member Bucket is nil")
  28806. }
  28807. return parseEndpointARN(*s.Bucket)
  28808. }
  28809. func (s *PutBucketNotificationConfigurationInput) hasEndpointARN() bool {
  28810. if s.Bucket == nil {
  28811. return false
  28812. }
  28813. return arn.IsARN(*s.Bucket)
  28814. }
  28815. // updateArnableField updates the value of the input field that
  28816. // takes an ARN as an input. This method is useful to backfill
  28817. // the parsed resource name from ARN into the input member.
  28818. // It returns a pointer to a modified copy of input and an error.
  28819. // Note that original input is not modified.
  28820. func (s PutBucketNotificationConfigurationInput) updateArnableField(v string) (interface{}, error) {
  28821. if s.Bucket == nil {
  28822. return nil, fmt.Errorf("member Bucket is nil")
  28823. }
  28824. s.Bucket = aws.String(v)
  28825. return &s, nil
  28826. }
  28827. type PutBucketNotificationConfigurationOutput struct {
  28828. _ struct{} `type:"structure"`
  28829. }
  28830. // String returns the string representation.
  28831. //
  28832. // API parameter values that are decorated as "sensitive" in the API will not
  28833. // be included in the string output. The member name will be present, but the
  28834. // value will be replaced with "sensitive".
  28835. func (s PutBucketNotificationConfigurationOutput) String() string {
  28836. return awsutil.Prettify(s)
  28837. }
  28838. // GoString returns the string representation.
  28839. //
  28840. // API parameter values that are decorated as "sensitive" in the API will not
  28841. // be included in the string output. The member name will be present, but the
  28842. // value will be replaced with "sensitive".
  28843. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  28844. return s.String()
  28845. }
  28846. type PutBucketNotificationInput struct {
  28847. _ struct{} `locationName:"PutBucketNotificationRequest" type:"structure" payload:"NotificationConfiguration"`
  28848. // The name of the bucket.
  28849. //
  28850. // Bucket is a required field
  28851. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28852. // Indicates the algorithm used to create the checksum for the object when using
  28853. // the SDK. This header will not provide any additional functionality if not
  28854. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  28855. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  28856. // the HTTP status code 400 Bad Request. For more information, see Checking
  28857. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  28858. // in the Amazon S3 User Guide.
  28859. //
  28860. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  28861. // parameter.
  28862. //
  28863. // The AWS SDK for Go v1 does not support automatic computing request payload
  28864. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  28865. // is specified for this parameter, the matching algorithm's checksum member
  28866. // must be populated with the algorithm's checksum of the request payload.
  28867. //
  28868. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  28869. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  28870. // to be used.
  28871. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  28872. // The account ID of the expected bucket owner. If the bucket is owned by a
  28873. // different account, the request fails with the HTTP status code 403 Forbidden
  28874. // (access denied).
  28875. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28876. // The container for the configuration.
  28877. //
  28878. // NotificationConfiguration is a required field
  28879. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28880. }
  28881. // String returns the string representation.
  28882. //
  28883. // API parameter values that are decorated as "sensitive" in the API will not
  28884. // be included in the string output. The member name will be present, but the
  28885. // value will be replaced with "sensitive".
  28886. func (s PutBucketNotificationInput) String() string {
  28887. return awsutil.Prettify(s)
  28888. }
  28889. // GoString returns the string representation.
  28890. //
  28891. // API parameter values that are decorated as "sensitive" in the API will not
  28892. // be included in the string output. The member name will be present, but the
  28893. // value will be replaced with "sensitive".
  28894. func (s PutBucketNotificationInput) GoString() string {
  28895. return s.String()
  28896. }
  28897. // Validate inspects the fields of the type to determine if they are valid.
  28898. func (s *PutBucketNotificationInput) Validate() error {
  28899. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  28900. if s.Bucket == nil {
  28901. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  28902. }
  28903. if s.Bucket != nil && len(*s.Bucket) < 1 {
  28904. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  28905. }
  28906. if s.NotificationConfiguration == nil {
  28907. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  28908. }
  28909. if invalidParams.Len() > 0 {
  28910. return invalidParams
  28911. }
  28912. return nil
  28913. }
  28914. // SetBucket sets the Bucket field's value.
  28915. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  28916. s.Bucket = &v
  28917. return s
  28918. }
  28919. func (s *PutBucketNotificationInput) getBucket() (v string) {
  28920. if s.Bucket == nil {
  28921. return v
  28922. }
  28923. return *s.Bucket
  28924. }
  28925. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  28926. func (s *PutBucketNotificationInput) SetChecksumAlgorithm(v string) *PutBucketNotificationInput {
  28927. s.ChecksumAlgorithm = &v
  28928. return s
  28929. }
  28930. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  28931. func (s *PutBucketNotificationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationInput {
  28932. s.ExpectedBucketOwner = &v
  28933. return s
  28934. }
  28935. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  28936. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  28937. s.NotificationConfiguration = v
  28938. return s
  28939. }
  28940. func (s *PutBucketNotificationInput) getEndpointARN() (arn.Resource, error) {
  28941. if s.Bucket == nil {
  28942. return nil, fmt.Errorf("member Bucket is nil")
  28943. }
  28944. return parseEndpointARN(*s.Bucket)
  28945. }
  28946. func (s *PutBucketNotificationInput) hasEndpointARN() bool {
  28947. if s.Bucket == nil {
  28948. return false
  28949. }
  28950. return arn.IsARN(*s.Bucket)
  28951. }
  28952. // updateArnableField updates the value of the input field that
  28953. // takes an ARN as an input. This method is useful to backfill
  28954. // the parsed resource name from ARN into the input member.
  28955. // It returns a pointer to a modified copy of input and an error.
  28956. // Note that original input is not modified.
  28957. func (s PutBucketNotificationInput) updateArnableField(v string) (interface{}, error) {
  28958. if s.Bucket == nil {
  28959. return nil, fmt.Errorf("member Bucket is nil")
  28960. }
  28961. s.Bucket = aws.String(v)
  28962. return &s, nil
  28963. }
  28964. type PutBucketNotificationOutput struct {
  28965. _ struct{} `type:"structure"`
  28966. }
  28967. // String returns the string representation.
  28968. //
  28969. // API parameter values that are decorated as "sensitive" in the API will not
  28970. // be included in the string output. The member name will be present, but the
  28971. // value will be replaced with "sensitive".
  28972. func (s PutBucketNotificationOutput) String() string {
  28973. return awsutil.Prettify(s)
  28974. }
  28975. // GoString returns the string representation.
  28976. //
  28977. // API parameter values that are decorated as "sensitive" in the API will not
  28978. // be included in the string output. The member name will be present, but the
  28979. // value will be replaced with "sensitive".
  28980. func (s PutBucketNotificationOutput) GoString() string {
  28981. return s.String()
  28982. }
  28983. type PutBucketOwnershipControlsInput struct {
  28984. _ struct{} `locationName:"PutBucketOwnershipControlsRequest" type:"structure" payload:"OwnershipControls"`
  28985. // The name of the Amazon S3 bucket whose OwnershipControls you want to set.
  28986. //
  28987. // Bucket is a required field
  28988. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  28989. // The account ID of the expected bucket owner. If the bucket is owned by a
  28990. // different account, the request fails with the HTTP status code 403 Forbidden
  28991. // (access denied).
  28992. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  28993. // The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter)
  28994. // that you want to apply to this Amazon S3 bucket.
  28995. //
  28996. // OwnershipControls is a required field
  28997. OwnershipControls *OwnershipControls `locationName:"OwnershipControls" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  28998. }
  28999. // String returns the string representation.
  29000. //
  29001. // API parameter values that are decorated as "sensitive" in the API will not
  29002. // be included in the string output. The member name will be present, but the
  29003. // value will be replaced with "sensitive".
  29004. func (s PutBucketOwnershipControlsInput) String() string {
  29005. return awsutil.Prettify(s)
  29006. }
  29007. // GoString returns the string representation.
  29008. //
  29009. // API parameter values that are decorated as "sensitive" in the API will not
  29010. // be included in the string output. The member name will be present, but the
  29011. // value will be replaced with "sensitive".
  29012. func (s PutBucketOwnershipControlsInput) GoString() string {
  29013. return s.String()
  29014. }
  29015. // Validate inspects the fields of the type to determine if they are valid.
  29016. func (s *PutBucketOwnershipControlsInput) Validate() error {
  29017. invalidParams := request.ErrInvalidParams{Context: "PutBucketOwnershipControlsInput"}
  29018. if s.Bucket == nil {
  29019. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29020. }
  29021. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29022. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29023. }
  29024. if s.OwnershipControls == nil {
  29025. invalidParams.Add(request.NewErrParamRequired("OwnershipControls"))
  29026. }
  29027. if s.OwnershipControls != nil {
  29028. if err := s.OwnershipControls.Validate(); err != nil {
  29029. invalidParams.AddNested("OwnershipControls", err.(request.ErrInvalidParams))
  29030. }
  29031. }
  29032. if invalidParams.Len() > 0 {
  29033. return invalidParams
  29034. }
  29035. return nil
  29036. }
  29037. // SetBucket sets the Bucket field's value.
  29038. func (s *PutBucketOwnershipControlsInput) SetBucket(v string) *PutBucketOwnershipControlsInput {
  29039. s.Bucket = &v
  29040. return s
  29041. }
  29042. func (s *PutBucketOwnershipControlsInput) getBucket() (v string) {
  29043. if s.Bucket == nil {
  29044. return v
  29045. }
  29046. return *s.Bucket
  29047. }
  29048. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29049. func (s *PutBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *PutBucketOwnershipControlsInput {
  29050. s.ExpectedBucketOwner = &v
  29051. return s
  29052. }
  29053. // SetOwnershipControls sets the OwnershipControls field's value.
  29054. func (s *PutBucketOwnershipControlsInput) SetOwnershipControls(v *OwnershipControls) *PutBucketOwnershipControlsInput {
  29055. s.OwnershipControls = v
  29056. return s
  29057. }
  29058. func (s *PutBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
  29059. if s.Bucket == nil {
  29060. return nil, fmt.Errorf("member Bucket is nil")
  29061. }
  29062. return parseEndpointARN(*s.Bucket)
  29063. }
  29064. func (s *PutBucketOwnershipControlsInput) hasEndpointARN() bool {
  29065. if s.Bucket == nil {
  29066. return false
  29067. }
  29068. return arn.IsARN(*s.Bucket)
  29069. }
  29070. // updateArnableField updates the value of the input field that
  29071. // takes an ARN as an input. This method is useful to backfill
  29072. // the parsed resource name from ARN into the input member.
  29073. // It returns a pointer to a modified copy of input and an error.
  29074. // Note that original input is not modified.
  29075. func (s PutBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
  29076. if s.Bucket == nil {
  29077. return nil, fmt.Errorf("member Bucket is nil")
  29078. }
  29079. s.Bucket = aws.String(v)
  29080. return &s, nil
  29081. }
  29082. type PutBucketOwnershipControlsOutput struct {
  29083. _ struct{} `type:"structure"`
  29084. }
  29085. // String returns the string representation.
  29086. //
  29087. // API parameter values that are decorated as "sensitive" in the API will not
  29088. // be included in the string output. The member name will be present, but the
  29089. // value will be replaced with "sensitive".
  29090. func (s PutBucketOwnershipControlsOutput) String() string {
  29091. return awsutil.Prettify(s)
  29092. }
  29093. // GoString returns the string representation.
  29094. //
  29095. // API parameter values that are decorated as "sensitive" in the API will not
  29096. // be included in the string output. The member name will be present, but the
  29097. // value will be replaced with "sensitive".
  29098. func (s PutBucketOwnershipControlsOutput) GoString() string {
  29099. return s.String()
  29100. }
  29101. type PutBucketPolicyInput struct {
  29102. _ struct{} `locationName:"PutBucketPolicyRequest" type:"structure" payload:"Policy"`
  29103. // The name of the bucket.
  29104. //
  29105. // Bucket is a required field
  29106. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29107. // Indicates the algorithm used to create the checksum for the object when using
  29108. // the SDK. This header will not provide any additional functionality if not
  29109. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29110. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29111. // the HTTP status code 400 Bad Request. For more information, see Checking
  29112. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29113. // in the Amazon S3 User Guide.
  29114. //
  29115. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29116. // parameter.
  29117. //
  29118. // The AWS SDK for Go v1 does not support automatic computing request payload
  29119. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29120. // is specified for this parameter, the matching algorithm's checksum member
  29121. // must be populated with the algorithm's checksum of the request payload.
  29122. //
  29123. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29124. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29125. // to be used.
  29126. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29127. // Set this parameter to true to confirm that you want to remove your permissions
  29128. // to change this bucket policy in the future.
  29129. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  29130. // The account ID of the expected bucket owner. If the bucket is owned by a
  29131. // different account, the request fails with the HTTP status code 403 Forbidden
  29132. // (access denied).
  29133. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29134. // The bucket policy as a JSON document.
  29135. //
  29136. // Policy is a required field
  29137. Policy *string `type:"string" required:"true"`
  29138. }
  29139. // String returns the string representation.
  29140. //
  29141. // API parameter values that are decorated as "sensitive" in the API will not
  29142. // be included in the string output. The member name will be present, but the
  29143. // value will be replaced with "sensitive".
  29144. func (s PutBucketPolicyInput) String() string {
  29145. return awsutil.Prettify(s)
  29146. }
  29147. // GoString returns the string representation.
  29148. //
  29149. // API parameter values that are decorated as "sensitive" in the API will not
  29150. // be included in the string output. The member name will be present, but the
  29151. // value will be replaced with "sensitive".
  29152. func (s PutBucketPolicyInput) GoString() string {
  29153. return s.String()
  29154. }
  29155. // Validate inspects the fields of the type to determine if they are valid.
  29156. func (s *PutBucketPolicyInput) Validate() error {
  29157. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  29158. if s.Bucket == nil {
  29159. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29160. }
  29161. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29162. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29163. }
  29164. if s.Policy == nil {
  29165. invalidParams.Add(request.NewErrParamRequired("Policy"))
  29166. }
  29167. if invalidParams.Len() > 0 {
  29168. return invalidParams
  29169. }
  29170. return nil
  29171. }
  29172. // SetBucket sets the Bucket field's value.
  29173. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  29174. s.Bucket = &v
  29175. return s
  29176. }
  29177. func (s *PutBucketPolicyInput) getBucket() (v string) {
  29178. if s.Bucket == nil {
  29179. return v
  29180. }
  29181. return *s.Bucket
  29182. }
  29183. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29184. func (s *PutBucketPolicyInput) SetChecksumAlgorithm(v string) *PutBucketPolicyInput {
  29185. s.ChecksumAlgorithm = &v
  29186. return s
  29187. }
  29188. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  29189. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  29190. s.ConfirmRemoveSelfBucketAccess = &v
  29191. return s
  29192. }
  29193. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29194. func (s *PutBucketPolicyInput) SetExpectedBucketOwner(v string) *PutBucketPolicyInput {
  29195. s.ExpectedBucketOwner = &v
  29196. return s
  29197. }
  29198. // SetPolicy sets the Policy field's value.
  29199. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  29200. s.Policy = &v
  29201. return s
  29202. }
  29203. func (s *PutBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
  29204. if s.Bucket == nil {
  29205. return nil, fmt.Errorf("member Bucket is nil")
  29206. }
  29207. return parseEndpointARN(*s.Bucket)
  29208. }
  29209. func (s *PutBucketPolicyInput) hasEndpointARN() bool {
  29210. if s.Bucket == nil {
  29211. return false
  29212. }
  29213. return arn.IsARN(*s.Bucket)
  29214. }
  29215. // updateArnableField updates the value of the input field that
  29216. // takes an ARN as an input. This method is useful to backfill
  29217. // the parsed resource name from ARN into the input member.
  29218. // It returns a pointer to a modified copy of input and an error.
  29219. // Note that original input is not modified.
  29220. func (s PutBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
  29221. if s.Bucket == nil {
  29222. return nil, fmt.Errorf("member Bucket is nil")
  29223. }
  29224. s.Bucket = aws.String(v)
  29225. return &s, nil
  29226. }
  29227. type PutBucketPolicyOutput struct {
  29228. _ struct{} `type:"structure"`
  29229. }
  29230. // String returns the string representation.
  29231. //
  29232. // API parameter values that are decorated as "sensitive" in the API will not
  29233. // be included in the string output. The member name will be present, but the
  29234. // value will be replaced with "sensitive".
  29235. func (s PutBucketPolicyOutput) String() string {
  29236. return awsutil.Prettify(s)
  29237. }
  29238. // GoString returns the string representation.
  29239. //
  29240. // API parameter values that are decorated as "sensitive" in the API will not
  29241. // be included in the string output. The member name will be present, but the
  29242. // value will be replaced with "sensitive".
  29243. func (s PutBucketPolicyOutput) GoString() string {
  29244. return s.String()
  29245. }
  29246. type PutBucketReplicationInput struct {
  29247. _ struct{} `locationName:"PutBucketReplicationRequest" type:"structure" payload:"ReplicationConfiguration"`
  29248. // The name of the bucket
  29249. //
  29250. // Bucket is a required field
  29251. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29252. // Indicates the algorithm used to create the checksum for the object when using
  29253. // the SDK. This header will not provide any additional functionality if not
  29254. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29255. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29256. // the HTTP status code 400 Bad Request. For more information, see Checking
  29257. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29258. // in the Amazon S3 User Guide.
  29259. //
  29260. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29261. // parameter.
  29262. //
  29263. // The AWS SDK for Go v1 does not support automatic computing request payload
  29264. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29265. // is specified for this parameter, the matching algorithm's checksum member
  29266. // must be populated with the algorithm's checksum of the request payload.
  29267. //
  29268. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29269. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29270. // to be used.
  29271. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29272. // The account ID of the expected bucket owner. If the bucket is owned by a
  29273. // different account, the request fails with the HTTP status code 403 Forbidden
  29274. // (access denied).
  29275. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29276. // A container for replication rules. You can add up to 1,000 rules. The maximum
  29277. // size of a replication configuration is 2 MB.
  29278. //
  29279. // ReplicationConfiguration is a required field
  29280. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29281. // A token to allow Object Lock to be enabled for an existing bucket.
  29282. Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
  29283. }
  29284. // String returns the string representation.
  29285. //
  29286. // API parameter values that are decorated as "sensitive" in the API will not
  29287. // be included in the string output. The member name will be present, but the
  29288. // value will be replaced with "sensitive".
  29289. func (s PutBucketReplicationInput) String() string {
  29290. return awsutil.Prettify(s)
  29291. }
  29292. // GoString returns the string representation.
  29293. //
  29294. // API parameter values that are decorated as "sensitive" in the API will not
  29295. // be included in the string output. The member name will be present, but the
  29296. // value will be replaced with "sensitive".
  29297. func (s PutBucketReplicationInput) GoString() string {
  29298. return s.String()
  29299. }
  29300. // Validate inspects the fields of the type to determine if they are valid.
  29301. func (s *PutBucketReplicationInput) Validate() error {
  29302. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  29303. if s.Bucket == nil {
  29304. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29305. }
  29306. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29307. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29308. }
  29309. if s.ReplicationConfiguration == nil {
  29310. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  29311. }
  29312. if s.ReplicationConfiguration != nil {
  29313. if err := s.ReplicationConfiguration.Validate(); err != nil {
  29314. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  29315. }
  29316. }
  29317. if invalidParams.Len() > 0 {
  29318. return invalidParams
  29319. }
  29320. return nil
  29321. }
  29322. // SetBucket sets the Bucket field's value.
  29323. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  29324. s.Bucket = &v
  29325. return s
  29326. }
  29327. func (s *PutBucketReplicationInput) getBucket() (v string) {
  29328. if s.Bucket == nil {
  29329. return v
  29330. }
  29331. return *s.Bucket
  29332. }
  29333. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29334. func (s *PutBucketReplicationInput) SetChecksumAlgorithm(v string) *PutBucketReplicationInput {
  29335. s.ChecksumAlgorithm = &v
  29336. return s
  29337. }
  29338. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29339. func (s *PutBucketReplicationInput) SetExpectedBucketOwner(v string) *PutBucketReplicationInput {
  29340. s.ExpectedBucketOwner = &v
  29341. return s
  29342. }
  29343. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  29344. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  29345. s.ReplicationConfiguration = v
  29346. return s
  29347. }
  29348. // SetToken sets the Token field's value.
  29349. func (s *PutBucketReplicationInput) SetToken(v string) *PutBucketReplicationInput {
  29350. s.Token = &v
  29351. return s
  29352. }
  29353. func (s *PutBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
  29354. if s.Bucket == nil {
  29355. return nil, fmt.Errorf("member Bucket is nil")
  29356. }
  29357. return parseEndpointARN(*s.Bucket)
  29358. }
  29359. func (s *PutBucketReplicationInput) hasEndpointARN() bool {
  29360. if s.Bucket == nil {
  29361. return false
  29362. }
  29363. return arn.IsARN(*s.Bucket)
  29364. }
  29365. // updateArnableField updates the value of the input field that
  29366. // takes an ARN as an input. This method is useful to backfill
  29367. // the parsed resource name from ARN into the input member.
  29368. // It returns a pointer to a modified copy of input and an error.
  29369. // Note that original input is not modified.
  29370. func (s PutBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
  29371. if s.Bucket == nil {
  29372. return nil, fmt.Errorf("member Bucket is nil")
  29373. }
  29374. s.Bucket = aws.String(v)
  29375. return &s, nil
  29376. }
  29377. type PutBucketReplicationOutput struct {
  29378. _ struct{} `type:"structure"`
  29379. }
  29380. // String returns the string representation.
  29381. //
  29382. // API parameter values that are decorated as "sensitive" in the API will not
  29383. // be included in the string output. The member name will be present, but the
  29384. // value will be replaced with "sensitive".
  29385. func (s PutBucketReplicationOutput) String() string {
  29386. return awsutil.Prettify(s)
  29387. }
  29388. // GoString returns the string representation.
  29389. //
  29390. // API parameter values that are decorated as "sensitive" in the API will not
  29391. // be included in the string output. The member name will be present, but the
  29392. // value will be replaced with "sensitive".
  29393. func (s PutBucketReplicationOutput) GoString() string {
  29394. return s.String()
  29395. }
  29396. type PutBucketRequestPaymentInput struct {
  29397. _ struct{} `locationName:"PutBucketRequestPaymentRequest" type:"structure" payload:"RequestPaymentConfiguration"`
  29398. // The bucket name.
  29399. //
  29400. // Bucket is a required field
  29401. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29402. // Indicates the algorithm used to create the checksum for the object when using
  29403. // the SDK. This header will not provide any additional functionality if not
  29404. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29405. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29406. // the HTTP status code 400 Bad Request. For more information, see Checking
  29407. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29408. // in the Amazon S3 User Guide.
  29409. //
  29410. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29411. // parameter.
  29412. //
  29413. // The AWS SDK for Go v1 does not support automatic computing request payload
  29414. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29415. // is specified for this parameter, the matching algorithm's checksum member
  29416. // must be populated with the algorithm's checksum of the request payload.
  29417. //
  29418. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29419. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29420. // to be used.
  29421. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29422. // The account ID of the expected bucket owner. If the bucket is owned by a
  29423. // different account, the request fails with the HTTP status code 403 Forbidden
  29424. // (access denied).
  29425. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29426. // Container for Payer.
  29427. //
  29428. // RequestPaymentConfiguration is a required field
  29429. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29430. }
  29431. // String returns the string representation.
  29432. //
  29433. // API parameter values that are decorated as "sensitive" in the API will not
  29434. // be included in the string output. The member name will be present, but the
  29435. // value will be replaced with "sensitive".
  29436. func (s PutBucketRequestPaymentInput) String() string {
  29437. return awsutil.Prettify(s)
  29438. }
  29439. // GoString returns the string representation.
  29440. //
  29441. // API parameter values that are decorated as "sensitive" in the API will not
  29442. // be included in the string output. The member name will be present, but the
  29443. // value will be replaced with "sensitive".
  29444. func (s PutBucketRequestPaymentInput) GoString() string {
  29445. return s.String()
  29446. }
  29447. // Validate inspects the fields of the type to determine if they are valid.
  29448. func (s *PutBucketRequestPaymentInput) Validate() error {
  29449. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  29450. if s.Bucket == nil {
  29451. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29452. }
  29453. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29454. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29455. }
  29456. if s.RequestPaymentConfiguration == nil {
  29457. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  29458. }
  29459. if s.RequestPaymentConfiguration != nil {
  29460. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  29461. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  29462. }
  29463. }
  29464. if invalidParams.Len() > 0 {
  29465. return invalidParams
  29466. }
  29467. return nil
  29468. }
  29469. // SetBucket sets the Bucket field's value.
  29470. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  29471. s.Bucket = &v
  29472. return s
  29473. }
  29474. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  29475. if s.Bucket == nil {
  29476. return v
  29477. }
  29478. return *s.Bucket
  29479. }
  29480. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29481. func (s *PutBucketRequestPaymentInput) SetChecksumAlgorithm(v string) *PutBucketRequestPaymentInput {
  29482. s.ChecksumAlgorithm = &v
  29483. return s
  29484. }
  29485. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29486. func (s *PutBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *PutBucketRequestPaymentInput {
  29487. s.ExpectedBucketOwner = &v
  29488. return s
  29489. }
  29490. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  29491. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  29492. s.RequestPaymentConfiguration = v
  29493. return s
  29494. }
  29495. func (s *PutBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
  29496. if s.Bucket == nil {
  29497. return nil, fmt.Errorf("member Bucket is nil")
  29498. }
  29499. return parseEndpointARN(*s.Bucket)
  29500. }
  29501. func (s *PutBucketRequestPaymentInput) hasEndpointARN() bool {
  29502. if s.Bucket == nil {
  29503. return false
  29504. }
  29505. return arn.IsARN(*s.Bucket)
  29506. }
  29507. // updateArnableField updates the value of the input field that
  29508. // takes an ARN as an input. This method is useful to backfill
  29509. // the parsed resource name from ARN into the input member.
  29510. // It returns a pointer to a modified copy of input and an error.
  29511. // Note that original input is not modified.
  29512. func (s PutBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
  29513. if s.Bucket == nil {
  29514. return nil, fmt.Errorf("member Bucket is nil")
  29515. }
  29516. s.Bucket = aws.String(v)
  29517. return &s, nil
  29518. }
  29519. type PutBucketRequestPaymentOutput struct {
  29520. _ struct{} `type:"structure"`
  29521. }
  29522. // String returns the string representation.
  29523. //
  29524. // API parameter values that are decorated as "sensitive" in the API will not
  29525. // be included in the string output. The member name will be present, but the
  29526. // value will be replaced with "sensitive".
  29527. func (s PutBucketRequestPaymentOutput) String() string {
  29528. return awsutil.Prettify(s)
  29529. }
  29530. // GoString returns the string representation.
  29531. //
  29532. // API parameter values that are decorated as "sensitive" in the API will not
  29533. // be included in the string output. The member name will be present, but the
  29534. // value will be replaced with "sensitive".
  29535. func (s PutBucketRequestPaymentOutput) GoString() string {
  29536. return s.String()
  29537. }
  29538. type PutBucketTaggingInput struct {
  29539. _ struct{} `locationName:"PutBucketTaggingRequest" type:"structure" payload:"Tagging"`
  29540. // The bucket name.
  29541. //
  29542. // Bucket is a required field
  29543. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29544. // Indicates the algorithm used to create the checksum for the object when using
  29545. // the SDK. This header will not provide any additional functionality if not
  29546. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29547. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29548. // the HTTP status code 400 Bad Request. For more information, see Checking
  29549. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29550. // in the Amazon S3 User Guide.
  29551. //
  29552. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29553. // parameter.
  29554. //
  29555. // The AWS SDK for Go v1 does not support automatic computing request payload
  29556. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29557. // is specified for this parameter, the matching algorithm's checksum member
  29558. // must be populated with the algorithm's checksum of the request payload.
  29559. //
  29560. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29561. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29562. // to be used.
  29563. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29564. // The account ID of the expected bucket owner. If the bucket is owned by a
  29565. // different account, the request fails with the HTTP status code 403 Forbidden
  29566. // (access denied).
  29567. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29568. // Container for the TagSet and Tag elements.
  29569. //
  29570. // Tagging is a required field
  29571. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29572. }
  29573. // String returns the string representation.
  29574. //
  29575. // API parameter values that are decorated as "sensitive" in the API will not
  29576. // be included in the string output. The member name will be present, but the
  29577. // value will be replaced with "sensitive".
  29578. func (s PutBucketTaggingInput) String() string {
  29579. return awsutil.Prettify(s)
  29580. }
  29581. // GoString returns the string representation.
  29582. //
  29583. // API parameter values that are decorated as "sensitive" in the API will not
  29584. // be included in the string output. The member name will be present, but the
  29585. // value will be replaced with "sensitive".
  29586. func (s PutBucketTaggingInput) GoString() string {
  29587. return s.String()
  29588. }
  29589. // Validate inspects the fields of the type to determine if they are valid.
  29590. func (s *PutBucketTaggingInput) Validate() error {
  29591. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  29592. if s.Bucket == nil {
  29593. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29594. }
  29595. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29596. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29597. }
  29598. if s.Tagging == nil {
  29599. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  29600. }
  29601. if s.Tagging != nil {
  29602. if err := s.Tagging.Validate(); err != nil {
  29603. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  29604. }
  29605. }
  29606. if invalidParams.Len() > 0 {
  29607. return invalidParams
  29608. }
  29609. return nil
  29610. }
  29611. // SetBucket sets the Bucket field's value.
  29612. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  29613. s.Bucket = &v
  29614. return s
  29615. }
  29616. func (s *PutBucketTaggingInput) getBucket() (v string) {
  29617. if s.Bucket == nil {
  29618. return v
  29619. }
  29620. return *s.Bucket
  29621. }
  29622. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29623. func (s *PutBucketTaggingInput) SetChecksumAlgorithm(v string) *PutBucketTaggingInput {
  29624. s.ChecksumAlgorithm = &v
  29625. return s
  29626. }
  29627. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29628. func (s *PutBucketTaggingInput) SetExpectedBucketOwner(v string) *PutBucketTaggingInput {
  29629. s.ExpectedBucketOwner = &v
  29630. return s
  29631. }
  29632. // SetTagging sets the Tagging field's value.
  29633. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  29634. s.Tagging = v
  29635. return s
  29636. }
  29637. func (s *PutBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
  29638. if s.Bucket == nil {
  29639. return nil, fmt.Errorf("member Bucket is nil")
  29640. }
  29641. return parseEndpointARN(*s.Bucket)
  29642. }
  29643. func (s *PutBucketTaggingInput) hasEndpointARN() bool {
  29644. if s.Bucket == nil {
  29645. return false
  29646. }
  29647. return arn.IsARN(*s.Bucket)
  29648. }
  29649. // updateArnableField updates the value of the input field that
  29650. // takes an ARN as an input. This method is useful to backfill
  29651. // the parsed resource name from ARN into the input member.
  29652. // It returns a pointer to a modified copy of input and an error.
  29653. // Note that original input is not modified.
  29654. func (s PutBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
  29655. if s.Bucket == nil {
  29656. return nil, fmt.Errorf("member Bucket is nil")
  29657. }
  29658. s.Bucket = aws.String(v)
  29659. return &s, nil
  29660. }
  29661. type PutBucketTaggingOutput struct {
  29662. _ struct{} `type:"structure"`
  29663. }
  29664. // String returns the string representation.
  29665. //
  29666. // API parameter values that are decorated as "sensitive" in the API will not
  29667. // be included in the string output. The member name will be present, but the
  29668. // value will be replaced with "sensitive".
  29669. func (s PutBucketTaggingOutput) String() string {
  29670. return awsutil.Prettify(s)
  29671. }
  29672. // GoString returns the string representation.
  29673. //
  29674. // API parameter values that are decorated as "sensitive" in the API will not
  29675. // be included in the string output. The member name will be present, but the
  29676. // value will be replaced with "sensitive".
  29677. func (s PutBucketTaggingOutput) GoString() string {
  29678. return s.String()
  29679. }
  29680. type PutBucketVersioningInput struct {
  29681. _ struct{} `locationName:"PutBucketVersioningRequest" type:"structure" payload:"VersioningConfiguration"`
  29682. // The bucket name.
  29683. //
  29684. // Bucket is a required field
  29685. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29686. // Indicates the algorithm used to create the checksum for the object when using
  29687. // the SDK. This header will not provide any additional functionality if not
  29688. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29689. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29690. // the HTTP status code 400 Bad Request. For more information, see Checking
  29691. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29692. // in the Amazon S3 User Guide.
  29693. //
  29694. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29695. // parameter.
  29696. //
  29697. // The AWS SDK for Go v1 does not support automatic computing request payload
  29698. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29699. // is specified for this parameter, the matching algorithm's checksum member
  29700. // must be populated with the algorithm's checksum of the request payload.
  29701. //
  29702. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29703. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29704. // to be used.
  29705. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29706. // The account ID of the expected bucket owner. If the bucket is owned by a
  29707. // different account, the request fails with the HTTP status code 403 Forbidden
  29708. // (access denied).
  29709. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29710. // The concatenation of the authentication device's serial number, a space,
  29711. // and the value that is displayed on your authentication device.
  29712. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  29713. // Container for setting the versioning state.
  29714. //
  29715. // VersioningConfiguration is a required field
  29716. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29717. }
  29718. // String returns the string representation.
  29719. //
  29720. // API parameter values that are decorated as "sensitive" in the API will not
  29721. // be included in the string output. The member name will be present, but the
  29722. // value will be replaced with "sensitive".
  29723. func (s PutBucketVersioningInput) String() string {
  29724. return awsutil.Prettify(s)
  29725. }
  29726. // GoString returns the string representation.
  29727. //
  29728. // API parameter values that are decorated as "sensitive" in the API will not
  29729. // be included in the string output. The member name will be present, but the
  29730. // value will be replaced with "sensitive".
  29731. func (s PutBucketVersioningInput) GoString() string {
  29732. return s.String()
  29733. }
  29734. // Validate inspects the fields of the type to determine if they are valid.
  29735. func (s *PutBucketVersioningInput) Validate() error {
  29736. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  29737. if s.Bucket == nil {
  29738. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29739. }
  29740. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29741. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29742. }
  29743. if s.VersioningConfiguration == nil {
  29744. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  29745. }
  29746. if invalidParams.Len() > 0 {
  29747. return invalidParams
  29748. }
  29749. return nil
  29750. }
  29751. // SetBucket sets the Bucket field's value.
  29752. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  29753. s.Bucket = &v
  29754. return s
  29755. }
  29756. func (s *PutBucketVersioningInput) getBucket() (v string) {
  29757. if s.Bucket == nil {
  29758. return v
  29759. }
  29760. return *s.Bucket
  29761. }
  29762. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29763. func (s *PutBucketVersioningInput) SetChecksumAlgorithm(v string) *PutBucketVersioningInput {
  29764. s.ChecksumAlgorithm = &v
  29765. return s
  29766. }
  29767. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29768. func (s *PutBucketVersioningInput) SetExpectedBucketOwner(v string) *PutBucketVersioningInput {
  29769. s.ExpectedBucketOwner = &v
  29770. return s
  29771. }
  29772. // SetMFA sets the MFA field's value.
  29773. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  29774. s.MFA = &v
  29775. return s
  29776. }
  29777. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  29778. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  29779. s.VersioningConfiguration = v
  29780. return s
  29781. }
  29782. func (s *PutBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
  29783. if s.Bucket == nil {
  29784. return nil, fmt.Errorf("member Bucket is nil")
  29785. }
  29786. return parseEndpointARN(*s.Bucket)
  29787. }
  29788. func (s *PutBucketVersioningInput) hasEndpointARN() bool {
  29789. if s.Bucket == nil {
  29790. return false
  29791. }
  29792. return arn.IsARN(*s.Bucket)
  29793. }
  29794. // updateArnableField updates the value of the input field that
  29795. // takes an ARN as an input. This method is useful to backfill
  29796. // the parsed resource name from ARN into the input member.
  29797. // It returns a pointer to a modified copy of input and an error.
  29798. // Note that original input is not modified.
  29799. func (s PutBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
  29800. if s.Bucket == nil {
  29801. return nil, fmt.Errorf("member Bucket is nil")
  29802. }
  29803. s.Bucket = aws.String(v)
  29804. return &s, nil
  29805. }
  29806. type PutBucketVersioningOutput struct {
  29807. _ struct{} `type:"structure"`
  29808. }
  29809. // String returns the string representation.
  29810. //
  29811. // API parameter values that are decorated as "sensitive" in the API will not
  29812. // be included in the string output. The member name will be present, but the
  29813. // value will be replaced with "sensitive".
  29814. func (s PutBucketVersioningOutput) String() string {
  29815. return awsutil.Prettify(s)
  29816. }
  29817. // GoString returns the string representation.
  29818. //
  29819. // API parameter values that are decorated as "sensitive" in the API will not
  29820. // be included in the string output. The member name will be present, but the
  29821. // value will be replaced with "sensitive".
  29822. func (s PutBucketVersioningOutput) GoString() string {
  29823. return s.String()
  29824. }
  29825. type PutBucketWebsiteInput struct {
  29826. _ struct{} `locationName:"PutBucketWebsiteRequest" type:"structure" payload:"WebsiteConfiguration"`
  29827. // The bucket name.
  29828. //
  29829. // Bucket is a required field
  29830. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29831. // Indicates the algorithm used to create the checksum for the object when using
  29832. // the SDK. This header will not provide any additional functionality if not
  29833. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29834. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29835. // the HTTP status code 400 Bad Request. For more information, see Checking
  29836. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29837. // in the Amazon S3 User Guide.
  29838. //
  29839. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29840. // parameter.
  29841. //
  29842. // The AWS SDK for Go v1 does not support automatic computing request payload
  29843. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29844. // is specified for this parameter, the matching algorithm's checksum member
  29845. // must be populated with the algorithm's checksum of the request payload.
  29846. //
  29847. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  29848. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  29849. // to be used.
  29850. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  29851. // The account ID of the expected bucket owner. If the bucket is owned by a
  29852. // different account, the request fails with the HTTP status code 403 Forbidden
  29853. // (access denied).
  29854. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  29855. // Container for the request.
  29856. //
  29857. // WebsiteConfiguration is a required field
  29858. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29859. }
  29860. // String returns the string representation.
  29861. //
  29862. // API parameter values that are decorated as "sensitive" in the API will not
  29863. // be included in the string output. The member name will be present, but the
  29864. // value will be replaced with "sensitive".
  29865. func (s PutBucketWebsiteInput) String() string {
  29866. return awsutil.Prettify(s)
  29867. }
  29868. // GoString returns the string representation.
  29869. //
  29870. // API parameter values that are decorated as "sensitive" in the API will not
  29871. // be included in the string output. The member name will be present, but the
  29872. // value will be replaced with "sensitive".
  29873. func (s PutBucketWebsiteInput) GoString() string {
  29874. return s.String()
  29875. }
  29876. // Validate inspects the fields of the type to determine if they are valid.
  29877. func (s *PutBucketWebsiteInput) Validate() error {
  29878. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  29879. if s.Bucket == nil {
  29880. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  29881. }
  29882. if s.Bucket != nil && len(*s.Bucket) < 1 {
  29883. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  29884. }
  29885. if s.WebsiteConfiguration == nil {
  29886. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  29887. }
  29888. if s.WebsiteConfiguration != nil {
  29889. if err := s.WebsiteConfiguration.Validate(); err != nil {
  29890. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  29891. }
  29892. }
  29893. if invalidParams.Len() > 0 {
  29894. return invalidParams
  29895. }
  29896. return nil
  29897. }
  29898. // SetBucket sets the Bucket field's value.
  29899. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  29900. s.Bucket = &v
  29901. return s
  29902. }
  29903. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  29904. if s.Bucket == nil {
  29905. return v
  29906. }
  29907. return *s.Bucket
  29908. }
  29909. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  29910. func (s *PutBucketWebsiteInput) SetChecksumAlgorithm(v string) *PutBucketWebsiteInput {
  29911. s.ChecksumAlgorithm = &v
  29912. return s
  29913. }
  29914. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  29915. func (s *PutBucketWebsiteInput) SetExpectedBucketOwner(v string) *PutBucketWebsiteInput {
  29916. s.ExpectedBucketOwner = &v
  29917. return s
  29918. }
  29919. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  29920. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  29921. s.WebsiteConfiguration = v
  29922. return s
  29923. }
  29924. func (s *PutBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
  29925. if s.Bucket == nil {
  29926. return nil, fmt.Errorf("member Bucket is nil")
  29927. }
  29928. return parseEndpointARN(*s.Bucket)
  29929. }
  29930. func (s *PutBucketWebsiteInput) hasEndpointARN() bool {
  29931. if s.Bucket == nil {
  29932. return false
  29933. }
  29934. return arn.IsARN(*s.Bucket)
  29935. }
  29936. // updateArnableField updates the value of the input field that
  29937. // takes an ARN as an input. This method is useful to backfill
  29938. // the parsed resource name from ARN into the input member.
  29939. // It returns a pointer to a modified copy of input and an error.
  29940. // Note that original input is not modified.
  29941. func (s PutBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
  29942. if s.Bucket == nil {
  29943. return nil, fmt.Errorf("member Bucket is nil")
  29944. }
  29945. s.Bucket = aws.String(v)
  29946. return &s, nil
  29947. }
  29948. type PutBucketWebsiteOutput struct {
  29949. _ struct{} `type:"structure"`
  29950. }
  29951. // String returns the string representation.
  29952. //
  29953. // API parameter values that are decorated as "sensitive" in the API will not
  29954. // be included in the string output. The member name will be present, but the
  29955. // value will be replaced with "sensitive".
  29956. func (s PutBucketWebsiteOutput) String() string {
  29957. return awsutil.Prettify(s)
  29958. }
  29959. // GoString returns the string representation.
  29960. //
  29961. // API parameter values that are decorated as "sensitive" in the API will not
  29962. // be included in the string output. The member name will be present, but the
  29963. // value will be replaced with "sensitive".
  29964. func (s PutBucketWebsiteOutput) GoString() string {
  29965. return s.String()
  29966. }
  29967. type PutObjectAclInput struct {
  29968. _ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"`
  29969. // The canned ACL to apply to the object. For more information, see Canned ACL
  29970. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  29971. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  29972. // Contains the elements that set the ACL permissions for an object per grantee.
  29973. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  29974. // The bucket name that contains the object to which you want to attach the
  29975. // ACL.
  29976. //
  29977. // When using this action with an access point, you must direct requests to
  29978. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  29979. // When using this action with an access point through the Amazon Web Services
  29980. // SDKs, you provide the access point ARN in place of the bucket name. For more
  29981. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  29982. // in the Amazon S3 User Guide.
  29983. //
  29984. // Bucket is a required field
  29985. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  29986. // Indicates the algorithm used to create the checksum for the object when using
  29987. // the SDK. This header will not provide any additional functionality if not
  29988. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  29989. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  29990. // the HTTP status code 400 Bad Request. For more information, see Checking
  29991. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  29992. // in the Amazon S3 User Guide.
  29993. //
  29994. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  29995. // parameter.
  29996. //
  29997. // The AWS SDK for Go v1 does not support automatic computing request payload
  29998. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  29999. // is specified for this parameter, the matching algorithm's checksum member
  30000. // must be populated with the algorithm's checksum of the request payload.
  30001. //
  30002. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  30003. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  30004. // to be used.
  30005. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  30006. // The account ID of the expected bucket owner. If the bucket is owned by a
  30007. // different account, the request fails with the HTTP status code 403 Forbidden
  30008. // (access denied).
  30009. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  30010. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  30011. // bucket.
  30012. //
  30013. // This action is not supported by Amazon S3 on Outposts.
  30014. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  30015. // Allows grantee to list the objects in the bucket.
  30016. //
  30017. // This action is not supported by Amazon S3 on Outposts.
  30018. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  30019. // Allows grantee to read the bucket ACL.
  30020. //
  30021. // This action is not supported by Amazon S3 on Outposts.
  30022. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  30023. // Allows grantee to create new objects in the bucket.
  30024. //
  30025. // For the bucket and object owners of existing objects, also allows deletions
  30026. // and overwrites of those objects.
  30027. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  30028. // Allows grantee to write the ACL for the applicable bucket.
  30029. //
  30030. // This action is not supported by Amazon S3 on Outposts.
  30031. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  30032. // Key for which the PUT action was initiated.
  30033. //
  30034. // When using this action with an access point, you must direct requests to
  30035. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  30036. // When using this action with an access point through the Amazon Web Services
  30037. // SDKs, you provide the access point ARN in place of the bucket name. For more
  30038. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  30039. // in the Amazon S3 User Guide.
  30040. //
  30041. // When using this action with Amazon S3 on Outposts, you must direct requests
  30042. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  30043. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  30044. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  30045. // you provide the Outposts bucket ARN in place of the bucket name. For more
  30046. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  30047. // in the Amazon S3 User Guide.
  30048. //
  30049. // Key is a required field
  30050. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  30051. // Confirms that the requester knows that they will be charged for the request.
  30052. // Bucket owners need not specify this parameter in their requests. For information
  30053. // about downloading objects from Requester Pays buckets, see Downloading Objects
  30054. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  30055. // in the Amazon S3 User Guide.
  30056. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  30057. // VersionId used to reference a specific version of the object.
  30058. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  30059. }
  30060. // String returns the string representation.
  30061. //
  30062. // API parameter values that are decorated as "sensitive" in the API will not
  30063. // be included in the string output. The member name will be present, but the
  30064. // value will be replaced with "sensitive".
  30065. func (s PutObjectAclInput) String() string {
  30066. return awsutil.Prettify(s)
  30067. }
  30068. // GoString returns the string representation.
  30069. //
  30070. // API parameter values that are decorated as "sensitive" in the API will not
  30071. // be included in the string output. The member name will be present, but the
  30072. // value will be replaced with "sensitive".
  30073. func (s PutObjectAclInput) GoString() string {
  30074. return s.String()
  30075. }
  30076. // Validate inspects the fields of the type to determine if they are valid.
  30077. func (s *PutObjectAclInput) Validate() error {
  30078. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  30079. if s.Bucket == nil {
  30080. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  30081. }
  30082. if s.Bucket != nil && len(*s.Bucket) < 1 {
  30083. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  30084. }
  30085. if s.Key == nil {
  30086. invalidParams.Add(request.NewErrParamRequired("Key"))
  30087. }
  30088. if s.Key != nil && len(*s.Key) < 1 {
  30089. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  30090. }
  30091. if s.AccessControlPolicy != nil {
  30092. if err := s.AccessControlPolicy.Validate(); err != nil {
  30093. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  30094. }
  30095. }
  30096. if invalidParams.Len() > 0 {
  30097. return invalidParams
  30098. }
  30099. return nil
  30100. }
  30101. // SetACL sets the ACL field's value.
  30102. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  30103. s.ACL = &v
  30104. return s
  30105. }
  30106. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  30107. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  30108. s.AccessControlPolicy = v
  30109. return s
  30110. }
  30111. // SetBucket sets the Bucket field's value.
  30112. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  30113. s.Bucket = &v
  30114. return s
  30115. }
  30116. func (s *PutObjectAclInput) getBucket() (v string) {
  30117. if s.Bucket == nil {
  30118. return v
  30119. }
  30120. return *s.Bucket
  30121. }
  30122. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  30123. func (s *PutObjectAclInput) SetChecksumAlgorithm(v string) *PutObjectAclInput {
  30124. s.ChecksumAlgorithm = &v
  30125. return s
  30126. }
  30127. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  30128. func (s *PutObjectAclInput) SetExpectedBucketOwner(v string) *PutObjectAclInput {
  30129. s.ExpectedBucketOwner = &v
  30130. return s
  30131. }
  30132. // SetGrantFullControl sets the GrantFullControl field's value.
  30133. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  30134. s.GrantFullControl = &v
  30135. return s
  30136. }
  30137. // SetGrantRead sets the GrantRead field's value.
  30138. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  30139. s.GrantRead = &v
  30140. return s
  30141. }
  30142. // SetGrantReadACP sets the GrantReadACP field's value.
  30143. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  30144. s.GrantReadACP = &v
  30145. return s
  30146. }
  30147. // SetGrantWrite sets the GrantWrite field's value.
  30148. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  30149. s.GrantWrite = &v
  30150. return s
  30151. }
  30152. // SetGrantWriteACP sets the GrantWriteACP field's value.
  30153. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  30154. s.GrantWriteACP = &v
  30155. return s
  30156. }
  30157. // SetKey sets the Key field's value.
  30158. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  30159. s.Key = &v
  30160. return s
  30161. }
  30162. // SetRequestPayer sets the RequestPayer field's value.
  30163. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  30164. s.RequestPayer = &v
  30165. return s
  30166. }
  30167. // SetVersionId sets the VersionId field's value.
  30168. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  30169. s.VersionId = &v
  30170. return s
  30171. }
  30172. func (s *PutObjectAclInput) getEndpointARN() (arn.Resource, error) {
  30173. if s.Bucket == nil {
  30174. return nil, fmt.Errorf("member Bucket is nil")
  30175. }
  30176. return parseEndpointARN(*s.Bucket)
  30177. }
  30178. func (s *PutObjectAclInput) hasEndpointARN() bool {
  30179. if s.Bucket == nil {
  30180. return false
  30181. }
  30182. return arn.IsARN(*s.Bucket)
  30183. }
  30184. // updateArnableField updates the value of the input field that
  30185. // takes an ARN as an input. This method is useful to backfill
  30186. // the parsed resource name from ARN into the input member.
  30187. // It returns a pointer to a modified copy of input and an error.
  30188. // Note that original input is not modified.
  30189. func (s PutObjectAclInput) updateArnableField(v string) (interface{}, error) {
  30190. if s.Bucket == nil {
  30191. return nil, fmt.Errorf("member Bucket is nil")
  30192. }
  30193. s.Bucket = aws.String(v)
  30194. return &s, nil
  30195. }
  30196. type PutObjectAclOutput struct {
  30197. _ struct{} `type:"structure"`
  30198. // If present, indicates that the requester was successfully charged for the
  30199. // request.
  30200. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  30201. }
  30202. // String returns the string representation.
  30203. //
  30204. // API parameter values that are decorated as "sensitive" in the API will not
  30205. // be included in the string output. The member name will be present, but the
  30206. // value will be replaced with "sensitive".
  30207. func (s PutObjectAclOutput) String() string {
  30208. return awsutil.Prettify(s)
  30209. }
  30210. // GoString returns the string representation.
  30211. //
  30212. // API parameter values that are decorated as "sensitive" in the API will not
  30213. // be included in the string output. The member name will be present, but the
  30214. // value will be replaced with "sensitive".
  30215. func (s PutObjectAclOutput) GoString() string {
  30216. return s.String()
  30217. }
  30218. // SetRequestCharged sets the RequestCharged field's value.
  30219. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  30220. s.RequestCharged = &v
  30221. return s
  30222. }
  30223. type PutObjectInput struct {
  30224. _ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
  30225. // The canned ACL to apply to the object. For more information, see Canned ACL
  30226. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
  30227. //
  30228. // This action is not supported by Amazon S3 on Outposts.
  30229. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  30230. // Object data.
  30231. Body io.ReadSeeker `type:"blob"`
  30232. // The bucket name to which the PUT action was initiated.
  30233. //
  30234. // When using this action with an access point, you must direct requests to
  30235. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  30236. // When using this action with an access point through the Amazon Web Services
  30237. // SDKs, you provide the access point ARN in place of the bucket name. For more
  30238. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  30239. // in the Amazon S3 User Guide.
  30240. //
  30241. // When using this action with Amazon S3 on Outposts, you must direct requests
  30242. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  30243. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  30244. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  30245. // you provide the Outposts bucket ARN in place of the bucket name. For more
  30246. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  30247. // in the Amazon S3 User Guide.
  30248. //
  30249. // Bucket is a required field
  30250. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  30251. // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
  30252. // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
  30253. // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
  30254. // SSE-KMS.
  30255. //
  30256. // Specifying this header with a PUT action doesn’t affect bucket-level settings
  30257. // for S3 Bucket Key.
  30258. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  30259. // Can be used to specify caching behavior along the request/reply chain. For
  30260. // more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
  30261. // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
  30262. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  30263. // Indicates the algorithm used to create the checksum for the object when using
  30264. // the SDK. This header will not provide any additional functionality if not
  30265. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  30266. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  30267. // the HTTP status code 400 Bad Request. For more information, see Checking
  30268. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30269. // in the Amazon S3 User Guide.
  30270. //
  30271. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  30272. // parameter.
  30273. //
  30274. // The AWS SDK for Go v1 does not support automatic computing request payload
  30275. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  30276. // is specified for this parameter, the matching algorithm's checksum member
  30277. // must be populated with the algorithm's checksum of the request payload.
  30278. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  30279. // This header can be used as a data integrity check to verify that the data
  30280. // received is the same data that was originally sent. This header specifies
  30281. // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
  30282. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30283. // in the Amazon S3 User Guide.
  30284. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  30285. // This header can be used as a data integrity check to verify that the data
  30286. // received is the same data that was originally sent. This header specifies
  30287. // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
  30288. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30289. // in the Amazon S3 User Guide.
  30290. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  30291. // This header can be used as a data integrity check to verify that the data
  30292. // received is the same data that was originally sent. This header specifies
  30293. // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
  30294. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30295. // in the Amazon S3 User Guide.
  30296. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  30297. // This header can be used as a data integrity check to verify that the data
  30298. // received is the same data that was originally sent. This header specifies
  30299. // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
  30300. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30301. // in the Amazon S3 User Guide.
  30302. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  30303. // Specifies presentational information for the object. For more information,
  30304. // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1).
  30305. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  30306. // Specifies what content encodings have been applied to the object and thus
  30307. // what decoding mechanisms must be applied to obtain the media-type referenced
  30308. // by the Content-Type header field. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
  30309. // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11).
  30310. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  30311. // The language the content is in.
  30312. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  30313. // Size of the body in bytes. This parameter is useful when the size of the
  30314. // body cannot be determined automatically. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
  30315. // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13).
  30316. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  30317. // The base64-encoded 128-bit MD5 digest of the message (without the headers)
  30318. // according to RFC 1864. This header can be used as a message integrity check
  30319. // to verify that the data is the same data that was originally sent. Although
  30320. // it is optional, we recommend using the Content-MD5 mechanism as an end-to-end
  30321. // integrity check. For more information about REST request authentication,
  30322. // see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
  30323. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  30324. // A standard MIME type describing the format of the contents. For more information,
  30325. // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17).
  30326. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  30327. // The account ID of the expected bucket owner. If the bucket is owned by a
  30328. // different account, the request fails with the HTTP status code 403 Forbidden
  30329. // (access denied).
  30330. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  30331. // The date and time at which the object is no longer cacheable. For more information,
  30332. // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21).
  30333. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  30334. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  30335. //
  30336. // This action is not supported by Amazon S3 on Outposts.
  30337. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  30338. // Allows grantee to read the object data and its metadata.
  30339. //
  30340. // This action is not supported by Amazon S3 on Outposts.
  30341. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  30342. // Allows grantee to read the object ACL.
  30343. //
  30344. // This action is not supported by Amazon S3 on Outposts.
  30345. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  30346. // Allows grantee to write the ACL for the applicable object.
  30347. //
  30348. // This action is not supported by Amazon S3 on Outposts.
  30349. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  30350. // Object key for which the PUT action was initiated.
  30351. //
  30352. // Key is a required field
  30353. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  30354. // A map of metadata to store with the object in S3.
  30355. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  30356. // Specifies whether a legal hold will be applied to this object. For more information
  30357. // about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
  30358. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  30359. // The Object Lock mode that you want to apply to this object.
  30360. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  30361. // The date and time when you want this object's Object Lock to expire. Must
  30362. // be formatted as a timestamp parameter.
  30363. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  30364. // Confirms that the requester knows that they will be charged for the request.
  30365. // Bucket owners need not specify this parameter in their requests. For information
  30366. // about downloading objects from Requester Pays buckets, see Downloading Objects
  30367. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  30368. // in the Amazon S3 User Guide.
  30369. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  30370. // Specifies the algorithm to use to when encrypting the object (for example,
  30371. // AES256).
  30372. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  30373. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  30374. // data. This value is used to store the object and then it is discarded; Amazon
  30375. // S3 does not store the encryption key. The key must be appropriate for use
  30376. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  30377. // header.
  30378. //
  30379. // SSECustomerKey is a sensitive parameter and its value will be
  30380. // replaced with "sensitive" in string returned by PutObjectInput's
  30381. // String and GoString methods.
  30382. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  30383. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  30384. // Amazon S3 uses this header for a message integrity check to ensure that the
  30385. // encryption key was transmitted without error.
  30386. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  30387. // Specifies the Amazon Web Services KMS Encryption Context to use for object
  30388. // encryption. The value of this header is a base64-encoded UTF-8 string holding
  30389. // JSON with the encryption context key-value pairs.
  30390. //
  30391. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  30392. // replaced with "sensitive" in string returned by PutObjectInput's
  30393. // String and GoString methods.
  30394. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  30395. // If x-amz-server-side-encryption is present and has the value of aws:kms,
  30396. // this header specifies the ID of the Amazon Web Services Key Management Service
  30397. // (Amazon Web Services KMS) symmetrical customer managed key that was used
  30398. // for the object. If you specify x-amz-server-side-encryption:aws:kms, but
  30399. // do not providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses
  30400. // the Amazon Web Services managed key to protect the data. If the KMS key does
  30401. // not exist in the same account issuing the command, you must use the full
  30402. // ARN and not just the ID.
  30403. //
  30404. // SSEKMSKeyId is a sensitive parameter and its value will be
  30405. // replaced with "sensitive" in string returned by PutObjectInput's
  30406. // String and GoString methods.
  30407. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  30408. // The server-side encryption algorithm used when storing this object in Amazon
  30409. // S3 (for example, AES256, aws:kms).
  30410. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  30411. // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
  30412. // objects. The STANDARD storage class provides high durability and high availability.
  30413. // Depending on performance needs, you can specify a different Storage Class.
  30414. // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
  30415. // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
  30416. // in the Amazon S3 User Guide.
  30417. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  30418. // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
  30419. // (For example, "Key1=Value1")
  30420. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  30421. // If the bucket is configured as a website, redirects requests for this object
  30422. // to another object in the same bucket or to an external URL. Amazon S3 stores
  30423. // the value of this header in the object metadata. For information about object
  30424. // metadata, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html).
  30425. //
  30426. // In the following example, the request header sets the redirect to an object
  30427. // (anotherPage.html) in the same bucket:
  30428. //
  30429. // x-amz-website-redirect-location: /anotherPage.html
  30430. //
  30431. // In the following example, the request header sets the object redirect to
  30432. // another website:
  30433. //
  30434. // x-amz-website-redirect-location: http://www.example.com/
  30435. //
  30436. // For more information about website hosting in Amazon S3, see Hosting Websites
  30437. // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
  30438. // and How to Configure Website Page Redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
  30439. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  30440. }
  30441. // String returns the string representation.
  30442. //
  30443. // API parameter values that are decorated as "sensitive" in the API will not
  30444. // be included in the string output. The member name will be present, but the
  30445. // value will be replaced with "sensitive".
  30446. func (s PutObjectInput) String() string {
  30447. return awsutil.Prettify(s)
  30448. }
  30449. // GoString returns the string representation.
  30450. //
  30451. // API parameter values that are decorated as "sensitive" in the API will not
  30452. // be included in the string output. The member name will be present, but the
  30453. // value will be replaced with "sensitive".
  30454. func (s PutObjectInput) GoString() string {
  30455. return s.String()
  30456. }
  30457. // Validate inspects the fields of the type to determine if they are valid.
  30458. func (s *PutObjectInput) Validate() error {
  30459. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  30460. if s.Bucket == nil {
  30461. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  30462. }
  30463. if s.Bucket != nil && len(*s.Bucket) < 1 {
  30464. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  30465. }
  30466. if s.Key == nil {
  30467. invalidParams.Add(request.NewErrParamRequired("Key"))
  30468. }
  30469. if s.Key != nil && len(*s.Key) < 1 {
  30470. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  30471. }
  30472. if invalidParams.Len() > 0 {
  30473. return invalidParams
  30474. }
  30475. return nil
  30476. }
  30477. // SetACL sets the ACL field's value.
  30478. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  30479. s.ACL = &v
  30480. return s
  30481. }
  30482. // SetBody sets the Body field's value.
  30483. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  30484. s.Body = v
  30485. return s
  30486. }
  30487. // SetBucket sets the Bucket field's value.
  30488. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  30489. s.Bucket = &v
  30490. return s
  30491. }
  30492. func (s *PutObjectInput) getBucket() (v string) {
  30493. if s.Bucket == nil {
  30494. return v
  30495. }
  30496. return *s.Bucket
  30497. }
  30498. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  30499. func (s *PutObjectInput) SetBucketKeyEnabled(v bool) *PutObjectInput {
  30500. s.BucketKeyEnabled = &v
  30501. return s
  30502. }
  30503. // SetCacheControl sets the CacheControl field's value.
  30504. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  30505. s.CacheControl = &v
  30506. return s
  30507. }
  30508. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  30509. func (s *PutObjectInput) SetChecksumAlgorithm(v string) *PutObjectInput {
  30510. s.ChecksumAlgorithm = &v
  30511. return s
  30512. }
  30513. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  30514. func (s *PutObjectInput) SetChecksumCRC32(v string) *PutObjectInput {
  30515. s.ChecksumCRC32 = &v
  30516. return s
  30517. }
  30518. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  30519. func (s *PutObjectInput) SetChecksumCRC32C(v string) *PutObjectInput {
  30520. s.ChecksumCRC32C = &v
  30521. return s
  30522. }
  30523. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  30524. func (s *PutObjectInput) SetChecksumSHA1(v string) *PutObjectInput {
  30525. s.ChecksumSHA1 = &v
  30526. return s
  30527. }
  30528. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  30529. func (s *PutObjectInput) SetChecksumSHA256(v string) *PutObjectInput {
  30530. s.ChecksumSHA256 = &v
  30531. return s
  30532. }
  30533. // SetContentDisposition sets the ContentDisposition field's value.
  30534. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  30535. s.ContentDisposition = &v
  30536. return s
  30537. }
  30538. // SetContentEncoding sets the ContentEncoding field's value.
  30539. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  30540. s.ContentEncoding = &v
  30541. return s
  30542. }
  30543. // SetContentLanguage sets the ContentLanguage field's value.
  30544. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  30545. s.ContentLanguage = &v
  30546. return s
  30547. }
  30548. // SetContentLength sets the ContentLength field's value.
  30549. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  30550. s.ContentLength = &v
  30551. return s
  30552. }
  30553. // SetContentMD5 sets the ContentMD5 field's value.
  30554. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  30555. s.ContentMD5 = &v
  30556. return s
  30557. }
  30558. // SetContentType sets the ContentType field's value.
  30559. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  30560. s.ContentType = &v
  30561. return s
  30562. }
  30563. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  30564. func (s *PutObjectInput) SetExpectedBucketOwner(v string) *PutObjectInput {
  30565. s.ExpectedBucketOwner = &v
  30566. return s
  30567. }
  30568. // SetExpires sets the Expires field's value.
  30569. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  30570. s.Expires = &v
  30571. return s
  30572. }
  30573. // SetGrantFullControl sets the GrantFullControl field's value.
  30574. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  30575. s.GrantFullControl = &v
  30576. return s
  30577. }
  30578. // SetGrantRead sets the GrantRead field's value.
  30579. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  30580. s.GrantRead = &v
  30581. return s
  30582. }
  30583. // SetGrantReadACP sets the GrantReadACP field's value.
  30584. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  30585. s.GrantReadACP = &v
  30586. return s
  30587. }
  30588. // SetGrantWriteACP sets the GrantWriteACP field's value.
  30589. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  30590. s.GrantWriteACP = &v
  30591. return s
  30592. }
  30593. // SetKey sets the Key field's value.
  30594. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  30595. s.Key = &v
  30596. return s
  30597. }
  30598. // SetMetadata sets the Metadata field's value.
  30599. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  30600. s.Metadata = v
  30601. return s
  30602. }
  30603. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  30604. func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
  30605. s.ObjectLockLegalHoldStatus = &v
  30606. return s
  30607. }
  30608. // SetObjectLockMode sets the ObjectLockMode field's value.
  30609. func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
  30610. s.ObjectLockMode = &v
  30611. return s
  30612. }
  30613. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  30614. func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
  30615. s.ObjectLockRetainUntilDate = &v
  30616. return s
  30617. }
  30618. // SetRequestPayer sets the RequestPayer field's value.
  30619. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  30620. s.RequestPayer = &v
  30621. return s
  30622. }
  30623. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  30624. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  30625. s.SSECustomerAlgorithm = &v
  30626. return s
  30627. }
  30628. // SetSSECustomerKey sets the SSECustomerKey field's value.
  30629. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  30630. s.SSECustomerKey = &v
  30631. return s
  30632. }
  30633. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  30634. if s.SSECustomerKey == nil {
  30635. return v
  30636. }
  30637. return *s.SSECustomerKey
  30638. }
  30639. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  30640. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  30641. s.SSECustomerKeyMD5 = &v
  30642. return s
  30643. }
  30644. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  30645. func (s *PutObjectInput) SetSSEKMSEncryptionContext(v string) *PutObjectInput {
  30646. s.SSEKMSEncryptionContext = &v
  30647. return s
  30648. }
  30649. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  30650. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  30651. s.SSEKMSKeyId = &v
  30652. return s
  30653. }
  30654. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  30655. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  30656. s.ServerSideEncryption = &v
  30657. return s
  30658. }
  30659. // SetStorageClass sets the StorageClass field's value.
  30660. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  30661. s.StorageClass = &v
  30662. return s
  30663. }
  30664. // SetTagging sets the Tagging field's value.
  30665. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  30666. s.Tagging = &v
  30667. return s
  30668. }
  30669. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  30670. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  30671. s.WebsiteRedirectLocation = &v
  30672. return s
  30673. }
  30674. func (s *PutObjectInput) getEndpointARN() (arn.Resource, error) {
  30675. if s.Bucket == nil {
  30676. return nil, fmt.Errorf("member Bucket is nil")
  30677. }
  30678. return parseEndpointARN(*s.Bucket)
  30679. }
  30680. func (s *PutObjectInput) hasEndpointARN() bool {
  30681. if s.Bucket == nil {
  30682. return false
  30683. }
  30684. return arn.IsARN(*s.Bucket)
  30685. }
  30686. // updateArnableField updates the value of the input field that
  30687. // takes an ARN as an input. This method is useful to backfill
  30688. // the parsed resource name from ARN into the input member.
  30689. // It returns a pointer to a modified copy of input and an error.
  30690. // Note that original input is not modified.
  30691. func (s PutObjectInput) updateArnableField(v string) (interface{}, error) {
  30692. if s.Bucket == nil {
  30693. return nil, fmt.Errorf("member Bucket is nil")
  30694. }
  30695. s.Bucket = aws.String(v)
  30696. return &s, nil
  30697. }
  30698. type PutObjectLegalHoldInput struct {
  30699. _ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"`
  30700. // The bucket name containing the object that you want to place a legal hold
  30701. // on.
  30702. //
  30703. // When using this action with an access point, you must direct requests to
  30704. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  30705. // When using this action with an access point through the Amazon Web Services
  30706. // SDKs, you provide the access point ARN in place of the bucket name. For more
  30707. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  30708. // in the Amazon S3 User Guide.
  30709. //
  30710. // Bucket is a required field
  30711. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  30712. // Indicates the algorithm used to create the checksum for the object when using
  30713. // the SDK. This header will not provide any additional functionality if not
  30714. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  30715. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  30716. // the HTTP status code 400 Bad Request. For more information, see Checking
  30717. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30718. // in the Amazon S3 User Guide.
  30719. //
  30720. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  30721. // parameter.
  30722. //
  30723. // The AWS SDK for Go v1 does not support automatic computing request payload
  30724. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  30725. // is specified for this parameter, the matching algorithm's checksum member
  30726. // must be populated with the algorithm's checksum of the request payload.
  30727. //
  30728. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  30729. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  30730. // to be used.
  30731. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  30732. // The account ID of the expected bucket owner. If the bucket is owned by a
  30733. // different account, the request fails with the HTTP status code 403 Forbidden
  30734. // (access denied).
  30735. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  30736. // The key name for the object that you want to place a legal hold on.
  30737. //
  30738. // Key is a required field
  30739. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  30740. // Container element for the legal hold configuration you want to apply to the
  30741. // specified object.
  30742. LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  30743. // Confirms that the requester knows that they will be charged for the request.
  30744. // Bucket owners need not specify this parameter in their requests. For information
  30745. // about downloading objects from Requester Pays buckets, see Downloading Objects
  30746. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  30747. // in the Amazon S3 User Guide.
  30748. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  30749. // The version ID of the object that you want to place a legal hold on.
  30750. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  30751. }
  30752. // String returns the string representation.
  30753. //
  30754. // API parameter values that are decorated as "sensitive" in the API will not
  30755. // be included in the string output. The member name will be present, but the
  30756. // value will be replaced with "sensitive".
  30757. func (s PutObjectLegalHoldInput) String() string {
  30758. return awsutil.Prettify(s)
  30759. }
  30760. // GoString returns the string representation.
  30761. //
  30762. // API parameter values that are decorated as "sensitive" in the API will not
  30763. // be included in the string output. The member name will be present, but the
  30764. // value will be replaced with "sensitive".
  30765. func (s PutObjectLegalHoldInput) GoString() string {
  30766. return s.String()
  30767. }
  30768. // Validate inspects the fields of the type to determine if they are valid.
  30769. func (s *PutObjectLegalHoldInput) Validate() error {
  30770. invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
  30771. if s.Bucket == nil {
  30772. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  30773. }
  30774. if s.Bucket != nil && len(*s.Bucket) < 1 {
  30775. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  30776. }
  30777. if s.Key == nil {
  30778. invalidParams.Add(request.NewErrParamRequired("Key"))
  30779. }
  30780. if s.Key != nil && len(*s.Key) < 1 {
  30781. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  30782. }
  30783. if invalidParams.Len() > 0 {
  30784. return invalidParams
  30785. }
  30786. return nil
  30787. }
  30788. // SetBucket sets the Bucket field's value.
  30789. func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
  30790. s.Bucket = &v
  30791. return s
  30792. }
  30793. func (s *PutObjectLegalHoldInput) getBucket() (v string) {
  30794. if s.Bucket == nil {
  30795. return v
  30796. }
  30797. return *s.Bucket
  30798. }
  30799. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  30800. func (s *PutObjectLegalHoldInput) SetChecksumAlgorithm(v string) *PutObjectLegalHoldInput {
  30801. s.ChecksumAlgorithm = &v
  30802. return s
  30803. }
  30804. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  30805. func (s *PutObjectLegalHoldInput) SetExpectedBucketOwner(v string) *PutObjectLegalHoldInput {
  30806. s.ExpectedBucketOwner = &v
  30807. return s
  30808. }
  30809. // SetKey sets the Key field's value.
  30810. func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
  30811. s.Key = &v
  30812. return s
  30813. }
  30814. // SetLegalHold sets the LegalHold field's value.
  30815. func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
  30816. s.LegalHold = v
  30817. return s
  30818. }
  30819. // SetRequestPayer sets the RequestPayer field's value.
  30820. func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
  30821. s.RequestPayer = &v
  30822. return s
  30823. }
  30824. // SetVersionId sets the VersionId field's value.
  30825. func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
  30826. s.VersionId = &v
  30827. return s
  30828. }
  30829. func (s *PutObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
  30830. if s.Bucket == nil {
  30831. return nil, fmt.Errorf("member Bucket is nil")
  30832. }
  30833. return parseEndpointARN(*s.Bucket)
  30834. }
  30835. func (s *PutObjectLegalHoldInput) hasEndpointARN() bool {
  30836. if s.Bucket == nil {
  30837. return false
  30838. }
  30839. return arn.IsARN(*s.Bucket)
  30840. }
  30841. // updateArnableField updates the value of the input field that
  30842. // takes an ARN as an input. This method is useful to backfill
  30843. // the parsed resource name from ARN into the input member.
  30844. // It returns a pointer to a modified copy of input and an error.
  30845. // Note that original input is not modified.
  30846. func (s PutObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
  30847. if s.Bucket == nil {
  30848. return nil, fmt.Errorf("member Bucket is nil")
  30849. }
  30850. s.Bucket = aws.String(v)
  30851. return &s, nil
  30852. }
  30853. type PutObjectLegalHoldOutput struct {
  30854. _ struct{} `type:"structure"`
  30855. // If present, indicates that the requester was successfully charged for the
  30856. // request.
  30857. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  30858. }
  30859. // String returns the string representation.
  30860. //
  30861. // API parameter values that are decorated as "sensitive" in the API will not
  30862. // be included in the string output. The member name will be present, but the
  30863. // value will be replaced with "sensitive".
  30864. func (s PutObjectLegalHoldOutput) String() string {
  30865. return awsutil.Prettify(s)
  30866. }
  30867. // GoString returns the string representation.
  30868. //
  30869. // API parameter values that are decorated as "sensitive" in the API will not
  30870. // be included in the string output. The member name will be present, but the
  30871. // value will be replaced with "sensitive".
  30872. func (s PutObjectLegalHoldOutput) GoString() string {
  30873. return s.String()
  30874. }
  30875. // SetRequestCharged sets the RequestCharged field's value.
  30876. func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
  30877. s.RequestCharged = &v
  30878. return s
  30879. }
  30880. type PutObjectLockConfigurationInput struct {
  30881. _ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"`
  30882. // The bucket whose Object Lock configuration you want to create or replace.
  30883. //
  30884. // Bucket is a required field
  30885. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  30886. // Indicates the algorithm used to create the checksum for the object when using
  30887. // the SDK. This header will not provide any additional functionality if not
  30888. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  30889. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  30890. // the HTTP status code 400 Bad Request. For more information, see Checking
  30891. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  30892. // in the Amazon S3 User Guide.
  30893. //
  30894. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  30895. // parameter.
  30896. //
  30897. // The AWS SDK for Go v1 does not support automatic computing request payload
  30898. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  30899. // is specified for this parameter, the matching algorithm's checksum member
  30900. // must be populated with the algorithm's checksum of the request payload.
  30901. //
  30902. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  30903. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  30904. // to be used.
  30905. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  30906. // The account ID of the expected bucket owner. If the bucket is owned by a
  30907. // different account, the request fails with the HTTP status code 403 Forbidden
  30908. // (access denied).
  30909. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  30910. // The Object Lock configuration that you want to apply to the specified bucket.
  30911. ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  30912. // Confirms that the requester knows that they will be charged for the request.
  30913. // Bucket owners need not specify this parameter in their requests. For information
  30914. // about downloading objects from Requester Pays buckets, see Downloading Objects
  30915. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  30916. // in the Amazon S3 User Guide.
  30917. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  30918. // A token to allow Object Lock to be enabled for an existing bucket.
  30919. Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
  30920. }
  30921. // String returns the string representation.
  30922. //
  30923. // API parameter values that are decorated as "sensitive" in the API will not
  30924. // be included in the string output. The member name will be present, but the
  30925. // value will be replaced with "sensitive".
  30926. func (s PutObjectLockConfigurationInput) String() string {
  30927. return awsutil.Prettify(s)
  30928. }
  30929. // GoString returns the string representation.
  30930. //
  30931. // API parameter values that are decorated as "sensitive" in the API will not
  30932. // be included in the string output. The member name will be present, but the
  30933. // value will be replaced with "sensitive".
  30934. func (s PutObjectLockConfigurationInput) GoString() string {
  30935. return s.String()
  30936. }
  30937. // Validate inspects the fields of the type to determine if they are valid.
  30938. func (s *PutObjectLockConfigurationInput) Validate() error {
  30939. invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
  30940. if s.Bucket == nil {
  30941. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  30942. }
  30943. if s.Bucket != nil && len(*s.Bucket) < 1 {
  30944. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  30945. }
  30946. if invalidParams.Len() > 0 {
  30947. return invalidParams
  30948. }
  30949. return nil
  30950. }
  30951. // SetBucket sets the Bucket field's value.
  30952. func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
  30953. s.Bucket = &v
  30954. return s
  30955. }
  30956. func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
  30957. if s.Bucket == nil {
  30958. return v
  30959. }
  30960. return *s.Bucket
  30961. }
  30962. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  30963. func (s *PutObjectLockConfigurationInput) SetChecksumAlgorithm(v string) *PutObjectLockConfigurationInput {
  30964. s.ChecksumAlgorithm = &v
  30965. return s
  30966. }
  30967. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  30968. func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput {
  30969. s.ExpectedBucketOwner = &v
  30970. return s
  30971. }
  30972. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  30973. func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
  30974. s.ObjectLockConfiguration = v
  30975. return s
  30976. }
  30977. // SetRequestPayer sets the RequestPayer field's value.
  30978. func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
  30979. s.RequestPayer = &v
  30980. return s
  30981. }
  30982. // SetToken sets the Token field's value.
  30983. func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
  30984. s.Token = &v
  30985. return s
  30986. }
  30987. func (s *PutObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
  30988. if s.Bucket == nil {
  30989. return nil, fmt.Errorf("member Bucket is nil")
  30990. }
  30991. return parseEndpointARN(*s.Bucket)
  30992. }
  30993. func (s *PutObjectLockConfigurationInput) hasEndpointARN() bool {
  30994. if s.Bucket == nil {
  30995. return false
  30996. }
  30997. return arn.IsARN(*s.Bucket)
  30998. }
  30999. // updateArnableField updates the value of the input field that
  31000. // takes an ARN as an input. This method is useful to backfill
  31001. // the parsed resource name from ARN into the input member.
  31002. // It returns a pointer to a modified copy of input and an error.
  31003. // Note that original input is not modified.
  31004. func (s PutObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
  31005. if s.Bucket == nil {
  31006. return nil, fmt.Errorf("member Bucket is nil")
  31007. }
  31008. s.Bucket = aws.String(v)
  31009. return &s, nil
  31010. }
  31011. type PutObjectLockConfigurationOutput struct {
  31012. _ struct{} `type:"structure"`
  31013. // If present, indicates that the requester was successfully charged for the
  31014. // request.
  31015. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  31016. }
  31017. // String returns the string representation.
  31018. //
  31019. // API parameter values that are decorated as "sensitive" in the API will not
  31020. // be included in the string output. The member name will be present, but the
  31021. // value will be replaced with "sensitive".
  31022. func (s PutObjectLockConfigurationOutput) String() string {
  31023. return awsutil.Prettify(s)
  31024. }
  31025. // GoString returns the string representation.
  31026. //
  31027. // API parameter values that are decorated as "sensitive" in the API will not
  31028. // be included in the string output. The member name will be present, but the
  31029. // value will be replaced with "sensitive".
  31030. func (s PutObjectLockConfigurationOutput) GoString() string {
  31031. return s.String()
  31032. }
  31033. // SetRequestCharged sets the RequestCharged field's value.
  31034. func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
  31035. s.RequestCharged = &v
  31036. return s
  31037. }
  31038. type PutObjectOutput struct {
  31039. _ struct{} `type:"structure"`
  31040. // Indicates whether the uploaded object uses an S3 Bucket Key for server-side
  31041. // encryption with Amazon Web Services KMS (SSE-KMS).
  31042. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  31043. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  31044. // present if it was uploaded with the object. With multipart uploads, this
  31045. // may not be a checksum value of the object. For more information about how
  31046. // checksums are calculated with multipart uploads, see Checking object integrity
  31047. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  31048. // in the Amazon S3 User Guide.
  31049. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  31050. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  31051. // be present if it was uploaded with the object. With multipart uploads, this
  31052. // may not be a checksum value of the object. For more information about how
  31053. // checksums are calculated with multipart uploads, see Checking object integrity
  31054. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  31055. // in the Amazon S3 User Guide.
  31056. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  31057. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  31058. // present if it was uploaded with the object. With multipart uploads, this
  31059. // may not be a checksum value of the object. For more information about how
  31060. // checksums are calculated with multipart uploads, see Checking object integrity
  31061. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  31062. // in the Amazon S3 User Guide.
  31063. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  31064. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  31065. // be present if it was uploaded with the object. With multipart uploads, this
  31066. // may not be a checksum value of the object. For more information about how
  31067. // checksums are calculated with multipart uploads, see Checking object integrity
  31068. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  31069. // in the Amazon S3 User Guide.
  31070. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  31071. // Entity tag for the uploaded object.
  31072. ETag *string `location:"header" locationName:"ETag" type:"string"`
  31073. // If the expiration is configured for the object (see PutBucketLifecycleConfiguration
  31074. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)),
  31075. // the response includes this header. It includes the expiry-date and rule-id
  31076. // key-value pairs that provide information about object expiration. The value
  31077. // of the rule-id is URL-encoded.
  31078. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  31079. // If present, indicates that the requester was successfully charged for the
  31080. // request.
  31081. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  31082. // If server-side encryption with a customer-provided encryption key was requested,
  31083. // the response will include this header confirming the encryption algorithm
  31084. // used.
  31085. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  31086. // If server-side encryption with a customer-provided encryption key was requested,
  31087. // the response will include this header to provide round-trip message integrity
  31088. // verification of the customer-provided encryption key.
  31089. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  31090. // If present, specifies the Amazon Web Services KMS Encryption Context to use
  31091. // for object encryption. The value of this header is a base64-encoded UTF-8
  31092. // string holding JSON with the encryption context key-value pairs.
  31093. //
  31094. // SSEKMSEncryptionContext is a sensitive parameter and its value will be
  31095. // replaced with "sensitive" in string returned by PutObjectOutput's
  31096. // String and GoString methods.
  31097. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
  31098. // If x-amz-server-side-encryption is present and has the value of aws:kms,
  31099. // this header specifies the ID of the Amazon Web Services Key Management Service
  31100. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  31101. // the object.
  31102. //
  31103. // SSEKMSKeyId is a sensitive parameter and its value will be
  31104. // replaced with "sensitive" in string returned by PutObjectOutput's
  31105. // String and GoString methods.
  31106. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  31107. // If you specified server-side encryption either with an Amazon Web Services
  31108. // KMS key or Amazon S3-managed encryption key in your PUT request, the response
  31109. // includes this header. It confirms the encryption algorithm that Amazon S3
  31110. // used to encrypt the object.
  31111. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  31112. // Version of the object.
  31113. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  31114. }
  31115. // String returns the string representation.
  31116. //
  31117. // API parameter values that are decorated as "sensitive" in the API will not
  31118. // be included in the string output. The member name will be present, but the
  31119. // value will be replaced with "sensitive".
  31120. func (s PutObjectOutput) String() string {
  31121. return awsutil.Prettify(s)
  31122. }
  31123. // GoString returns the string representation.
  31124. //
  31125. // API parameter values that are decorated as "sensitive" in the API will not
  31126. // be included in the string output. The member name will be present, but the
  31127. // value will be replaced with "sensitive".
  31128. func (s PutObjectOutput) GoString() string {
  31129. return s.String()
  31130. }
  31131. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  31132. func (s *PutObjectOutput) SetBucketKeyEnabled(v bool) *PutObjectOutput {
  31133. s.BucketKeyEnabled = &v
  31134. return s
  31135. }
  31136. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  31137. func (s *PutObjectOutput) SetChecksumCRC32(v string) *PutObjectOutput {
  31138. s.ChecksumCRC32 = &v
  31139. return s
  31140. }
  31141. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  31142. func (s *PutObjectOutput) SetChecksumCRC32C(v string) *PutObjectOutput {
  31143. s.ChecksumCRC32C = &v
  31144. return s
  31145. }
  31146. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  31147. func (s *PutObjectOutput) SetChecksumSHA1(v string) *PutObjectOutput {
  31148. s.ChecksumSHA1 = &v
  31149. return s
  31150. }
  31151. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  31152. func (s *PutObjectOutput) SetChecksumSHA256(v string) *PutObjectOutput {
  31153. s.ChecksumSHA256 = &v
  31154. return s
  31155. }
  31156. // SetETag sets the ETag field's value.
  31157. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  31158. s.ETag = &v
  31159. return s
  31160. }
  31161. // SetExpiration sets the Expiration field's value.
  31162. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  31163. s.Expiration = &v
  31164. return s
  31165. }
  31166. // SetRequestCharged sets the RequestCharged field's value.
  31167. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  31168. s.RequestCharged = &v
  31169. return s
  31170. }
  31171. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  31172. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  31173. s.SSECustomerAlgorithm = &v
  31174. return s
  31175. }
  31176. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  31177. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  31178. s.SSECustomerKeyMD5 = &v
  31179. return s
  31180. }
  31181. // SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
  31182. func (s *PutObjectOutput) SetSSEKMSEncryptionContext(v string) *PutObjectOutput {
  31183. s.SSEKMSEncryptionContext = &v
  31184. return s
  31185. }
  31186. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  31187. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  31188. s.SSEKMSKeyId = &v
  31189. return s
  31190. }
  31191. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  31192. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  31193. s.ServerSideEncryption = &v
  31194. return s
  31195. }
  31196. // SetVersionId sets the VersionId field's value.
  31197. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  31198. s.VersionId = &v
  31199. return s
  31200. }
  31201. type PutObjectRetentionInput struct {
  31202. _ struct{} `locationName:"PutObjectRetentionRequest" type:"structure" payload:"Retention"`
  31203. // The bucket name that contains the object you want to apply this Object Retention
  31204. // configuration to.
  31205. //
  31206. // When using this action with an access point, you must direct requests to
  31207. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  31208. // When using this action with an access point through the Amazon Web Services
  31209. // SDKs, you provide the access point ARN in place of the bucket name. For more
  31210. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  31211. // in the Amazon S3 User Guide.
  31212. //
  31213. // Bucket is a required field
  31214. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  31215. // Indicates whether this action should bypass Governance-mode restrictions.
  31216. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  31217. // Indicates the algorithm used to create the checksum for the object when using
  31218. // the SDK. This header will not provide any additional functionality if not
  31219. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  31220. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  31221. // the HTTP status code 400 Bad Request. For more information, see Checking
  31222. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  31223. // in the Amazon S3 User Guide.
  31224. //
  31225. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  31226. // parameter.
  31227. //
  31228. // The AWS SDK for Go v1 does not support automatic computing request payload
  31229. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  31230. // is specified for this parameter, the matching algorithm's checksum member
  31231. // must be populated with the algorithm's checksum of the request payload.
  31232. //
  31233. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  31234. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  31235. // to be used.
  31236. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  31237. // The account ID of the expected bucket owner. If the bucket is owned by a
  31238. // different account, the request fails with the HTTP status code 403 Forbidden
  31239. // (access denied).
  31240. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  31241. // The key name for the object that you want to apply this Object Retention
  31242. // configuration to.
  31243. //
  31244. // Key is a required field
  31245. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  31246. // Confirms that the requester knows that they will be charged for the request.
  31247. // Bucket owners need not specify this parameter in their requests. For information
  31248. // about downloading objects from Requester Pays buckets, see Downloading Objects
  31249. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  31250. // in the Amazon S3 User Guide.
  31251. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  31252. // The container element for the Object Retention configuration.
  31253. Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  31254. // The version ID for the object that you want to apply this Object Retention
  31255. // configuration to.
  31256. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  31257. }
  31258. // String returns the string representation.
  31259. //
  31260. // API parameter values that are decorated as "sensitive" in the API will not
  31261. // be included in the string output. The member name will be present, but the
  31262. // value will be replaced with "sensitive".
  31263. func (s PutObjectRetentionInput) String() string {
  31264. return awsutil.Prettify(s)
  31265. }
  31266. // GoString returns the string representation.
  31267. //
  31268. // API parameter values that are decorated as "sensitive" in the API will not
  31269. // be included in the string output. The member name will be present, but the
  31270. // value will be replaced with "sensitive".
  31271. func (s PutObjectRetentionInput) GoString() string {
  31272. return s.String()
  31273. }
  31274. // Validate inspects the fields of the type to determine if they are valid.
  31275. func (s *PutObjectRetentionInput) Validate() error {
  31276. invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
  31277. if s.Bucket == nil {
  31278. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  31279. }
  31280. if s.Bucket != nil && len(*s.Bucket) < 1 {
  31281. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  31282. }
  31283. if s.Key == nil {
  31284. invalidParams.Add(request.NewErrParamRequired("Key"))
  31285. }
  31286. if s.Key != nil && len(*s.Key) < 1 {
  31287. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  31288. }
  31289. if invalidParams.Len() > 0 {
  31290. return invalidParams
  31291. }
  31292. return nil
  31293. }
  31294. // SetBucket sets the Bucket field's value.
  31295. func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
  31296. s.Bucket = &v
  31297. return s
  31298. }
  31299. func (s *PutObjectRetentionInput) getBucket() (v string) {
  31300. if s.Bucket == nil {
  31301. return v
  31302. }
  31303. return *s.Bucket
  31304. }
  31305. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  31306. func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
  31307. s.BypassGovernanceRetention = &v
  31308. return s
  31309. }
  31310. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  31311. func (s *PutObjectRetentionInput) SetChecksumAlgorithm(v string) *PutObjectRetentionInput {
  31312. s.ChecksumAlgorithm = &v
  31313. return s
  31314. }
  31315. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  31316. func (s *PutObjectRetentionInput) SetExpectedBucketOwner(v string) *PutObjectRetentionInput {
  31317. s.ExpectedBucketOwner = &v
  31318. return s
  31319. }
  31320. // SetKey sets the Key field's value.
  31321. func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
  31322. s.Key = &v
  31323. return s
  31324. }
  31325. // SetRequestPayer sets the RequestPayer field's value.
  31326. func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
  31327. s.RequestPayer = &v
  31328. return s
  31329. }
  31330. // SetRetention sets the Retention field's value.
  31331. func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
  31332. s.Retention = v
  31333. return s
  31334. }
  31335. // SetVersionId sets the VersionId field's value.
  31336. func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
  31337. s.VersionId = &v
  31338. return s
  31339. }
  31340. func (s *PutObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
  31341. if s.Bucket == nil {
  31342. return nil, fmt.Errorf("member Bucket is nil")
  31343. }
  31344. return parseEndpointARN(*s.Bucket)
  31345. }
  31346. func (s *PutObjectRetentionInput) hasEndpointARN() bool {
  31347. if s.Bucket == nil {
  31348. return false
  31349. }
  31350. return arn.IsARN(*s.Bucket)
  31351. }
  31352. // updateArnableField updates the value of the input field that
  31353. // takes an ARN as an input. This method is useful to backfill
  31354. // the parsed resource name from ARN into the input member.
  31355. // It returns a pointer to a modified copy of input and an error.
  31356. // Note that original input is not modified.
  31357. func (s PutObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
  31358. if s.Bucket == nil {
  31359. return nil, fmt.Errorf("member Bucket is nil")
  31360. }
  31361. s.Bucket = aws.String(v)
  31362. return &s, nil
  31363. }
  31364. type PutObjectRetentionOutput struct {
  31365. _ struct{} `type:"structure"`
  31366. // If present, indicates that the requester was successfully charged for the
  31367. // request.
  31368. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  31369. }
  31370. // String returns the string representation.
  31371. //
  31372. // API parameter values that are decorated as "sensitive" in the API will not
  31373. // be included in the string output. The member name will be present, but the
  31374. // value will be replaced with "sensitive".
  31375. func (s PutObjectRetentionOutput) String() string {
  31376. return awsutil.Prettify(s)
  31377. }
  31378. // GoString returns the string representation.
  31379. //
  31380. // API parameter values that are decorated as "sensitive" in the API will not
  31381. // be included in the string output. The member name will be present, but the
  31382. // value will be replaced with "sensitive".
  31383. func (s PutObjectRetentionOutput) GoString() string {
  31384. return s.String()
  31385. }
  31386. // SetRequestCharged sets the RequestCharged field's value.
  31387. func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
  31388. s.RequestCharged = &v
  31389. return s
  31390. }
  31391. type PutObjectTaggingInput struct {
  31392. _ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"`
  31393. // The bucket name containing the object.
  31394. //
  31395. // When using this action with an access point, you must direct requests to
  31396. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  31397. // When using this action with an access point through the Amazon Web Services
  31398. // SDKs, you provide the access point ARN in place of the bucket name. For more
  31399. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  31400. // in the Amazon S3 User Guide.
  31401. //
  31402. // When using this action with Amazon S3 on Outposts, you must direct requests
  31403. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  31404. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  31405. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  31406. // you provide the Outposts bucket ARN in place of the bucket name. For more
  31407. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  31408. // in the Amazon S3 User Guide.
  31409. //
  31410. // Bucket is a required field
  31411. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  31412. // Indicates the algorithm used to create the checksum for the object when using
  31413. // the SDK. This header will not provide any additional functionality if not
  31414. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  31415. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  31416. // the HTTP status code 400 Bad Request. For more information, see Checking
  31417. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  31418. // in the Amazon S3 User Guide.
  31419. //
  31420. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  31421. // parameter.
  31422. //
  31423. // The AWS SDK for Go v1 does not support automatic computing request payload
  31424. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  31425. // is specified for this parameter, the matching algorithm's checksum member
  31426. // must be populated with the algorithm's checksum of the request payload.
  31427. //
  31428. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  31429. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  31430. // to be used.
  31431. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  31432. // The account ID of the expected bucket owner. If the bucket is owned by a
  31433. // different account, the request fails with the HTTP status code 403 Forbidden
  31434. // (access denied).
  31435. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  31436. // Name of the object key.
  31437. //
  31438. // Key is a required field
  31439. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  31440. // Confirms that the requester knows that they will be charged for the request.
  31441. // Bucket owners need not specify this parameter in their requests. For information
  31442. // about downloading objects from Requester Pays buckets, see Downloading Objects
  31443. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  31444. // in the Amazon S3 User Guide.
  31445. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  31446. // Container for the TagSet and Tag elements
  31447. //
  31448. // Tagging is a required field
  31449. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  31450. // The versionId of the object that the tag-set will be added to.
  31451. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  31452. }
  31453. // String returns the string representation.
  31454. //
  31455. // API parameter values that are decorated as "sensitive" in the API will not
  31456. // be included in the string output. The member name will be present, but the
  31457. // value will be replaced with "sensitive".
  31458. func (s PutObjectTaggingInput) String() string {
  31459. return awsutil.Prettify(s)
  31460. }
  31461. // GoString returns the string representation.
  31462. //
  31463. // API parameter values that are decorated as "sensitive" in the API will not
  31464. // be included in the string output. The member name will be present, but the
  31465. // value will be replaced with "sensitive".
  31466. func (s PutObjectTaggingInput) GoString() string {
  31467. return s.String()
  31468. }
  31469. // Validate inspects the fields of the type to determine if they are valid.
  31470. func (s *PutObjectTaggingInput) Validate() error {
  31471. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  31472. if s.Bucket == nil {
  31473. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  31474. }
  31475. if s.Bucket != nil && len(*s.Bucket) < 1 {
  31476. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  31477. }
  31478. if s.Key == nil {
  31479. invalidParams.Add(request.NewErrParamRequired("Key"))
  31480. }
  31481. if s.Key != nil && len(*s.Key) < 1 {
  31482. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  31483. }
  31484. if s.Tagging == nil {
  31485. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  31486. }
  31487. if s.Tagging != nil {
  31488. if err := s.Tagging.Validate(); err != nil {
  31489. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  31490. }
  31491. }
  31492. if invalidParams.Len() > 0 {
  31493. return invalidParams
  31494. }
  31495. return nil
  31496. }
  31497. // SetBucket sets the Bucket field's value.
  31498. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  31499. s.Bucket = &v
  31500. return s
  31501. }
  31502. func (s *PutObjectTaggingInput) getBucket() (v string) {
  31503. if s.Bucket == nil {
  31504. return v
  31505. }
  31506. return *s.Bucket
  31507. }
  31508. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  31509. func (s *PutObjectTaggingInput) SetChecksumAlgorithm(v string) *PutObjectTaggingInput {
  31510. s.ChecksumAlgorithm = &v
  31511. return s
  31512. }
  31513. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  31514. func (s *PutObjectTaggingInput) SetExpectedBucketOwner(v string) *PutObjectTaggingInput {
  31515. s.ExpectedBucketOwner = &v
  31516. return s
  31517. }
  31518. // SetKey sets the Key field's value.
  31519. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  31520. s.Key = &v
  31521. return s
  31522. }
  31523. // SetRequestPayer sets the RequestPayer field's value.
  31524. func (s *PutObjectTaggingInput) SetRequestPayer(v string) *PutObjectTaggingInput {
  31525. s.RequestPayer = &v
  31526. return s
  31527. }
  31528. // SetTagging sets the Tagging field's value.
  31529. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  31530. s.Tagging = v
  31531. return s
  31532. }
  31533. // SetVersionId sets the VersionId field's value.
  31534. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  31535. s.VersionId = &v
  31536. return s
  31537. }
  31538. func (s *PutObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
  31539. if s.Bucket == nil {
  31540. return nil, fmt.Errorf("member Bucket is nil")
  31541. }
  31542. return parseEndpointARN(*s.Bucket)
  31543. }
  31544. func (s *PutObjectTaggingInput) hasEndpointARN() bool {
  31545. if s.Bucket == nil {
  31546. return false
  31547. }
  31548. return arn.IsARN(*s.Bucket)
  31549. }
  31550. // updateArnableField updates the value of the input field that
  31551. // takes an ARN as an input. This method is useful to backfill
  31552. // the parsed resource name from ARN into the input member.
  31553. // It returns a pointer to a modified copy of input and an error.
  31554. // Note that original input is not modified.
  31555. func (s PutObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
  31556. if s.Bucket == nil {
  31557. return nil, fmt.Errorf("member Bucket is nil")
  31558. }
  31559. s.Bucket = aws.String(v)
  31560. return &s, nil
  31561. }
  31562. type PutObjectTaggingOutput struct {
  31563. _ struct{} `type:"structure"`
  31564. // The versionId of the object the tag-set was added to.
  31565. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  31566. }
  31567. // String returns the string representation.
  31568. //
  31569. // API parameter values that are decorated as "sensitive" in the API will not
  31570. // be included in the string output. The member name will be present, but the
  31571. // value will be replaced with "sensitive".
  31572. func (s PutObjectTaggingOutput) String() string {
  31573. return awsutil.Prettify(s)
  31574. }
  31575. // GoString returns the string representation.
  31576. //
  31577. // API parameter values that are decorated as "sensitive" in the API will not
  31578. // be included in the string output. The member name will be present, but the
  31579. // value will be replaced with "sensitive".
  31580. func (s PutObjectTaggingOutput) GoString() string {
  31581. return s.String()
  31582. }
  31583. // SetVersionId sets the VersionId field's value.
  31584. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  31585. s.VersionId = &v
  31586. return s
  31587. }
  31588. type PutPublicAccessBlockInput struct {
  31589. _ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"`
  31590. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  31591. // want to set.
  31592. //
  31593. // Bucket is a required field
  31594. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  31595. // Indicates the algorithm used to create the checksum for the object when using
  31596. // the SDK. This header will not provide any additional functionality if not
  31597. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  31598. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  31599. // the HTTP status code 400 Bad Request. For more information, see Checking
  31600. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  31601. // in the Amazon S3 User Guide.
  31602. //
  31603. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  31604. // parameter.
  31605. //
  31606. // The AWS SDK for Go v1 does not support automatic computing request payload
  31607. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  31608. // is specified for this parameter, the matching algorithm's checksum member
  31609. // must be populated with the algorithm's checksum of the request payload.
  31610. //
  31611. // The SDK will automatically compute the Content-MD5 checksum for this operation.
  31612. // The AWS SDK for Go v2 allows you to configure alternative checksum algorithm
  31613. // to be used.
  31614. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  31615. // The account ID of the expected bucket owner. If the bucket is owned by a
  31616. // different account, the request fails with the HTTP status code 403 Forbidden
  31617. // (access denied).
  31618. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  31619. // The PublicAccessBlock configuration that you want to apply to this Amazon
  31620. // S3 bucket. You can enable the configuration options in any combination. For
  31621. // more information about when Amazon S3 considers a bucket or object public,
  31622. // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
  31623. // in the Amazon S3 User Guide.
  31624. //
  31625. // PublicAccessBlockConfiguration is a required field
  31626. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  31627. }
  31628. // String returns the string representation.
  31629. //
  31630. // API parameter values that are decorated as "sensitive" in the API will not
  31631. // be included in the string output. The member name will be present, but the
  31632. // value will be replaced with "sensitive".
  31633. func (s PutPublicAccessBlockInput) String() string {
  31634. return awsutil.Prettify(s)
  31635. }
  31636. // GoString returns the string representation.
  31637. //
  31638. // API parameter values that are decorated as "sensitive" in the API will not
  31639. // be included in the string output. The member name will be present, but the
  31640. // value will be replaced with "sensitive".
  31641. func (s PutPublicAccessBlockInput) GoString() string {
  31642. return s.String()
  31643. }
  31644. // Validate inspects the fields of the type to determine if they are valid.
  31645. func (s *PutPublicAccessBlockInput) Validate() error {
  31646. invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
  31647. if s.Bucket == nil {
  31648. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  31649. }
  31650. if s.Bucket != nil && len(*s.Bucket) < 1 {
  31651. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  31652. }
  31653. if s.PublicAccessBlockConfiguration == nil {
  31654. invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
  31655. }
  31656. if invalidParams.Len() > 0 {
  31657. return invalidParams
  31658. }
  31659. return nil
  31660. }
  31661. // SetBucket sets the Bucket field's value.
  31662. func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
  31663. s.Bucket = &v
  31664. return s
  31665. }
  31666. func (s *PutPublicAccessBlockInput) getBucket() (v string) {
  31667. if s.Bucket == nil {
  31668. return v
  31669. }
  31670. return *s.Bucket
  31671. }
  31672. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  31673. func (s *PutPublicAccessBlockInput) SetChecksumAlgorithm(v string) *PutPublicAccessBlockInput {
  31674. s.ChecksumAlgorithm = &v
  31675. return s
  31676. }
  31677. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  31678. func (s *PutPublicAccessBlockInput) SetExpectedBucketOwner(v string) *PutPublicAccessBlockInput {
  31679. s.ExpectedBucketOwner = &v
  31680. return s
  31681. }
  31682. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  31683. func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
  31684. s.PublicAccessBlockConfiguration = v
  31685. return s
  31686. }
  31687. func (s *PutPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
  31688. if s.Bucket == nil {
  31689. return nil, fmt.Errorf("member Bucket is nil")
  31690. }
  31691. return parseEndpointARN(*s.Bucket)
  31692. }
  31693. func (s *PutPublicAccessBlockInput) hasEndpointARN() bool {
  31694. if s.Bucket == nil {
  31695. return false
  31696. }
  31697. return arn.IsARN(*s.Bucket)
  31698. }
  31699. // updateArnableField updates the value of the input field that
  31700. // takes an ARN as an input. This method is useful to backfill
  31701. // the parsed resource name from ARN into the input member.
  31702. // It returns a pointer to a modified copy of input and an error.
  31703. // Note that original input is not modified.
  31704. func (s PutPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
  31705. if s.Bucket == nil {
  31706. return nil, fmt.Errorf("member Bucket is nil")
  31707. }
  31708. s.Bucket = aws.String(v)
  31709. return &s, nil
  31710. }
  31711. type PutPublicAccessBlockOutput struct {
  31712. _ struct{} `type:"structure"`
  31713. }
  31714. // String returns the string representation.
  31715. //
  31716. // API parameter values that are decorated as "sensitive" in the API will not
  31717. // be included in the string output. The member name will be present, but the
  31718. // value will be replaced with "sensitive".
  31719. func (s PutPublicAccessBlockOutput) String() string {
  31720. return awsutil.Prettify(s)
  31721. }
  31722. // GoString returns the string representation.
  31723. //
  31724. // API parameter values that are decorated as "sensitive" in the API will not
  31725. // be included in the string output. The member name will be present, but the
  31726. // value will be replaced with "sensitive".
  31727. func (s PutPublicAccessBlockOutput) GoString() string {
  31728. return s.String()
  31729. }
  31730. // Specifies the configuration for publishing messages to an Amazon Simple Queue
  31731. // Service (Amazon SQS) queue when Amazon S3 detects specified events.
  31732. type QueueConfiguration struct {
  31733. _ struct{} `type:"structure"`
  31734. // A collection of bucket events for which to send notifications
  31735. //
  31736. // Events is a required field
  31737. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"`
  31738. // Specifies object key name filtering rules. For information about key name
  31739. // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  31740. // in the Amazon S3 User Guide.
  31741. Filter *NotificationConfigurationFilter `type:"structure"`
  31742. // An optional unique identifier for configurations in a notification configuration.
  31743. // If you don't provide one, Amazon S3 will assign an ID.
  31744. Id *string `type:"string"`
  31745. // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
  31746. // publishes a message when it detects events of the specified type.
  31747. //
  31748. // QueueArn is a required field
  31749. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  31750. }
  31751. // String returns the string representation.
  31752. //
  31753. // API parameter values that are decorated as "sensitive" in the API will not
  31754. // be included in the string output. The member name will be present, but the
  31755. // value will be replaced with "sensitive".
  31756. func (s QueueConfiguration) String() string {
  31757. return awsutil.Prettify(s)
  31758. }
  31759. // GoString returns the string representation.
  31760. //
  31761. // API parameter values that are decorated as "sensitive" in the API will not
  31762. // be included in the string output. The member name will be present, but the
  31763. // value will be replaced with "sensitive".
  31764. func (s QueueConfiguration) GoString() string {
  31765. return s.String()
  31766. }
  31767. // Validate inspects the fields of the type to determine if they are valid.
  31768. func (s *QueueConfiguration) Validate() error {
  31769. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  31770. if s.Events == nil {
  31771. invalidParams.Add(request.NewErrParamRequired("Events"))
  31772. }
  31773. if s.QueueArn == nil {
  31774. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  31775. }
  31776. if invalidParams.Len() > 0 {
  31777. return invalidParams
  31778. }
  31779. return nil
  31780. }
  31781. // SetEvents sets the Events field's value.
  31782. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  31783. s.Events = v
  31784. return s
  31785. }
  31786. // SetFilter sets the Filter field's value.
  31787. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  31788. s.Filter = v
  31789. return s
  31790. }
  31791. // SetId sets the Id field's value.
  31792. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  31793. s.Id = &v
  31794. return s
  31795. }
  31796. // SetQueueArn sets the QueueArn field's value.
  31797. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  31798. s.QueueArn = &v
  31799. return s
  31800. }
  31801. // This data type is deprecated. Use QueueConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_QueueConfiguration.html)
  31802. // for the same purposes. This data type specifies the configuration for publishing
  31803. // messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon
  31804. // S3 detects specified events.
  31805. type QueueConfigurationDeprecated struct {
  31806. _ struct{} `type:"structure"`
  31807. // The bucket event for which to send notifications.
  31808. //
  31809. // Deprecated: Event has been deprecated
  31810. Event *string `deprecated:"true" type:"string" enum:"Event"`
  31811. // A collection of bucket events for which to send notifications.
  31812. Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"`
  31813. // An optional unique identifier for configurations in a notification configuration.
  31814. // If you don't provide one, Amazon S3 will assign an ID.
  31815. Id *string `type:"string"`
  31816. // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
  31817. // publishes a message when it detects events of the specified type.
  31818. Queue *string `type:"string"`
  31819. }
  31820. // String returns the string representation.
  31821. //
  31822. // API parameter values that are decorated as "sensitive" in the API will not
  31823. // be included in the string output. The member name will be present, but the
  31824. // value will be replaced with "sensitive".
  31825. func (s QueueConfigurationDeprecated) String() string {
  31826. return awsutil.Prettify(s)
  31827. }
  31828. // GoString returns the string representation.
  31829. //
  31830. // API parameter values that are decorated as "sensitive" in the API will not
  31831. // be included in the string output. The member name will be present, but the
  31832. // value will be replaced with "sensitive".
  31833. func (s QueueConfigurationDeprecated) GoString() string {
  31834. return s.String()
  31835. }
  31836. // SetEvent sets the Event field's value.
  31837. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  31838. s.Event = &v
  31839. return s
  31840. }
  31841. // SetEvents sets the Events field's value.
  31842. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  31843. s.Events = v
  31844. return s
  31845. }
  31846. // SetId sets the Id field's value.
  31847. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  31848. s.Id = &v
  31849. return s
  31850. }
  31851. // SetQueue sets the Queue field's value.
  31852. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  31853. s.Queue = &v
  31854. return s
  31855. }
  31856. // The container for the records event.
  31857. type RecordsEvent struct {
  31858. _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
  31859. // The byte array of partial, one or more result records.
  31860. // Payload is automatically base64 encoded/decoded by the SDK.
  31861. Payload []byte `type:"blob"`
  31862. }
  31863. // String returns the string representation.
  31864. //
  31865. // API parameter values that are decorated as "sensitive" in the API will not
  31866. // be included in the string output. The member name will be present, but the
  31867. // value will be replaced with "sensitive".
  31868. func (s RecordsEvent) String() string {
  31869. return awsutil.Prettify(s)
  31870. }
  31871. // GoString returns the string representation.
  31872. //
  31873. // API parameter values that are decorated as "sensitive" in the API will not
  31874. // be included in the string output. The member name will be present, but the
  31875. // value will be replaced with "sensitive".
  31876. func (s RecordsEvent) GoString() string {
  31877. return s.String()
  31878. }
  31879. // SetPayload sets the Payload field's value.
  31880. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  31881. s.Payload = v
  31882. return s
  31883. }
  31884. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  31885. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  31886. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  31887. // This method is only used internally within the SDK's EventStream handling.
  31888. func (s *RecordsEvent) UnmarshalEvent(
  31889. payloadUnmarshaler protocol.PayloadUnmarshaler,
  31890. msg eventstream.Message,
  31891. ) error {
  31892. s.Payload = make([]byte, len(msg.Payload))
  31893. copy(s.Payload, msg.Payload)
  31894. return nil
  31895. }
  31896. // MarshalEvent marshals the type into an stream event value. This method
  31897. // should only used internally within the SDK's EventStream handling.
  31898. func (s *RecordsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  31899. msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  31900. msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream"))
  31901. msg.Payload = s.Payload
  31902. return msg, err
  31903. }
  31904. // Specifies how requests are redirected. In the event of an error, you can
  31905. // specify a different error code to return.
  31906. type Redirect struct {
  31907. _ struct{} `type:"structure"`
  31908. // The host name to use in the redirect request.
  31909. HostName *string `type:"string"`
  31910. // The HTTP redirect code to use on the response. Not required if one of the
  31911. // siblings is present.
  31912. HttpRedirectCode *string `type:"string"`
  31913. // Protocol to use when redirecting requests. The default is the protocol that
  31914. // is used in the original request.
  31915. Protocol *string `type:"string" enum:"Protocol"`
  31916. // The object key prefix to use in the redirect request. For example, to redirect
  31917. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  31918. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  31919. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  31920. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  31921. // is not provided.
  31922. //
  31923. // Replacement must be made for object keys containing special characters (such
  31924. // as carriage returns) when using XML requests. For more information, see XML
  31925. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  31926. ReplaceKeyPrefixWith *string `type:"string"`
  31927. // The specific object key to use in the redirect request. For example, redirect
  31928. // request to error.html. Not required if one of the siblings is present. Can
  31929. // be present only if ReplaceKeyPrefixWith is not provided.
  31930. //
  31931. // Replacement must be made for object keys containing special characters (such
  31932. // as carriage returns) when using XML requests. For more information, see XML
  31933. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  31934. ReplaceKeyWith *string `type:"string"`
  31935. }
  31936. // String returns the string representation.
  31937. //
  31938. // API parameter values that are decorated as "sensitive" in the API will not
  31939. // be included in the string output. The member name will be present, but the
  31940. // value will be replaced with "sensitive".
  31941. func (s Redirect) String() string {
  31942. return awsutil.Prettify(s)
  31943. }
  31944. // GoString returns the string representation.
  31945. //
  31946. // API parameter values that are decorated as "sensitive" in the API will not
  31947. // be included in the string output. The member name will be present, but the
  31948. // value will be replaced with "sensitive".
  31949. func (s Redirect) GoString() string {
  31950. return s.String()
  31951. }
  31952. // SetHostName sets the HostName field's value.
  31953. func (s *Redirect) SetHostName(v string) *Redirect {
  31954. s.HostName = &v
  31955. return s
  31956. }
  31957. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  31958. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  31959. s.HttpRedirectCode = &v
  31960. return s
  31961. }
  31962. // SetProtocol sets the Protocol field's value.
  31963. func (s *Redirect) SetProtocol(v string) *Redirect {
  31964. s.Protocol = &v
  31965. return s
  31966. }
  31967. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  31968. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  31969. s.ReplaceKeyPrefixWith = &v
  31970. return s
  31971. }
  31972. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  31973. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  31974. s.ReplaceKeyWith = &v
  31975. return s
  31976. }
  31977. // Specifies the redirect behavior of all requests to a website endpoint of
  31978. // an Amazon S3 bucket.
  31979. type RedirectAllRequestsTo struct {
  31980. _ struct{} `type:"structure"`
  31981. // Name of the host where requests are redirected.
  31982. //
  31983. // HostName is a required field
  31984. HostName *string `type:"string" required:"true"`
  31985. // Protocol to use when redirecting requests. The default is the protocol that
  31986. // is used in the original request.
  31987. Protocol *string `type:"string" enum:"Protocol"`
  31988. }
  31989. // String returns the string representation.
  31990. //
  31991. // API parameter values that are decorated as "sensitive" in the API will not
  31992. // be included in the string output. The member name will be present, but the
  31993. // value will be replaced with "sensitive".
  31994. func (s RedirectAllRequestsTo) String() string {
  31995. return awsutil.Prettify(s)
  31996. }
  31997. // GoString returns the string representation.
  31998. //
  31999. // API parameter values that are decorated as "sensitive" in the API will not
  32000. // be included in the string output. The member name will be present, but the
  32001. // value will be replaced with "sensitive".
  32002. func (s RedirectAllRequestsTo) GoString() string {
  32003. return s.String()
  32004. }
  32005. // Validate inspects the fields of the type to determine if they are valid.
  32006. func (s *RedirectAllRequestsTo) Validate() error {
  32007. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  32008. if s.HostName == nil {
  32009. invalidParams.Add(request.NewErrParamRequired("HostName"))
  32010. }
  32011. if invalidParams.Len() > 0 {
  32012. return invalidParams
  32013. }
  32014. return nil
  32015. }
  32016. // SetHostName sets the HostName field's value.
  32017. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  32018. s.HostName = &v
  32019. return s
  32020. }
  32021. // SetProtocol sets the Protocol field's value.
  32022. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  32023. s.Protocol = &v
  32024. return s
  32025. }
  32026. // A filter that you can specify for selection for modifications on replicas.
  32027. // Amazon S3 doesn't replicate replica modifications by default. In the latest
  32028. // version of replication configuration (when Filter is specified), you can
  32029. // specify this element and set the status to Enabled to replicate modifications
  32030. // on replicas.
  32031. //
  32032. // If you don't specify the Filter element, Amazon S3 assumes that the replication
  32033. // configuration is the earlier version, V1. In the earlier version, this element
  32034. // is not allowed.
  32035. type ReplicaModifications struct {
  32036. _ struct{} `type:"structure"`
  32037. // Specifies whether Amazon S3 replicates modifications on replicas.
  32038. //
  32039. // Status is a required field
  32040. Status *string `type:"string" required:"true" enum:"ReplicaModificationsStatus"`
  32041. }
  32042. // String returns the string representation.
  32043. //
  32044. // API parameter values that are decorated as "sensitive" in the API will not
  32045. // be included in the string output. The member name will be present, but the
  32046. // value will be replaced with "sensitive".
  32047. func (s ReplicaModifications) String() string {
  32048. return awsutil.Prettify(s)
  32049. }
  32050. // GoString returns the string representation.
  32051. //
  32052. // API parameter values that are decorated as "sensitive" in the API will not
  32053. // be included in the string output. The member name will be present, but the
  32054. // value will be replaced with "sensitive".
  32055. func (s ReplicaModifications) GoString() string {
  32056. return s.String()
  32057. }
  32058. // Validate inspects the fields of the type to determine if they are valid.
  32059. func (s *ReplicaModifications) Validate() error {
  32060. invalidParams := request.ErrInvalidParams{Context: "ReplicaModifications"}
  32061. if s.Status == nil {
  32062. invalidParams.Add(request.NewErrParamRequired("Status"))
  32063. }
  32064. if invalidParams.Len() > 0 {
  32065. return invalidParams
  32066. }
  32067. return nil
  32068. }
  32069. // SetStatus sets the Status field's value.
  32070. func (s *ReplicaModifications) SetStatus(v string) *ReplicaModifications {
  32071. s.Status = &v
  32072. return s
  32073. }
  32074. // A container for replication rules. You can add up to 1,000 rules. The maximum
  32075. // size of a replication configuration is 2 MB.
  32076. type ReplicationConfiguration struct {
  32077. _ struct{} `type:"structure"`
  32078. // The Amazon Resource Name (ARN) of the Identity and Access Management (IAM)
  32079. // role that Amazon S3 assumes when replicating objects. For more information,
  32080. // see How to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html)
  32081. // in the Amazon S3 User Guide.
  32082. //
  32083. // Role is a required field
  32084. Role *string `type:"string" required:"true"`
  32085. // A container for one or more replication rules. A replication configuration
  32086. // must have at least one rule and can contain a maximum of 1,000 rules.
  32087. //
  32088. // Rules is a required field
  32089. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  32090. }
  32091. // String returns the string representation.
  32092. //
  32093. // API parameter values that are decorated as "sensitive" in the API will not
  32094. // be included in the string output. The member name will be present, but the
  32095. // value will be replaced with "sensitive".
  32096. func (s ReplicationConfiguration) String() string {
  32097. return awsutil.Prettify(s)
  32098. }
  32099. // GoString returns the string representation.
  32100. //
  32101. // API parameter values that are decorated as "sensitive" in the API will not
  32102. // be included in the string output. The member name will be present, but the
  32103. // value will be replaced with "sensitive".
  32104. func (s ReplicationConfiguration) GoString() string {
  32105. return s.String()
  32106. }
  32107. // Validate inspects the fields of the type to determine if they are valid.
  32108. func (s *ReplicationConfiguration) Validate() error {
  32109. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  32110. if s.Role == nil {
  32111. invalidParams.Add(request.NewErrParamRequired("Role"))
  32112. }
  32113. if s.Rules == nil {
  32114. invalidParams.Add(request.NewErrParamRequired("Rules"))
  32115. }
  32116. if s.Rules != nil {
  32117. for i, v := range s.Rules {
  32118. if v == nil {
  32119. continue
  32120. }
  32121. if err := v.Validate(); err != nil {
  32122. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  32123. }
  32124. }
  32125. }
  32126. if invalidParams.Len() > 0 {
  32127. return invalidParams
  32128. }
  32129. return nil
  32130. }
  32131. // SetRole sets the Role field's value.
  32132. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  32133. s.Role = &v
  32134. return s
  32135. }
  32136. // SetRules sets the Rules field's value.
  32137. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  32138. s.Rules = v
  32139. return s
  32140. }
  32141. // Specifies which Amazon S3 objects to replicate and where to store the replicas.
  32142. type ReplicationRule struct {
  32143. _ struct{} `type:"structure"`
  32144. // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
  32145. // in your replication configuration, you must also include a DeleteMarkerReplication
  32146. // element. If your Filter includes a Tag element, the DeleteMarkerReplication
  32147. // Status must be set to Disabled, because Amazon S3 does not support replicating
  32148. // delete markers for tag-based rules. For an example configuration, see Basic
  32149. // Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
  32150. //
  32151. // For more information about delete marker replication, see Basic Rule Configuration
  32152. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
  32153. //
  32154. // If you are using an earlier version of the replication configuration, Amazon
  32155. // S3 handles replication of delete markers differently. For more information,
  32156. // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
  32157. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
  32158. // A container for information about the replication destination and its configurations
  32159. // including enabling the S3 Replication Time Control (S3 RTC).
  32160. //
  32161. // Destination is a required field
  32162. Destination *Destination `type:"structure" required:"true"`
  32163. // Optional configuration to replicate existing source bucket objects. For more
  32164. // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
  32165. // in the Amazon S3 User Guide.
  32166. ExistingObjectReplication *ExistingObjectReplication `type:"structure"`
  32167. // A filter that identifies the subset of objects to which the replication rule
  32168. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  32169. Filter *ReplicationRuleFilter `type:"structure"`
  32170. // A unique identifier for the rule. The maximum value is 255 characters.
  32171. ID *string `type:"string"`
  32172. // An object key name prefix that identifies the object or objects to which
  32173. // the rule applies. The maximum prefix length is 1,024 characters. To include
  32174. // all objects in a bucket, specify an empty string.
  32175. //
  32176. // Replacement must be made for object keys containing special characters (such
  32177. // as carriage returns) when using XML requests. For more information, see XML
  32178. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  32179. //
  32180. // Deprecated: Prefix has been deprecated
  32181. Prefix *string `deprecated:"true" type:"string"`
  32182. // The priority indicates which rule has precedence whenever two or more replication
  32183. // rules conflict. Amazon S3 will attempt to replicate objects according to
  32184. // all replication rules. However, if there are two or more rules with the same
  32185. // destination bucket, then objects will be replicated according to the rule
  32186. // with the highest priority. The higher the number, the higher the priority.
  32187. //
  32188. // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
  32189. // in the Amazon S3 User Guide.
  32190. Priority *int64 `type:"integer"`
  32191. // A container that describes additional filters for identifying the source
  32192. // objects that you want to replicate. You can choose to enable or disable the
  32193. // replication of these objects. Currently, Amazon S3 supports only the filter
  32194. // that you can specify for objects created with server-side encryption using
  32195. // a customer managed key stored in Amazon Web Services Key Management Service
  32196. // (SSE-KMS).
  32197. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  32198. // Specifies whether the rule is enabled.
  32199. //
  32200. // Status is a required field
  32201. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  32202. }
  32203. // String returns the string representation.
  32204. //
  32205. // API parameter values that are decorated as "sensitive" in the API will not
  32206. // be included in the string output. The member name will be present, but the
  32207. // value will be replaced with "sensitive".
  32208. func (s ReplicationRule) String() string {
  32209. return awsutil.Prettify(s)
  32210. }
  32211. // GoString returns the string representation.
  32212. //
  32213. // API parameter values that are decorated as "sensitive" in the API will not
  32214. // be included in the string output. The member name will be present, but the
  32215. // value will be replaced with "sensitive".
  32216. func (s ReplicationRule) GoString() string {
  32217. return s.String()
  32218. }
  32219. // Validate inspects the fields of the type to determine if they are valid.
  32220. func (s *ReplicationRule) Validate() error {
  32221. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  32222. if s.Destination == nil {
  32223. invalidParams.Add(request.NewErrParamRequired("Destination"))
  32224. }
  32225. if s.Status == nil {
  32226. invalidParams.Add(request.NewErrParamRequired("Status"))
  32227. }
  32228. if s.Destination != nil {
  32229. if err := s.Destination.Validate(); err != nil {
  32230. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  32231. }
  32232. }
  32233. if s.ExistingObjectReplication != nil {
  32234. if err := s.ExistingObjectReplication.Validate(); err != nil {
  32235. invalidParams.AddNested("ExistingObjectReplication", err.(request.ErrInvalidParams))
  32236. }
  32237. }
  32238. if s.Filter != nil {
  32239. if err := s.Filter.Validate(); err != nil {
  32240. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  32241. }
  32242. }
  32243. if s.SourceSelectionCriteria != nil {
  32244. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  32245. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  32246. }
  32247. }
  32248. if invalidParams.Len() > 0 {
  32249. return invalidParams
  32250. }
  32251. return nil
  32252. }
  32253. // SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
  32254. func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
  32255. s.DeleteMarkerReplication = v
  32256. return s
  32257. }
  32258. // SetDestination sets the Destination field's value.
  32259. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  32260. s.Destination = v
  32261. return s
  32262. }
  32263. // SetExistingObjectReplication sets the ExistingObjectReplication field's value.
  32264. func (s *ReplicationRule) SetExistingObjectReplication(v *ExistingObjectReplication) *ReplicationRule {
  32265. s.ExistingObjectReplication = v
  32266. return s
  32267. }
  32268. // SetFilter sets the Filter field's value.
  32269. func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
  32270. s.Filter = v
  32271. return s
  32272. }
  32273. // SetID sets the ID field's value.
  32274. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  32275. s.ID = &v
  32276. return s
  32277. }
  32278. // SetPrefix sets the Prefix field's value.
  32279. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  32280. s.Prefix = &v
  32281. return s
  32282. }
  32283. // SetPriority sets the Priority field's value.
  32284. func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
  32285. s.Priority = &v
  32286. return s
  32287. }
  32288. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  32289. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  32290. s.SourceSelectionCriteria = v
  32291. return s
  32292. }
  32293. // SetStatus sets the Status field's value.
  32294. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  32295. s.Status = &v
  32296. return s
  32297. }
  32298. // A container for specifying rule filters. The filters determine the subset
  32299. // of objects to which the rule applies. This element is required only if you
  32300. // specify more than one filter.
  32301. //
  32302. // For example:
  32303. //
  32304. // - If you specify both a Prefix and a Tag filter, wrap these filters in
  32305. // an And tag.
  32306. //
  32307. // - If you specify a filter based on multiple tags, wrap the Tag elements
  32308. // in an And tag.
  32309. type ReplicationRuleAndOperator struct {
  32310. _ struct{} `type:"structure"`
  32311. // An object key name prefix that identifies the subset of objects to which
  32312. // the rule applies.
  32313. Prefix *string `type:"string"`
  32314. // An array of tags containing key and value pairs.
  32315. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  32316. }
  32317. // String returns the string representation.
  32318. //
  32319. // API parameter values that are decorated as "sensitive" in the API will not
  32320. // be included in the string output. The member name will be present, but the
  32321. // value will be replaced with "sensitive".
  32322. func (s ReplicationRuleAndOperator) String() string {
  32323. return awsutil.Prettify(s)
  32324. }
  32325. // GoString returns the string representation.
  32326. //
  32327. // API parameter values that are decorated as "sensitive" in the API will not
  32328. // be included in the string output. The member name will be present, but the
  32329. // value will be replaced with "sensitive".
  32330. func (s ReplicationRuleAndOperator) GoString() string {
  32331. return s.String()
  32332. }
  32333. // Validate inspects the fields of the type to determine if they are valid.
  32334. func (s *ReplicationRuleAndOperator) Validate() error {
  32335. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
  32336. if s.Tags != nil {
  32337. for i, v := range s.Tags {
  32338. if v == nil {
  32339. continue
  32340. }
  32341. if err := v.Validate(); err != nil {
  32342. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  32343. }
  32344. }
  32345. }
  32346. if invalidParams.Len() > 0 {
  32347. return invalidParams
  32348. }
  32349. return nil
  32350. }
  32351. // SetPrefix sets the Prefix field's value.
  32352. func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
  32353. s.Prefix = &v
  32354. return s
  32355. }
  32356. // SetTags sets the Tags field's value.
  32357. func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
  32358. s.Tags = v
  32359. return s
  32360. }
  32361. // A filter that identifies the subset of objects to which the replication rule
  32362. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  32363. type ReplicationRuleFilter struct {
  32364. _ struct{} `type:"structure"`
  32365. // A container for specifying rule filters. The filters determine the subset
  32366. // of objects to which the rule applies. This element is required only if you
  32367. // specify more than one filter. For example:
  32368. //
  32369. // * If you specify both a Prefix and a Tag filter, wrap these filters in
  32370. // an And tag.
  32371. //
  32372. // * If you specify a filter based on multiple tags, wrap the Tag elements
  32373. // in an And tag.
  32374. And *ReplicationRuleAndOperator `type:"structure"`
  32375. // An object key name prefix that identifies the subset of objects to which
  32376. // the rule applies.
  32377. //
  32378. // Replacement must be made for object keys containing special characters (such
  32379. // as carriage returns) when using XML requests. For more information, see XML
  32380. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  32381. Prefix *string `type:"string"`
  32382. // A container for specifying a tag key and value.
  32383. //
  32384. // The rule applies only to objects that have the tag in their tag set.
  32385. Tag *Tag `type:"structure"`
  32386. }
  32387. // String returns the string representation.
  32388. //
  32389. // API parameter values that are decorated as "sensitive" in the API will not
  32390. // be included in the string output. The member name will be present, but the
  32391. // value will be replaced with "sensitive".
  32392. func (s ReplicationRuleFilter) String() string {
  32393. return awsutil.Prettify(s)
  32394. }
  32395. // GoString returns the string representation.
  32396. //
  32397. // API parameter values that are decorated as "sensitive" in the API will not
  32398. // be included in the string output. The member name will be present, but the
  32399. // value will be replaced with "sensitive".
  32400. func (s ReplicationRuleFilter) GoString() string {
  32401. return s.String()
  32402. }
  32403. // Validate inspects the fields of the type to determine if they are valid.
  32404. func (s *ReplicationRuleFilter) Validate() error {
  32405. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
  32406. if s.And != nil {
  32407. if err := s.And.Validate(); err != nil {
  32408. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  32409. }
  32410. }
  32411. if s.Tag != nil {
  32412. if err := s.Tag.Validate(); err != nil {
  32413. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  32414. }
  32415. }
  32416. if invalidParams.Len() > 0 {
  32417. return invalidParams
  32418. }
  32419. return nil
  32420. }
  32421. // SetAnd sets the And field's value.
  32422. func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
  32423. s.And = v
  32424. return s
  32425. }
  32426. // SetPrefix sets the Prefix field's value.
  32427. func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
  32428. s.Prefix = &v
  32429. return s
  32430. }
  32431. // SetTag sets the Tag field's value.
  32432. func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
  32433. s.Tag = v
  32434. return s
  32435. }
  32436. // A container specifying S3 Replication Time Control (S3 RTC) related information,
  32437. // including whether S3 RTC is enabled and the time when all objects and operations
  32438. // on objects must be replicated. Must be specified together with a Metrics
  32439. // block.
  32440. type ReplicationTime struct {
  32441. _ struct{} `type:"structure"`
  32442. // Specifies whether the replication time is enabled.
  32443. //
  32444. // Status is a required field
  32445. Status *string `type:"string" required:"true" enum:"ReplicationTimeStatus"`
  32446. // A container specifying the time by which replication should be complete for
  32447. // all objects and operations on objects.
  32448. //
  32449. // Time is a required field
  32450. Time *ReplicationTimeValue `type:"structure" required:"true"`
  32451. }
  32452. // String returns the string representation.
  32453. //
  32454. // API parameter values that are decorated as "sensitive" in the API will not
  32455. // be included in the string output. The member name will be present, but the
  32456. // value will be replaced with "sensitive".
  32457. func (s ReplicationTime) String() string {
  32458. return awsutil.Prettify(s)
  32459. }
  32460. // GoString returns the string representation.
  32461. //
  32462. // API parameter values that are decorated as "sensitive" in the API will not
  32463. // be included in the string output. The member name will be present, but the
  32464. // value will be replaced with "sensitive".
  32465. func (s ReplicationTime) GoString() string {
  32466. return s.String()
  32467. }
  32468. // Validate inspects the fields of the type to determine if they are valid.
  32469. func (s *ReplicationTime) Validate() error {
  32470. invalidParams := request.ErrInvalidParams{Context: "ReplicationTime"}
  32471. if s.Status == nil {
  32472. invalidParams.Add(request.NewErrParamRequired("Status"))
  32473. }
  32474. if s.Time == nil {
  32475. invalidParams.Add(request.NewErrParamRequired("Time"))
  32476. }
  32477. if invalidParams.Len() > 0 {
  32478. return invalidParams
  32479. }
  32480. return nil
  32481. }
  32482. // SetStatus sets the Status field's value.
  32483. func (s *ReplicationTime) SetStatus(v string) *ReplicationTime {
  32484. s.Status = &v
  32485. return s
  32486. }
  32487. // SetTime sets the Time field's value.
  32488. func (s *ReplicationTime) SetTime(v *ReplicationTimeValue) *ReplicationTime {
  32489. s.Time = v
  32490. return s
  32491. }
  32492. // A container specifying the time value for S3 Replication Time Control (S3
  32493. // RTC) and replication metrics EventThreshold.
  32494. type ReplicationTimeValue struct {
  32495. _ struct{} `type:"structure"`
  32496. // Contains an integer specifying time in minutes.
  32497. //
  32498. // Valid value: 15
  32499. Minutes *int64 `type:"integer"`
  32500. }
  32501. // String returns the string representation.
  32502. //
  32503. // API parameter values that are decorated as "sensitive" in the API will not
  32504. // be included in the string output. The member name will be present, but the
  32505. // value will be replaced with "sensitive".
  32506. func (s ReplicationTimeValue) String() string {
  32507. return awsutil.Prettify(s)
  32508. }
  32509. // GoString returns the string representation.
  32510. //
  32511. // API parameter values that are decorated as "sensitive" in the API will not
  32512. // be included in the string output. The member name will be present, but the
  32513. // value will be replaced with "sensitive".
  32514. func (s ReplicationTimeValue) GoString() string {
  32515. return s.String()
  32516. }
  32517. // SetMinutes sets the Minutes field's value.
  32518. func (s *ReplicationTimeValue) SetMinutes(v int64) *ReplicationTimeValue {
  32519. s.Minutes = &v
  32520. return s
  32521. }
  32522. // Container for Payer.
  32523. type RequestPaymentConfiguration struct {
  32524. _ struct{} `type:"structure"`
  32525. // Specifies who pays for the download and request fees.
  32526. //
  32527. // Payer is a required field
  32528. Payer *string `type:"string" required:"true" enum:"Payer"`
  32529. }
  32530. // String returns the string representation.
  32531. //
  32532. // API parameter values that are decorated as "sensitive" in the API will not
  32533. // be included in the string output. The member name will be present, but the
  32534. // value will be replaced with "sensitive".
  32535. func (s RequestPaymentConfiguration) String() string {
  32536. return awsutil.Prettify(s)
  32537. }
  32538. // GoString returns the string representation.
  32539. //
  32540. // API parameter values that are decorated as "sensitive" in the API will not
  32541. // be included in the string output. The member name will be present, but the
  32542. // value will be replaced with "sensitive".
  32543. func (s RequestPaymentConfiguration) GoString() string {
  32544. return s.String()
  32545. }
  32546. // Validate inspects the fields of the type to determine if they are valid.
  32547. func (s *RequestPaymentConfiguration) Validate() error {
  32548. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  32549. if s.Payer == nil {
  32550. invalidParams.Add(request.NewErrParamRequired("Payer"))
  32551. }
  32552. if invalidParams.Len() > 0 {
  32553. return invalidParams
  32554. }
  32555. return nil
  32556. }
  32557. // SetPayer sets the Payer field's value.
  32558. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  32559. s.Payer = &v
  32560. return s
  32561. }
  32562. // Container for specifying if periodic QueryProgress messages should be sent.
  32563. type RequestProgress struct {
  32564. _ struct{} `type:"structure"`
  32565. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  32566. // TRUE, FALSE. Default value: FALSE.
  32567. Enabled *bool `type:"boolean"`
  32568. }
  32569. // String returns the string representation.
  32570. //
  32571. // API parameter values that are decorated as "sensitive" in the API will not
  32572. // be included in the string output. The member name will be present, but the
  32573. // value will be replaced with "sensitive".
  32574. func (s RequestProgress) String() string {
  32575. return awsutil.Prettify(s)
  32576. }
  32577. // GoString returns the string representation.
  32578. //
  32579. // API parameter values that are decorated as "sensitive" in the API will not
  32580. // be included in the string output. The member name will be present, but the
  32581. // value will be replaced with "sensitive".
  32582. func (s RequestProgress) GoString() string {
  32583. return s.String()
  32584. }
  32585. // SetEnabled sets the Enabled field's value.
  32586. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  32587. s.Enabled = &v
  32588. return s
  32589. }
  32590. type RestoreObjectInput struct {
  32591. _ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"`
  32592. // The bucket name containing the object to restore.
  32593. //
  32594. // When using this action with an access point, you must direct requests to
  32595. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  32596. // When using this action with an access point through the Amazon Web Services
  32597. // SDKs, you provide the access point ARN in place of the bucket name. For more
  32598. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  32599. // in the Amazon S3 User Guide.
  32600. //
  32601. // When using this action with Amazon S3 on Outposts, you must direct requests
  32602. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  32603. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  32604. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  32605. // you provide the Outposts bucket ARN in place of the bucket name. For more
  32606. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  32607. // in the Amazon S3 User Guide.
  32608. //
  32609. // Bucket is a required field
  32610. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  32611. // Indicates the algorithm used to create the checksum for the object when using
  32612. // the SDK. This header will not provide any additional functionality if not
  32613. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  32614. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  32615. // the HTTP status code 400 Bad Request. For more information, see Checking
  32616. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  32617. // in the Amazon S3 User Guide.
  32618. //
  32619. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  32620. // parameter.
  32621. //
  32622. // The AWS SDK for Go v1 does not support automatic computing request payload
  32623. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  32624. // is specified for this parameter, the matching algorithm's checksum member
  32625. // must be populated with the algorithm's checksum of the request payload.
  32626. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  32627. // The account ID of the expected bucket owner. If the bucket is owned by a
  32628. // different account, the request fails with the HTTP status code 403 Forbidden
  32629. // (access denied).
  32630. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  32631. // Object key for which the action was initiated.
  32632. //
  32633. // Key is a required field
  32634. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  32635. // Confirms that the requester knows that they will be charged for the request.
  32636. // Bucket owners need not specify this parameter in their requests. For information
  32637. // about downloading objects from Requester Pays buckets, see Downloading Objects
  32638. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  32639. // in the Amazon S3 User Guide.
  32640. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  32641. // Container for restore job parameters.
  32642. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  32643. // VersionId used to reference a specific version of the object.
  32644. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  32645. }
  32646. // String returns the string representation.
  32647. //
  32648. // API parameter values that are decorated as "sensitive" in the API will not
  32649. // be included in the string output. The member name will be present, but the
  32650. // value will be replaced with "sensitive".
  32651. func (s RestoreObjectInput) String() string {
  32652. return awsutil.Prettify(s)
  32653. }
  32654. // GoString returns the string representation.
  32655. //
  32656. // API parameter values that are decorated as "sensitive" in the API will not
  32657. // be included in the string output. The member name will be present, but the
  32658. // value will be replaced with "sensitive".
  32659. func (s RestoreObjectInput) GoString() string {
  32660. return s.String()
  32661. }
  32662. // Validate inspects the fields of the type to determine if they are valid.
  32663. func (s *RestoreObjectInput) Validate() error {
  32664. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  32665. if s.Bucket == nil {
  32666. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  32667. }
  32668. if s.Bucket != nil && len(*s.Bucket) < 1 {
  32669. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  32670. }
  32671. if s.Key == nil {
  32672. invalidParams.Add(request.NewErrParamRequired("Key"))
  32673. }
  32674. if s.Key != nil && len(*s.Key) < 1 {
  32675. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  32676. }
  32677. if s.RestoreRequest != nil {
  32678. if err := s.RestoreRequest.Validate(); err != nil {
  32679. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  32680. }
  32681. }
  32682. if invalidParams.Len() > 0 {
  32683. return invalidParams
  32684. }
  32685. return nil
  32686. }
  32687. // SetBucket sets the Bucket field's value.
  32688. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  32689. s.Bucket = &v
  32690. return s
  32691. }
  32692. func (s *RestoreObjectInput) getBucket() (v string) {
  32693. if s.Bucket == nil {
  32694. return v
  32695. }
  32696. return *s.Bucket
  32697. }
  32698. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  32699. func (s *RestoreObjectInput) SetChecksumAlgorithm(v string) *RestoreObjectInput {
  32700. s.ChecksumAlgorithm = &v
  32701. return s
  32702. }
  32703. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  32704. func (s *RestoreObjectInput) SetExpectedBucketOwner(v string) *RestoreObjectInput {
  32705. s.ExpectedBucketOwner = &v
  32706. return s
  32707. }
  32708. // SetKey sets the Key field's value.
  32709. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  32710. s.Key = &v
  32711. return s
  32712. }
  32713. // SetRequestPayer sets the RequestPayer field's value.
  32714. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  32715. s.RequestPayer = &v
  32716. return s
  32717. }
  32718. // SetRestoreRequest sets the RestoreRequest field's value.
  32719. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  32720. s.RestoreRequest = v
  32721. return s
  32722. }
  32723. // SetVersionId sets the VersionId field's value.
  32724. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  32725. s.VersionId = &v
  32726. return s
  32727. }
  32728. func (s *RestoreObjectInput) getEndpointARN() (arn.Resource, error) {
  32729. if s.Bucket == nil {
  32730. return nil, fmt.Errorf("member Bucket is nil")
  32731. }
  32732. return parseEndpointARN(*s.Bucket)
  32733. }
  32734. func (s *RestoreObjectInput) hasEndpointARN() bool {
  32735. if s.Bucket == nil {
  32736. return false
  32737. }
  32738. return arn.IsARN(*s.Bucket)
  32739. }
  32740. // updateArnableField updates the value of the input field that
  32741. // takes an ARN as an input. This method is useful to backfill
  32742. // the parsed resource name from ARN into the input member.
  32743. // It returns a pointer to a modified copy of input and an error.
  32744. // Note that original input is not modified.
  32745. func (s RestoreObjectInput) updateArnableField(v string) (interface{}, error) {
  32746. if s.Bucket == nil {
  32747. return nil, fmt.Errorf("member Bucket is nil")
  32748. }
  32749. s.Bucket = aws.String(v)
  32750. return &s, nil
  32751. }
  32752. type RestoreObjectOutput struct {
  32753. _ struct{} `type:"structure"`
  32754. // If present, indicates that the requester was successfully charged for the
  32755. // request.
  32756. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  32757. // Indicates the path in the provided S3 output location where Select results
  32758. // will be restored to.
  32759. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  32760. }
  32761. // String returns the string representation.
  32762. //
  32763. // API parameter values that are decorated as "sensitive" in the API will not
  32764. // be included in the string output. The member name will be present, but the
  32765. // value will be replaced with "sensitive".
  32766. func (s RestoreObjectOutput) String() string {
  32767. return awsutil.Prettify(s)
  32768. }
  32769. // GoString returns the string representation.
  32770. //
  32771. // API parameter values that are decorated as "sensitive" in the API will not
  32772. // be included in the string output. The member name will be present, but the
  32773. // value will be replaced with "sensitive".
  32774. func (s RestoreObjectOutput) GoString() string {
  32775. return s.String()
  32776. }
  32777. // SetRequestCharged sets the RequestCharged field's value.
  32778. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  32779. s.RequestCharged = &v
  32780. return s
  32781. }
  32782. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  32783. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  32784. s.RestoreOutputPath = &v
  32785. return s
  32786. }
  32787. // Container for restore job parameters.
  32788. type RestoreRequest struct {
  32789. _ struct{} `type:"structure"`
  32790. // Lifetime of the active copy in days. Do not use with restores that specify
  32791. // OutputLocation.
  32792. //
  32793. // The Days element is required for regular restores, and must not be provided
  32794. // for select requests.
  32795. Days *int64 `type:"integer"`
  32796. // The optional description for the job.
  32797. Description *string `type:"string"`
  32798. // S3 Glacier related parameters pertaining to this job. Do not use with restores
  32799. // that specify OutputLocation.
  32800. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  32801. // Describes the location where the restore job's output is stored.
  32802. OutputLocation *OutputLocation `type:"structure"`
  32803. // Describes the parameters for Select job types.
  32804. SelectParameters *SelectParameters `type:"structure"`
  32805. // Retrieval tier at which the restore will be processed.
  32806. Tier *string `type:"string" enum:"Tier"`
  32807. // Type of restore request.
  32808. Type *string `type:"string" enum:"RestoreRequestType"`
  32809. }
  32810. // String returns the string representation.
  32811. //
  32812. // API parameter values that are decorated as "sensitive" in the API will not
  32813. // be included in the string output. The member name will be present, but the
  32814. // value will be replaced with "sensitive".
  32815. func (s RestoreRequest) String() string {
  32816. return awsutil.Prettify(s)
  32817. }
  32818. // GoString returns the string representation.
  32819. //
  32820. // API parameter values that are decorated as "sensitive" in the API will not
  32821. // be included in the string output. The member name will be present, but the
  32822. // value will be replaced with "sensitive".
  32823. func (s RestoreRequest) GoString() string {
  32824. return s.String()
  32825. }
  32826. // Validate inspects the fields of the type to determine if they are valid.
  32827. func (s *RestoreRequest) Validate() error {
  32828. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  32829. if s.GlacierJobParameters != nil {
  32830. if err := s.GlacierJobParameters.Validate(); err != nil {
  32831. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  32832. }
  32833. }
  32834. if s.OutputLocation != nil {
  32835. if err := s.OutputLocation.Validate(); err != nil {
  32836. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  32837. }
  32838. }
  32839. if s.SelectParameters != nil {
  32840. if err := s.SelectParameters.Validate(); err != nil {
  32841. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  32842. }
  32843. }
  32844. if invalidParams.Len() > 0 {
  32845. return invalidParams
  32846. }
  32847. return nil
  32848. }
  32849. // SetDays sets the Days field's value.
  32850. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  32851. s.Days = &v
  32852. return s
  32853. }
  32854. // SetDescription sets the Description field's value.
  32855. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  32856. s.Description = &v
  32857. return s
  32858. }
  32859. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  32860. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  32861. s.GlacierJobParameters = v
  32862. return s
  32863. }
  32864. // SetOutputLocation sets the OutputLocation field's value.
  32865. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  32866. s.OutputLocation = v
  32867. return s
  32868. }
  32869. // SetSelectParameters sets the SelectParameters field's value.
  32870. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  32871. s.SelectParameters = v
  32872. return s
  32873. }
  32874. // SetTier sets the Tier field's value.
  32875. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  32876. s.Tier = &v
  32877. return s
  32878. }
  32879. // SetType sets the Type field's value.
  32880. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  32881. s.Type = &v
  32882. return s
  32883. }
  32884. // Specifies the redirect behavior and when a redirect is applied. For more
  32885. // information about routing rules, see Configuring advanced conditional redirects
  32886. // (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
  32887. // in the Amazon S3 User Guide.
  32888. type RoutingRule struct {
  32889. _ struct{} `type:"structure"`
  32890. // A container for describing a condition that must be met for the specified
  32891. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  32892. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  32893. // redirect request to another host where you might process the error.
  32894. Condition *Condition `type:"structure"`
  32895. // Container for redirect information. You can redirect requests to another
  32896. // host, to another page, or with another protocol. In the event of an error,
  32897. // you can specify a different error code to return.
  32898. //
  32899. // Redirect is a required field
  32900. Redirect *Redirect `type:"structure" required:"true"`
  32901. }
  32902. // String returns the string representation.
  32903. //
  32904. // API parameter values that are decorated as "sensitive" in the API will not
  32905. // be included in the string output. The member name will be present, but the
  32906. // value will be replaced with "sensitive".
  32907. func (s RoutingRule) String() string {
  32908. return awsutil.Prettify(s)
  32909. }
  32910. // GoString returns the string representation.
  32911. //
  32912. // API parameter values that are decorated as "sensitive" in the API will not
  32913. // be included in the string output. The member name will be present, but the
  32914. // value will be replaced with "sensitive".
  32915. func (s RoutingRule) GoString() string {
  32916. return s.String()
  32917. }
  32918. // Validate inspects the fields of the type to determine if they are valid.
  32919. func (s *RoutingRule) Validate() error {
  32920. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  32921. if s.Redirect == nil {
  32922. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  32923. }
  32924. if invalidParams.Len() > 0 {
  32925. return invalidParams
  32926. }
  32927. return nil
  32928. }
  32929. // SetCondition sets the Condition field's value.
  32930. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  32931. s.Condition = v
  32932. return s
  32933. }
  32934. // SetRedirect sets the Redirect field's value.
  32935. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  32936. s.Redirect = v
  32937. return s
  32938. }
  32939. // Specifies lifecycle rules for an Amazon S3 bucket. For more information,
  32940. // see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
  32941. // in the Amazon S3 API Reference. For examples, see Put Bucket Lifecycle Configuration
  32942. // Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples).
  32943. type Rule struct {
  32944. _ struct{} `type:"structure"`
  32945. // Specifies the days since the initiation of an incomplete multipart upload
  32946. // that Amazon S3 will wait before permanently removing all parts of the upload.
  32947. // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
  32948. // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
  32949. // in the Amazon S3 User Guide.
  32950. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  32951. // Specifies the expiration for the lifecycle of the object.
  32952. Expiration *LifecycleExpiration `type:"structure"`
  32953. // Unique identifier for the rule. The value can't be longer than 255 characters.
  32954. ID *string `type:"string"`
  32955. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  32956. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  32957. // configuration action on a bucket that has versioning enabled (or suspended)
  32958. // to request that Amazon S3 delete noncurrent object versions at a specific
  32959. // period in the object's lifetime.
  32960. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  32961. // Container for the transition rule that describes when noncurrent objects
  32962. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER_IR,
  32963. // GLACIER, or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled
  32964. // (or versioning is suspended), you can set this action to request that Amazon
  32965. // S3 transition noncurrent object versions to the STANDARD_IA, ONEZONE_IA,
  32966. // INTELLIGENT_TIERING, GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage class at
  32967. // a specific period in the object's lifetime.
  32968. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  32969. // Object key prefix that identifies one or more objects to which this rule
  32970. // applies.
  32971. //
  32972. // Replacement must be made for object keys containing special characters (such
  32973. // as carriage returns) when using XML requests. For more information, see XML
  32974. // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
  32975. //
  32976. // Prefix is a required field
  32977. Prefix *string `type:"string" required:"true"`
  32978. // If Enabled, the rule is currently being applied. If Disabled, the rule is
  32979. // not currently being applied.
  32980. //
  32981. // Status is a required field
  32982. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  32983. // Specifies when an object transitions to a specified storage class. For more
  32984. // information about Amazon S3 lifecycle configuration rules, see Transitioning
  32985. // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
  32986. // in the Amazon S3 User Guide.
  32987. Transition *Transition `type:"structure"`
  32988. }
  32989. // String returns the string representation.
  32990. //
  32991. // API parameter values that are decorated as "sensitive" in the API will not
  32992. // be included in the string output. The member name will be present, but the
  32993. // value will be replaced with "sensitive".
  32994. func (s Rule) String() string {
  32995. return awsutil.Prettify(s)
  32996. }
  32997. // GoString returns the string representation.
  32998. //
  32999. // API parameter values that are decorated as "sensitive" in the API will not
  33000. // be included in the string output. The member name will be present, but the
  33001. // value will be replaced with "sensitive".
  33002. func (s Rule) GoString() string {
  33003. return s.String()
  33004. }
  33005. // Validate inspects the fields of the type to determine if they are valid.
  33006. func (s *Rule) Validate() error {
  33007. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  33008. if s.Prefix == nil {
  33009. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  33010. }
  33011. if s.Status == nil {
  33012. invalidParams.Add(request.NewErrParamRequired("Status"))
  33013. }
  33014. if invalidParams.Len() > 0 {
  33015. return invalidParams
  33016. }
  33017. return nil
  33018. }
  33019. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  33020. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  33021. s.AbortIncompleteMultipartUpload = v
  33022. return s
  33023. }
  33024. // SetExpiration sets the Expiration field's value.
  33025. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  33026. s.Expiration = v
  33027. return s
  33028. }
  33029. // SetID sets the ID field's value.
  33030. func (s *Rule) SetID(v string) *Rule {
  33031. s.ID = &v
  33032. return s
  33033. }
  33034. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  33035. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  33036. s.NoncurrentVersionExpiration = v
  33037. return s
  33038. }
  33039. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  33040. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  33041. s.NoncurrentVersionTransition = v
  33042. return s
  33043. }
  33044. // SetPrefix sets the Prefix field's value.
  33045. func (s *Rule) SetPrefix(v string) *Rule {
  33046. s.Prefix = &v
  33047. return s
  33048. }
  33049. // SetStatus sets the Status field's value.
  33050. func (s *Rule) SetStatus(v string) *Rule {
  33051. s.Status = &v
  33052. return s
  33053. }
  33054. // SetTransition sets the Transition field's value.
  33055. func (s *Rule) SetTransition(v *Transition) *Rule {
  33056. s.Transition = v
  33057. return s
  33058. }
  33059. // Specifies the use of SSE-KMS to encrypt delivered inventory reports.
  33060. type SSEKMS struct {
  33061. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  33062. // Specifies the ID of the Amazon Web Services Key Management Service (Amazon
  33063. // Web Services KMS) symmetric customer managed key to use for encrypting inventory
  33064. // reports.
  33065. //
  33066. // KeyId is a sensitive parameter and its value will be
  33067. // replaced with "sensitive" in string returned by SSEKMS's
  33068. // String and GoString methods.
  33069. //
  33070. // KeyId is a required field
  33071. KeyId *string `type:"string" required:"true" sensitive:"true"`
  33072. }
  33073. // String returns the string representation.
  33074. //
  33075. // API parameter values that are decorated as "sensitive" in the API will not
  33076. // be included in the string output. The member name will be present, but the
  33077. // value will be replaced with "sensitive".
  33078. func (s SSEKMS) String() string {
  33079. return awsutil.Prettify(s)
  33080. }
  33081. // GoString returns the string representation.
  33082. //
  33083. // API parameter values that are decorated as "sensitive" in the API will not
  33084. // be included in the string output. The member name will be present, but the
  33085. // value will be replaced with "sensitive".
  33086. func (s SSEKMS) GoString() string {
  33087. return s.String()
  33088. }
  33089. // Validate inspects the fields of the type to determine if they are valid.
  33090. func (s *SSEKMS) Validate() error {
  33091. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  33092. if s.KeyId == nil {
  33093. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  33094. }
  33095. if invalidParams.Len() > 0 {
  33096. return invalidParams
  33097. }
  33098. return nil
  33099. }
  33100. // SetKeyId sets the KeyId field's value.
  33101. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  33102. s.KeyId = &v
  33103. return s
  33104. }
  33105. // Specifies the use of SSE-S3 to encrypt delivered inventory reports.
  33106. type SSES3 struct {
  33107. _ struct{} `locationName:"SSE-S3" type:"structure"`
  33108. }
  33109. // String returns the string representation.
  33110. //
  33111. // API parameter values that are decorated as "sensitive" in the API will not
  33112. // be included in the string output. The member name will be present, but the
  33113. // value will be replaced with "sensitive".
  33114. func (s SSES3) String() string {
  33115. return awsutil.Prettify(s)
  33116. }
  33117. // GoString returns the string representation.
  33118. //
  33119. // API parameter values that are decorated as "sensitive" in the API will not
  33120. // be included in the string output. The member name will be present, but the
  33121. // value will be replaced with "sensitive".
  33122. func (s SSES3) GoString() string {
  33123. return s.String()
  33124. }
  33125. // Specifies the byte range of the object to get the records from. A record
  33126. // is processed when its first byte is contained by the range. This parameter
  33127. // is optional, but when specified, it must not be empty. See RFC 2616, Section
  33128. // 14.35.1 about how to specify the start and end of the range.
  33129. type ScanRange struct {
  33130. _ struct{} `type:"structure"`
  33131. // Specifies the end of the byte range. This parameter is optional. Valid values:
  33132. // non-negative integers. The default value is one less than the size of the
  33133. // object being queried. If only the End parameter is supplied, it is interpreted
  33134. // to mean scan the last N bytes of the file. For example, <scanrange><end>50</end></scanrange>
  33135. // means scan the last 50 bytes.
  33136. End *int64 `type:"long"`
  33137. // Specifies the start of the byte range. This parameter is optional. Valid
  33138. // values: non-negative integers. The default value is 0. If only start is supplied,
  33139. // it means scan from that point to the end of the file. For example, <scanrange><start>50</start></scanrange>
  33140. // means scan from byte 50 until the end of the file.
  33141. Start *int64 `type:"long"`
  33142. }
  33143. // String returns the string representation.
  33144. //
  33145. // API parameter values that are decorated as "sensitive" in the API will not
  33146. // be included in the string output. The member name will be present, but the
  33147. // value will be replaced with "sensitive".
  33148. func (s ScanRange) String() string {
  33149. return awsutil.Prettify(s)
  33150. }
  33151. // GoString returns the string representation.
  33152. //
  33153. // API parameter values that are decorated as "sensitive" in the API will not
  33154. // be included in the string output. The member name will be present, but the
  33155. // value will be replaced with "sensitive".
  33156. func (s ScanRange) GoString() string {
  33157. return s.String()
  33158. }
  33159. // SetEnd sets the End field's value.
  33160. func (s *ScanRange) SetEnd(v int64) *ScanRange {
  33161. s.End = &v
  33162. return s
  33163. }
  33164. // SetStart sets the Start field's value.
  33165. func (s *ScanRange) SetStart(v int64) *ScanRange {
  33166. s.Start = &v
  33167. return s
  33168. }
  33169. // SelectObjectContentEventStreamEvent groups together all EventStream
  33170. // events writes for SelectObjectContentEventStream.
  33171. //
  33172. // These events are:
  33173. //
  33174. // - ContinuationEvent
  33175. // - EndEvent
  33176. // - ProgressEvent
  33177. // - RecordsEvent
  33178. // - StatsEvent
  33179. type SelectObjectContentEventStreamEvent interface {
  33180. eventSelectObjectContentEventStream()
  33181. eventstreamapi.Marshaler
  33182. eventstreamapi.Unmarshaler
  33183. }
  33184. // SelectObjectContentEventStreamReader provides the interface for reading to the stream. The
  33185. // default implementation for this interface will be SelectObjectContentEventStreamData.
  33186. //
  33187. // The reader's Close method must allow multiple concurrent calls.
  33188. //
  33189. // These events are:
  33190. //
  33191. // - ContinuationEvent
  33192. // - EndEvent
  33193. // - ProgressEvent
  33194. // - RecordsEvent
  33195. // - StatsEvent
  33196. // - SelectObjectContentEventStreamUnknownEvent
  33197. type SelectObjectContentEventStreamReader interface {
  33198. // Returns a channel of events as they are read from the event stream.
  33199. Events() <-chan SelectObjectContentEventStreamEvent
  33200. // Close will stop the reader reading events from the stream.
  33201. Close() error
  33202. // Returns any error that has occurred while reading from the event stream.
  33203. Err() error
  33204. }
  33205. type readSelectObjectContentEventStream struct {
  33206. eventReader *eventstreamapi.EventReader
  33207. stream chan SelectObjectContentEventStreamEvent
  33208. err *eventstreamapi.OnceError
  33209. done chan struct{}
  33210. closeOnce sync.Once
  33211. }
  33212. func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream {
  33213. r := &readSelectObjectContentEventStream{
  33214. eventReader: eventReader,
  33215. stream: make(chan SelectObjectContentEventStreamEvent),
  33216. done: make(chan struct{}),
  33217. err: eventstreamapi.NewOnceError(),
  33218. }
  33219. go r.readEventStream()
  33220. return r
  33221. }
  33222. // Close will close the underlying event stream reader.
  33223. func (r *readSelectObjectContentEventStream) Close() error {
  33224. r.closeOnce.Do(r.safeClose)
  33225. return r.Err()
  33226. }
  33227. func (r *readSelectObjectContentEventStream) ErrorSet() <-chan struct{} {
  33228. return r.err.ErrorSet()
  33229. }
  33230. func (r *readSelectObjectContentEventStream) Closed() <-chan struct{} {
  33231. return r.done
  33232. }
  33233. func (r *readSelectObjectContentEventStream) safeClose() {
  33234. close(r.done)
  33235. }
  33236. func (r *readSelectObjectContentEventStream) Err() error {
  33237. return r.err.Err()
  33238. }
  33239. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  33240. return r.stream
  33241. }
  33242. func (r *readSelectObjectContentEventStream) readEventStream() {
  33243. defer r.Close()
  33244. defer close(r.stream)
  33245. for {
  33246. event, err := r.eventReader.ReadEvent()
  33247. if err != nil {
  33248. if err == io.EOF {
  33249. return
  33250. }
  33251. select {
  33252. case <-r.done:
  33253. // If closed already ignore the error
  33254. return
  33255. default:
  33256. }
  33257. if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok {
  33258. continue
  33259. }
  33260. r.err.SetError(err)
  33261. return
  33262. }
  33263. select {
  33264. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  33265. case <-r.done:
  33266. return
  33267. }
  33268. }
  33269. }
  33270. type unmarshalerForSelectObjectContentEventStreamEvent struct {
  33271. metadata protocol.ResponseMetadata
  33272. }
  33273. func (u unmarshalerForSelectObjectContentEventStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) {
  33274. switch eventType {
  33275. case "Cont":
  33276. return &ContinuationEvent{}, nil
  33277. case "End":
  33278. return &EndEvent{}, nil
  33279. case "Progress":
  33280. return &ProgressEvent{}, nil
  33281. case "Records":
  33282. return &RecordsEvent{}, nil
  33283. case "Stats":
  33284. return &StatsEvent{}, nil
  33285. default:
  33286. return &SelectObjectContentEventStreamUnknownEvent{Type: eventType}, nil
  33287. }
  33288. }
  33289. // SelectObjectContentEventStreamUnknownEvent provides a failsafe event for the
  33290. // SelectObjectContentEventStream group of events when an unknown event is received.
  33291. type SelectObjectContentEventStreamUnknownEvent struct {
  33292. Type string
  33293. Message eventstream.Message
  33294. }
  33295. // The SelectObjectContentEventStreamUnknownEvent is and event in the SelectObjectContentEventStream
  33296. // group of events.
  33297. func (s *SelectObjectContentEventStreamUnknownEvent) eventSelectObjectContentEventStream() {}
  33298. // MarshalEvent marshals the type into an stream event value. This method
  33299. // should only used internally within the SDK's EventStream handling.
  33300. func (e *SelectObjectContentEventStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) (
  33301. msg eventstream.Message, err error,
  33302. ) {
  33303. return e.Message.Clone(), nil
  33304. }
  33305. // UnmarshalEvent unmarshals the EventStream Message into the SelectObjectContentEventStreamData value.
  33306. // This method is only used internally within the SDK's EventStream handling.
  33307. func (e *SelectObjectContentEventStreamUnknownEvent) UnmarshalEvent(
  33308. payloadUnmarshaler protocol.PayloadUnmarshaler,
  33309. msg eventstream.Message,
  33310. ) error {
  33311. e.Message = msg.Clone()
  33312. return nil
  33313. }
  33314. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  33315. // Query Language (SQL) statement. In the request, along with the SQL expression,
  33316. // you must specify a data serialization format (JSON or CSV) of the object.
  33317. // Amazon S3 uses this to parse object data into records. It returns only records
  33318. // that match the specified SQL expression. You must also specify the data serialization
  33319. // format for the response. For more information, see S3Select API Documentation
  33320. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
  33321. type SelectObjectContentInput struct {
  33322. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  33323. // The S3 bucket.
  33324. //
  33325. // Bucket is a required field
  33326. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  33327. // The account ID of the expected bucket owner. If the bucket is owned by a
  33328. // different account, the request fails with the HTTP status code 403 Forbidden
  33329. // (access denied).
  33330. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  33331. // The expression that is used to query the object.
  33332. //
  33333. // Expression is a required field
  33334. Expression *string `type:"string" required:"true"`
  33335. // The type of the provided expression (for example, SQL).
  33336. //
  33337. // ExpressionType is a required field
  33338. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  33339. // Describes the format of the data in the object that is being queried.
  33340. //
  33341. // InputSerialization is a required field
  33342. InputSerialization *InputSerialization `type:"structure" required:"true"`
  33343. // The object key.
  33344. //
  33345. // Key is a required field
  33346. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  33347. // Describes the format of the data that you want Amazon S3 to return in response.
  33348. //
  33349. // OutputSerialization is a required field
  33350. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  33351. // Specifies if periodic request progress information should be enabled.
  33352. RequestProgress *RequestProgress `type:"structure"`
  33353. // The server-side encryption (SSE) algorithm used to encrypt the object. This
  33354. // parameter is needed only when the object was created using a checksum algorithm.
  33355. // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  33356. // in the Amazon S3 User Guide.
  33357. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  33358. // The server-side encryption (SSE) customer managed key. This parameter is
  33359. // needed only when the object was created using a checksum algorithm. For more
  33360. // information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  33361. // in the Amazon S3 User Guide.
  33362. //
  33363. // SSECustomerKey is a sensitive parameter and its value will be
  33364. // replaced with "sensitive" in string returned by SelectObjectContentInput's
  33365. // String and GoString methods.
  33366. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  33367. // The MD5 server-side encryption (SSE) customer managed key. This parameter
  33368. // is needed only when the object was created using a checksum algorithm. For
  33369. // more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
  33370. // in the Amazon S3 User Guide.
  33371. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  33372. // Specifies the byte range of the object to get the records from. A record
  33373. // is processed when its first byte is contained by the range. This parameter
  33374. // is optional, but when specified, it must not be empty. See RFC 2616, Section
  33375. // 14.35.1 about how to specify the start and end of the range.
  33376. //
  33377. // ScanRangemay be used in the following ways:
  33378. //
  33379. // * <scanrange><start>50</start><end>100</end></scanrange> - process only
  33380. // the records starting between the bytes 50 and 100 (inclusive, counting
  33381. // from zero)
  33382. //
  33383. // * <scanrange><start>50</start></scanrange> - process only the records
  33384. // starting after the byte 50
  33385. //
  33386. // * <scanrange><end>50</end></scanrange> - process only the records within
  33387. // the last 50 bytes of the file.
  33388. ScanRange *ScanRange `type:"structure"`
  33389. }
  33390. // String returns the string representation.
  33391. //
  33392. // API parameter values that are decorated as "sensitive" in the API will not
  33393. // be included in the string output. The member name will be present, but the
  33394. // value will be replaced with "sensitive".
  33395. func (s SelectObjectContentInput) String() string {
  33396. return awsutil.Prettify(s)
  33397. }
  33398. // GoString returns the string representation.
  33399. //
  33400. // API parameter values that are decorated as "sensitive" in the API will not
  33401. // be included in the string output. The member name will be present, but the
  33402. // value will be replaced with "sensitive".
  33403. func (s SelectObjectContentInput) GoString() string {
  33404. return s.String()
  33405. }
  33406. // Validate inspects the fields of the type to determine if they are valid.
  33407. func (s *SelectObjectContentInput) Validate() error {
  33408. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  33409. if s.Bucket == nil {
  33410. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  33411. }
  33412. if s.Bucket != nil && len(*s.Bucket) < 1 {
  33413. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  33414. }
  33415. if s.Expression == nil {
  33416. invalidParams.Add(request.NewErrParamRequired("Expression"))
  33417. }
  33418. if s.ExpressionType == nil {
  33419. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  33420. }
  33421. if s.InputSerialization == nil {
  33422. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  33423. }
  33424. if s.Key == nil {
  33425. invalidParams.Add(request.NewErrParamRequired("Key"))
  33426. }
  33427. if s.Key != nil && len(*s.Key) < 1 {
  33428. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  33429. }
  33430. if s.OutputSerialization == nil {
  33431. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  33432. }
  33433. if invalidParams.Len() > 0 {
  33434. return invalidParams
  33435. }
  33436. return nil
  33437. }
  33438. // SetBucket sets the Bucket field's value.
  33439. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  33440. s.Bucket = &v
  33441. return s
  33442. }
  33443. func (s *SelectObjectContentInput) getBucket() (v string) {
  33444. if s.Bucket == nil {
  33445. return v
  33446. }
  33447. return *s.Bucket
  33448. }
  33449. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  33450. func (s *SelectObjectContentInput) SetExpectedBucketOwner(v string) *SelectObjectContentInput {
  33451. s.ExpectedBucketOwner = &v
  33452. return s
  33453. }
  33454. // SetExpression sets the Expression field's value.
  33455. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  33456. s.Expression = &v
  33457. return s
  33458. }
  33459. // SetExpressionType sets the ExpressionType field's value.
  33460. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  33461. s.ExpressionType = &v
  33462. return s
  33463. }
  33464. // SetInputSerialization sets the InputSerialization field's value.
  33465. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  33466. s.InputSerialization = v
  33467. return s
  33468. }
  33469. // SetKey sets the Key field's value.
  33470. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  33471. s.Key = &v
  33472. return s
  33473. }
  33474. // SetOutputSerialization sets the OutputSerialization field's value.
  33475. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  33476. s.OutputSerialization = v
  33477. return s
  33478. }
  33479. // SetRequestProgress sets the RequestProgress field's value.
  33480. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  33481. s.RequestProgress = v
  33482. return s
  33483. }
  33484. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  33485. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  33486. s.SSECustomerAlgorithm = &v
  33487. return s
  33488. }
  33489. // SetSSECustomerKey sets the SSECustomerKey field's value.
  33490. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  33491. s.SSECustomerKey = &v
  33492. return s
  33493. }
  33494. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  33495. if s.SSECustomerKey == nil {
  33496. return v
  33497. }
  33498. return *s.SSECustomerKey
  33499. }
  33500. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  33501. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  33502. s.SSECustomerKeyMD5 = &v
  33503. return s
  33504. }
  33505. // SetScanRange sets the ScanRange field's value.
  33506. func (s *SelectObjectContentInput) SetScanRange(v *ScanRange) *SelectObjectContentInput {
  33507. s.ScanRange = v
  33508. return s
  33509. }
  33510. func (s *SelectObjectContentInput) getEndpointARN() (arn.Resource, error) {
  33511. if s.Bucket == nil {
  33512. return nil, fmt.Errorf("member Bucket is nil")
  33513. }
  33514. return parseEndpointARN(*s.Bucket)
  33515. }
  33516. func (s *SelectObjectContentInput) hasEndpointARN() bool {
  33517. if s.Bucket == nil {
  33518. return false
  33519. }
  33520. return arn.IsARN(*s.Bucket)
  33521. }
  33522. // updateArnableField updates the value of the input field that
  33523. // takes an ARN as an input. This method is useful to backfill
  33524. // the parsed resource name from ARN into the input member.
  33525. // It returns a pointer to a modified copy of input and an error.
  33526. // Note that original input is not modified.
  33527. func (s SelectObjectContentInput) updateArnableField(v string) (interface{}, error) {
  33528. if s.Bucket == nil {
  33529. return nil, fmt.Errorf("member Bucket is nil")
  33530. }
  33531. s.Bucket = aws.String(v)
  33532. return &s, nil
  33533. }
  33534. type SelectObjectContentOutput struct {
  33535. _ struct{} `type:"structure" payload:"Payload"`
  33536. EventStream *SelectObjectContentEventStream
  33537. }
  33538. // String returns the string representation.
  33539. //
  33540. // API parameter values that are decorated as "sensitive" in the API will not
  33541. // be included in the string output. The member name will be present, but the
  33542. // value will be replaced with "sensitive".
  33543. func (s SelectObjectContentOutput) String() string {
  33544. return awsutil.Prettify(s)
  33545. }
  33546. // GoString returns the string representation.
  33547. //
  33548. // API parameter values that are decorated as "sensitive" in the API will not
  33549. // be included in the string output. The member name will be present, but the
  33550. // value will be replaced with "sensitive".
  33551. func (s SelectObjectContentOutput) GoString() string {
  33552. return s.String()
  33553. }
  33554. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  33555. s.EventStream = v
  33556. return s
  33557. }
  33558. func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream {
  33559. return s.EventStream
  33560. }
  33561. // GetStream returns the type to interact with the event stream.
  33562. func (s *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream {
  33563. return s.EventStream
  33564. }
  33565. // Describes the parameters for Select job types.
  33566. type SelectParameters struct {
  33567. _ struct{} `type:"structure"`
  33568. // The expression that is used to query the object.
  33569. //
  33570. // Expression is a required field
  33571. Expression *string `type:"string" required:"true"`
  33572. // The type of the provided expression (for example, SQL).
  33573. //
  33574. // ExpressionType is a required field
  33575. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  33576. // Describes the serialization format of the object.
  33577. //
  33578. // InputSerialization is a required field
  33579. InputSerialization *InputSerialization `type:"structure" required:"true"`
  33580. // Describes how the results of the Select job are serialized.
  33581. //
  33582. // OutputSerialization is a required field
  33583. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  33584. }
  33585. // String returns the string representation.
  33586. //
  33587. // API parameter values that are decorated as "sensitive" in the API will not
  33588. // be included in the string output. The member name will be present, but the
  33589. // value will be replaced with "sensitive".
  33590. func (s SelectParameters) String() string {
  33591. return awsutil.Prettify(s)
  33592. }
  33593. // GoString returns the string representation.
  33594. //
  33595. // API parameter values that are decorated as "sensitive" in the API will not
  33596. // be included in the string output. The member name will be present, but the
  33597. // value will be replaced with "sensitive".
  33598. func (s SelectParameters) GoString() string {
  33599. return s.String()
  33600. }
  33601. // Validate inspects the fields of the type to determine if they are valid.
  33602. func (s *SelectParameters) Validate() error {
  33603. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  33604. if s.Expression == nil {
  33605. invalidParams.Add(request.NewErrParamRequired("Expression"))
  33606. }
  33607. if s.ExpressionType == nil {
  33608. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  33609. }
  33610. if s.InputSerialization == nil {
  33611. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  33612. }
  33613. if s.OutputSerialization == nil {
  33614. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  33615. }
  33616. if invalidParams.Len() > 0 {
  33617. return invalidParams
  33618. }
  33619. return nil
  33620. }
  33621. // SetExpression sets the Expression field's value.
  33622. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  33623. s.Expression = &v
  33624. return s
  33625. }
  33626. // SetExpressionType sets the ExpressionType field's value.
  33627. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  33628. s.ExpressionType = &v
  33629. return s
  33630. }
  33631. // SetInputSerialization sets the InputSerialization field's value.
  33632. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  33633. s.InputSerialization = v
  33634. return s
  33635. }
  33636. // SetOutputSerialization sets the OutputSerialization field's value.
  33637. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  33638. s.OutputSerialization = v
  33639. return s
  33640. }
  33641. // Describes the default server-side encryption to apply to new objects in the
  33642. // bucket. If a PUT Object request doesn't specify any server-side encryption,
  33643. // this default encryption will be applied. If you don't specify a customer
  33644. // managed key at configuration, Amazon S3 automatically creates an Amazon Web
  33645. // Services KMS key in your Amazon Web Services account the first time that
  33646. // you add an object encrypted with SSE-KMS to a bucket. By default, Amazon
  33647. // S3 uses this KMS key for SSE-KMS. For more information, see PUT Bucket encryption
  33648. // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
  33649. // in the Amazon S3 API Reference.
  33650. type ServerSideEncryptionByDefault struct {
  33651. _ struct{} `type:"structure"`
  33652. // Amazon Web Services Key Management Service (KMS) customer Amazon Web Services
  33653. // KMS key ID to use for the default encryption. This parameter is allowed if
  33654. // and only if SSEAlgorithm is set to aws:kms.
  33655. //
  33656. // You can specify the key ID or the Amazon Resource Name (ARN) of the KMS key.
  33657. // However, if you are using encryption with cross-account or Amazon Web Services
  33658. // service operations you must use a fully qualified KMS key ARN. For more information,
  33659. // see Using encryption for cross-account operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy).
  33660. //
  33661. // For example:
  33662. //
  33663. // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
  33664. //
  33665. // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
  33666. //
  33667. // Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For
  33668. // more information, see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
  33669. // in the Amazon Web Services Key Management Service Developer Guide.
  33670. //
  33671. // KMSMasterKeyID is a sensitive parameter and its value will be
  33672. // replaced with "sensitive" in string returned by ServerSideEncryptionByDefault's
  33673. // String and GoString methods.
  33674. KMSMasterKeyID *string `type:"string" sensitive:"true"`
  33675. // Server-side encryption algorithm to use for the default encryption.
  33676. //
  33677. // SSEAlgorithm is a required field
  33678. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  33679. }
  33680. // String returns the string representation.
  33681. //
  33682. // API parameter values that are decorated as "sensitive" in the API will not
  33683. // be included in the string output. The member name will be present, but the
  33684. // value will be replaced with "sensitive".
  33685. func (s ServerSideEncryptionByDefault) String() string {
  33686. return awsutil.Prettify(s)
  33687. }
  33688. // GoString returns the string representation.
  33689. //
  33690. // API parameter values that are decorated as "sensitive" in the API will not
  33691. // be included in the string output. The member name will be present, but the
  33692. // value will be replaced with "sensitive".
  33693. func (s ServerSideEncryptionByDefault) GoString() string {
  33694. return s.String()
  33695. }
  33696. // Validate inspects the fields of the type to determine if they are valid.
  33697. func (s *ServerSideEncryptionByDefault) Validate() error {
  33698. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  33699. if s.SSEAlgorithm == nil {
  33700. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  33701. }
  33702. if invalidParams.Len() > 0 {
  33703. return invalidParams
  33704. }
  33705. return nil
  33706. }
  33707. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  33708. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  33709. s.KMSMasterKeyID = &v
  33710. return s
  33711. }
  33712. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  33713. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  33714. s.SSEAlgorithm = &v
  33715. return s
  33716. }
  33717. // Specifies the default server-side-encryption configuration.
  33718. type ServerSideEncryptionConfiguration struct {
  33719. _ struct{} `type:"structure"`
  33720. // Container for information about a particular server-side encryption configuration
  33721. // rule.
  33722. //
  33723. // Rules is a required field
  33724. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  33725. }
  33726. // String returns the string representation.
  33727. //
  33728. // API parameter values that are decorated as "sensitive" in the API will not
  33729. // be included in the string output. The member name will be present, but the
  33730. // value will be replaced with "sensitive".
  33731. func (s ServerSideEncryptionConfiguration) String() string {
  33732. return awsutil.Prettify(s)
  33733. }
  33734. // GoString returns the string representation.
  33735. //
  33736. // API parameter values that are decorated as "sensitive" in the API will not
  33737. // be included in the string output. The member name will be present, but the
  33738. // value will be replaced with "sensitive".
  33739. func (s ServerSideEncryptionConfiguration) GoString() string {
  33740. return s.String()
  33741. }
  33742. // Validate inspects the fields of the type to determine if they are valid.
  33743. func (s *ServerSideEncryptionConfiguration) Validate() error {
  33744. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  33745. if s.Rules == nil {
  33746. invalidParams.Add(request.NewErrParamRequired("Rules"))
  33747. }
  33748. if s.Rules != nil {
  33749. for i, v := range s.Rules {
  33750. if v == nil {
  33751. continue
  33752. }
  33753. if err := v.Validate(); err != nil {
  33754. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  33755. }
  33756. }
  33757. }
  33758. if invalidParams.Len() > 0 {
  33759. return invalidParams
  33760. }
  33761. return nil
  33762. }
  33763. // SetRules sets the Rules field's value.
  33764. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  33765. s.Rules = v
  33766. return s
  33767. }
  33768. // Specifies the default server-side encryption configuration.
  33769. type ServerSideEncryptionRule struct {
  33770. _ struct{} `type:"structure"`
  33771. // Specifies the default server-side encryption to apply to new objects in the
  33772. // bucket. If a PUT Object request doesn't specify any server-side encryption,
  33773. // this default encryption will be applied.
  33774. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  33775. // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side
  33776. // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects
  33777. // are not affected. Setting the BucketKeyEnabled element to true causes Amazon
  33778. // S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.
  33779. //
  33780. // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
  33781. // in the Amazon S3 User Guide.
  33782. BucketKeyEnabled *bool `type:"boolean"`
  33783. }
  33784. // String returns the string representation.
  33785. //
  33786. // API parameter values that are decorated as "sensitive" in the API will not
  33787. // be included in the string output. The member name will be present, but the
  33788. // value will be replaced with "sensitive".
  33789. func (s ServerSideEncryptionRule) String() string {
  33790. return awsutil.Prettify(s)
  33791. }
  33792. // GoString returns the string representation.
  33793. //
  33794. // API parameter values that are decorated as "sensitive" in the API will not
  33795. // be included in the string output. The member name will be present, but the
  33796. // value will be replaced with "sensitive".
  33797. func (s ServerSideEncryptionRule) GoString() string {
  33798. return s.String()
  33799. }
  33800. // Validate inspects the fields of the type to determine if they are valid.
  33801. func (s *ServerSideEncryptionRule) Validate() error {
  33802. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  33803. if s.ApplyServerSideEncryptionByDefault != nil {
  33804. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  33805. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  33806. }
  33807. }
  33808. if invalidParams.Len() > 0 {
  33809. return invalidParams
  33810. }
  33811. return nil
  33812. }
  33813. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  33814. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  33815. s.ApplyServerSideEncryptionByDefault = v
  33816. return s
  33817. }
  33818. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  33819. func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryptionRule {
  33820. s.BucketKeyEnabled = &v
  33821. return s
  33822. }
  33823. // A container that describes additional filters for identifying the source
  33824. // objects that you want to replicate. You can choose to enable or disable the
  33825. // replication of these objects. Currently, Amazon S3 supports only the filter
  33826. // that you can specify for objects created with server-side encryption using
  33827. // a customer managed key stored in Amazon Web Services Key Management Service
  33828. // (SSE-KMS).
  33829. type SourceSelectionCriteria struct {
  33830. _ struct{} `type:"structure"`
  33831. // A filter that you can specify for selections for modifications on replicas.
  33832. // Amazon S3 doesn't replicate replica modifications by default. In the latest
  33833. // version of replication configuration (when Filter is specified), you can
  33834. // specify this element and set the status to Enabled to replicate modifications
  33835. // on replicas.
  33836. //
  33837. // If you don't specify the Filter element, Amazon S3 assumes that the replication
  33838. // configuration is the earlier version, V1. In the earlier version, this element
  33839. // is not allowed
  33840. ReplicaModifications *ReplicaModifications `type:"structure"`
  33841. // A container for filter information for the selection of Amazon S3 objects
  33842. // encrypted with Amazon Web Services KMS. If you include SourceSelectionCriteria
  33843. // in the replication configuration, this element is required.
  33844. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  33845. }
  33846. // String returns the string representation.
  33847. //
  33848. // API parameter values that are decorated as "sensitive" in the API will not
  33849. // be included in the string output. The member name will be present, but the
  33850. // value will be replaced with "sensitive".
  33851. func (s SourceSelectionCriteria) String() string {
  33852. return awsutil.Prettify(s)
  33853. }
  33854. // GoString returns the string representation.
  33855. //
  33856. // API parameter values that are decorated as "sensitive" in the API will not
  33857. // be included in the string output. The member name will be present, but the
  33858. // value will be replaced with "sensitive".
  33859. func (s SourceSelectionCriteria) GoString() string {
  33860. return s.String()
  33861. }
  33862. // Validate inspects the fields of the type to determine if they are valid.
  33863. func (s *SourceSelectionCriteria) Validate() error {
  33864. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  33865. if s.ReplicaModifications != nil {
  33866. if err := s.ReplicaModifications.Validate(); err != nil {
  33867. invalidParams.AddNested("ReplicaModifications", err.(request.ErrInvalidParams))
  33868. }
  33869. }
  33870. if s.SseKmsEncryptedObjects != nil {
  33871. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  33872. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  33873. }
  33874. }
  33875. if invalidParams.Len() > 0 {
  33876. return invalidParams
  33877. }
  33878. return nil
  33879. }
  33880. // SetReplicaModifications sets the ReplicaModifications field's value.
  33881. func (s *SourceSelectionCriteria) SetReplicaModifications(v *ReplicaModifications) *SourceSelectionCriteria {
  33882. s.ReplicaModifications = v
  33883. return s
  33884. }
  33885. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  33886. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  33887. s.SseKmsEncryptedObjects = v
  33888. return s
  33889. }
  33890. // A container for filter information for the selection of S3 objects encrypted
  33891. // with Amazon Web Services KMS.
  33892. type SseKmsEncryptedObjects struct {
  33893. _ struct{} `type:"structure"`
  33894. // Specifies whether Amazon S3 replicates objects created with server-side encryption
  33895. // using an Amazon Web Services KMS key stored in Amazon Web Services Key Management
  33896. // Service.
  33897. //
  33898. // Status is a required field
  33899. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  33900. }
  33901. // String returns the string representation.
  33902. //
  33903. // API parameter values that are decorated as "sensitive" in the API will not
  33904. // be included in the string output. The member name will be present, but the
  33905. // value will be replaced with "sensitive".
  33906. func (s SseKmsEncryptedObjects) String() string {
  33907. return awsutil.Prettify(s)
  33908. }
  33909. // GoString returns the string representation.
  33910. //
  33911. // API parameter values that are decorated as "sensitive" in the API will not
  33912. // be included in the string output. The member name will be present, but the
  33913. // value will be replaced with "sensitive".
  33914. func (s SseKmsEncryptedObjects) GoString() string {
  33915. return s.String()
  33916. }
  33917. // Validate inspects the fields of the type to determine if they are valid.
  33918. func (s *SseKmsEncryptedObjects) Validate() error {
  33919. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  33920. if s.Status == nil {
  33921. invalidParams.Add(request.NewErrParamRequired("Status"))
  33922. }
  33923. if invalidParams.Len() > 0 {
  33924. return invalidParams
  33925. }
  33926. return nil
  33927. }
  33928. // SetStatus sets the Status field's value.
  33929. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  33930. s.Status = &v
  33931. return s
  33932. }
  33933. // Container for the stats details.
  33934. type Stats struct {
  33935. _ struct{} `type:"structure"`
  33936. // The total number of uncompressed object bytes processed.
  33937. BytesProcessed *int64 `type:"long"`
  33938. // The total number of bytes of records payload data returned.
  33939. BytesReturned *int64 `type:"long"`
  33940. // The total number of object bytes scanned.
  33941. BytesScanned *int64 `type:"long"`
  33942. }
  33943. // String returns the string representation.
  33944. //
  33945. // API parameter values that are decorated as "sensitive" in the API will not
  33946. // be included in the string output. The member name will be present, but the
  33947. // value will be replaced with "sensitive".
  33948. func (s Stats) String() string {
  33949. return awsutil.Prettify(s)
  33950. }
  33951. // GoString returns the string representation.
  33952. //
  33953. // API parameter values that are decorated as "sensitive" in the API will not
  33954. // be included in the string output. The member name will be present, but the
  33955. // value will be replaced with "sensitive".
  33956. func (s Stats) GoString() string {
  33957. return s.String()
  33958. }
  33959. // SetBytesProcessed sets the BytesProcessed field's value.
  33960. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  33961. s.BytesProcessed = &v
  33962. return s
  33963. }
  33964. // SetBytesReturned sets the BytesReturned field's value.
  33965. func (s *Stats) SetBytesReturned(v int64) *Stats {
  33966. s.BytesReturned = &v
  33967. return s
  33968. }
  33969. // SetBytesScanned sets the BytesScanned field's value.
  33970. func (s *Stats) SetBytesScanned(v int64) *Stats {
  33971. s.BytesScanned = &v
  33972. return s
  33973. }
  33974. // Container for the Stats Event.
  33975. type StatsEvent struct {
  33976. _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
  33977. // The Stats event details.
  33978. Details *Stats `locationName:"Details" type:"structure"`
  33979. }
  33980. // String returns the string representation.
  33981. //
  33982. // API parameter values that are decorated as "sensitive" in the API will not
  33983. // be included in the string output. The member name will be present, but the
  33984. // value will be replaced with "sensitive".
  33985. func (s StatsEvent) String() string {
  33986. return awsutil.Prettify(s)
  33987. }
  33988. // GoString returns the string representation.
  33989. //
  33990. // API parameter values that are decorated as "sensitive" in the API will not
  33991. // be included in the string output. The member name will be present, but the
  33992. // value will be replaced with "sensitive".
  33993. func (s StatsEvent) GoString() string {
  33994. return s.String()
  33995. }
  33996. // SetDetails sets the Details field's value.
  33997. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  33998. s.Details = v
  33999. return s
  34000. }
  34001. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  34002. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  34003. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  34004. // This method is only used internally within the SDK's EventStream handling.
  34005. func (s *StatsEvent) UnmarshalEvent(
  34006. payloadUnmarshaler protocol.PayloadUnmarshaler,
  34007. msg eventstream.Message,
  34008. ) error {
  34009. if err := payloadUnmarshaler.UnmarshalPayload(
  34010. bytes.NewReader(msg.Payload), s,
  34011. ); err != nil {
  34012. return err
  34013. }
  34014. return nil
  34015. }
  34016. // MarshalEvent marshals the type into an stream event value. This method
  34017. // should only used internally within the SDK's EventStream handling.
  34018. func (s *StatsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
  34019. msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
  34020. var buf bytes.Buffer
  34021. if err = pm.MarshalPayload(&buf, s); err != nil {
  34022. return eventstream.Message{}, err
  34023. }
  34024. msg.Payload = buf.Bytes()
  34025. return msg, err
  34026. }
  34027. // Specifies data related to access patterns to be collected and made available
  34028. // to analyze the tradeoffs between different storage classes for an Amazon
  34029. // S3 bucket.
  34030. type StorageClassAnalysis struct {
  34031. _ struct{} `type:"structure"`
  34032. // Specifies how data related to the storage class analysis for an Amazon S3
  34033. // bucket should be exported.
  34034. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  34035. }
  34036. // String returns the string representation.
  34037. //
  34038. // API parameter values that are decorated as "sensitive" in the API will not
  34039. // be included in the string output. The member name will be present, but the
  34040. // value will be replaced with "sensitive".
  34041. func (s StorageClassAnalysis) String() string {
  34042. return awsutil.Prettify(s)
  34043. }
  34044. // GoString returns the string representation.
  34045. //
  34046. // API parameter values that are decorated as "sensitive" in the API will not
  34047. // be included in the string output. The member name will be present, but the
  34048. // value will be replaced with "sensitive".
  34049. func (s StorageClassAnalysis) GoString() string {
  34050. return s.String()
  34051. }
  34052. // Validate inspects the fields of the type to determine if they are valid.
  34053. func (s *StorageClassAnalysis) Validate() error {
  34054. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  34055. if s.DataExport != nil {
  34056. if err := s.DataExport.Validate(); err != nil {
  34057. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  34058. }
  34059. }
  34060. if invalidParams.Len() > 0 {
  34061. return invalidParams
  34062. }
  34063. return nil
  34064. }
  34065. // SetDataExport sets the DataExport field's value.
  34066. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  34067. s.DataExport = v
  34068. return s
  34069. }
  34070. // Container for data related to the storage class analysis for an Amazon S3
  34071. // bucket for export.
  34072. type StorageClassAnalysisDataExport struct {
  34073. _ struct{} `type:"structure"`
  34074. // The place to store the data for an analysis.
  34075. //
  34076. // Destination is a required field
  34077. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  34078. // The version of the output schema to use when exporting data. Must be V_1.
  34079. //
  34080. // OutputSchemaVersion is a required field
  34081. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  34082. }
  34083. // String returns the string representation.
  34084. //
  34085. // API parameter values that are decorated as "sensitive" in the API will not
  34086. // be included in the string output. The member name will be present, but the
  34087. // value will be replaced with "sensitive".
  34088. func (s StorageClassAnalysisDataExport) String() string {
  34089. return awsutil.Prettify(s)
  34090. }
  34091. // GoString returns the string representation.
  34092. //
  34093. // API parameter values that are decorated as "sensitive" in the API will not
  34094. // be included in the string output. The member name will be present, but the
  34095. // value will be replaced with "sensitive".
  34096. func (s StorageClassAnalysisDataExport) GoString() string {
  34097. return s.String()
  34098. }
  34099. // Validate inspects the fields of the type to determine if they are valid.
  34100. func (s *StorageClassAnalysisDataExport) Validate() error {
  34101. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  34102. if s.Destination == nil {
  34103. invalidParams.Add(request.NewErrParamRequired("Destination"))
  34104. }
  34105. if s.OutputSchemaVersion == nil {
  34106. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  34107. }
  34108. if s.Destination != nil {
  34109. if err := s.Destination.Validate(); err != nil {
  34110. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  34111. }
  34112. }
  34113. if invalidParams.Len() > 0 {
  34114. return invalidParams
  34115. }
  34116. return nil
  34117. }
  34118. // SetDestination sets the Destination field's value.
  34119. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  34120. s.Destination = v
  34121. return s
  34122. }
  34123. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  34124. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  34125. s.OutputSchemaVersion = &v
  34126. return s
  34127. }
  34128. // A container of a key value name pair.
  34129. type Tag struct {
  34130. _ struct{} `type:"structure"`
  34131. // Name of the object key.
  34132. //
  34133. // Key is a required field
  34134. Key *string `min:"1" type:"string" required:"true"`
  34135. // Value of the tag.
  34136. //
  34137. // Value is a required field
  34138. Value *string `type:"string" required:"true"`
  34139. }
  34140. // String returns the string representation.
  34141. //
  34142. // API parameter values that are decorated as "sensitive" in the API will not
  34143. // be included in the string output. The member name will be present, but the
  34144. // value will be replaced with "sensitive".
  34145. func (s Tag) String() string {
  34146. return awsutil.Prettify(s)
  34147. }
  34148. // GoString returns the string representation.
  34149. //
  34150. // API parameter values that are decorated as "sensitive" in the API will not
  34151. // be included in the string output. The member name will be present, but the
  34152. // value will be replaced with "sensitive".
  34153. func (s Tag) GoString() string {
  34154. return s.String()
  34155. }
  34156. // Validate inspects the fields of the type to determine if they are valid.
  34157. func (s *Tag) Validate() error {
  34158. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  34159. if s.Key == nil {
  34160. invalidParams.Add(request.NewErrParamRequired("Key"))
  34161. }
  34162. if s.Key != nil && len(*s.Key) < 1 {
  34163. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  34164. }
  34165. if s.Value == nil {
  34166. invalidParams.Add(request.NewErrParamRequired("Value"))
  34167. }
  34168. if invalidParams.Len() > 0 {
  34169. return invalidParams
  34170. }
  34171. return nil
  34172. }
  34173. // SetKey sets the Key field's value.
  34174. func (s *Tag) SetKey(v string) *Tag {
  34175. s.Key = &v
  34176. return s
  34177. }
  34178. // SetValue sets the Value field's value.
  34179. func (s *Tag) SetValue(v string) *Tag {
  34180. s.Value = &v
  34181. return s
  34182. }
  34183. // Container for TagSet elements.
  34184. type Tagging struct {
  34185. _ struct{} `type:"structure"`
  34186. // A collection for a set of tags
  34187. //
  34188. // TagSet is a required field
  34189. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  34190. }
  34191. // String returns the string representation.
  34192. //
  34193. // API parameter values that are decorated as "sensitive" in the API will not
  34194. // be included in the string output. The member name will be present, but the
  34195. // value will be replaced with "sensitive".
  34196. func (s Tagging) String() string {
  34197. return awsutil.Prettify(s)
  34198. }
  34199. // GoString returns the string representation.
  34200. //
  34201. // API parameter values that are decorated as "sensitive" in the API will not
  34202. // be included in the string output. The member name will be present, but the
  34203. // value will be replaced with "sensitive".
  34204. func (s Tagging) GoString() string {
  34205. return s.String()
  34206. }
  34207. // Validate inspects the fields of the type to determine if they are valid.
  34208. func (s *Tagging) Validate() error {
  34209. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  34210. if s.TagSet == nil {
  34211. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  34212. }
  34213. if s.TagSet != nil {
  34214. for i, v := range s.TagSet {
  34215. if v == nil {
  34216. continue
  34217. }
  34218. if err := v.Validate(); err != nil {
  34219. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  34220. }
  34221. }
  34222. }
  34223. if invalidParams.Len() > 0 {
  34224. return invalidParams
  34225. }
  34226. return nil
  34227. }
  34228. // SetTagSet sets the TagSet field's value.
  34229. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  34230. s.TagSet = v
  34231. return s
  34232. }
  34233. // Container for granting information.
  34234. //
  34235. // Buckets that use the bucket owner enforced setting for Object Ownership don't
  34236. // support target grants. For more information, see Permissions server access
  34237. // log delivery (https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general)
  34238. // in the Amazon S3 User Guide.
  34239. type TargetGrant struct {
  34240. _ struct{} `type:"structure"`
  34241. // Container for the person being granted permissions.
  34242. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  34243. // Logging permissions assigned to the grantee for the bucket.
  34244. Permission *string `type:"string" enum:"BucketLogsPermission"`
  34245. }
  34246. // String returns the string representation.
  34247. //
  34248. // API parameter values that are decorated as "sensitive" in the API will not
  34249. // be included in the string output. The member name will be present, but the
  34250. // value will be replaced with "sensitive".
  34251. func (s TargetGrant) String() string {
  34252. return awsutil.Prettify(s)
  34253. }
  34254. // GoString returns the string representation.
  34255. //
  34256. // API parameter values that are decorated as "sensitive" in the API will not
  34257. // be included in the string output. The member name will be present, but the
  34258. // value will be replaced with "sensitive".
  34259. func (s TargetGrant) GoString() string {
  34260. return s.String()
  34261. }
  34262. // Validate inspects the fields of the type to determine if they are valid.
  34263. func (s *TargetGrant) Validate() error {
  34264. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  34265. if s.Grantee != nil {
  34266. if err := s.Grantee.Validate(); err != nil {
  34267. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  34268. }
  34269. }
  34270. if invalidParams.Len() > 0 {
  34271. return invalidParams
  34272. }
  34273. return nil
  34274. }
  34275. // SetGrantee sets the Grantee field's value.
  34276. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  34277. s.Grantee = v
  34278. return s
  34279. }
  34280. // SetPermission sets the Permission field's value.
  34281. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  34282. s.Permission = &v
  34283. return s
  34284. }
  34285. // The S3 Intelligent-Tiering storage class is designed to optimize storage
  34286. // costs by automatically moving data to the most cost-effective storage access
  34287. // tier, without additional operational overhead.
  34288. type Tiering struct {
  34289. _ struct{} `type:"structure"`
  34290. // S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing
  34291. // frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
  34292. // for a list of access tiers in the S3 Intelligent-Tiering storage class.
  34293. //
  34294. // AccessTier is a required field
  34295. AccessTier *string `type:"string" required:"true" enum:"IntelligentTieringAccessTier"`
  34296. // The number of consecutive days of no access after which an object will be
  34297. // eligible to be transitioned to the corresponding tier. The minimum number
  34298. // of days specified for Archive Access tier must be at least 90 days and Deep
  34299. // Archive Access tier must be at least 180 days. The maximum can be up to 2
  34300. // years (730 days).
  34301. //
  34302. // Days is a required field
  34303. Days *int64 `type:"integer" required:"true"`
  34304. }
  34305. // String returns the string representation.
  34306. //
  34307. // API parameter values that are decorated as "sensitive" in the API will not
  34308. // be included in the string output. The member name will be present, but the
  34309. // value will be replaced with "sensitive".
  34310. func (s Tiering) String() string {
  34311. return awsutil.Prettify(s)
  34312. }
  34313. // GoString returns the string representation.
  34314. //
  34315. // API parameter values that are decorated as "sensitive" in the API will not
  34316. // be included in the string output. The member name will be present, but the
  34317. // value will be replaced with "sensitive".
  34318. func (s Tiering) GoString() string {
  34319. return s.String()
  34320. }
  34321. // Validate inspects the fields of the type to determine if they are valid.
  34322. func (s *Tiering) Validate() error {
  34323. invalidParams := request.ErrInvalidParams{Context: "Tiering"}
  34324. if s.AccessTier == nil {
  34325. invalidParams.Add(request.NewErrParamRequired("AccessTier"))
  34326. }
  34327. if s.Days == nil {
  34328. invalidParams.Add(request.NewErrParamRequired("Days"))
  34329. }
  34330. if invalidParams.Len() > 0 {
  34331. return invalidParams
  34332. }
  34333. return nil
  34334. }
  34335. // SetAccessTier sets the AccessTier field's value.
  34336. func (s *Tiering) SetAccessTier(v string) *Tiering {
  34337. s.AccessTier = &v
  34338. return s
  34339. }
  34340. // SetDays sets the Days field's value.
  34341. func (s *Tiering) SetDays(v int64) *Tiering {
  34342. s.Days = &v
  34343. return s
  34344. }
  34345. // A container for specifying the configuration for publication of messages
  34346. // to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3
  34347. // detects specified events.
  34348. type TopicConfiguration struct {
  34349. _ struct{} `type:"structure"`
  34350. // The Amazon S3 bucket event about which to send notifications. For more information,
  34351. // see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  34352. // in the Amazon S3 User Guide.
  34353. //
  34354. // Events is a required field
  34355. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true" enum:"Event"`
  34356. // Specifies object key name filtering rules. For information about key name
  34357. // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  34358. // in the Amazon S3 User Guide.
  34359. Filter *NotificationConfigurationFilter `type:"structure"`
  34360. // An optional unique identifier for configurations in a notification configuration.
  34361. // If you don't provide one, Amazon S3 will assign an ID.
  34362. Id *string `type:"string"`
  34363. // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
  34364. // publishes a message when it detects events of the specified type.
  34365. //
  34366. // TopicArn is a required field
  34367. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  34368. }
  34369. // String returns the string representation.
  34370. //
  34371. // API parameter values that are decorated as "sensitive" in the API will not
  34372. // be included in the string output. The member name will be present, but the
  34373. // value will be replaced with "sensitive".
  34374. func (s TopicConfiguration) String() string {
  34375. return awsutil.Prettify(s)
  34376. }
  34377. // GoString returns the string representation.
  34378. //
  34379. // API parameter values that are decorated as "sensitive" in the API will not
  34380. // be included in the string output. The member name will be present, but the
  34381. // value will be replaced with "sensitive".
  34382. func (s TopicConfiguration) GoString() string {
  34383. return s.String()
  34384. }
  34385. // Validate inspects the fields of the type to determine if they are valid.
  34386. func (s *TopicConfiguration) Validate() error {
  34387. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  34388. if s.Events == nil {
  34389. invalidParams.Add(request.NewErrParamRequired("Events"))
  34390. }
  34391. if s.TopicArn == nil {
  34392. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  34393. }
  34394. if invalidParams.Len() > 0 {
  34395. return invalidParams
  34396. }
  34397. return nil
  34398. }
  34399. // SetEvents sets the Events field's value.
  34400. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  34401. s.Events = v
  34402. return s
  34403. }
  34404. // SetFilter sets the Filter field's value.
  34405. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  34406. s.Filter = v
  34407. return s
  34408. }
  34409. // SetId sets the Id field's value.
  34410. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  34411. s.Id = &v
  34412. return s
  34413. }
  34414. // SetTopicArn sets the TopicArn field's value.
  34415. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  34416. s.TopicArn = &v
  34417. return s
  34418. }
  34419. // A container for specifying the configuration for publication of messages
  34420. // to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3
  34421. // detects specified events. This data type is deprecated. Use TopicConfiguration
  34422. // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_TopicConfiguration.html)
  34423. // instead.
  34424. type TopicConfigurationDeprecated struct {
  34425. _ struct{} `type:"structure"`
  34426. // Bucket event for which to send notifications.
  34427. //
  34428. // Deprecated: Event has been deprecated
  34429. Event *string `deprecated:"true" type:"string" enum:"Event"`
  34430. // A collection of events related to objects
  34431. Events []*string `locationName:"Event" type:"list" flattened:"true" enum:"Event"`
  34432. // An optional unique identifier for configurations in a notification configuration.
  34433. // If you don't provide one, Amazon S3 will assign an ID.
  34434. Id *string `type:"string"`
  34435. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  34436. // specified events for the bucket.
  34437. Topic *string `type:"string"`
  34438. }
  34439. // String returns the string representation.
  34440. //
  34441. // API parameter values that are decorated as "sensitive" in the API will not
  34442. // be included in the string output. The member name will be present, but the
  34443. // value will be replaced with "sensitive".
  34444. func (s TopicConfigurationDeprecated) String() string {
  34445. return awsutil.Prettify(s)
  34446. }
  34447. // GoString returns the string representation.
  34448. //
  34449. // API parameter values that are decorated as "sensitive" in the API will not
  34450. // be included in the string output. The member name will be present, but the
  34451. // value will be replaced with "sensitive".
  34452. func (s TopicConfigurationDeprecated) GoString() string {
  34453. return s.String()
  34454. }
  34455. // SetEvent sets the Event field's value.
  34456. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  34457. s.Event = &v
  34458. return s
  34459. }
  34460. // SetEvents sets the Events field's value.
  34461. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  34462. s.Events = v
  34463. return s
  34464. }
  34465. // SetId sets the Id field's value.
  34466. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  34467. s.Id = &v
  34468. return s
  34469. }
  34470. // SetTopic sets the Topic field's value.
  34471. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  34472. s.Topic = &v
  34473. return s
  34474. }
  34475. // Specifies when an object transitions to a specified storage class. For more
  34476. // information about Amazon S3 lifecycle configuration rules, see Transitioning
  34477. // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
  34478. // in the Amazon S3 User Guide.
  34479. type Transition struct {
  34480. _ struct{} `type:"structure"`
  34481. // Indicates when objects are transitioned to the specified storage class. The
  34482. // date value must be in ISO 8601 format. The time is always midnight UTC.
  34483. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  34484. // Indicates the number of days after creation when objects are transitioned
  34485. // to the specified storage class. The value must be a positive integer.
  34486. Days *int64 `type:"integer"`
  34487. // The storage class to which you want the object to transition.
  34488. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  34489. }
  34490. // String returns the string representation.
  34491. //
  34492. // API parameter values that are decorated as "sensitive" in the API will not
  34493. // be included in the string output. The member name will be present, but the
  34494. // value will be replaced with "sensitive".
  34495. func (s Transition) String() string {
  34496. return awsutil.Prettify(s)
  34497. }
  34498. // GoString returns the string representation.
  34499. //
  34500. // API parameter values that are decorated as "sensitive" in the API will not
  34501. // be included in the string output. The member name will be present, but the
  34502. // value will be replaced with "sensitive".
  34503. func (s Transition) GoString() string {
  34504. return s.String()
  34505. }
  34506. // SetDate sets the Date field's value.
  34507. func (s *Transition) SetDate(v time.Time) *Transition {
  34508. s.Date = &v
  34509. return s
  34510. }
  34511. // SetDays sets the Days field's value.
  34512. func (s *Transition) SetDays(v int64) *Transition {
  34513. s.Days = &v
  34514. return s
  34515. }
  34516. // SetStorageClass sets the StorageClass field's value.
  34517. func (s *Transition) SetStorageClass(v string) *Transition {
  34518. s.StorageClass = &v
  34519. return s
  34520. }
  34521. type UploadPartCopyInput struct {
  34522. _ struct{} `locationName:"UploadPartCopyRequest" type:"structure"`
  34523. // The bucket name.
  34524. //
  34525. // When using this action with an access point, you must direct requests to
  34526. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  34527. // When using this action with an access point through the Amazon Web Services
  34528. // SDKs, you provide the access point ARN in place of the bucket name. For more
  34529. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  34530. // in the Amazon S3 User Guide.
  34531. //
  34532. // When using this action with Amazon S3 on Outposts, you must direct requests
  34533. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  34534. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  34535. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  34536. // you provide the Outposts bucket ARN in place of the bucket name. For more
  34537. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  34538. // in the Amazon S3 User Guide.
  34539. //
  34540. // Bucket is a required field
  34541. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  34542. // Specifies the source object for the copy operation. You specify the value
  34543. // in one of two formats, depending on whether you want to access the source
  34544. // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
  34545. //
  34546. // * For objects not accessed through an access point, specify the name of
  34547. // the source bucket and key of the source object, separated by a slash (/).
  34548. // For example, to copy the object reports/january.pdf from the bucket awsexamplebucket,
  34549. // use awsexamplebucket/reports/january.pdf. The value must be URL-encoded.
  34550. //
  34551. // * For objects accessed through access points, specify the Amazon Resource
  34552. // Name (ARN) of the object as accessed through the access point, in the
  34553. // format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>.
  34554. // For example, to copy the object reports/january.pdf through access point
  34555. // my-access-point owned by account 123456789012 in Region us-west-2, use
  34556. // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
  34557. // The value must be URL encoded. Amazon S3 supports copy operations using
  34558. // access points only when the source and destination buckets are in the
  34559. // same Amazon Web Services Region. Alternatively, for objects accessed through
  34560. // Amazon S3 on Outposts, specify the ARN of the object as accessed in the
  34561. // format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>.
  34562. // For example, to copy the object reports/january.pdf through outpost my-outpost
  34563. // owned by account 123456789012 in Region us-west-2, use the URL encoding
  34564. // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
  34565. // The value must be URL-encoded.
  34566. //
  34567. // To copy a specific version of an object, append ?versionId=<version-id> to
  34568. // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
  34569. // If you don't specify a version ID, Amazon S3 copies the latest version of
  34570. // the source object.
  34571. //
  34572. // CopySource is a required field
  34573. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  34574. // Copies the object if its entity tag (ETag) matches the specified tag.
  34575. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  34576. // Copies the object if it has been modified since the specified time.
  34577. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  34578. // Copies the object if its entity tag (ETag) is different than the specified
  34579. // ETag.
  34580. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  34581. // Copies the object if it hasn't been modified since the specified time.
  34582. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  34583. // The range of bytes to copy from the source object. The range value must use
  34584. // the form bytes=first-last, where the first and last are the zero-based byte
  34585. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  34586. // first 10 bytes of the source. You can copy a range only if the source object
  34587. // is greater than 5 MB.
  34588. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  34589. // Specifies the algorithm to use when decrypting the source object (for example,
  34590. // AES256).
  34591. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  34592. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  34593. // the source object. The encryption key provided in this header must be one
  34594. // that was used when the source object was created.
  34595. //
  34596. // CopySourceSSECustomerKey is a sensitive parameter and its value will be
  34597. // replaced with "sensitive" in string returned by UploadPartCopyInput's
  34598. // String and GoString methods.
  34599. CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  34600. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  34601. // Amazon S3 uses this header for a message integrity check to ensure that the
  34602. // encryption key was transmitted without error.
  34603. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  34604. // The account ID of the expected destination bucket owner. If the destination
  34605. // bucket is owned by a different account, the request fails with the HTTP status
  34606. // code 403 Forbidden (access denied).
  34607. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  34608. // The account ID of the expected source bucket owner. If the source bucket
  34609. // is owned by a different account, the request fails with the HTTP status code
  34610. // 403 Forbidden (access denied).
  34611. ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`
  34612. // Object key for which the multipart upload was initiated.
  34613. //
  34614. // Key is a required field
  34615. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  34616. // Part number of part being copied. This is a positive integer between 1 and
  34617. // 10,000.
  34618. //
  34619. // PartNumber is a required field
  34620. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  34621. // Confirms that the requester knows that they will be charged for the request.
  34622. // Bucket owners need not specify this parameter in their requests. For information
  34623. // about downloading objects from Requester Pays buckets, see Downloading Objects
  34624. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  34625. // in the Amazon S3 User Guide.
  34626. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  34627. // Specifies the algorithm to use to when encrypting the object (for example,
  34628. // AES256).
  34629. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  34630. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  34631. // data. This value is used to store the object and then it is discarded; Amazon
  34632. // S3 does not store the encryption key. The key must be appropriate for use
  34633. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  34634. // header. This must be the same encryption key specified in the initiate multipart
  34635. // upload request.
  34636. //
  34637. // SSECustomerKey is a sensitive parameter and its value will be
  34638. // replaced with "sensitive" in string returned by UploadPartCopyInput's
  34639. // String and GoString methods.
  34640. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  34641. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  34642. // Amazon S3 uses this header for a message integrity check to ensure that the
  34643. // encryption key was transmitted without error.
  34644. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  34645. // Upload ID identifying the multipart upload whose part is being copied.
  34646. //
  34647. // UploadId is a required field
  34648. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  34649. }
  34650. // String returns the string representation.
  34651. //
  34652. // API parameter values that are decorated as "sensitive" in the API will not
  34653. // be included in the string output. The member name will be present, but the
  34654. // value will be replaced with "sensitive".
  34655. func (s UploadPartCopyInput) String() string {
  34656. return awsutil.Prettify(s)
  34657. }
  34658. // GoString returns the string representation.
  34659. //
  34660. // API parameter values that are decorated as "sensitive" in the API will not
  34661. // be included in the string output. The member name will be present, but the
  34662. // value will be replaced with "sensitive".
  34663. func (s UploadPartCopyInput) GoString() string {
  34664. return s.String()
  34665. }
  34666. // Validate inspects the fields of the type to determine if they are valid.
  34667. func (s *UploadPartCopyInput) Validate() error {
  34668. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  34669. if s.Bucket == nil {
  34670. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  34671. }
  34672. if s.Bucket != nil && len(*s.Bucket) < 1 {
  34673. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  34674. }
  34675. if s.CopySource == nil {
  34676. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  34677. }
  34678. if s.Key == nil {
  34679. invalidParams.Add(request.NewErrParamRequired("Key"))
  34680. }
  34681. if s.Key != nil && len(*s.Key) < 1 {
  34682. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  34683. }
  34684. if s.PartNumber == nil {
  34685. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  34686. }
  34687. if s.UploadId == nil {
  34688. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  34689. }
  34690. if invalidParams.Len() > 0 {
  34691. return invalidParams
  34692. }
  34693. return nil
  34694. }
  34695. // SetBucket sets the Bucket field's value.
  34696. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  34697. s.Bucket = &v
  34698. return s
  34699. }
  34700. func (s *UploadPartCopyInput) getBucket() (v string) {
  34701. if s.Bucket == nil {
  34702. return v
  34703. }
  34704. return *s.Bucket
  34705. }
  34706. // SetCopySource sets the CopySource field's value.
  34707. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  34708. s.CopySource = &v
  34709. return s
  34710. }
  34711. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  34712. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  34713. s.CopySourceIfMatch = &v
  34714. return s
  34715. }
  34716. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  34717. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  34718. s.CopySourceIfModifiedSince = &v
  34719. return s
  34720. }
  34721. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  34722. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  34723. s.CopySourceIfNoneMatch = &v
  34724. return s
  34725. }
  34726. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  34727. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  34728. s.CopySourceIfUnmodifiedSince = &v
  34729. return s
  34730. }
  34731. // SetCopySourceRange sets the CopySourceRange field's value.
  34732. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  34733. s.CopySourceRange = &v
  34734. return s
  34735. }
  34736. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  34737. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  34738. s.CopySourceSSECustomerAlgorithm = &v
  34739. return s
  34740. }
  34741. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  34742. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  34743. s.CopySourceSSECustomerKey = &v
  34744. return s
  34745. }
  34746. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  34747. if s.CopySourceSSECustomerKey == nil {
  34748. return v
  34749. }
  34750. return *s.CopySourceSSECustomerKey
  34751. }
  34752. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  34753. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  34754. s.CopySourceSSECustomerKeyMD5 = &v
  34755. return s
  34756. }
  34757. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  34758. func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput {
  34759. s.ExpectedBucketOwner = &v
  34760. return s
  34761. }
  34762. // SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
  34763. func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput {
  34764. s.ExpectedSourceBucketOwner = &v
  34765. return s
  34766. }
  34767. // SetKey sets the Key field's value.
  34768. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  34769. s.Key = &v
  34770. return s
  34771. }
  34772. // SetPartNumber sets the PartNumber field's value.
  34773. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  34774. s.PartNumber = &v
  34775. return s
  34776. }
  34777. // SetRequestPayer sets the RequestPayer field's value.
  34778. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  34779. s.RequestPayer = &v
  34780. return s
  34781. }
  34782. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  34783. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  34784. s.SSECustomerAlgorithm = &v
  34785. return s
  34786. }
  34787. // SetSSECustomerKey sets the SSECustomerKey field's value.
  34788. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  34789. s.SSECustomerKey = &v
  34790. return s
  34791. }
  34792. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  34793. if s.SSECustomerKey == nil {
  34794. return v
  34795. }
  34796. return *s.SSECustomerKey
  34797. }
  34798. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  34799. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  34800. s.SSECustomerKeyMD5 = &v
  34801. return s
  34802. }
  34803. // SetUploadId sets the UploadId field's value.
  34804. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  34805. s.UploadId = &v
  34806. return s
  34807. }
  34808. func (s *UploadPartCopyInput) getEndpointARN() (arn.Resource, error) {
  34809. if s.Bucket == nil {
  34810. return nil, fmt.Errorf("member Bucket is nil")
  34811. }
  34812. return parseEndpointARN(*s.Bucket)
  34813. }
  34814. func (s *UploadPartCopyInput) hasEndpointARN() bool {
  34815. if s.Bucket == nil {
  34816. return false
  34817. }
  34818. return arn.IsARN(*s.Bucket)
  34819. }
  34820. // updateArnableField updates the value of the input field that
  34821. // takes an ARN as an input. This method is useful to backfill
  34822. // the parsed resource name from ARN into the input member.
  34823. // It returns a pointer to a modified copy of input and an error.
  34824. // Note that original input is not modified.
  34825. func (s UploadPartCopyInput) updateArnableField(v string) (interface{}, error) {
  34826. if s.Bucket == nil {
  34827. return nil, fmt.Errorf("member Bucket is nil")
  34828. }
  34829. s.Bucket = aws.String(v)
  34830. return &s, nil
  34831. }
  34832. type UploadPartCopyOutput struct {
  34833. _ struct{} `type:"structure" payload:"CopyPartResult"`
  34834. // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
  34835. // encryption with Amazon Web Services KMS (SSE-KMS).
  34836. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  34837. // Container for all response elements.
  34838. CopyPartResult *CopyPartResult `type:"structure"`
  34839. // The version of the source object that was copied, if you have enabled versioning
  34840. // on the source bucket.
  34841. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  34842. // If present, indicates that the requester was successfully charged for the
  34843. // request.
  34844. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  34845. // If server-side encryption with a customer-provided encryption key was requested,
  34846. // the response will include this header confirming the encryption algorithm
  34847. // used.
  34848. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  34849. // If server-side encryption with a customer-provided encryption key was requested,
  34850. // the response will include this header to provide round-trip message integrity
  34851. // verification of the customer-provided encryption key.
  34852. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  34853. // If present, specifies the ID of the Amazon Web Services Key Management Service
  34854. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  34855. // the object.
  34856. //
  34857. // SSEKMSKeyId is a sensitive parameter and its value will be
  34858. // replaced with "sensitive" in string returned by UploadPartCopyOutput's
  34859. // String and GoString methods.
  34860. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  34861. // The server-side encryption algorithm used when storing this object in Amazon
  34862. // S3 (for example, AES256, aws:kms).
  34863. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  34864. }
  34865. // String returns the string representation.
  34866. //
  34867. // API parameter values that are decorated as "sensitive" in the API will not
  34868. // be included in the string output. The member name will be present, but the
  34869. // value will be replaced with "sensitive".
  34870. func (s UploadPartCopyOutput) String() string {
  34871. return awsutil.Prettify(s)
  34872. }
  34873. // GoString returns the string representation.
  34874. //
  34875. // API parameter values that are decorated as "sensitive" in the API will not
  34876. // be included in the string output. The member name will be present, but the
  34877. // value will be replaced with "sensitive".
  34878. func (s UploadPartCopyOutput) GoString() string {
  34879. return s.String()
  34880. }
  34881. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  34882. func (s *UploadPartCopyOutput) SetBucketKeyEnabled(v bool) *UploadPartCopyOutput {
  34883. s.BucketKeyEnabled = &v
  34884. return s
  34885. }
  34886. // SetCopyPartResult sets the CopyPartResult field's value.
  34887. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  34888. s.CopyPartResult = v
  34889. return s
  34890. }
  34891. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  34892. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  34893. s.CopySourceVersionId = &v
  34894. return s
  34895. }
  34896. // SetRequestCharged sets the RequestCharged field's value.
  34897. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  34898. s.RequestCharged = &v
  34899. return s
  34900. }
  34901. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  34902. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  34903. s.SSECustomerAlgorithm = &v
  34904. return s
  34905. }
  34906. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  34907. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  34908. s.SSECustomerKeyMD5 = &v
  34909. return s
  34910. }
  34911. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  34912. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  34913. s.SSEKMSKeyId = &v
  34914. return s
  34915. }
  34916. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  34917. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  34918. s.ServerSideEncryption = &v
  34919. return s
  34920. }
  34921. type UploadPartInput struct {
  34922. _ struct{} `locationName:"UploadPartRequest" type:"structure" payload:"Body"`
  34923. // Object data.
  34924. Body io.ReadSeeker `type:"blob"`
  34925. // The name of the bucket to which the multipart upload was initiated.
  34926. //
  34927. // When using this action with an access point, you must direct requests to
  34928. // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
  34929. // When using this action with an access point through the Amazon Web Services
  34930. // SDKs, you provide the access point ARN in place of the bucket name. For more
  34931. // information about access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
  34932. // in the Amazon S3 User Guide.
  34933. //
  34934. // When using this action with Amazon S3 on Outposts, you must direct requests
  34935. // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
  34936. // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
  34937. // using this action with S3 on Outposts through the Amazon Web Services SDKs,
  34938. // you provide the Outposts bucket ARN in place of the bucket name. For more
  34939. // information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
  34940. // in the Amazon S3 User Guide.
  34941. //
  34942. // Bucket is a required field
  34943. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  34944. // Indicates the algorithm used to create the checksum for the object when using
  34945. // the SDK. This header will not provide any additional functionality if not
  34946. // using the SDK. When sending this header, there must be a corresponding x-amz-checksum
  34947. // or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with
  34948. // the HTTP status code 400 Bad Request. For more information, see Checking
  34949. // object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  34950. // in the Amazon S3 User Guide.
  34951. //
  34952. // If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
  34953. // parameter.
  34954. //
  34955. // This checksum algorithm must be the same for all parts and it match the checksum
  34956. // value supplied in the CreateMultipartUpload request.
  34957. //
  34958. // The AWS SDK for Go v1 does not support automatic computing request payload
  34959. // checksum. This feature is available in the AWS SDK for Go v2. If a value
  34960. // is specified for this parameter, the matching algorithm's checksum member
  34961. // must be populated with the algorithm's checksum of the request payload.
  34962. ChecksumAlgorithm *string `location:"header" locationName:"x-amz-sdk-checksum-algorithm" type:"string" enum:"ChecksumAlgorithm"`
  34963. // This header can be used as a data integrity check to verify that the data
  34964. // received is the same data that was originally sent. This header specifies
  34965. // the base64-encoded, 32-bit CRC32 checksum of the object. For more information,
  34966. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  34967. // in the Amazon S3 User Guide.
  34968. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  34969. // This header can be used as a data integrity check to verify that the data
  34970. // received is the same data that was originally sent. This header specifies
  34971. // the base64-encoded, 32-bit CRC32C checksum of the object. For more information,
  34972. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  34973. // in the Amazon S3 User Guide.
  34974. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  34975. // This header can be used as a data integrity check to verify that the data
  34976. // received is the same data that was originally sent. This header specifies
  34977. // the base64-encoded, 160-bit SHA-1 digest of the object. For more information,
  34978. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  34979. // in the Amazon S3 User Guide.
  34980. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  34981. // This header can be used as a data integrity check to verify that the data
  34982. // received is the same data that was originally sent. This header specifies
  34983. // the base64-encoded, 256-bit SHA-256 digest of the object. For more information,
  34984. // see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  34985. // in the Amazon S3 User Guide.
  34986. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  34987. // Size of the body in bytes. This parameter is useful when the size of the
  34988. // body cannot be determined automatically.
  34989. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  34990. // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
  34991. // auto-populated when using the command from the CLI. This parameter is required
  34992. // if object lock parameters are specified.
  34993. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  34994. // The account ID of the expected bucket owner. If the bucket is owned by a
  34995. // different account, the request fails with the HTTP status code 403 Forbidden
  34996. // (access denied).
  34997. ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
  34998. // Object key for which the multipart upload was initiated.
  34999. //
  35000. // Key is a required field
  35001. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  35002. // Part number of part being uploaded. This is a positive integer between 1
  35003. // and 10,000.
  35004. //
  35005. // PartNumber is a required field
  35006. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  35007. // Confirms that the requester knows that they will be charged for the request.
  35008. // Bucket owners need not specify this parameter in their requests. For information
  35009. // about downloading objects from Requester Pays buckets, see Downloading Objects
  35010. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  35011. // in the Amazon S3 User Guide.
  35012. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  35013. // Specifies the algorithm to use to when encrypting the object (for example,
  35014. // AES256).
  35015. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  35016. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  35017. // data. This value is used to store the object and then it is discarded; Amazon
  35018. // S3 does not store the encryption key. The key must be appropriate for use
  35019. // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
  35020. // header. This must be the same encryption key specified in the initiate multipart
  35021. // upload request.
  35022. //
  35023. // SSECustomerKey is a sensitive parameter and its value will be
  35024. // replaced with "sensitive" in string returned by UploadPartInput's
  35025. // String and GoString methods.
  35026. SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  35027. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  35028. // Amazon S3 uses this header for a message integrity check to ensure that the
  35029. // encryption key was transmitted without error.
  35030. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  35031. // Upload ID identifying the multipart upload whose part is being uploaded.
  35032. //
  35033. // UploadId is a required field
  35034. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  35035. }
  35036. // String returns the string representation.
  35037. //
  35038. // API parameter values that are decorated as "sensitive" in the API will not
  35039. // be included in the string output. The member name will be present, but the
  35040. // value will be replaced with "sensitive".
  35041. func (s UploadPartInput) String() string {
  35042. return awsutil.Prettify(s)
  35043. }
  35044. // GoString returns the string representation.
  35045. //
  35046. // API parameter values that are decorated as "sensitive" in the API will not
  35047. // be included in the string output. The member name will be present, but the
  35048. // value will be replaced with "sensitive".
  35049. func (s UploadPartInput) GoString() string {
  35050. return s.String()
  35051. }
  35052. // Validate inspects the fields of the type to determine if they are valid.
  35053. func (s *UploadPartInput) Validate() error {
  35054. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  35055. if s.Bucket == nil {
  35056. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  35057. }
  35058. if s.Bucket != nil && len(*s.Bucket) < 1 {
  35059. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  35060. }
  35061. if s.Key == nil {
  35062. invalidParams.Add(request.NewErrParamRequired("Key"))
  35063. }
  35064. if s.Key != nil && len(*s.Key) < 1 {
  35065. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  35066. }
  35067. if s.PartNumber == nil {
  35068. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  35069. }
  35070. if s.UploadId == nil {
  35071. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  35072. }
  35073. if invalidParams.Len() > 0 {
  35074. return invalidParams
  35075. }
  35076. return nil
  35077. }
  35078. // SetBody sets the Body field's value.
  35079. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  35080. s.Body = v
  35081. return s
  35082. }
  35083. // SetBucket sets the Bucket field's value.
  35084. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  35085. s.Bucket = &v
  35086. return s
  35087. }
  35088. func (s *UploadPartInput) getBucket() (v string) {
  35089. if s.Bucket == nil {
  35090. return v
  35091. }
  35092. return *s.Bucket
  35093. }
  35094. // SetChecksumAlgorithm sets the ChecksumAlgorithm field's value.
  35095. func (s *UploadPartInput) SetChecksumAlgorithm(v string) *UploadPartInput {
  35096. s.ChecksumAlgorithm = &v
  35097. return s
  35098. }
  35099. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  35100. func (s *UploadPartInput) SetChecksumCRC32(v string) *UploadPartInput {
  35101. s.ChecksumCRC32 = &v
  35102. return s
  35103. }
  35104. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  35105. func (s *UploadPartInput) SetChecksumCRC32C(v string) *UploadPartInput {
  35106. s.ChecksumCRC32C = &v
  35107. return s
  35108. }
  35109. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  35110. func (s *UploadPartInput) SetChecksumSHA1(v string) *UploadPartInput {
  35111. s.ChecksumSHA1 = &v
  35112. return s
  35113. }
  35114. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  35115. func (s *UploadPartInput) SetChecksumSHA256(v string) *UploadPartInput {
  35116. s.ChecksumSHA256 = &v
  35117. return s
  35118. }
  35119. // SetContentLength sets the ContentLength field's value.
  35120. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  35121. s.ContentLength = &v
  35122. return s
  35123. }
  35124. // SetContentMD5 sets the ContentMD5 field's value.
  35125. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  35126. s.ContentMD5 = &v
  35127. return s
  35128. }
  35129. // SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
  35130. func (s *UploadPartInput) SetExpectedBucketOwner(v string) *UploadPartInput {
  35131. s.ExpectedBucketOwner = &v
  35132. return s
  35133. }
  35134. // SetKey sets the Key field's value.
  35135. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  35136. s.Key = &v
  35137. return s
  35138. }
  35139. // SetPartNumber sets the PartNumber field's value.
  35140. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  35141. s.PartNumber = &v
  35142. return s
  35143. }
  35144. // SetRequestPayer sets the RequestPayer field's value.
  35145. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  35146. s.RequestPayer = &v
  35147. return s
  35148. }
  35149. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  35150. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  35151. s.SSECustomerAlgorithm = &v
  35152. return s
  35153. }
  35154. // SetSSECustomerKey sets the SSECustomerKey field's value.
  35155. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  35156. s.SSECustomerKey = &v
  35157. return s
  35158. }
  35159. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  35160. if s.SSECustomerKey == nil {
  35161. return v
  35162. }
  35163. return *s.SSECustomerKey
  35164. }
  35165. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  35166. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  35167. s.SSECustomerKeyMD5 = &v
  35168. return s
  35169. }
  35170. // SetUploadId sets the UploadId field's value.
  35171. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  35172. s.UploadId = &v
  35173. return s
  35174. }
  35175. func (s *UploadPartInput) getEndpointARN() (arn.Resource, error) {
  35176. if s.Bucket == nil {
  35177. return nil, fmt.Errorf("member Bucket is nil")
  35178. }
  35179. return parseEndpointARN(*s.Bucket)
  35180. }
  35181. func (s *UploadPartInput) hasEndpointARN() bool {
  35182. if s.Bucket == nil {
  35183. return false
  35184. }
  35185. return arn.IsARN(*s.Bucket)
  35186. }
  35187. // updateArnableField updates the value of the input field that
  35188. // takes an ARN as an input. This method is useful to backfill
  35189. // the parsed resource name from ARN into the input member.
  35190. // It returns a pointer to a modified copy of input and an error.
  35191. // Note that original input is not modified.
  35192. func (s UploadPartInput) updateArnableField(v string) (interface{}, error) {
  35193. if s.Bucket == nil {
  35194. return nil, fmt.Errorf("member Bucket is nil")
  35195. }
  35196. s.Bucket = aws.String(v)
  35197. return &s, nil
  35198. }
  35199. type UploadPartOutput struct {
  35200. _ struct{} `type:"structure"`
  35201. // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
  35202. // encryption with Amazon Web Services KMS (SSE-KMS).
  35203. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  35204. // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be
  35205. // present if it was uploaded with the object. With multipart uploads, this
  35206. // may not be a checksum value of the object. For more information about how
  35207. // checksums are calculated with multipart uploads, see Checking object integrity
  35208. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  35209. // in the Amazon S3 User Guide.
  35210. ChecksumCRC32 *string `location:"header" locationName:"x-amz-checksum-crc32" type:"string"`
  35211. // The base64-encoded, 32-bit CRC32C checksum of the object. This will only
  35212. // be present if it was uploaded with the object. With multipart uploads, this
  35213. // may not be a checksum value of the object. For more information about how
  35214. // checksums are calculated with multipart uploads, see Checking object integrity
  35215. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  35216. // in the Amazon S3 User Guide.
  35217. ChecksumCRC32C *string `location:"header" locationName:"x-amz-checksum-crc32c" type:"string"`
  35218. // The base64-encoded, 160-bit SHA-1 digest of the object. This will only be
  35219. // present if it was uploaded with the object. With multipart uploads, this
  35220. // may not be a checksum value of the object. For more information about how
  35221. // checksums are calculated with multipart uploads, see Checking object integrity
  35222. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  35223. // in the Amazon S3 User Guide.
  35224. ChecksumSHA1 *string `location:"header" locationName:"x-amz-checksum-sha1" type:"string"`
  35225. // The base64-encoded, 256-bit SHA-256 digest of the object. This will only
  35226. // be present if it was uploaded with the object. With multipart uploads, this
  35227. // may not be a checksum value of the object. For more information about how
  35228. // checksums are calculated with multipart uploads, see Checking object integrity
  35229. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums)
  35230. // in the Amazon S3 User Guide.
  35231. ChecksumSHA256 *string `location:"header" locationName:"x-amz-checksum-sha256" type:"string"`
  35232. // Entity tag for the uploaded object.
  35233. ETag *string `location:"header" locationName:"ETag" type:"string"`
  35234. // If present, indicates that the requester was successfully charged for the
  35235. // request.
  35236. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  35237. // If server-side encryption with a customer-provided encryption key was requested,
  35238. // the response will include this header confirming the encryption algorithm
  35239. // used.
  35240. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  35241. // If server-side encryption with a customer-provided encryption key was requested,
  35242. // the response will include this header to provide round-trip message integrity
  35243. // verification of the customer-provided encryption key.
  35244. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  35245. // If present, specifies the ID of the Amazon Web Services Key Management Service
  35246. // (Amazon Web Services KMS) symmetric customer managed key was used for the
  35247. // object.
  35248. //
  35249. // SSEKMSKeyId is a sensitive parameter and its value will be
  35250. // replaced with "sensitive" in string returned by UploadPartOutput's
  35251. // String and GoString methods.
  35252. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  35253. // The server-side encryption algorithm used when storing this object in Amazon
  35254. // S3 (for example, AES256, aws:kms).
  35255. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  35256. }
  35257. // String returns the string representation.
  35258. //
  35259. // API parameter values that are decorated as "sensitive" in the API will not
  35260. // be included in the string output. The member name will be present, but the
  35261. // value will be replaced with "sensitive".
  35262. func (s UploadPartOutput) String() string {
  35263. return awsutil.Prettify(s)
  35264. }
  35265. // GoString returns the string representation.
  35266. //
  35267. // API parameter values that are decorated as "sensitive" in the API will not
  35268. // be included in the string output. The member name will be present, but the
  35269. // value will be replaced with "sensitive".
  35270. func (s UploadPartOutput) GoString() string {
  35271. return s.String()
  35272. }
  35273. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  35274. func (s *UploadPartOutput) SetBucketKeyEnabled(v bool) *UploadPartOutput {
  35275. s.BucketKeyEnabled = &v
  35276. return s
  35277. }
  35278. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  35279. func (s *UploadPartOutput) SetChecksumCRC32(v string) *UploadPartOutput {
  35280. s.ChecksumCRC32 = &v
  35281. return s
  35282. }
  35283. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  35284. func (s *UploadPartOutput) SetChecksumCRC32C(v string) *UploadPartOutput {
  35285. s.ChecksumCRC32C = &v
  35286. return s
  35287. }
  35288. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  35289. func (s *UploadPartOutput) SetChecksumSHA1(v string) *UploadPartOutput {
  35290. s.ChecksumSHA1 = &v
  35291. return s
  35292. }
  35293. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  35294. func (s *UploadPartOutput) SetChecksumSHA256(v string) *UploadPartOutput {
  35295. s.ChecksumSHA256 = &v
  35296. return s
  35297. }
  35298. // SetETag sets the ETag field's value.
  35299. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  35300. s.ETag = &v
  35301. return s
  35302. }
  35303. // SetRequestCharged sets the RequestCharged field's value.
  35304. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  35305. s.RequestCharged = &v
  35306. return s
  35307. }
  35308. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  35309. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  35310. s.SSECustomerAlgorithm = &v
  35311. return s
  35312. }
  35313. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  35314. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  35315. s.SSECustomerKeyMD5 = &v
  35316. return s
  35317. }
  35318. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  35319. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  35320. s.SSEKMSKeyId = &v
  35321. return s
  35322. }
  35323. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  35324. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  35325. s.ServerSideEncryption = &v
  35326. return s
  35327. }
  35328. // Describes the versioning state of an Amazon S3 bucket. For more information,
  35329. // see PUT Bucket versioning (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html)
  35330. // in the Amazon S3 API Reference.
  35331. type VersioningConfiguration struct {
  35332. _ struct{} `type:"structure"`
  35333. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  35334. // This element is only returned if the bucket has been configured with MFA
  35335. // delete. If the bucket has never been so configured, this element is not returned.
  35336. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  35337. // The versioning state of the bucket.
  35338. Status *string `type:"string" enum:"BucketVersioningStatus"`
  35339. }
  35340. // String returns the string representation.
  35341. //
  35342. // API parameter values that are decorated as "sensitive" in the API will not
  35343. // be included in the string output. The member name will be present, but the
  35344. // value will be replaced with "sensitive".
  35345. func (s VersioningConfiguration) String() string {
  35346. return awsutil.Prettify(s)
  35347. }
  35348. // GoString returns the string representation.
  35349. //
  35350. // API parameter values that are decorated as "sensitive" in the API will not
  35351. // be included in the string output. The member name will be present, but the
  35352. // value will be replaced with "sensitive".
  35353. func (s VersioningConfiguration) GoString() string {
  35354. return s.String()
  35355. }
  35356. // SetMFADelete sets the MFADelete field's value.
  35357. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  35358. s.MFADelete = &v
  35359. return s
  35360. }
  35361. // SetStatus sets the Status field's value.
  35362. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  35363. s.Status = &v
  35364. return s
  35365. }
  35366. // Specifies website configuration parameters for an Amazon S3 bucket.
  35367. type WebsiteConfiguration struct {
  35368. _ struct{} `type:"structure"`
  35369. // The name of the error document for the website.
  35370. ErrorDocument *ErrorDocument `type:"structure"`
  35371. // The name of the index document for the website.
  35372. IndexDocument *IndexDocument `type:"structure"`
  35373. // The redirect behavior for every request to this bucket's website endpoint.
  35374. //
  35375. // If you specify this property, you can't specify any other property.
  35376. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  35377. // Rules that define when a redirect is applied and the redirect behavior.
  35378. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  35379. }
  35380. // String returns the string representation.
  35381. //
  35382. // API parameter values that are decorated as "sensitive" in the API will not
  35383. // be included in the string output. The member name will be present, but the
  35384. // value will be replaced with "sensitive".
  35385. func (s WebsiteConfiguration) String() string {
  35386. return awsutil.Prettify(s)
  35387. }
  35388. // GoString returns the string representation.
  35389. //
  35390. // API parameter values that are decorated as "sensitive" in the API will not
  35391. // be included in the string output. The member name will be present, but the
  35392. // value will be replaced with "sensitive".
  35393. func (s WebsiteConfiguration) GoString() string {
  35394. return s.String()
  35395. }
  35396. // Validate inspects the fields of the type to determine if they are valid.
  35397. func (s *WebsiteConfiguration) Validate() error {
  35398. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  35399. if s.ErrorDocument != nil {
  35400. if err := s.ErrorDocument.Validate(); err != nil {
  35401. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  35402. }
  35403. }
  35404. if s.IndexDocument != nil {
  35405. if err := s.IndexDocument.Validate(); err != nil {
  35406. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  35407. }
  35408. }
  35409. if s.RedirectAllRequestsTo != nil {
  35410. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  35411. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  35412. }
  35413. }
  35414. if s.RoutingRules != nil {
  35415. for i, v := range s.RoutingRules {
  35416. if v == nil {
  35417. continue
  35418. }
  35419. if err := v.Validate(); err != nil {
  35420. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  35421. }
  35422. }
  35423. }
  35424. if invalidParams.Len() > 0 {
  35425. return invalidParams
  35426. }
  35427. return nil
  35428. }
  35429. // SetErrorDocument sets the ErrorDocument field's value.
  35430. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  35431. s.ErrorDocument = v
  35432. return s
  35433. }
  35434. // SetIndexDocument sets the IndexDocument field's value.
  35435. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  35436. s.IndexDocument = v
  35437. return s
  35438. }
  35439. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  35440. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  35441. s.RedirectAllRequestsTo = v
  35442. return s
  35443. }
  35444. // SetRoutingRules sets the RoutingRules field's value.
  35445. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  35446. s.RoutingRules = v
  35447. return s
  35448. }
  35449. type WriteGetObjectResponseInput struct {
  35450. _ struct{} `locationName:"WriteGetObjectResponseRequest" type:"structure" payload:"Body"`
  35451. // Indicates that a range of bytes was specified.
  35452. AcceptRanges *string `location:"header" locationName:"x-amz-fwd-header-accept-ranges" type:"string"`
  35453. // The object data.
  35454. //
  35455. // To use an non-seekable io.Reader for this request wrap the io.Reader with
  35456. // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable
  35457. // readers. This will allow the SDK to send the reader's payload as chunked
  35458. // transfer encoding.
  35459. Body io.ReadSeeker `type:"blob"`
  35460. // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for
  35461. // server-side encryption with Amazon Web Services KMS (SSE-KMS).
  35462. BucketKeyEnabled *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
  35463. // Specifies caching behavior along the request/reply chain.
  35464. CacheControl *string `location:"header" locationName:"x-amz-fwd-header-Cache-Control" type:"string"`
  35465. // This header can be used as a data integrity check to verify that the data
  35466. // received is the same data that was originally sent. This specifies the base64-encoded,
  35467. // 32-bit CRC32 checksum of the object returned by the Object Lambda function.
  35468. // This may not match the checksum for the object stored in Amazon S3. Amazon
  35469. // S3 will perform validation of the checksum values only when the original
  35470. // GetObject request required checksum validation. For more information about
  35471. // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  35472. // in the Amazon S3 User Guide.
  35473. //
  35474. // Only one checksum header can be specified at a time. If you supply multiple
  35475. // checksum headers, this request will fail.
  35476. ChecksumCRC32 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32" type:"string"`
  35477. // This header can be used as a data integrity check to verify that the data
  35478. // received is the same data that was originally sent. This specifies the base64-encoded,
  35479. // 32-bit CRC32C checksum of the object returned by the Object Lambda function.
  35480. // This may not match the checksum for the object stored in Amazon S3. Amazon
  35481. // S3 will perform validation of the checksum values only when the original
  35482. // GetObject request required checksum validation. For more information about
  35483. // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  35484. // in the Amazon S3 User Guide.
  35485. //
  35486. // Only one checksum header can be specified at a time. If you supply multiple
  35487. // checksum headers, this request will fail.
  35488. ChecksumCRC32C *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-crc32c" type:"string"`
  35489. // This header can be used as a data integrity check to verify that the data
  35490. // received is the same data that was originally sent. This specifies the base64-encoded,
  35491. // 160-bit SHA-1 digest of the object returned by the Object Lambda function.
  35492. // This may not match the checksum for the object stored in Amazon S3. Amazon
  35493. // S3 will perform validation of the checksum values only when the original
  35494. // GetObject request required checksum validation. For more information about
  35495. // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  35496. // in the Amazon S3 User Guide.
  35497. //
  35498. // Only one checksum header can be specified at a time. If you supply multiple
  35499. // checksum headers, this request will fail.
  35500. ChecksumSHA1 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha1" type:"string"`
  35501. // This header can be used as a data integrity check to verify that the data
  35502. // received is the same data that was originally sent. This specifies the base64-encoded,
  35503. // 256-bit SHA-256 digest of the object returned by the Object Lambda function.
  35504. // This may not match the checksum for the object stored in Amazon S3. Amazon
  35505. // S3 will perform validation of the checksum values only when the original
  35506. // GetObject request required checksum validation. For more information about
  35507. // checksums, see Checking object integrity (https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html)
  35508. // in the Amazon S3 User Guide.
  35509. //
  35510. // Only one checksum header can be specified at a time. If you supply multiple
  35511. // checksum headers, this request will fail.
  35512. ChecksumSHA256 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-checksum-sha256" type:"string"`
  35513. // Specifies presentational information for the object.
  35514. ContentDisposition *string `location:"header" locationName:"x-amz-fwd-header-Content-Disposition" type:"string"`
  35515. // Specifies what content encodings have been applied to the object and thus
  35516. // what decoding mechanisms must be applied to obtain the media-type referenced
  35517. // by the Content-Type header field.
  35518. ContentEncoding *string `location:"header" locationName:"x-amz-fwd-header-Content-Encoding" type:"string"`
  35519. // The language the content is in.
  35520. ContentLanguage *string `location:"header" locationName:"x-amz-fwd-header-Content-Language" type:"string"`
  35521. // The size of the content body in bytes.
  35522. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  35523. // The portion of the object returned in the response.
  35524. ContentRange *string `location:"header" locationName:"x-amz-fwd-header-Content-Range" type:"string"`
  35525. // A standard MIME type describing the format of the object data.
  35526. ContentType *string `location:"header" locationName:"x-amz-fwd-header-Content-Type" type:"string"`
  35527. // Specifies whether an object stored in Amazon S3 is (true) or is not (false)
  35528. // a delete marker.
  35529. DeleteMarker *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-delete-marker" type:"boolean"`
  35530. // An opaque identifier assigned by a web server to a specific version of a
  35531. // resource found at a URL.
  35532. ETag *string `location:"header" locationName:"x-amz-fwd-header-ETag" type:"string"`
  35533. // A string that uniquely identifies an error condition. Returned in the <Code>
  35534. // tag of the error XML response for a corresponding GetObject call. Cannot
  35535. // be used with a successful StatusCode header or when the transformed object
  35536. // is provided in the body. All error codes from S3 are sentence-cased. The
  35537. // regular expression (regex) value is "^[A-Z][a-zA-Z]+$".
  35538. ErrorCode *string `location:"header" locationName:"x-amz-fwd-error-code" type:"string"`
  35539. // Contains a generic description of the error condition. Returned in the <Message>
  35540. // tag of the error XML response for a corresponding GetObject call. Cannot
  35541. // be used with a successful StatusCode header or when the transformed object
  35542. // is provided in body.
  35543. ErrorMessage *string `location:"header" locationName:"x-amz-fwd-error-message" type:"string"`
  35544. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  35545. // includes this header. It includes the expiry-date and rule-id key-value pairs
  35546. // that provide the object expiration information. The value of the rule-id
  35547. // is URL-encoded.
  35548. Expiration *string `location:"header" locationName:"x-amz-fwd-header-x-amz-expiration" type:"string"`
  35549. // The date and time at which the object is no longer cacheable.
  35550. Expires *time.Time `location:"header" locationName:"x-amz-fwd-header-Expires" type:"timestamp"`
  35551. // The date and time that the object was last modified.
  35552. LastModified *time.Time `location:"header" locationName:"x-amz-fwd-header-Last-Modified" type:"timestamp"`
  35553. // A map of metadata to store with the object in S3.
  35554. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  35555. // Set to the number of metadata entries not returned in x-amz-meta headers.
  35556. // This can happen if you create metadata using an API like SOAP that supports
  35557. // more flexible metadata than the REST API. For example, using SOAP, you can
  35558. // create metadata whose values are not legal HTTP headers.
  35559. MissingMeta *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-missing-meta" type:"integer"`
  35560. // Indicates whether an object stored in Amazon S3 has an active legal hold.
  35561. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  35562. // Indicates whether an object stored in Amazon S3 has Object Lock enabled.
  35563. // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
  35564. ObjectLockMode *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  35565. // The date and time when Object Lock is configured to expire.
  35566. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  35567. // The count of parts this object has.
  35568. PartsCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-mp-parts-count" type:"integer"`
  35569. // Indicates if request involves bucket that is either a source or destination
  35570. // in a Replication rule. For more information about S3 Replication, see Replication
  35571. // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html).
  35572. ReplicationStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  35573. // If present, indicates that the requester was successfully charged for the
  35574. // request.
  35575. RequestCharged *string `location:"header" locationName:"x-amz-fwd-header-x-amz-request-charged" type:"string" enum:"RequestCharged"`
  35576. // Route prefix to the HTTP URL generated.
  35577. //
  35578. // RequestRoute is a required field
  35579. RequestRoute *string `location:"header" locationName:"x-amz-request-route" type:"string" required:"true"`
  35580. // A single use encrypted token that maps WriteGetObjectResponse to the end
  35581. // user GetObject request.
  35582. //
  35583. // RequestToken is a required field
  35584. RequestToken *string `location:"header" locationName:"x-amz-request-token" type:"string" required:"true"`
  35585. // Provides information about object restoration operation and expiration time
  35586. // of the restored object copy.
  35587. Restore *string `location:"header" locationName:"x-amz-fwd-header-x-amz-restore" type:"string"`
  35588. // Encryption algorithm used if server-side encryption with a customer-provided
  35589. // encryption key was specified for object stored in Amazon S3.
  35590. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" type:"string"`
  35591. // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3
  35592. // to encrypt data stored in S3. For more information, see Protecting data using
  35593. // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
  35594. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  35595. // If present, specifies the ID of the Amazon Web Services Key Management Service
  35596. // (Amazon Web Services KMS) symmetric customer managed key that was used for
  35597. // stored in Amazon S3 object.
  35598. //
  35599. // SSEKMSKeyId is a sensitive parameter and its value will be
  35600. // replaced with "sensitive" in string returned by WriteGetObjectResponseInput's
  35601. // String and GoString methods.
  35602. SSEKMSKeyId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  35603. // The server-side encryption algorithm used when storing requested object in
  35604. // Amazon S3 (for example, AES256, aws:kms).
  35605. ServerSideEncryption *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  35606. // The integer status code for an HTTP response of a corresponding GetObject
  35607. // request.
  35608. //
  35609. // Status Codes
  35610. //
  35611. // * 200 - OK
  35612. //
  35613. // * 206 - Partial Content
  35614. //
  35615. // * 304 - Not Modified
  35616. //
  35617. // * 400 - Bad Request
  35618. //
  35619. // * 401 - Unauthorized
  35620. //
  35621. // * 403 - Forbidden
  35622. //
  35623. // * 404 - Not Found
  35624. //
  35625. // * 405 - Method Not Allowed
  35626. //
  35627. // * 409 - Conflict
  35628. //
  35629. // * 411 - Length Required
  35630. //
  35631. // * 412 - Precondition Failed
  35632. //
  35633. // * 416 - Range Not Satisfiable
  35634. //
  35635. // * 500 - Internal Server Error
  35636. //
  35637. // * 503 - Service Unavailable
  35638. StatusCode *int64 `location:"header" locationName:"x-amz-fwd-status" type:"integer"`
  35639. // Provides storage class information of the object. Amazon S3 returns this
  35640. // header for all objects except for S3 Standard storage class objects.
  35641. //
  35642. // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
  35643. StorageClass *string `location:"header" locationName:"x-amz-fwd-header-x-amz-storage-class" type:"string" enum:"StorageClass"`
  35644. // The number of tags, if any, on the object.
  35645. TagCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-tagging-count" type:"integer"`
  35646. // An ID used to reference a specific version of the object.
  35647. VersionId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-version-id" type:"string"`
  35648. }
  35649. // String returns the string representation.
  35650. //
  35651. // API parameter values that are decorated as "sensitive" in the API will not
  35652. // be included in the string output. The member name will be present, but the
  35653. // value will be replaced with "sensitive".
  35654. func (s WriteGetObjectResponseInput) String() string {
  35655. return awsutil.Prettify(s)
  35656. }
  35657. // GoString returns the string representation.
  35658. //
  35659. // API parameter values that are decorated as "sensitive" in the API will not
  35660. // be included in the string output. The member name will be present, but the
  35661. // value will be replaced with "sensitive".
  35662. func (s WriteGetObjectResponseInput) GoString() string {
  35663. return s.String()
  35664. }
  35665. // Validate inspects the fields of the type to determine if they are valid.
  35666. func (s *WriteGetObjectResponseInput) Validate() error {
  35667. invalidParams := request.ErrInvalidParams{Context: "WriteGetObjectResponseInput"}
  35668. if s.RequestRoute == nil {
  35669. invalidParams.Add(request.NewErrParamRequired("RequestRoute"))
  35670. }
  35671. if s.RequestRoute != nil && len(*s.RequestRoute) < 1 {
  35672. invalidParams.Add(request.NewErrParamMinLen("RequestRoute", 1))
  35673. }
  35674. if s.RequestToken == nil {
  35675. invalidParams.Add(request.NewErrParamRequired("RequestToken"))
  35676. }
  35677. if invalidParams.Len() > 0 {
  35678. return invalidParams
  35679. }
  35680. return nil
  35681. }
  35682. // SetAcceptRanges sets the AcceptRanges field's value.
  35683. func (s *WriteGetObjectResponseInput) SetAcceptRanges(v string) *WriteGetObjectResponseInput {
  35684. s.AcceptRanges = &v
  35685. return s
  35686. }
  35687. // SetBody sets the Body field's value.
  35688. func (s *WriteGetObjectResponseInput) SetBody(v io.ReadSeeker) *WriteGetObjectResponseInput {
  35689. s.Body = v
  35690. return s
  35691. }
  35692. // SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
  35693. func (s *WriteGetObjectResponseInput) SetBucketKeyEnabled(v bool) *WriteGetObjectResponseInput {
  35694. s.BucketKeyEnabled = &v
  35695. return s
  35696. }
  35697. // SetCacheControl sets the CacheControl field's value.
  35698. func (s *WriteGetObjectResponseInput) SetCacheControl(v string) *WriteGetObjectResponseInput {
  35699. s.CacheControl = &v
  35700. return s
  35701. }
  35702. // SetChecksumCRC32 sets the ChecksumCRC32 field's value.
  35703. func (s *WriteGetObjectResponseInput) SetChecksumCRC32(v string) *WriteGetObjectResponseInput {
  35704. s.ChecksumCRC32 = &v
  35705. return s
  35706. }
  35707. // SetChecksumCRC32C sets the ChecksumCRC32C field's value.
  35708. func (s *WriteGetObjectResponseInput) SetChecksumCRC32C(v string) *WriteGetObjectResponseInput {
  35709. s.ChecksumCRC32C = &v
  35710. return s
  35711. }
  35712. // SetChecksumSHA1 sets the ChecksumSHA1 field's value.
  35713. func (s *WriteGetObjectResponseInput) SetChecksumSHA1(v string) *WriteGetObjectResponseInput {
  35714. s.ChecksumSHA1 = &v
  35715. return s
  35716. }
  35717. // SetChecksumSHA256 sets the ChecksumSHA256 field's value.
  35718. func (s *WriteGetObjectResponseInput) SetChecksumSHA256(v string) *WriteGetObjectResponseInput {
  35719. s.ChecksumSHA256 = &v
  35720. return s
  35721. }
  35722. // SetContentDisposition sets the ContentDisposition field's value.
  35723. func (s *WriteGetObjectResponseInput) SetContentDisposition(v string) *WriteGetObjectResponseInput {
  35724. s.ContentDisposition = &v
  35725. return s
  35726. }
  35727. // SetContentEncoding sets the ContentEncoding field's value.
  35728. func (s *WriteGetObjectResponseInput) SetContentEncoding(v string) *WriteGetObjectResponseInput {
  35729. s.ContentEncoding = &v
  35730. return s
  35731. }
  35732. // SetContentLanguage sets the ContentLanguage field's value.
  35733. func (s *WriteGetObjectResponseInput) SetContentLanguage(v string) *WriteGetObjectResponseInput {
  35734. s.ContentLanguage = &v
  35735. return s
  35736. }
  35737. // SetContentLength sets the ContentLength field's value.
  35738. func (s *WriteGetObjectResponseInput) SetContentLength(v int64) *WriteGetObjectResponseInput {
  35739. s.ContentLength = &v
  35740. return s
  35741. }
  35742. // SetContentRange sets the ContentRange field's value.
  35743. func (s *WriteGetObjectResponseInput) SetContentRange(v string) *WriteGetObjectResponseInput {
  35744. s.ContentRange = &v
  35745. return s
  35746. }
  35747. // SetContentType sets the ContentType field's value.
  35748. func (s *WriteGetObjectResponseInput) SetContentType(v string) *WriteGetObjectResponseInput {
  35749. s.ContentType = &v
  35750. return s
  35751. }
  35752. // SetDeleteMarker sets the DeleteMarker field's value.
  35753. func (s *WriteGetObjectResponseInput) SetDeleteMarker(v bool) *WriteGetObjectResponseInput {
  35754. s.DeleteMarker = &v
  35755. return s
  35756. }
  35757. // SetETag sets the ETag field's value.
  35758. func (s *WriteGetObjectResponseInput) SetETag(v string) *WriteGetObjectResponseInput {
  35759. s.ETag = &v
  35760. return s
  35761. }
  35762. // SetErrorCode sets the ErrorCode field's value.
  35763. func (s *WriteGetObjectResponseInput) SetErrorCode(v string) *WriteGetObjectResponseInput {
  35764. s.ErrorCode = &v
  35765. return s
  35766. }
  35767. // SetErrorMessage sets the ErrorMessage field's value.
  35768. func (s *WriteGetObjectResponseInput) SetErrorMessage(v string) *WriteGetObjectResponseInput {
  35769. s.ErrorMessage = &v
  35770. return s
  35771. }
  35772. // SetExpiration sets the Expiration field's value.
  35773. func (s *WriteGetObjectResponseInput) SetExpiration(v string) *WriteGetObjectResponseInput {
  35774. s.Expiration = &v
  35775. return s
  35776. }
  35777. // SetExpires sets the Expires field's value.
  35778. func (s *WriteGetObjectResponseInput) SetExpires(v time.Time) *WriteGetObjectResponseInput {
  35779. s.Expires = &v
  35780. return s
  35781. }
  35782. // SetLastModified sets the LastModified field's value.
  35783. func (s *WriteGetObjectResponseInput) SetLastModified(v time.Time) *WriteGetObjectResponseInput {
  35784. s.LastModified = &v
  35785. return s
  35786. }
  35787. // SetMetadata sets the Metadata field's value.
  35788. func (s *WriteGetObjectResponseInput) SetMetadata(v map[string]*string) *WriteGetObjectResponseInput {
  35789. s.Metadata = v
  35790. return s
  35791. }
  35792. // SetMissingMeta sets the MissingMeta field's value.
  35793. func (s *WriteGetObjectResponseInput) SetMissingMeta(v int64) *WriteGetObjectResponseInput {
  35794. s.MissingMeta = &v
  35795. return s
  35796. }
  35797. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  35798. func (s *WriteGetObjectResponseInput) SetObjectLockLegalHoldStatus(v string) *WriteGetObjectResponseInput {
  35799. s.ObjectLockLegalHoldStatus = &v
  35800. return s
  35801. }
  35802. // SetObjectLockMode sets the ObjectLockMode field's value.
  35803. func (s *WriteGetObjectResponseInput) SetObjectLockMode(v string) *WriteGetObjectResponseInput {
  35804. s.ObjectLockMode = &v
  35805. return s
  35806. }
  35807. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  35808. func (s *WriteGetObjectResponseInput) SetObjectLockRetainUntilDate(v time.Time) *WriteGetObjectResponseInput {
  35809. s.ObjectLockRetainUntilDate = &v
  35810. return s
  35811. }
  35812. // SetPartsCount sets the PartsCount field's value.
  35813. func (s *WriteGetObjectResponseInput) SetPartsCount(v int64) *WriteGetObjectResponseInput {
  35814. s.PartsCount = &v
  35815. return s
  35816. }
  35817. // SetReplicationStatus sets the ReplicationStatus field's value.
  35818. func (s *WriteGetObjectResponseInput) SetReplicationStatus(v string) *WriteGetObjectResponseInput {
  35819. s.ReplicationStatus = &v
  35820. return s
  35821. }
  35822. // SetRequestCharged sets the RequestCharged field's value.
  35823. func (s *WriteGetObjectResponseInput) SetRequestCharged(v string) *WriteGetObjectResponseInput {
  35824. s.RequestCharged = &v
  35825. return s
  35826. }
  35827. // SetRequestRoute sets the RequestRoute field's value.
  35828. func (s *WriteGetObjectResponseInput) SetRequestRoute(v string) *WriteGetObjectResponseInput {
  35829. s.RequestRoute = &v
  35830. return s
  35831. }
  35832. // SetRequestToken sets the RequestToken field's value.
  35833. func (s *WriteGetObjectResponseInput) SetRequestToken(v string) *WriteGetObjectResponseInput {
  35834. s.RequestToken = &v
  35835. return s
  35836. }
  35837. // SetRestore sets the Restore field's value.
  35838. func (s *WriteGetObjectResponseInput) SetRestore(v string) *WriteGetObjectResponseInput {
  35839. s.Restore = &v
  35840. return s
  35841. }
  35842. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  35843. func (s *WriteGetObjectResponseInput) SetSSECustomerAlgorithm(v string) *WriteGetObjectResponseInput {
  35844. s.SSECustomerAlgorithm = &v
  35845. return s
  35846. }
  35847. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  35848. func (s *WriteGetObjectResponseInput) SetSSECustomerKeyMD5(v string) *WriteGetObjectResponseInput {
  35849. s.SSECustomerKeyMD5 = &v
  35850. return s
  35851. }
  35852. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  35853. func (s *WriteGetObjectResponseInput) SetSSEKMSKeyId(v string) *WriteGetObjectResponseInput {
  35854. s.SSEKMSKeyId = &v
  35855. return s
  35856. }
  35857. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  35858. func (s *WriteGetObjectResponseInput) SetServerSideEncryption(v string) *WriteGetObjectResponseInput {
  35859. s.ServerSideEncryption = &v
  35860. return s
  35861. }
  35862. // SetStatusCode sets the StatusCode field's value.
  35863. func (s *WriteGetObjectResponseInput) SetStatusCode(v int64) *WriteGetObjectResponseInput {
  35864. s.StatusCode = &v
  35865. return s
  35866. }
  35867. // SetStorageClass sets the StorageClass field's value.
  35868. func (s *WriteGetObjectResponseInput) SetStorageClass(v string) *WriteGetObjectResponseInput {
  35869. s.StorageClass = &v
  35870. return s
  35871. }
  35872. // SetTagCount sets the TagCount field's value.
  35873. func (s *WriteGetObjectResponseInput) SetTagCount(v int64) *WriteGetObjectResponseInput {
  35874. s.TagCount = &v
  35875. return s
  35876. }
  35877. // SetVersionId sets the VersionId field's value.
  35878. func (s *WriteGetObjectResponseInput) SetVersionId(v string) *WriteGetObjectResponseInput {
  35879. s.VersionId = &v
  35880. return s
  35881. }
  35882. func (s *WriteGetObjectResponseInput) hostLabels() map[string]string {
  35883. return map[string]string{
  35884. "RequestRoute": aws.StringValue(s.RequestRoute),
  35885. }
  35886. }
  35887. type WriteGetObjectResponseOutput struct {
  35888. _ struct{} `type:"structure"`
  35889. }
  35890. // String returns the string representation.
  35891. //
  35892. // API parameter values that are decorated as "sensitive" in the API will not
  35893. // be included in the string output. The member name will be present, but the
  35894. // value will be replaced with "sensitive".
  35895. func (s WriteGetObjectResponseOutput) String() string {
  35896. return awsutil.Prettify(s)
  35897. }
  35898. // GoString returns the string representation.
  35899. //
  35900. // API parameter values that are decorated as "sensitive" in the API will not
  35901. // be included in the string output. The member name will be present, but the
  35902. // value will be replaced with "sensitive".
  35903. func (s WriteGetObjectResponseOutput) GoString() string {
  35904. return s.String()
  35905. }
  35906. const (
  35907. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  35908. AnalyticsS3ExportFileFormatCsv = "CSV"
  35909. )
  35910. // AnalyticsS3ExportFileFormat_Values returns all elements of the AnalyticsS3ExportFileFormat enum
  35911. func AnalyticsS3ExportFileFormat_Values() []string {
  35912. return []string{
  35913. AnalyticsS3ExportFileFormatCsv,
  35914. }
  35915. }
  35916. const (
  35917. // ArchiveStatusArchiveAccess is a ArchiveStatus enum value
  35918. ArchiveStatusArchiveAccess = "ARCHIVE_ACCESS"
  35919. // ArchiveStatusDeepArchiveAccess is a ArchiveStatus enum value
  35920. ArchiveStatusDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
  35921. )
  35922. // ArchiveStatus_Values returns all elements of the ArchiveStatus enum
  35923. func ArchiveStatus_Values() []string {
  35924. return []string{
  35925. ArchiveStatusArchiveAccess,
  35926. ArchiveStatusDeepArchiveAccess,
  35927. }
  35928. }
  35929. const (
  35930. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  35931. BucketAccelerateStatusEnabled = "Enabled"
  35932. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  35933. BucketAccelerateStatusSuspended = "Suspended"
  35934. )
  35935. // BucketAccelerateStatus_Values returns all elements of the BucketAccelerateStatus enum
  35936. func BucketAccelerateStatus_Values() []string {
  35937. return []string{
  35938. BucketAccelerateStatusEnabled,
  35939. BucketAccelerateStatusSuspended,
  35940. }
  35941. }
  35942. const (
  35943. // BucketCannedACLPrivate is a BucketCannedACL enum value
  35944. BucketCannedACLPrivate = "private"
  35945. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  35946. BucketCannedACLPublicRead = "public-read"
  35947. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  35948. BucketCannedACLPublicReadWrite = "public-read-write"
  35949. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  35950. BucketCannedACLAuthenticatedRead = "authenticated-read"
  35951. )
  35952. // BucketCannedACL_Values returns all elements of the BucketCannedACL enum
  35953. func BucketCannedACL_Values() []string {
  35954. return []string{
  35955. BucketCannedACLPrivate,
  35956. BucketCannedACLPublicRead,
  35957. BucketCannedACLPublicReadWrite,
  35958. BucketCannedACLAuthenticatedRead,
  35959. }
  35960. }
  35961. const (
  35962. // BucketLocationConstraintAfSouth1 is a BucketLocationConstraint enum value
  35963. BucketLocationConstraintAfSouth1 = "af-south-1"
  35964. // BucketLocationConstraintApEast1 is a BucketLocationConstraint enum value
  35965. BucketLocationConstraintApEast1 = "ap-east-1"
  35966. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  35967. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  35968. // BucketLocationConstraintApNortheast2 is a BucketLocationConstraint enum value
  35969. BucketLocationConstraintApNortheast2 = "ap-northeast-2"
  35970. // BucketLocationConstraintApNortheast3 is a BucketLocationConstraint enum value
  35971. BucketLocationConstraintApNortheast3 = "ap-northeast-3"
  35972. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  35973. BucketLocationConstraintApSouth1 = "ap-south-1"
  35974. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  35975. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  35976. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  35977. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  35978. // BucketLocationConstraintApSoutheast3 is a BucketLocationConstraint enum value
  35979. BucketLocationConstraintApSoutheast3 = "ap-southeast-3"
  35980. // BucketLocationConstraintCaCentral1 is a BucketLocationConstraint enum value
  35981. BucketLocationConstraintCaCentral1 = "ca-central-1"
  35982. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  35983. BucketLocationConstraintCnNorth1 = "cn-north-1"
  35984. // BucketLocationConstraintCnNorthwest1 is a BucketLocationConstraint enum value
  35985. BucketLocationConstraintCnNorthwest1 = "cn-northwest-1"
  35986. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  35987. BucketLocationConstraintEu = "EU"
  35988. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  35989. BucketLocationConstraintEuCentral1 = "eu-central-1"
  35990. // BucketLocationConstraintEuNorth1 is a BucketLocationConstraint enum value
  35991. BucketLocationConstraintEuNorth1 = "eu-north-1"
  35992. // BucketLocationConstraintEuSouth1 is a BucketLocationConstraint enum value
  35993. BucketLocationConstraintEuSouth1 = "eu-south-1"
  35994. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  35995. BucketLocationConstraintEuWest1 = "eu-west-1"
  35996. // BucketLocationConstraintEuWest2 is a BucketLocationConstraint enum value
  35997. BucketLocationConstraintEuWest2 = "eu-west-2"
  35998. // BucketLocationConstraintEuWest3 is a BucketLocationConstraint enum value
  35999. BucketLocationConstraintEuWest3 = "eu-west-3"
  36000. // BucketLocationConstraintMeSouth1 is a BucketLocationConstraint enum value
  36001. BucketLocationConstraintMeSouth1 = "me-south-1"
  36002. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  36003. BucketLocationConstraintSaEast1 = "sa-east-1"
  36004. // BucketLocationConstraintUsEast2 is a BucketLocationConstraint enum value
  36005. BucketLocationConstraintUsEast2 = "us-east-2"
  36006. // BucketLocationConstraintUsGovEast1 is a BucketLocationConstraint enum value
  36007. BucketLocationConstraintUsGovEast1 = "us-gov-east-1"
  36008. // BucketLocationConstraintUsGovWest1 is a BucketLocationConstraint enum value
  36009. BucketLocationConstraintUsGovWest1 = "us-gov-west-1"
  36010. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  36011. BucketLocationConstraintUsWest1 = "us-west-1"
  36012. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  36013. BucketLocationConstraintUsWest2 = "us-west-2"
  36014. )
  36015. // BucketLocationConstraint_Values returns all elements of the BucketLocationConstraint enum
  36016. func BucketLocationConstraint_Values() []string {
  36017. return []string{
  36018. BucketLocationConstraintAfSouth1,
  36019. BucketLocationConstraintApEast1,
  36020. BucketLocationConstraintApNortheast1,
  36021. BucketLocationConstraintApNortheast2,
  36022. BucketLocationConstraintApNortheast3,
  36023. BucketLocationConstraintApSouth1,
  36024. BucketLocationConstraintApSoutheast1,
  36025. BucketLocationConstraintApSoutheast2,
  36026. BucketLocationConstraintApSoutheast3,
  36027. BucketLocationConstraintCaCentral1,
  36028. BucketLocationConstraintCnNorth1,
  36029. BucketLocationConstraintCnNorthwest1,
  36030. BucketLocationConstraintEu,
  36031. BucketLocationConstraintEuCentral1,
  36032. BucketLocationConstraintEuNorth1,
  36033. BucketLocationConstraintEuSouth1,
  36034. BucketLocationConstraintEuWest1,
  36035. BucketLocationConstraintEuWest2,
  36036. BucketLocationConstraintEuWest3,
  36037. BucketLocationConstraintMeSouth1,
  36038. BucketLocationConstraintSaEast1,
  36039. BucketLocationConstraintUsEast2,
  36040. BucketLocationConstraintUsGovEast1,
  36041. BucketLocationConstraintUsGovWest1,
  36042. BucketLocationConstraintUsWest1,
  36043. BucketLocationConstraintUsWest2,
  36044. }
  36045. }
  36046. const (
  36047. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  36048. BucketLogsPermissionFullControl = "FULL_CONTROL"
  36049. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  36050. BucketLogsPermissionRead = "READ"
  36051. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  36052. BucketLogsPermissionWrite = "WRITE"
  36053. )
  36054. // BucketLogsPermission_Values returns all elements of the BucketLogsPermission enum
  36055. func BucketLogsPermission_Values() []string {
  36056. return []string{
  36057. BucketLogsPermissionFullControl,
  36058. BucketLogsPermissionRead,
  36059. BucketLogsPermissionWrite,
  36060. }
  36061. }
  36062. const (
  36063. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  36064. BucketVersioningStatusEnabled = "Enabled"
  36065. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  36066. BucketVersioningStatusSuspended = "Suspended"
  36067. )
  36068. // BucketVersioningStatus_Values returns all elements of the BucketVersioningStatus enum
  36069. func BucketVersioningStatus_Values() []string {
  36070. return []string{
  36071. BucketVersioningStatusEnabled,
  36072. BucketVersioningStatusSuspended,
  36073. }
  36074. }
  36075. const (
  36076. // ChecksumAlgorithmCrc32 is a ChecksumAlgorithm enum value
  36077. ChecksumAlgorithmCrc32 = "CRC32"
  36078. // ChecksumAlgorithmCrc32c is a ChecksumAlgorithm enum value
  36079. ChecksumAlgorithmCrc32c = "CRC32C"
  36080. // ChecksumAlgorithmSha1 is a ChecksumAlgorithm enum value
  36081. ChecksumAlgorithmSha1 = "SHA1"
  36082. // ChecksumAlgorithmSha256 is a ChecksumAlgorithm enum value
  36083. ChecksumAlgorithmSha256 = "SHA256"
  36084. )
  36085. // ChecksumAlgorithm_Values returns all elements of the ChecksumAlgorithm enum
  36086. func ChecksumAlgorithm_Values() []string {
  36087. return []string{
  36088. ChecksumAlgorithmCrc32,
  36089. ChecksumAlgorithmCrc32c,
  36090. ChecksumAlgorithmSha1,
  36091. ChecksumAlgorithmSha256,
  36092. }
  36093. }
  36094. const (
  36095. // ChecksumModeEnabled is a ChecksumMode enum value
  36096. ChecksumModeEnabled = "ENABLED"
  36097. )
  36098. // ChecksumMode_Values returns all elements of the ChecksumMode enum
  36099. func ChecksumMode_Values() []string {
  36100. return []string{
  36101. ChecksumModeEnabled,
  36102. }
  36103. }
  36104. const (
  36105. // CompressionTypeNone is a CompressionType enum value
  36106. CompressionTypeNone = "NONE"
  36107. // CompressionTypeGzip is a CompressionType enum value
  36108. CompressionTypeGzip = "GZIP"
  36109. // CompressionTypeBzip2 is a CompressionType enum value
  36110. CompressionTypeBzip2 = "BZIP2"
  36111. )
  36112. // CompressionType_Values returns all elements of the CompressionType enum
  36113. func CompressionType_Values() []string {
  36114. return []string{
  36115. CompressionTypeNone,
  36116. CompressionTypeGzip,
  36117. CompressionTypeBzip2,
  36118. }
  36119. }
  36120. const (
  36121. // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
  36122. DeleteMarkerReplicationStatusEnabled = "Enabled"
  36123. // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
  36124. DeleteMarkerReplicationStatusDisabled = "Disabled"
  36125. )
  36126. // DeleteMarkerReplicationStatus_Values returns all elements of the DeleteMarkerReplicationStatus enum
  36127. func DeleteMarkerReplicationStatus_Values() []string {
  36128. return []string{
  36129. DeleteMarkerReplicationStatusEnabled,
  36130. DeleteMarkerReplicationStatusDisabled,
  36131. }
  36132. }
  36133. // Requests Amazon S3 to encode the object keys in the response and specifies
  36134. // the encoding method to use. An object key may contain any Unicode character;
  36135. // however, XML 1.0 parser cannot parse some characters, such as characters
  36136. // with an ASCII value from 0 to 10. For characters that are not supported in
  36137. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  36138. // keys in the response.
  36139. const (
  36140. // EncodingTypeUrl is a EncodingType enum value
  36141. EncodingTypeUrl = "url"
  36142. )
  36143. // EncodingType_Values returns all elements of the EncodingType enum
  36144. func EncodingType_Values() []string {
  36145. return []string{
  36146. EncodingTypeUrl,
  36147. }
  36148. }
  36149. // The bucket event for which to send notifications.
  36150. const (
  36151. // EventS3ReducedRedundancyLostObject is a Event enum value
  36152. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  36153. // EventS3ObjectCreated is a Event enum value
  36154. EventS3ObjectCreated = "s3:ObjectCreated:*"
  36155. // EventS3ObjectCreatedPut is a Event enum value
  36156. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  36157. // EventS3ObjectCreatedPost is a Event enum value
  36158. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  36159. // EventS3ObjectCreatedCopy is a Event enum value
  36160. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  36161. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  36162. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  36163. // EventS3ObjectRemoved is a Event enum value
  36164. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  36165. // EventS3ObjectRemovedDelete is a Event enum value
  36166. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  36167. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  36168. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  36169. // EventS3ObjectRestore is a Event enum value
  36170. EventS3ObjectRestore = "s3:ObjectRestore:*"
  36171. // EventS3ObjectRestorePost is a Event enum value
  36172. EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
  36173. // EventS3ObjectRestoreCompleted is a Event enum value
  36174. EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
  36175. // EventS3Replication is a Event enum value
  36176. EventS3Replication = "s3:Replication:*"
  36177. // EventS3ReplicationOperationFailedReplication is a Event enum value
  36178. EventS3ReplicationOperationFailedReplication = "s3:Replication:OperationFailedReplication"
  36179. // EventS3ReplicationOperationNotTracked is a Event enum value
  36180. EventS3ReplicationOperationNotTracked = "s3:Replication:OperationNotTracked"
  36181. // EventS3ReplicationOperationMissedThreshold is a Event enum value
  36182. EventS3ReplicationOperationMissedThreshold = "s3:Replication:OperationMissedThreshold"
  36183. // EventS3ReplicationOperationReplicatedAfterThreshold is a Event enum value
  36184. EventS3ReplicationOperationReplicatedAfterThreshold = "s3:Replication:OperationReplicatedAfterThreshold"
  36185. // EventS3ObjectRestoreDelete is a Event enum value
  36186. EventS3ObjectRestoreDelete = "s3:ObjectRestore:Delete"
  36187. // EventS3LifecycleTransition is a Event enum value
  36188. EventS3LifecycleTransition = "s3:LifecycleTransition"
  36189. // EventS3IntelligentTiering is a Event enum value
  36190. EventS3IntelligentTiering = "s3:IntelligentTiering"
  36191. // EventS3ObjectAclPut is a Event enum value
  36192. EventS3ObjectAclPut = "s3:ObjectAcl:Put"
  36193. // EventS3LifecycleExpiration is a Event enum value
  36194. EventS3LifecycleExpiration = "s3:LifecycleExpiration:*"
  36195. // EventS3LifecycleExpirationDelete is a Event enum value
  36196. EventS3LifecycleExpirationDelete = "s3:LifecycleExpiration:Delete"
  36197. // EventS3LifecycleExpirationDeleteMarkerCreated is a Event enum value
  36198. EventS3LifecycleExpirationDeleteMarkerCreated = "s3:LifecycleExpiration:DeleteMarkerCreated"
  36199. // EventS3ObjectTagging is a Event enum value
  36200. EventS3ObjectTagging = "s3:ObjectTagging:*"
  36201. // EventS3ObjectTaggingPut is a Event enum value
  36202. EventS3ObjectTaggingPut = "s3:ObjectTagging:Put"
  36203. // EventS3ObjectTaggingDelete is a Event enum value
  36204. EventS3ObjectTaggingDelete = "s3:ObjectTagging:Delete"
  36205. )
  36206. // Event_Values returns all elements of the Event enum
  36207. func Event_Values() []string {
  36208. return []string{
  36209. EventS3ReducedRedundancyLostObject,
  36210. EventS3ObjectCreated,
  36211. EventS3ObjectCreatedPut,
  36212. EventS3ObjectCreatedPost,
  36213. EventS3ObjectCreatedCopy,
  36214. EventS3ObjectCreatedCompleteMultipartUpload,
  36215. EventS3ObjectRemoved,
  36216. EventS3ObjectRemovedDelete,
  36217. EventS3ObjectRemovedDeleteMarkerCreated,
  36218. EventS3ObjectRestore,
  36219. EventS3ObjectRestorePost,
  36220. EventS3ObjectRestoreCompleted,
  36221. EventS3Replication,
  36222. EventS3ReplicationOperationFailedReplication,
  36223. EventS3ReplicationOperationNotTracked,
  36224. EventS3ReplicationOperationMissedThreshold,
  36225. EventS3ReplicationOperationReplicatedAfterThreshold,
  36226. EventS3ObjectRestoreDelete,
  36227. EventS3LifecycleTransition,
  36228. EventS3IntelligentTiering,
  36229. EventS3ObjectAclPut,
  36230. EventS3LifecycleExpiration,
  36231. EventS3LifecycleExpirationDelete,
  36232. EventS3LifecycleExpirationDeleteMarkerCreated,
  36233. EventS3ObjectTagging,
  36234. EventS3ObjectTaggingPut,
  36235. EventS3ObjectTaggingDelete,
  36236. }
  36237. }
  36238. const (
  36239. // ExistingObjectReplicationStatusEnabled is a ExistingObjectReplicationStatus enum value
  36240. ExistingObjectReplicationStatusEnabled = "Enabled"
  36241. // ExistingObjectReplicationStatusDisabled is a ExistingObjectReplicationStatus enum value
  36242. ExistingObjectReplicationStatusDisabled = "Disabled"
  36243. )
  36244. // ExistingObjectReplicationStatus_Values returns all elements of the ExistingObjectReplicationStatus enum
  36245. func ExistingObjectReplicationStatus_Values() []string {
  36246. return []string{
  36247. ExistingObjectReplicationStatusEnabled,
  36248. ExistingObjectReplicationStatusDisabled,
  36249. }
  36250. }
  36251. const (
  36252. // ExpirationStatusEnabled is a ExpirationStatus enum value
  36253. ExpirationStatusEnabled = "Enabled"
  36254. // ExpirationStatusDisabled is a ExpirationStatus enum value
  36255. ExpirationStatusDisabled = "Disabled"
  36256. )
  36257. // ExpirationStatus_Values returns all elements of the ExpirationStatus enum
  36258. func ExpirationStatus_Values() []string {
  36259. return []string{
  36260. ExpirationStatusEnabled,
  36261. ExpirationStatusDisabled,
  36262. }
  36263. }
  36264. const (
  36265. // ExpressionTypeSql is a ExpressionType enum value
  36266. ExpressionTypeSql = "SQL"
  36267. )
  36268. // ExpressionType_Values returns all elements of the ExpressionType enum
  36269. func ExpressionType_Values() []string {
  36270. return []string{
  36271. ExpressionTypeSql,
  36272. }
  36273. }
  36274. const (
  36275. // FileHeaderInfoUse is a FileHeaderInfo enum value
  36276. FileHeaderInfoUse = "USE"
  36277. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  36278. FileHeaderInfoIgnore = "IGNORE"
  36279. // FileHeaderInfoNone is a FileHeaderInfo enum value
  36280. FileHeaderInfoNone = "NONE"
  36281. )
  36282. // FileHeaderInfo_Values returns all elements of the FileHeaderInfo enum
  36283. func FileHeaderInfo_Values() []string {
  36284. return []string{
  36285. FileHeaderInfoUse,
  36286. FileHeaderInfoIgnore,
  36287. FileHeaderInfoNone,
  36288. }
  36289. }
  36290. const (
  36291. // FilterRuleNamePrefix is a FilterRuleName enum value
  36292. FilterRuleNamePrefix = "prefix"
  36293. // FilterRuleNameSuffix is a FilterRuleName enum value
  36294. FilterRuleNameSuffix = "suffix"
  36295. )
  36296. // FilterRuleName_Values returns all elements of the FilterRuleName enum
  36297. func FilterRuleName_Values() []string {
  36298. return []string{
  36299. FilterRuleNamePrefix,
  36300. FilterRuleNameSuffix,
  36301. }
  36302. }
  36303. const (
  36304. // IntelligentTieringAccessTierArchiveAccess is a IntelligentTieringAccessTier enum value
  36305. IntelligentTieringAccessTierArchiveAccess = "ARCHIVE_ACCESS"
  36306. // IntelligentTieringAccessTierDeepArchiveAccess is a IntelligentTieringAccessTier enum value
  36307. IntelligentTieringAccessTierDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
  36308. )
  36309. // IntelligentTieringAccessTier_Values returns all elements of the IntelligentTieringAccessTier enum
  36310. func IntelligentTieringAccessTier_Values() []string {
  36311. return []string{
  36312. IntelligentTieringAccessTierArchiveAccess,
  36313. IntelligentTieringAccessTierDeepArchiveAccess,
  36314. }
  36315. }
  36316. const (
  36317. // IntelligentTieringStatusEnabled is a IntelligentTieringStatus enum value
  36318. IntelligentTieringStatusEnabled = "Enabled"
  36319. // IntelligentTieringStatusDisabled is a IntelligentTieringStatus enum value
  36320. IntelligentTieringStatusDisabled = "Disabled"
  36321. )
  36322. // IntelligentTieringStatus_Values returns all elements of the IntelligentTieringStatus enum
  36323. func IntelligentTieringStatus_Values() []string {
  36324. return []string{
  36325. IntelligentTieringStatusEnabled,
  36326. IntelligentTieringStatusDisabled,
  36327. }
  36328. }
  36329. const (
  36330. // InventoryFormatCsv is a InventoryFormat enum value
  36331. InventoryFormatCsv = "CSV"
  36332. // InventoryFormatOrc is a InventoryFormat enum value
  36333. InventoryFormatOrc = "ORC"
  36334. // InventoryFormatParquet is a InventoryFormat enum value
  36335. InventoryFormatParquet = "Parquet"
  36336. )
  36337. // InventoryFormat_Values returns all elements of the InventoryFormat enum
  36338. func InventoryFormat_Values() []string {
  36339. return []string{
  36340. InventoryFormatCsv,
  36341. InventoryFormatOrc,
  36342. InventoryFormatParquet,
  36343. }
  36344. }
  36345. const (
  36346. // InventoryFrequencyDaily is a InventoryFrequency enum value
  36347. InventoryFrequencyDaily = "Daily"
  36348. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  36349. InventoryFrequencyWeekly = "Weekly"
  36350. )
  36351. // InventoryFrequency_Values returns all elements of the InventoryFrequency enum
  36352. func InventoryFrequency_Values() []string {
  36353. return []string{
  36354. InventoryFrequencyDaily,
  36355. InventoryFrequencyWeekly,
  36356. }
  36357. }
  36358. const (
  36359. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  36360. InventoryIncludedObjectVersionsAll = "All"
  36361. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  36362. InventoryIncludedObjectVersionsCurrent = "Current"
  36363. )
  36364. // InventoryIncludedObjectVersions_Values returns all elements of the InventoryIncludedObjectVersions enum
  36365. func InventoryIncludedObjectVersions_Values() []string {
  36366. return []string{
  36367. InventoryIncludedObjectVersionsAll,
  36368. InventoryIncludedObjectVersionsCurrent,
  36369. }
  36370. }
  36371. const (
  36372. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  36373. InventoryOptionalFieldSize = "Size"
  36374. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  36375. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  36376. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  36377. InventoryOptionalFieldStorageClass = "StorageClass"
  36378. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  36379. InventoryOptionalFieldEtag = "ETag"
  36380. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  36381. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  36382. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  36383. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  36384. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  36385. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  36386. // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
  36387. InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
  36388. // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
  36389. InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
  36390. // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
  36391. InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
  36392. // InventoryOptionalFieldIntelligentTieringAccessTier is a InventoryOptionalField enum value
  36393. InventoryOptionalFieldIntelligentTieringAccessTier = "IntelligentTieringAccessTier"
  36394. // InventoryOptionalFieldBucketKeyStatus is a InventoryOptionalField enum value
  36395. InventoryOptionalFieldBucketKeyStatus = "BucketKeyStatus"
  36396. // InventoryOptionalFieldChecksumAlgorithm is a InventoryOptionalField enum value
  36397. InventoryOptionalFieldChecksumAlgorithm = "ChecksumAlgorithm"
  36398. )
  36399. // InventoryOptionalField_Values returns all elements of the InventoryOptionalField enum
  36400. func InventoryOptionalField_Values() []string {
  36401. return []string{
  36402. InventoryOptionalFieldSize,
  36403. InventoryOptionalFieldLastModifiedDate,
  36404. InventoryOptionalFieldStorageClass,
  36405. InventoryOptionalFieldEtag,
  36406. InventoryOptionalFieldIsMultipartUploaded,
  36407. InventoryOptionalFieldReplicationStatus,
  36408. InventoryOptionalFieldEncryptionStatus,
  36409. InventoryOptionalFieldObjectLockRetainUntilDate,
  36410. InventoryOptionalFieldObjectLockMode,
  36411. InventoryOptionalFieldObjectLockLegalHoldStatus,
  36412. InventoryOptionalFieldIntelligentTieringAccessTier,
  36413. InventoryOptionalFieldBucketKeyStatus,
  36414. InventoryOptionalFieldChecksumAlgorithm,
  36415. }
  36416. }
  36417. const (
  36418. // JSONTypeDocument is a JSONType enum value
  36419. JSONTypeDocument = "DOCUMENT"
  36420. // JSONTypeLines is a JSONType enum value
  36421. JSONTypeLines = "LINES"
  36422. )
  36423. // JSONType_Values returns all elements of the JSONType enum
  36424. func JSONType_Values() []string {
  36425. return []string{
  36426. JSONTypeDocument,
  36427. JSONTypeLines,
  36428. }
  36429. }
  36430. const (
  36431. // MFADeleteEnabled is a MFADelete enum value
  36432. MFADeleteEnabled = "Enabled"
  36433. // MFADeleteDisabled is a MFADelete enum value
  36434. MFADeleteDisabled = "Disabled"
  36435. )
  36436. // MFADelete_Values returns all elements of the MFADelete enum
  36437. func MFADelete_Values() []string {
  36438. return []string{
  36439. MFADeleteEnabled,
  36440. MFADeleteDisabled,
  36441. }
  36442. }
  36443. const (
  36444. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  36445. MFADeleteStatusEnabled = "Enabled"
  36446. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  36447. MFADeleteStatusDisabled = "Disabled"
  36448. )
  36449. // MFADeleteStatus_Values returns all elements of the MFADeleteStatus enum
  36450. func MFADeleteStatus_Values() []string {
  36451. return []string{
  36452. MFADeleteStatusEnabled,
  36453. MFADeleteStatusDisabled,
  36454. }
  36455. }
  36456. const (
  36457. // MetadataDirectiveCopy is a MetadataDirective enum value
  36458. MetadataDirectiveCopy = "COPY"
  36459. // MetadataDirectiveReplace is a MetadataDirective enum value
  36460. MetadataDirectiveReplace = "REPLACE"
  36461. )
  36462. // MetadataDirective_Values returns all elements of the MetadataDirective enum
  36463. func MetadataDirective_Values() []string {
  36464. return []string{
  36465. MetadataDirectiveCopy,
  36466. MetadataDirectiveReplace,
  36467. }
  36468. }
  36469. const (
  36470. // MetricsStatusEnabled is a MetricsStatus enum value
  36471. MetricsStatusEnabled = "Enabled"
  36472. // MetricsStatusDisabled is a MetricsStatus enum value
  36473. MetricsStatusDisabled = "Disabled"
  36474. )
  36475. // MetricsStatus_Values returns all elements of the MetricsStatus enum
  36476. func MetricsStatus_Values() []string {
  36477. return []string{
  36478. MetricsStatusEnabled,
  36479. MetricsStatusDisabled,
  36480. }
  36481. }
  36482. const (
  36483. // ObjectAttributesEtag is a ObjectAttributes enum value
  36484. ObjectAttributesEtag = "ETag"
  36485. // ObjectAttributesChecksum is a ObjectAttributes enum value
  36486. ObjectAttributesChecksum = "Checksum"
  36487. // ObjectAttributesObjectParts is a ObjectAttributes enum value
  36488. ObjectAttributesObjectParts = "ObjectParts"
  36489. // ObjectAttributesStorageClass is a ObjectAttributes enum value
  36490. ObjectAttributesStorageClass = "StorageClass"
  36491. // ObjectAttributesObjectSize is a ObjectAttributes enum value
  36492. ObjectAttributesObjectSize = "ObjectSize"
  36493. )
  36494. // ObjectAttributes_Values returns all elements of the ObjectAttributes enum
  36495. func ObjectAttributes_Values() []string {
  36496. return []string{
  36497. ObjectAttributesEtag,
  36498. ObjectAttributesChecksum,
  36499. ObjectAttributesObjectParts,
  36500. ObjectAttributesStorageClass,
  36501. ObjectAttributesObjectSize,
  36502. }
  36503. }
  36504. const (
  36505. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  36506. ObjectCannedACLPrivate = "private"
  36507. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  36508. ObjectCannedACLPublicRead = "public-read"
  36509. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  36510. ObjectCannedACLPublicReadWrite = "public-read-write"
  36511. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  36512. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  36513. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  36514. ObjectCannedACLAwsExecRead = "aws-exec-read"
  36515. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  36516. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  36517. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  36518. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  36519. )
  36520. // ObjectCannedACL_Values returns all elements of the ObjectCannedACL enum
  36521. func ObjectCannedACL_Values() []string {
  36522. return []string{
  36523. ObjectCannedACLPrivate,
  36524. ObjectCannedACLPublicRead,
  36525. ObjectCannedACLPublicReadWrite,
  36526. ObjectCannedACLAuthenticatedRead,
  36527. ObjectCannedACLAwsExecRead,
  36528. ObjectCannedACLBucketOwnerRead,
  36529. ObjectCannedACLBucketOwnerFullControl,
  36530. }
  36531. }
  36532. const (
  36533. // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
  36534. ObjectLockEnabledEnabled = "Enabled"
  36535. )
  36536. // ObjectLockEnabled_Values returns all elements of the ObjectLockEnabled enum
  36537. func ObjectLockEnabled_Values() []string {
  36538. return []string{
  36539. ObjectLockEnabledEnabled,
  36540. }
  36541. }
  36542. const (
  36543. // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
  36544. ObjectLockLegalHoldStatusOn = "ON"
  36545. // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
  36546. ObjectLockLegalHoldStatusOff = "OFF"
  36547. )
  36548. // ObjectLockLegalHoldStatus_Values returns all elements of the ObjectLockLegalHoldStatus enum
  36549. func ObjectLockLegalHoldStatus_Values() []string {
  36550. return []string{
  36551. ObjectLockLegalHoldStatusOn,
  36552. ObjectLockLegalHoldStatusOff,
  36553. }
  36554. }
  36555. const (
  36556. // ObjectLockModeGovernance is a ObjectLockMode enum value
  36557. ObjectLockModeGovernance = "GOVERNANCE"
  36558. // ObjectLockModeCompliance is a ObjectLockMode enum value
  36559. ObjectLockModeCompliance = "COMPLIANCE"
  36560. )
  36561. // ObjectLockMode_Values returns all elements of the ObjectLockMode enum
  36562. func ObjectLockMode_Values() []string {
  36563. return []string{
  36564. ObjectLockModeGovernance,
  36565. ObjectLockModeCompliance,
  36566. }
  36567. }
  36568. const (
  36569. // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
  36570. ObjectLockRetentionModeGovernance = "GOVERNANCE"
  36571. // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
  36572. ObjectLockRetentionModeCompliance = "COMPLIANCE"
  36573. )
  36574. // ObjectLockRetentionMode_Values returns all elements of the ObjectLockRetentionMode enum
  36575. func ObjectLockRetentionMode_Values() []string {
  36576. return []string{
  36577. ObjectLockRetentionModeGovernance,
  36578. ObjectLockRetentionModeCompliance,
  36579. }
  36580. }
  36581. // The container element for object ownership for a bucket's ownership controls.
  36582. //
  36583. // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
  36584. // the bucket owner if the objects are uploaded with the bucket-owner-full-control
  36585. // canned ACL.
  36586. //
  36587. // ObjectWriter - The uploading account will own the object if the object is
  36588. // uploaded with the bucket-owner-full-control canned ACL.
  36589. //
  36590. // BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer
  36591. // affect permissions. The bucket owner automatically owns and has full control
  36592. // over every object in the bucket. The bucket only accepts PUT requests that
  36593. // don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control
  36594. // canned ACL or an equivalent form of this ACL expressed in the XML format.
  36595. const (
  36596. // ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value
  36597. ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred"
  36598. // ObjectOwnershipObjectWriter is a ObjectOwnership enum value
  36599. ObjectOwnershipObjectWriter = "ObjectWriter"
  36600. // ObjectOwnershipBucketOwnerEnforced is a ObjectOwnership enum value
  36601. ObjectOwnershipBucketOwnerEnforced = "BucketOwnerEnforced"
  36602. )
  36603. // ObjectOwnership_Values returns all elements of the ObjectOwnership enum
  36604. func ObjectOwnership_Values() []string {
  36605. return []string{
  36606. ObjectOwnershipBucketOwnerPreferred,
  36607. ObjectOwnershipObjectWriter,
  36608. ObjectOwnershipBucketOwnerEnforced,
  36609. }
  36610. }
  36611. const (
  36612. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  36613. ObjectStorageClassStandard = "STANDARD"
  36614. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  36615. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  36616. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  36617. ObjectStorageClassGlacier = "GLACIER"
  36618. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  36619. ObjectStorageClassStandardIa = "STANDARD_IA"
  36620. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  36621. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  36622. // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
  36623. ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  36624. // ObjectStorageClassDeepArchive is a ObjectStorageClass enum value
  36625. ObjectStorageClassDeepArchive = "DEEP_ARCHIVE"
  36626. // ObjectStorageClassOutposts is a ObjectStorageClass enum value
  36627. ObjectStorageClassOutposts = "OUTPOSTS"
  36628. // ObjectStorageClassGlacierIr is a ObjectStorageClass enum value
  36629. ObjectStorageClassGlacierIr = "GLACIER_IR"
  36630. )
  36631. // ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum
  36632. func ObjectStorageClass_Values() []string {
  36633. return []string{
  36634. ObjectStorageClassStandard,
  36635. ObjectStorageClassReducedRedundancy,
  36636. ObjectStorageClassGlacier,
  36637. ObjectStorageClassStandardIa,
  36638. ObjectStorageClassOnezoneIa,
  36639. ObjectStorageClassIntelligentTiering,
  36640. ObjectStorageClassDeepArchive,
  36641. ObjectStorageClassOutposts,
  36642. ObjectStorageClassGlacierIr,
  36643. }
  36644. }
  36645. const (
  36646. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  36647. ObjectVersionStorageClassStandard = "STANDARD"
  36648. )
  36649. // ObjectVersionStorageClass_Values returns all elements of the ObjectVersionStorageClass enum
  36650. func ObjectVersionStorageClass_Values() []string {
  36651. return []string{
  36652. ObjectVersionStorageClassStandard,
  36653. }
  36654. }
  36655. const (
  36656. // OwnerOverrideDestination is a OwnerOverride enum value
  36657. OwnerOverrideDestination = "Destination"
  36658. )
  36659. // OwnerOverride_Values returns all elements of the OwnerOverride enum
  36660. func OwnerOverride_Values() []string {
  36661. return []string{
  36662. OwnerOverrideDestination,
  36663. }
  36664. }
  36665. const (
  36666. // PayerRequester is a Payer enum value
  36667. PayerRequester = "Requester"
  36668. // PayerBucketOwner is a Payer enum value
  36669. PayerBucketOwner = "BucketOwner"
  36670. )
  36671. // Payer_Values returns all elements of the Payer enum
  36672. func Payer_Values() []string {
  36673. return []string{
  36674. PayerRequester,
  36675. PayerBucketOwner,
  36676. }
  36677. }
  36678. const (
  36679. // PermissionFullControl is a Permission enum value
  36680. PermissionFullControl = "FULL_CONTROL"
  36681. // PermissionWrite is a Permission enum value
  36682. PermissionWrite = "WRITE"
  36683. // PermissionWriteAcp is a Permission enum value
  36684. PermissionWriteAcp = "WRITE_ACP"
  36685. // PermissionRead is a Permission enum value
  36686. PermissionRead = "READ"
  36687. // PermissionReadAcp is a Permission enum value
  36688. PermissionReadAcp = "READ_ACP"
  36689. )
  36690. // Permission_Values returns all elements of the Permission enum
  36691. func Permission_Values() []string {
  36692. return []string{
  36693. PermissionFullControl,
  36694. PermissionWrite,
  36695. PermissionWriteAcp,
  36696. PermissionRead,
  36697. PermissionReadAcp,
  36698. }
  36699. }
  36700. const (
  36701. // ProtocolHttp is a Protocol enum value
  36702. ProtocolHttp = "http"
  36703. // ProtocolHttps is a Protocol enum value
  36704. ProtocolHttps = "https"
  36705. )
  36706. // Protocol_Values returns all elements of the Protocol enum
  36707. func Protocol_Values() []string {
  36708. return []string{
  36709. ProtocolHttp,
  36710. ProtocolHttps,
  36711. }
  36712. }
  36713. const (
  36714. // QuoteFieldsAlways is a QuoteFields enum value
  36715. QuoteFieldsAlways = "ALWAYS"
  36716. // QuoteFieldsAsneeded is a QuoteFields enum value
  36717. QuoteFieldsAsneeded = "ASNEEDED"
  36718. )
  36719. // QuoteFields_Values returns all elements of the QuoteFields enum
  36720. func QuoteFields_Values() []string {
  36721. return []string{
  36722. QuoteFieldsAlways,
  36723. QuoteFieldsAsneeded,
  36724. }
  36725. }
  36726. const (
  36727. // ReplicaModificationsStatusEnabled is a ReplicaModificationsStatus enum value
  36728. ReplicaModificationsStatusEnabled = "Enabled"
  36729. // ReplicaModificationsStatusDisabled is a ReplicaModificationsStatus enum value
  36730. ReplicaModificationsStatusDisabled = "Disabled"
  36731. )
  36732. // ReplicaModificationsStatus_Values returns all elements of the ReplicaModificationsStatus enum
  36733. func ReplicaModificationsStatus_Values() []string {
  36734. return []string{
  36735. ReplicaModificationsStatusEnabled,
  36736. ReplicaModificationsStatusDisabled,
  36737. }
  36738. }
  36739. const (
  36740. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  36741. ReplicationRuleStatusEnabled = "Enabled"
  36742. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  36743. ReplicationRuleStatusDisabled = "Disabled"
  36744. )
  36745. // ReplicationRuleStatus_Values returns all elements of the ReplicationRuleStatus enum
  36746. func ReplicationRuleStatus_Values() []string {
  36747. return []string{
  36748. ReplicationRuleStatusEnabled,
  36749. ReplicationRuleStatusDisabled,
  36750. }
  36751. }
  36752. const (
  36753. // ReplicationStatusComplete is a ReplicationStatus enum value
  36754. ReplicationStatusComplete = "COMPLETE"
  36755. // ReplicationStatusPending is a ReplicationStatus enum value
  36756. ReplicationStatusPending = "PENDING"
  36757. // ReplicationStatusFailed is a ReplicationStatus enum value
  36758. ReplicationStatusFailed = "FAILED"
  36759. // ReplicationStatusReplica is a ReplicationStatus enum value
  36760. ReplicationStatusReplica = "REPLICA"
  36761. )
  36762. // ReplicationStatus_Values returns all elements of the ReplicationStatus enum
  36763. func ReplicationStatus_Values() []string {
  36764. return []string{
  36765. ReplicationStatusComplete,
  36766. ReplicationStatusPending,
  36767. ReplicationStatusFailed,
  36768. ReplicationStatusReplica,
  36769. }
  36770. }
  36771. const (
  36772. // ReplicationTimeStatusEnabled is a ReplicationTimeStatus enum value
  36773. ReplicationTimeStatusEnabled = "Enabled"
  36774. // ReplicationTimeStatusDisabled is a ReplicationTimeStatus enum value
  36775. ReplicationTimeStatusDisabled = "Disabled"
  36776. )
  36777. // ReplicationTimeStatus_Values returns all elements of the ReplicationTimeStatus enum
  36778. func ReplicationTimeStatus_Values() []string {
  36779. return []string{
  36780. ReplicationTimeStatusEnabled,
  36781. ReplicationTimeStatusDisabled,
  36782. }
  36783. }
  36784. // If present, indicates that the requester was successfully charged for the
  36785. // request.
  36786. const (
  36787. // RequestChargedRequester is a RequestCharged enum value
  36788. RequestChargedRequester = "requester"
  36789. )
  36790. // RequestCharged_Values returns all elements of the RequestCharged enum
  36791. func RequestCharged_Values() []string {
  36792. return []string{
  36793. RequestChargedRequester,
  36794. }
  36795. }
  36796. // Confirms that the requester knows that they will be charged for the request.
  36797. // Bucket owners need not specify this parameter in their requests. For information
  36798. // about downloading objects from Requester Pays buckets, see Downloading Objects
  36799. // in Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
  36800. // in the Amazon S3 User Guide.
  36801. const (
  36802. // RequestPayerRequester is a RequestPayer enum value
  36803. RequestPayerRequester = "requester"
  36804. )
  36805. // RequestPayer_Values returns all elements of the RequestPayer enum
  36806. func RequestPayer_Values() []string {
  36807. return []string{
  36808. RequestPayerRequester,
  36809. }
  36810. }
  36811. const (
  36812. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  36813. RestoreRequestTypeSelect = "SELECT"
  36814. )
  36815. // RestoreRequestType_Values returns all elements of the RestoreRequestType enum
  36816. func RestoreRequestType_Values() []string {
  36817. return []string{
  36818. RestoreRequestTypeSelect,
  36819. }
  36820. }
  36821. const (
  36822. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  36823. ServerSideEncryptionAes256 = "AES256"
  36824. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  36825. ServerSideEncryptionAwsKms = "aws:kms"
  36826. )
  36827. // ServerSideEncryption_Values returns all elements of the ServerSideEncryption enum
  36828. func ServerSideEncryption_Values() []string {
  36829. return []string{
  36830. ServerSideEncryptionAes256,
  36831. ServerSideEncryptionAwsKms,
  36832. }
  36833. }
  36834. const (
  36835. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  36836. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  36837. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  36838. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  36839. )
  36840. // SseKmsEncryptedObjectsStatus_Values returns all elements of the SseKmsEncryptedObjectsStatus enum
  36841. func SseKmsEncryptedObjectsStatus_Values() []string {
  36842. return []string{
  36843. SseKmsEncryptedObjectsStatusEnabled,
  36844. SseKmsEncryptedObjectsStatusDisabled,
  36845. }
  36846. }
  36847. const (
  36848. // StorageClassStandard is a StorageClass enum value
  36849. StorageClassStandard = "STANDARD"
  36850. // StorageClassReducedRedundancy is a StorageClass enum value
  36851. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  36852. // StorageClassStandardIa is a StorageClass enum value
  36853. StorageClassStandardIa = "STANDARD_IA"
  36854. // StorageClassOnezoneIa is a StorageClass enum value
  36855. StorageClassOnezoneIa = "ONEZONE_IA"
  36856. // StorageClassIntelligentTiering is a StorageClass enum value
  36857. StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  36858. // StorageClassGlacier is a StorageClass enum value
  36859. StorageClassGlacier = "GLACIER"
  36860. // StorageClassDeepArchive is a StorageClass enum value
  36861. StorageClassDeepArchive = "DEEP_ARCHIVE"
  36862. // StorageClassOutposts is a StorageClass enum value
  36863. StorageClassOutposts = "OUTPOSTS"
  36864. // StorageClassGlacierIr is a StorageClass enum value
  36865. StorageClassGlacierIr = "GLACIER_IR"
  36866. )
  36867. // StorageClass_Values returns all elements of the StorageClass enum
  36868. func StorageClass_Values() []string {
  36869. return []string{
  36870. StorageClassStandard,
  36871. StorageClassReducedRedundancy,
  36872. StorageClassStandardIa,
  36873. StorageClassOnezoneIa,
  36874. StorageClassIntelligentTiering,
  36875. StorageClassGlacier,
  36876. StorageClassDeepArchive,
  36877. StorageClassOutposts,
  36878. StorageClassGlacierIr,
  36879. }
  36880. }
  36881. const (
  36882. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  36883. StorageClassAnalysisSchemaVersionV1 = "V_1"
  36884. )
  36885. // StorageClassAnalysisSchemaVersion_Values returns all elements of the StorageClassAnalysisSchemaVersion enum
  36886. func StorageClassAnalysisSchemaVersion_Values() []string {
  36887. return []string{
  36888. StorageClassAnalysisSchemaVersionV1,
  36889. }
  36890. }
  36891. const (
  36892. // TaggingDirectiveCopy is a TaggingDirective enum value
  36893. TaggingDirectiveCopy = "COPY"
  36894. // TaggingDirectiveReplace is a TaggingDirective enum value
  36895. TaggingDirectiveReplace = "REPLACE"
  36896. )
  36897. // TaggingDirective_Values returns all elements of the TaggingDirective enum
  36898. func TaggingDirective_Values() []string {
  36899. return []string{
  36900. TaggingDirectiveCopy,
  36901. TaggingDirectiveReplace,
  36902. }
  36903. }
  36904. const (
  36905. // TierStandard is a Tier enum value
  36906. TierStandard = "Standard"
  36907. // TierBulk is a Tier enum value
  36908. TierBulk = "Bulk"
  36909. // TierExpedited is a Tier enum value
  36910. TierExpedited = "Expedited"
  36911. )
  36912. // Tier_Values returns all elements of the Tier enum
  36913. func Tier_Values() []string {
  36914. return []string{
  36915. TierStandard,
  36916. TierBulk,
  36917. TierExpedited,
  36918. }
  36919. }
  36920. const (
  36921. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  36922. TransitionStorageClassGlacier = "GLACIER"
  36923. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  36924. TransitionStorageClassStandardIa = "STANDARD_IA"
  36925. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  36926. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  36927. // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
  36928. TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  36929. // TransitionStorageClassDeepArchive is a TransitionStorageClass enum value
  36930. TransitionStorageClassDeepArchive = "DEEP_ARCHIVE"
  36931. // TransitionStorageClassGlacierIr is a TransitionStorageClass enum value
  36932. TransitionStorageClassGlacierIr = "GLACIER_IR"
  36933. )
  36934. // TransitionStorageClass_Values returns all elements of the TransitionStorageClass enum
  36935. func TransitionStorageClass_Values() []string {
  36936. return []string{
  36937. TransitionStorageClassGlacier,
  36938. TransitionStorageClassStandardIa,
  36939. TransitionStorageClassOnezoneIa,
  36940. TransitionStorageClassIntelligentTiering,
  36941. TransitionStorageClassDeepArchive,
  36942. TransitionStorageClassGlacierIr,
  36943. }
  36944. }
  36945. const (
  36946. // TypeCanonicalUser is a Type enum value
  36947. TypeCanonicalUser = "CanonicalUser"
  36948. // TypeAmazonCustomerByEmail is a Type enum value
  36949. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  36950. // TypeGroup is a Type enum value
  36951. TypeGroup = "Group"
  36952. )
  36953. // Type_Values returns all elements of the Type enum
  36954. func Type_Values() []string {
  36955. return []string{
  36956. TypeCanonicalUser,
  36957. TypeAmazonCustomerByEmail,
  36958. TypeGroup,
  36959. }
  36960. }