api.go 573 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package dynamodb
  3. import (
  4. "fmt"
  5. "net/url"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws"
  8. "github.com/aws/aws-sdk-go/aws/awsutil"
  9. "github.com/aws/aws-sdk-go/aws/crr"
  10. "github.com/aws/aws-sdk-go/aws/request"
  11. "github.com/aws/aws-sdk-go/private/protocol"
  12. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  13. )
  14. const opBatchGetItem = "BatchGetItem"
  15. // BatchGetItemRequest generates a "aws/request.Request" representing the
  16. // client's request for the BatchGetItem operation. The "output" return
  17. // value will be populated with the request's response once the request completes
  18. // successfully.
  19. //
  20. // Use "Send" method on the returned Request to send the API call to the service.
  21. // the "output" return value is not valid until after Send returns without error.
  22. //
  23. // See BatchGetItem for more information on using the BatchGetItem
  24. // API call, and error handling.
  25. //
  26. // This method is useful when you want to inject custom logic or configuration
  27. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  28. //
  29. //
  30. // // Example sending a request using the BatchGetItemRequest method.
  31. // req, resp := client.BatchGetItemRequest(params)
  32. //
  33. // err := req.Send()
  34. // if err == nil { // resp is now filled
  35. // fmt.Println(resp)
  36. // }
  37. //
  38. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem
  39. func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.Request, output *BatchGetItemOutput) {
  40. op := &request.Operation{
  41. Name: opBatchGetItem,
  42. HTTPMethod: "POST",
  43. HTTPPath: "/",
  44. Paginator: &request.Paginator{
  45. InputTokens: []string{"RequestItems"},
  46. OutputTokens: []string{"UnprocessedKeys"},
  47. LimitToken: "",
  48. TruncationToken: "",
  49. },
  50. }
  51. if input == nil {
  52. input = &BatchGetItemInput{}
  53. }
  54. output = &BatchGetItemOutput{}
  55. req = c.newRequest(op, input, output)
  56. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  57. de := discovererDescribeEndpoints{
  58. Required: false,
  59. EndpointCache: c.endpointCache,
  60. Params: map[string]*string{
  61. "op": aws.String(req.Operation.Name),
  62. },
  63. Client: c,
  64. }
  65. for k, v := range de.Params {
  66. if v == nil {
  67. delete(de.Params, k)
  68. }
  69. }
  70. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  71. Name: "crr.endpointdiscovery",
  72. Fn: de.Handler,
  73. })
  74. }
  75. return
  76. }
  77. // BatchGetItem API operation for Amazon DynamoDB.
  78. //
  79. // The BatchGetItem operation returns the attributes of one or more items from
  80. // one or more tables. You identify requested items by primary key.
  81. //
  82. // A single operation can retrieve up to 16 MB of data, which can contain as
  83. // many as 100 items. BatchGetItem will return a partial result if the response
  84. // size limit is exceeded, the table's provisioned throughput is exceeded, or
  85. // an internal processing failure occurs. If a partial result is returned, the
  86. // operation returns a value for UnprocessedKeys. You can use this value to
  87. // retry the operation starting with the next item to get.
  88. //
  89. // If you request more than 100 items BatchGetItem will return a ValidationException
  90. // with the message "Too many items requested for the BatchGetItem call".
  91. //
  92. // For example, if you ask to retrieve 100 items, but each individual item is
  93. // 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB
  94. // limit). It also returns an appropriate UnprocessedKeys value so you can get
  95. // the next page of results. If desired, your application can include its own
  96. // logic to assemble the pages of results into one data set.
  97. //
  98. // If none of the items can be processed due to insufficient provisioned throughput
  99. // on all of the tables in the request, then BatchGetItem will return a ProvisionedThroughputExceededException.
  100. // If at least one of the items is successfully processed, then BatchGetItem
  101. // completes successfully, while returning the keys of the unread items in UnprocessedKeys.
  102. //
  103. // If DynamoDB returns any unprocessed items, you should retry the batch operation
  104. // on those items. However, we strongly recommend that you use an exponential
  105. // backoff algorithm. If you retry the batch operation immediately, the underlying
  106. // read or write requests can still fail due to throttling on the individual
  107. // tables. If you delay the batch operation using exponential backoff, the individual
  108. // requests in the batch are much more likely to succeed.
  109. //
  110. // For more information, see Batch Operations and Error Handling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations)
  111. // in the Amazon DynamoDB Developer Guide.
  112. //
  113. // By default, BatchGetItem performs eventually consistent reads on every table
  114. // in the request. If you want strongly consistent reads instead, you can set
  115. // ConsistentRead to true for any or all tables.
  116. //
  117. // In order to minimize response latency, BatchGetItem retrieves items in parallel.
  118. //
  119. // When designing your application, keep in mind that DynamoDB does not return
  120. // items in any particular order. To help parse the response by item, include
  121. // the primary key values for the items in your request in the ProjectionExpression
  122. // parameter.
  123. //
  124. // If a requested item does not exist, it is not returned in the result. Requests
  125. // for nonexistent items consume the minimum read capacity units according to
  126. // the type of read. For more information, see Capacity Units Calculations (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations)
  127. // in the Amazon DynamoDB Developer Guide.
  128. //
  129. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  130. // with awserr.Error's Code and Message methods to get detailed information about
  131. // the error.
  132. //
  133. // See the AWS API reference guide for Amazon DynamoDB's
  134. // API operation BatchGetItem for usage and error information.
  135. //
  136. // Returned Error Codes:
  137. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  138. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  139. // requests that receive this exception. Your request is eventually successful,
  140. // unless your retry queue is too large to finish. Reduce the frequency of requests
  141. // and use exponential backoff. For more information, go to Error Retries and
  142. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  143. // in the Amazon DynamoDB Developer Guide.
  144. //
  145. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  146. // The operation tried to access a nonexistent table or index. The resource
  147. // might not be specified correctly, or its status might not be ACTIVE.
  148. //
  149. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  150. // Throughput exceeds the current throughput limit for your account. Please
  151. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  152. // to request a limit increase.
  153. //
  154. // * ErrCodeInternalServerError "InternalServerError"
  155. // An error occurred on the server side.
  156. //
  157. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem
  158. func (c *DynamoDB) BatchGetItem(input *BatchGetItemInput) (*BatchGetItemOutput, error) {
  159. req, out := c.BatchGetItemRequest(input)
  160. return out, req.Send()
  161. }
  162. // BatchGetItemWithContext is the same as BatchGetItem with the addition of
  163. // the ability to pass a context and additional request options.
  164. //
  165. // See BatchGetItem for details on how to use this API operation.
  166. //
  167. // The context must be non-nil and will be used for request cancellation. If
  168. // the context is nil a panic will occur. In the future the SDK may create
  169. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  170. // for more information on using Contexts.
  171. func (c *DynamoDB) BatchGetItemWithContext(ctx aws.Context, input *BatchGetItemInput, opts ...request.Option) (*BatchGetItemOutput, error) {
  172. req, out := c.BatchGetItemRequest(input)
  173. req.SetContext(ctx)
  174. req.ApplyOptions(opts...)
  175. return out, req.Send()
  176. }
  177. // BatchGetItemPages iterates over the pages of a BatchGetItem operation,
  178. // calling the "fn" function with the response data for each page. To stop
  179. // iterating, return false from the fn function.
  180. //
  181. // See BatchGetItem method for more information on how to use this operation.
  182. //
  183. // Note: This operation can generate multiple requests to a service.
  184. //
  185. // // Example iterating over at most 3 pages of a BatchGetItem operation.
  186. // pageNum := 0
  187. // err := client.BatchGetItemPages(params,
  188. // func(page *BatchGetItemOutput, lastPage bool) bool {
  189. // pageNum++
  190. // fmt.Println(page)
  191. // return pageNum <= 3
  192. // })
  193. //
  194. func (c *DynamoDB) BatchGetItemPages(input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool) error {
  195. return c.BatchGetItemPagesWithContext(aws.BackgroundContext(), input, fn)
  196. }
  197. // BatchGetItemPagesWithContext same as BatchGetItemPages except
  198. // it takes a Context and allows setting request options on the pages.
  199. //
  200. // The context must be non-nil and will be used for request cancellation. If
  201. // the context is nil a panic will occur. In the future the SDK may create
  202. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  203. // for more information on using Contexts.
  204. func (c *DynamoDB) BatchGetItemPagesWithContext(ctx aws.Context, input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool, opts ...request.Option) error {
  205. p := request.Pagination{
  206. NewRequest: func() (*request.Request, error) {
  207. var inCpy *BatchGetItemInput
  208. if input != nil {
  209. tmp := *input
  210. inCpy = &tmp
  211. }
  212. req, _ := c.BatchGetItemRequest(inCpy)
  213. req.SetContext(ctx)
  214. req.ApplyOptions(opts...)
  215. return req, nil
  216. },
  217. }
  218. cont := true
  219. for p.Next() && cont {
  220. cont = fn(p.Page().(*BatchGetItemOutput), !p.HasNextPage())
  221. }
  222. return p.Err()
  223. }
  224. const opBatchWriteItem = "BatchWriteItem"
  225. // BatchWriteItemRequest generates a "aws/request.Request" representing the
  226. // client's request for the BatchWriteItem operation. The "output" return
  227. // value will be populated with the request's response once the request completes
  228. // successfully.
  229. //
  230. // Use "Send" method on the returned Request to send the API call to the service.
  231. // the "output" return value is not valid until after Send returns without error.
  232. //
  233. // See BatchWriteItem for more information on using the BatchWriteItem
  234. // API call, and error handling.
  235. //
  236. // This method is useful when you want to inject custom logic or configuration
  237. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  238. //
  239. //
  240. // // Example sending a request using the BatchWriteItemRequest method.
  241. // req, resp := client.BatchWriteItemRequest(params)
  242. //
  243. // err := req.Send()
  244. // if err == nil { // resp is now filled
  245. // fmt.Println(resp)
  246. // }
  247. //
  248. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem
  249. func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *request.Request, output *BatchWriteItemOutput) {
  250. op := &request.Operation{
  251. Name: opBatchWriteItem,
  252. HTTPMethod: "POST",
  253. HTTPPath: "/",
  254. }
  255. if input == nil {
  256. input = &BatchWriteItemInput{}
  257. }
  258. output = &BatchWriteItemOutput{}
  259. req = c.newRequest(op, input, output)
  260. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  261. de := discovererDescribeEndpoints{
  262. Required: false,
  263. EndpointCache: c.endpointCache,
  264. Params: map[string]*string{
  265. "op": aws.String(req.Operation.Name),
  266. },
  267. Client: c,
  268. }
  269. for k, v := range de.Params {
  270. if v == nil {
  271. delete(de.Params, k)
  272. }
  273. }
  274. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  275. Name: "crr.endpointdiscovery",
  276. Fn: de.Handler,
  277. })
  278. }
  279. return
  280. }
  281. // BatchWriteItem API operation for Amazon DynamoDB.
  282. //
  283. // The BatchWriteItem operation puts or deletes multiple items in one or more
  284. // tables. A single call to BatchWriteItem can write up to 16 MB of data, which
  285. // can comprise as many as 25 put or delete requests. Individual items to be
  286. // written can be as large as 400 KB.
  287. //
  288. // BatchWriteItem cannot update items. To update items, use the UpdateItem action.
  289. //
  290. // The individual PutItem and DeleteItem operations specified in BatchWriteItem
  291. // are atomic; however BatchWriteItem as a whole is not. If any requested operations
  292. // fail because the table's provisioned throughput is exceeded or an internal
  293. // processing failure occurs, the failed operations are returned in the UnprocessedItems
  294. // response parameter. You can investigate and optionally resend the requests.
  295. // Typically, you would call BatchWriteItem in a loop. Each iteration would
  296. // check for unprocessed items and submit a new BatchWriteItem request with
  297. // those unprocessed items until all items have been processed.
  298. //
  299. // Note that if none of the items can be processed due to insufficient provisioned
  300. // throughput on all of the tables in the request, then BatchWriteItem will
  301. // return a ProvisionedThroughputExceededException.
  302. //
  303. // If DynamoDB returns any unprocessed items, you should retry the batch operation
  304. // on those items. However, we strongly recommend that you use an exponential
  305. // backoff algorithm. If you retry the batch operation immediately, the underlying
  306. // read or write requests can still fail due to throttling on the individual
  307. // tables. If you delay the batch operation using exponential backoff, the individual
  308. // requests in the batch are much more likely to succeed.
  309. //
  310. // For more information, see Batch Operations and Error Handling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations)
  311. // in the Amazon DynamoDB Developer Guide.
  312. //
  313. // With BatchWriteItem, you can efficiently write or delete large amounts of
  314. // data, such as from Amazon Elastic MapReduce (EMR), or copy data from another
  315. // database into DynamoDB. In order to improve performance with these large-scale
  316. // operations, BatchWriteItem does not behave in the same way as individual
  317. // PutItem and DeleteItem calls would. For example, you cannot specify conditions
  318. // on individual put and delete requests, and BatchWriteItem does not return
  319. // deleted items in the response.
  320. //
  321. // If you use a programming language that supports concurrency, you can use
  322. // threads to write items in parallel. Your application must include the necessary
  323. // logic to manage the threads. With languages that don't support threading,
  324. // you must update or delete the specified items one at a time. In both situations,
  325. // BatchWriteItem performs the specified put and delete operations in parallel,
  326. // giving you the power of the thread pool approach without having to introduce
  327. // complexity into your application.
  328. //
  329. // Parallel processing reduces latency, but each specified put and delete request
  330. // consumes the same number of write capacity units whether it is processed
  331. // in parallel or not. Delete operations on nonexistent items consume one write
  332. // capacity unit.
  333. //
  334. // If one or more of the following is true, DynamoDB rejects the entire batch
  335. // write operation:
  336. //
  337. // * One or more tables specified in the BatchWriteItem request does not
  338. // exist.
  339. //
  340. // * Primary key attributes specified on an item in the request do not match
  341. // those in the corresponding table's primary key schema.
  342. //
  343. // * You try to perform multiple operations on the same item in the same
  344. // BatchWriteItem request. For example, you cannot put and delete the same
  345. // item in the same BatchWriteItem request.
  346. //
  347. // * Your request contains at least two items with identical hash and range
  348. // keys (which essentially is two put operations).
  349. //
  350. // * There are more than 25 requests in the batch.
  351. //
  352. // * Any individual item in a batch exceeds 400 KB.
  353. //
  354. // * The total request size exceeds 16 MB.
  355. //
  356. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  357. // with awserr.Error's Code and Message methods to get detailed information about
  358. // the error.
  359. //
  360. // See the AWS API reference guide for Amazon DynamoDB's
  361. // API operation BatchWriteItem for usage and error information.
  362. //
  363. // Returned Error Codes:
  364. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  365. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  366. // requests that receive this exception. Your request is eventually successful,
  367. // unless your retry queue is too large to finish. Reduce the frequency of requests
  368. // and use exponential backoff. For more information, go to Error Retries and
  369. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  370. // in the Amazon DynamoDB Developer Guide.
  371. //
  372. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  373. // The operation tried to access a nonexistent table or index. The resource
  374. // might not be specified correctly, or its status might not be ACTIVE.
  375. //
  376. // * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
  377. // An item collection is too large. This exception is only returned for tables
  378. // that have one or more local secondary indexes.
  379. //
  380. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  381. // Throughput exceeds the current throughput limit for your account. Please
  382. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  383. // to request a limit increase.
  384. //
  385. // * ErrCodeInternalServerError "InternalServerError"
  386. // An error occurred on the server side.
  387. //
  388. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem
  389. func (c *DynamoDB) BatchWriteItem(input *BatchWriteItemInput) (*BatchWriteItemOutput, error) {
  390. req, out := c.BatchWriteItemRequest(input)
  391. return out, req.Send()
  392. }
  393. // BatchWriteItemWithContext is the same as BatchWriteItem with the addition of
  394. // the ability to pass a context and additional request options.
  395. //
  396. // See BatchWriteItem for details on how to use this API operation.
  397. //
  398. // The context must be non-nil and will be used for request cancellation. If
  399. // the context is nil a panic will occur. In the future the SDK may create
  400. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  401. // for more information on using Contexts.
  402. func (c *DynamoDB) BatchWriteItemWithContext(ctx aws.Context, input *BatchWriteItemInput, opts ...request.Option) (*BatchWriteItemOutput, error) {
  403. req, out := c.BatchWriteItemRequest(input)
  404. req.SetContext(ctx)
  405. req.ApplyOptions(opts...)
  406. return out, req.Send()
  407. }
  408. const opCreateBackup = "CreateBackup"
  409. // CreateBackupRequest generates a "aws/request.Request" representing the
  410. // client's request for the CreateBackup operation. The "output" return
  411. // value will be populated with the request's response once the request completes
  412. // successfully.
  413. //
  414. // Use "Send" method on the returned Request to send the API call to the service.
  415. // the "output" return value is not valid until after Send returns without error.
  416. //
  417. // See CreateBackup for more information on using the CreateBackup
  418. // API call, and error handling.
  419. //
  420. // This method is useful when you want to inject custom logic or configuration
  421. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  422. //
  423. //
  424. // // Example sending a request using the CreateBackupRequest method.
  425. // req, resp := client.CreateBackupRequest(params)
  426. //
  427. // err := req.Send()
  428. // if err == nil { // resp is now filled
  429. // fmt.Println(resp)
  430. // }
  431. //
  432. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup
  433. func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput) {
  434. op := &request.Operation{
  435. Name: opCreateBackup,
  436. HTTPMethod: "POST",
  437. HTTPPath: "/",
  438. }
  439. if input == nil {
  440. input = &CreateBackupInput{}
  441. }
  442. output = &CreateBackupOutput{}
  443. req = c.newRequest(op, input, output)
  444. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  445. de := discovererDescribeEndpoints{
  446. Required: false,
  447. EndpointCache: c.endpointCache,
  448. Params: map[string]*string{
  449. "op": aws.String(req.Operation.Name),
  450. },
  451. Client: c,
  452. }
  453. for k, v := range de.Params {
  454. if v == nil {
  455. delete(de.Params, k)
  456. }
  457. }
  458. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  459. Name: "crr.endpointdiscovery",
  460. Fn: de.Handler,
  461. })
  462. }
  463. return
  464. }
  465. // CreateBackup API operation for Amazon DynamoDB.
  466. //
  467. // Creates a backup for an existing table.
  468. //
  469. // Each time you create an On-Demand Backup, the entire table data is backed
  470. // up. There is no limit to the number of on-demand backups that can be taken.
  471. //
  472. // When you create an On-Demand Backup, a time marker of the request is cataloged,
  473. // and the backup is created asynchronously, by applying all changes until the
  474. // time of the request to the last full table snapshot. Backup requests are
  475. // processed instantaneously and become available for restore within minutes.
  476. //
  477. // You can call CreateBackup at a maximum rate of 50 times per second.
  478. //
  479. // All backups in DynamoDB work without consuming any provisioned throughput
  480. // on the table.
  481. //
  482. // If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed
  483. // to contain all data committed to the table up to 14:24:00, and data committed
  484. // after 14:26:00 will not be. The backup may or may not contain data modifications
  485. // made between 14:24:00 and 14:26:00. On-Demand Backup does not support causal
  486. // consistency.
  487. //
  488. // Along with data, the following are also included on the backups:
  489. //
  490. // * Global secondary indexes (GSIs)
  491. //
  492. // * Local secondary indexes (LSIs)
  493. //
  494. // * Streams
  495. //
  496. // * Provisioned read and write capacity
  497. //
  498. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  499. // with awserr.Error's Code and Message methods to get detailed information about
  500. // the error.
  501. //
  502. // See the AWS API reference guide for Amazon DynamoDB's
  503. // API operation CreateBackup for usage and error information.
  504. //
  505. // Returned Error Codes:
  506. // * ErrCodeTableNotFoundException "TableNotFoundException"
  507. // A source table with the name TableName does not currently exist within the
  508. // subscriber's account.
  509. //
  510. // * ErrCodeTableInUseException "TableInUseException"
  511. // A target table with the specified name is either being created or deleted.
  512. //
  513. // * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException"
  514. // Backups have not yet been enabled for this table.
  515. //
  516. // * ErrCodeBackupInUseException "BackupInUseException"
  517. // There is another ongoing conflicting backup control plane operation on the
  518. // table. The backup is either being created, deleted or restored to a table.
  519. //
  520. // * ErrCodeLimitExceededException "LimitExceededException"
  521. // There is no limit to the number of daily on-demand backups that can be taken.
  522. //
  523. // Up to 10 simultaneous table operations are allowed per account. These operations
  524. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  525. // and RestoreTableToPointInTime.
  526. //
  527. // For tables with secondary indexes, only one of those tables can be in the
  528. // CREATING state at any point in time. Do not attempt to create more than one
  529. // such table simultaneously.
  530. //
  531. // The total limit of tables in the ACTIVE state is 250.
  532. //
  533. // * ErrCodeInternalServerError "InternalServerError"
  534. // An error occurred on the server side.
  535. //
  536. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup
  537. func (c *DynamoDB) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error) {
  538. req, out := c.CreateBackupRequest(input)
  539. return out, req.Send()
  540. }
  541. // CreateBackupWithContext is the same as CreateBackup with the addition of
  542. // the ability to pass a context and additional request options.
  543. //
  544. // See CreateBackup for details on how to use this API operation.
  545. //
  546. // The context must be non-nil and will be used for request cancellation. If
  547. // the context is nil a panic will occur. In the future the SDK may create
  548. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  549. // for more information on using Contexts.
  550. func (c *DynamoDB) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error) {
  551. req, out := c.CreateBackupRequest(input)
  552. req.SetContext(ctx)
  553. req.ApplyOptions(opts...)
  554. return out, req.Send()
  555. }
  556. const opCreateGlobalTable = "CreateGlobalTable"
  557. // CreateGlobalTableRequest generates a "aws/request.Request" representing the
  558. // client's request for the CreateGlobalTable operation. The "output" return
  559. // value will be populated with the request's response once the request completes
  560. // successfully.
  561. //
  562. // Use "Send" method on the returned Request to send the API call to the service.
  563. // the "output" return value is not valid until after Send returns without error.
  564. //
  565. // See CreateGlobalTable for more information on using the CreateGlobalTable
  566. // API call, and error handling.
  567. //
  568. // This method is useful when you want to inject custom logic or configuration
  569. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  570. //
  571. //
  572. // // Example sending a request using the CreateGlobalTableRequest method.
  573. // req, resp := client.CreateGlobalTableRequest(params)
  574. //
  575. // err := req.Send()
  576. // if err == nil { // resp is now filled
  577. // fmt.Println(resp)
  578. // }
  579. //
  580. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable
  581. func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req *request.Request, output *CreateGlobalTableOutput) {
  582. op := &request.Operation{
  583. Name: opCreateGlobalTable,
  584. HTTPMethod: "POST",
  585. HTTPPath: "/",
  586. }
  587. if input == nil {
  588. input = &CreateGlobalTableInput{}
  589. }
  590. output = &CreateGlobalTableOutput{}
  591. req = c.newRequest(op, input, output)
  592. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  593. de := discovererDescribeEndpoints{
  594. Required: false,
  595. EndpointCache: c.endpointCache,
  596. Params: map[string]*string{
  597. "op": aws.String(req.Operation.Name),
  598. },
  599. Client: c,
  600. }
  601. for k, v := range de.Params {
  602. if v == nil {
  603. delete(de.Params, k)
  604. }
  605. }
  606. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  607. Name: "crr.endpointdiscovery",
  608. Fn: de.Handler,
  609. })
  610. }
  611. return
  612. }
  613. // CreateGlobalTable API operation for Amazon DynamoDB.
  614. //
  615. // Creates a global table from an existing table. A global table creates a replication
  616. // relationship between two or more DynamoDB tables with the same table name
  617. // in the provided regions.
  618. //
  619. // If you want to add a new replica table to a global table, each of the following
  620. // conditions must be true:
  621. //
  622. // * The table must have the same primary key as all of the other replicas.
  623. //
  624. // * The table must have the same name as all of the other replicas.
  625. //
  626. // * The table must have DynamoDB Streams enabled, with the stream containing
  627. // both the new and the old images of the item.
  628. //
  629. // * None of the replica tables in the global table can contain any data.
  630. //
  631. // If global secondary indexes are specified, then the following conditions
  632. // must also be met:
  633. //
  634. // * The global secondary indexes must have the same name.
  635. //
  636. // * The global secondary indexes must have the same hash key and sort key
  637. // (if present).
  638. //
  639. // Write capacity settings should be set consistently across your replica tables
  640. // and secondary indexes. DynamoDB strongly recommends enabling auto scaling
  641. // to manage the write capacity settings for all of your global tables replicas
  642. // and indexes.
  643. //
  644. // If you prefer to manage write capacity settings manually, you should provision
  645. // equal replicated write capacity units to your replica tables. You should
  646. // also provision equal replicated write capacity units to matching secondary
  647. // indexes across your global table.
  648. //
  649. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  650. // with awserr.Error's Code and Message methods to get detailed information about
  651. // the error.
  652. //
  653. // See the AWS API reference guide for Amazon DynamoDB's
  654. // API operation CreateGlobalTable for usage and error information.
  655. //
  656. // Returned Error Codes:
  657. // * ErrCodeLimitExceededException "LimitExceededException"
  658. // There is no limit to the number of daily on-demand backups that can be taken.
  659. //
  660. // Up to 10 simultaneous table operations are allowed per account. These operations
  661. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  662. // and RestoreTableToPointInTime.
  663. //
  664. // For tables with secondary indexes, only one of those tables can be in the
  665. // CREATING state at any point in time. Do not attempt to create more than one
  666. // such table simultaneously.
  667. //
  668. // The total limit of tables in the ACTIVE state is 250.
  669. //
  670. // * ErrCodeInternalServerError "InternalServerError"
  671. // An error occurred on the server side.
  672. //
  673. // * ErrCodeGlobalTableAlreadyExistsException "GlobalTableAlreadyExistsException"
  674. // The specified global table already exists.
  675. //
  676. // * ErrCodeTableNotFoundException "TableNotFoundException"
  677. // A source table with the name TableName does not currently exist within the
  678. // subscriber's account.
  679. //
  680. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable
  681. func (c *DynamoDB) CreateGlobalTable(input *CreateGlobalTableInput) (*CreateGlobalTableOutput, error) {
  682. req, out := c.CreateGlobalTableRequest(input)
  683. return out, req.Send()
  684. }
  685. // CreateGlobalTableWithContext is the same as CreateGlobalTable with the addition of
  686. // the ability to pass a context and additional request options.
  687. //
  688. // See CreateGlobalTable for details on how to use this API operation.
  689. //
  690. // The context must be non-nil and will be used for request cancellation. If
  691. // the context is nil a panic will occur. In the future the SDK may create
  692. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  693. // for more information on using Contexts.
  694. func (c *DynamoDB) CreateGlobalTableWithContext(ctx aws.Context, input *CreateGlobalTableInput, opts ...request.Option) (*CreateGlobalTableOutput, error) {
  695. req, out := c.CreateGlobalTableRequest(input)
  696. req.SetContext(ctx)
  697. req.ApplyOptions(opts...)
  698. return out, req.Send()
  699. }
  700. const opCreateTable = "CreateTable"
  701. // CreateTableRequest generates a "aws/request.Request" representing the
  702. // client's request for the CreateTable operation. The "output" return
  703. // value will be populated with the request's response once the request completes
  704. // successfully.
  705. //
  706. // Use "Send" method on the returned Request to send the API call to the service.
  707. // the "output" return value is not valid until after Send returns without error.
  708. //
  709. // See CreateTable for more information on using the CreateTable
  710. // API call, and error handling.
  711. //
  712. // This method is useful when you want to inject custom logic or configuration
  713. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  714. //
  715. //
  716. // // Example sending a request using the CreateTableRequest method.
  717. // req, resp := client.CreateTableRequest(params)
  718. //
  719. // err := req.Send()
  720. // if err == nil { // resp is now filled
  721. // fmt.Println(resp)
  722. // }
  723. //
  724. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable
  725. func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) {
  726. op := &request.Operation{
  727. Name: opCreateTable,
  728. HTTPMethod: "POST",
  729. HTTPPath: "/",
  730. }
  731. if input == nil {
  732. input = &CreateTableInput{}
  733. }
  734. output = &CreateTableOutput{}
  735. req = c.newRequest(op, input, output)
  736. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  737. de := discovererDescribeEndpoints{
  738. Required: false,
  739. EndpointCache: c.endpointCache,
  740. Params: map[string]*string{
  741. "op": aws.String(req.Operation.Name),
  742. },
  743. Client: c,
  744. }
  745. for k, v := range de.Params {
  746. if v == nil {
  747. delete(de.Params, k)
  748. }
  749. }
  750. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  751. Name: "crr.endpointdiscovery",
  752. Fn: de.Handler,
  753. })
  754. }
  755. return
  756. }
  757. // CreateTable API operation for Amazon DynamoDB.
  758. //
  759. // The CreateTable operation adds a new table to your account. In an AWS account,
  760. // table names must be unique within each region. That is, you can have two
  761. // tables with same name if you create the tables in different regions.
  762. //
  763. // CreateTable is an asynchronous operation. Upon receiving a CreateTable request,
  764. // DynamoDB immediately returns a response with a TableStatus of CREATING. After
  765. // the table is created, DynamoDB sets the TableStatus to ACTIVE. You can perform
  766. // read and write operations only on an ACTIVE table.
  767. //
  768. // You can optionally define secondary indexes on the new table, as part of
  769. // the CreateTable operation. If you want to create multiple tables with secondary
  770. // indexes on them, you must create the tables sequentially. Only one table
  771. // with secondary indexes can be in the CREATING state at any given time.
  772. //
  773. // You can use the DescribeTable action to check the table status.
  774. //
  775. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  776. // with awserr.Error's Code and Message methods to get detailed information about
  777. // the error.
  778. //
  779. // See the AWS API reference guide for Amazon DynamoDB's
  780. // API operation CreateTable for usage and error information.
  781. //
  782. // Returned Error Codes:
  783. // * ErrCodeResourceInUseException "ResourceInUseException"
  784. // The operation conflicts with the resource's availability. For example, you
  785. // attempted to recreate an existing table, or tried to delete a table currently
  786. // in the CREATING state.
  787. //
  788. // * ErrCodeLimitExceededException "LimitExceededException"
  789. // There is no limit to the number of daily on-demand backups that can be taken.
  790. //
  791. // Up to 10 simultaneous table operations are allowed per account. These operations
  792. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  793. // and RestoreTableToPointInTime.
  794. //
  795. // For tables with secondary indexes, only one of those tables can be in the
  796. // CREATING state at any point in time. Do not attempt to create more than one
  797. // such table simultaneously.
  798. //
  799. // The total limit of tables in the ACTIVE state is 250.
  800. //
  801. // * ErrCodeInternalServerError "InternalServerError"
  802. // An error occurred on the server side.
  803. //
  804. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable
  805. func (c *DynamoDB) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) {
  806. req, out := c.CreateTableRequest(input)
  807. return out, req.Send()
  808. }
  809. // CreateTableWithContext is the same as CreateTable with the addition of
  810. // the ability to pass a context and additional request options.
  811. //
  812. // See CreateTable for details on how to use this API operation.
  813. //
  814. // The context must be non-nil and will be used for request cancellation. If
  815. // the context is nil a panic will occur. In the future the SDK may create
  816. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  817. // for more information on using Contexts.
  818. func (c *DynamoDB) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error) {
  819. req, out := c.CreateTableRequest(input)
  820. req.SetContext(ctx)
  821. req.ApplyOptions(opts...)
  822. return out, req.Send()
  823. }
  824. const opDeleteBackup = "DeleteBackup"
  825. // DeleteBackupRequest generates a "aws/request.Request" representing the
  826. // client's request for the DeleteBackup operation. The "output" return
  827. // value will be populated with the request's response once the request completes
  828. // successfully.
  829. //
  830. // Use "Send" method on the returned Request to send the API call to the service.
  831. // the "output" return value is not valid until after Send returns without error.
  832. //
  833. // See DeleteBackup for more information on using the DeleteBackup
  834. // API call, and error handling.
  835. //
  836. // This method is useful when you want to inject custom logic or configuration
  837. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  838. //
  839. //
  840. // // Example sending a request using the DeleteBackupRequest method.
  841. // req, resp := client.DeleteBackupRequest(params)
  842. //
  843. // err := req.Send()
  844. // if err == nil { // resp is now filled
  845. // fmt.Println(resp)
  846. // }
  847. //
  848. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup
  849. func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) {
  850. op := &request.Operation{
  851. Name: opDeleteBackup,
  852. HTTPMethod: "POST",
  853. HTTPPath: "/",
  854. }
  855. if input == nil {
  856. input = &DeleteBackupInput{}
  857. }
  858. output = &DeleteBackupOutput{}
  859. req = c.newRequest(op, input, output)
  860. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  861. de := discovererDescribeEndpoints{
  862. Required: false,
  863. EndpointCache: c.endpointCache,
  864. Params: map[string]*string{
  865. "op": aws.String(req.Operation.Name),
  866. },
  867. Client: c,
  868. }
  869. for k, v := range de.Params {
  870. if v == nil {
  871. delete(de.Params, k)
  872. }
  873. }
  874. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  875. Name: "crr.endpointdiscovery",
  876. Fn: de.Handler,
  877. })
  878. }
  879. return
  880. }
  881. // DeleteBackup API operation for Amazon DynamoDB.
  882. //
  883. // Deletes an existing backup of a table.
  884. //
  885. // You can call DeleteBackup at a maximum rate of 10 times per second.
  886. //
  887. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  888. // with awserr.Error's Code and Message methods to get detailed information about
  889. // the error.
  890. //
  891. // See the AWS API reference guide for Amazon DynamoDB's
  892. // API operation DeleteBackup for usage and error information.
  893. //
  894. // Returned Error Codes:
  895. // * ErrCodeBackupNotFoundException "BackupNotFoundException"
  896. // Backup not found for the given BackupARN.
  897. //
  898. // * ErrCodeBackupInUseException "BackupInUseException"
  899. // There is another ongoing conflicting backup control plane operation on the
  900. // table. The backup is either being created, deleted or restored to a table.
  901. //
  902. // * ErrCodeLimitExceededException "LimitExceededException"
  903. // There is no limit to the number of daily on-demand backups that can be taken.
  904. //
  905. // Up to 10 simultaneous table operations are allowed per account. These operations
  906. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  907. // and RestoreTableToPointInTime.
  908. //
  909. // For tables with secondary indexes, only one of those tables can be in the
  910. // CREATING state at any point in time. Do not attempt to create more than one
  911. // such table simultaneously.
  912. //
  913. // The total limit of tables in the ACTIVE state is 250.
  914. //
  915. // * ErrCodeInternalServerError "InternalServerError"
  916. // An error occurred on the server side.
  917. //
  918. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup
  919. func (c *DynamoDB) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) {
  920. req, out := c.DeleteBackupRequest(input)
  921. return out, req.Send()
  922. }
  923. // DeleteBackupWithContext is the same as DeleteBackup with the addition of
  924. // the ability to pass a context and additional request options.
  925. //
  926. // See DeleteBackup for details on how to use this API operation.
  927. //
  928. // The context must be non-nil and will be used for request cancellation. If
  929. // the context is nil a panic will occur. In the future the SDK may create
  930. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  931. // for more information on using Contexts.
  932. func (c *DynamoDB) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) {
  933. req, out := c.DeleteBackupRequest(input)
  934. req.SetContext(ctx)
  935. req.ApplyOptions(opts...)
  936. return out, req.Send()
  937. }
  938. const opDeleteItem = "DeleteItem"
  939. // DeleteItemRequest generates a "aws/request.Request" representing the
  940. // client's request for the DeleteItem operation. The "output" return
  941. // value will be populated with the request's response once the request completes
  942. // successfully.
  943. //
  944. // Use "Send" method on the returned Request to send the API call to the service.
  945. // the "output" return value is not valid until after Send returns without error.
  946. //
  947. // See DeleteItem for more information on using the DeleteItem
  948. // API call, and error handling.
  949. //
  950. // This method is useful when you want to inject custom logic or configuration
  951. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  952. //
  953. //
  954. // // Example sending a request using the DeleteItemRequest method.
  955. // req, resp := client.DeleteItemRequest(params)
  956. //
  957. // err := req.Send()
  958. // if err == nil { // resp is now filled
  959. // fmt.Println(resp)
  960. // }
  961. //
  962. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem
  963. func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Request, output *DeleteItemOutput) {
  964. op := &request.Operation{
  965. Name: opDeleteItem,
  966. HTTPMethod: "POST",
  967. HTTPPath: "/",
  968. }
  969. if input == nil {
  970. input = &DeleteItemInput{}
  971. }
  972. output = &DeleteItemOutput{}
  973. req = c.newRequest(op, input, output)
  974. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  975. de := discovererDescribeEndpoints{
  976. Required: false,
  977. EndpointCache: c.endpointCache,
  978. Params: map[string]*string{
  979. "op": aws.String(req.Operation.Name),
  980. },
  981. Client: c,
  982. }
  983. for k, v := range de.Params {
  984. if v == nil {
  985. delete(de.Params, k)
  986. }
  987. }
  988. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  989. Name: "crr.endpointdiscovery",
  990. Fn: de.Handler,
  991. })
  992. }
  993. return
  994. }
  995. // DeleteItem API operation for Amazon DynamoDB.
  996. //
  997. // Deletes a single item in a table by primary key. You can perform a conditional
  998. // delete operation that deletes the item if it exists, or if it has an expected
  999. // attribute value.
  1000. //
  1001. // In addition to deleting an item, you can also return the item's attribute
  1002. // values in the same operation, using the ReturnValues parameter.
  1003. //
  1004. // Unless you specify conditions, the DeleteItem is an idempotent operation;
  1005. // running it multiple times on the same item or attribute does not result in
  1006. // an error response.
  1007. //
  1008. // Conditional deletes are useful for deleting items only if specific conditions
  1009. // are met. If those conditions are met, DynamoDB performs the delete. Otherwise,
  1010. // the item is not deleted.
  1011. //
  1012. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1013. // with awserr.Error's Code and Message methods to get detailed information about
  1014. // the error.
  1015. //
  1016. // See the AWS API reference guide for Amazon DynamoDB's
  1017. // API operation DeleteItem for usage and error information.
  1018. //
  1019. // Returned Error Codes:
  1020. // * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
  1021. // A condition specified in the operation could not be evaluated.
  1022. //
  1023. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  1024. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  1025. // requests that receive this exception. Your request is eventually successful,
  1026. // unless your retry queue is too large to finish. Reduce the frequency of requests
  1027. // and use exponential backoff. For more information, go to Error Retries and
  1028. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  1029. // in the Amazon DynamoDB Developer Guide.
  1030. //
  1031. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1032. // The operation tried to access a nonexistent table or index. The resource
  1033. // might not be specified correctly, or its status might not be ACTIVE.
  1034. //
  1035. // * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
  1036. // An item collection is too large. This exception is only returned for tables
  1037. // that have one or more local secondary indexes.
  1038. //
  1039. // * ErrCodeTransactionConflictException "TransactionConflictException"
  1040. // Operation was rejected because there is an ongoing transaction for the item.
  1041. //
  1042. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  1043. // Throughput exceeds the current throughput limit for your account. Please
  1044. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  1045. // to request a limit increase.
  1046. //
  1047. // * ErrCodeInternalServerError "InternalServerError"
  1048. // An error occurred on the server side.
  1049. //
  1050. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem
  1051. func (c *DynamoDB) DeleteItem(input *DeleteItemInput) (*DeleteItemOutput, error) {
  1052. req, out := c.DeleteItemRequest(input)
  1053. return out, req.Send()
  1054. }
  1055. // DeleteItemWithContext is the same as DeleteItem with the addition of
  1056. // the ability to pass a context and additional request options.
  1057. //
  1058. // See DeleteItem for details on how to use this API operation.
  1059. //
  1060. // The context must be non-nil and will be used for request cancellation. If
  1061. // the context is nil a panic will occur. In the future the SDK may create
  1062. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1063. // for more information on using Contexts.
  1064. func (c *DynamoDB) DeleteItemWithContext(ctx aws.Context, input *DeleteItemInput, opts ...request.Option) (*DeleteItemOutput, error) {
  1065. req, out := c.DeleteItemRequest(input)
  1066. req.SetContext(ctx)
  1067. req.ApplyOptions(opts...)
  1068. return out, req.Send()
  1069. }
  1070. const opDeleteTable = "DeleteTable"
  1071. // DeleteTableRequest generates a "aws/request.Request" representing the
  1072. // client's request for the DeleteTable operation. The "output" return
  1073. // value will be populated with the request's response once the request completes
  1074. // successfully.
  1075. //
  1076. // Use "Send" method on the returned Request to send the API call to the service.
  1077. // the "output" return value is not valid until after Send returns without error.
  1078. //
  1079. // See DeleteTable for more information on using the DeleteTable
  1080. // API call, and error handling.
  1081. //
  1082. // This method is useful when you want to inject custom logic or configuration
  1083. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1084. //
  1085. //
  1086. // // Example sending a request using the DeleteTableRequest method.
  1087. // req, resp := client.DeleteTableRequest(params)
  1088. //
  1089. // err := req.Send()
  1090. // if err == nil { // resp is now filled
  1091. // fmt.Println(resp)
  1092. // }
  1093. //
  1094. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable
  1095. func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) {
  1096. op := &request.Operation{
  1097. Name: opDeleteTable,
  1098. HTTPMethod: "POST",
  1099. HTTPPath: "/",
  1100. }
  1101. if input == nil {
  1102. input = &DeleteTableInput{}
  1103. }
  1104. output = &DeleteTableOutput{}
  1105. req = c.newRequest(op, input, output)
  1106. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1107. de := discovererDescribeEndpoints{
  1108. Required: false,
  1109. EndpointCache: c.endpointCache,
  1110. Params: map[string]*string{
  1111. "op": aws.String(req.Operation.Name),
  1112. },
  1113. Client: c,
  1114. }
  1115. for k, v := range de.Params {
  1116. if v == nil {
  1117. delete(de.Params, k)
  1118. }
  1119. }
  1120. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1121. Name: "crr.endpointdiscovery",
  1122. Fn: de.Handler,
  1123. })
  1124. }
  1125. return
  1126. }
  1127. // DeleteTable API operation for Amazon DynamoDB.
  1128. //
  1129. // The DeleteTable operation deletes a table and all of its items. After a DeleteTable
  1130. // request, the specified table is in the DELETING state until DynamoDB completes
  1131. // the deletion. If the table is in the ACTIVE state, you can delete it. If
  1132. // a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException.
  1133. // If the specified table does not exist, DynamoDB returns a ResourceNotFoundException.
  1134. // If table is already in the DELETING state, no error is returned.
  1135. //
  1136. // DynamoDB might continue to accept data read and write operations, such as
  1137. // GetItem and PutItem, on a table in the DELETING state until the table deletion
  1138. // is complete.
  1139. //
  1140. // When you delete a table, any indexes on that table are also deleted.
  1141. //
  1142. // If you have DynamoDB Streams enabled on the table, then the corresponding
  1143. // stream on that table goes into the DISABLED state, and the stream is automatically
  1144. // deleted after 24 hours.
  1145. //
  1146. // Use the DescribeTable action to check the status of the table.
  1147. //
  1148. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1149. // with awserr.Error's Code and Message methods to get detailed information about
  1150. // the error.
  1151. //
  1152. // See the AWS API reference guide for Amazon DynamoDB's
  1153. // API operation DeleteTable for usage and error information.
  1154. //
  1155. // Returned Error Codes:
  1156. // * ErrCodeResourceInUseException "ResourceInUseException"
  1157. // The operation conflicts with the resource's availability. For example, you
  1158. // attempted to recreate an existing table, or tried to delete a table currently
  1159. // in the CREATING state.
  1160. //
  1161. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1162. // The operation tried to access a nonexistent table or index. The resource
  1163. // might not be specified correctly, or its status might not be ACTIVE.
  1164. //
  1165. // * ErrCodeLimitExceededException "LimitExceededException"
  1166. // There is no limit to the number of daily on-demand backups that can be taken.
  1167. //
  1168. // Up to 10 simultaneous table operations are allowed per account. These operations
  1169. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  1170. // and RestoreTableToPointInTime.
  1171. //
  1172. // For tables with secondary indexes, only one of those tables can be in the
  1173. // CREATING state at any point in time. Do not attempt to create more than one
  1174. // such table simultaneously.
  1175. //
  1176. // The total limit of tables in the ACTIVE state is 250.
  1177. //
  1178. // * ErrCodeInternalServerError "InternalServerError"
  1179. // An error occurred on the server side.
  1180. //
  1181. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable
  1182. func (c *DynamoDB) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) {
  1183. req, out := c.DeleteTableRequest(input)
  1184. return out, req.Send()
  1185. }
  1186. // DeleteTableWithContext is the same as DeleteTable with the addition of
  1187. // the ability to pass a context and additional request options.
  1188. //
  1189. // See DeleteTable for details on how to use this API operation.
  1190. //
  1191. // The context must be non-nil and will be used for request cancellation. If
  1192. // the context is nil a panic will occur. In the future the SDK may create
  1193. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1194. // for more information on using Contexts.
  1195. func (c *DynamoDB) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error) {
  1196. req, out := c.DeleteTableRequest(input)
  1197. req.SetContext(ctx)
  1198. req.ApplyOptions(opts...)
  1199. return out, req.Send()
  1200. }
  1201. const opDescribeBackup = "DescribeBackup"
  1202. // DescribeBackupRequest generates a "aws/request.Request" representing the
  1203. // client's request for the DescribeBackup operation. The "output" return
  1204. // value will be populated with the request's response once the request completes
  1205. // successfully.
  1206. //
  1207. // Use "Send" method on the returned Request to send the API call to the service.
  1208. // the "output" return value is not valid until after Send returns without error.
  1209. //
  1210. // See DescribeBackup for more information on using the DescribeBackup
  1211. // API call, and error handling.
  1212. //
  1213. // This method is useful when you want to inject custom logic or configuration
  1214. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1215. //
  1216. //
  1217. // // Example sending a request using the DescribeBackupRequest method.
  1218. // req, resp := client.DescribeBackupRequest(params)
  1219. //
  1220. // err := req.Send()
  1221. // if err == nil { // resp is now filled
  1222. // fmt.Println(resp)
  1223. // }
  1224. //
  1225. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup
  1226. func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *request.Request, output *DescribeBackupOutput) {
  1227. op := &request.Operation{
  1228. Name: opDescribeBackup,
  1229. HTTPMethod: "POST",
  1230. HTTPPath: "/",
  1231. }
  1232. if input == nil {
  1233. input = &DescribeBackupInput{}
  1234. }
  1235. output = &DescribeBackupOutput{}
  1236. req = c.newRequest(op, input, output)
  1237. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1238. de := discovererDescribeEndpoints{
  1239. Required: false,
  1240. EndpointCache: c.endpointCache,
  1241. Params: map[string]*string{
  1242. "op": aws.String(req.Operation.Name),
  1243. },
  1244. Client: c,
  1245. }
  1246. for k, v := range de.Params {
  1247. if v == nil {
  1248. delete(de.Params, k)
  1249. }
  1250. }
  1251. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1252. Name: "crr.endpointdiscovery",
  1253. Fn: de.Handler,
  1254. })
  1255. }
  1256. return
  1257. }
  1258. // DescribeBackup API operation for Amazon DynamoDB.
  1259. //
  1260. // Describes an existing backup of a table.
  1261. //
  1262. // You can call DescribeBackup at a maximum rate of 10 times per second.
  1263. //
  1264. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1265. // with awserr.Error's Code and Message methods to get detailed information about
  1266. // the error.
  1267. //
  1268. // See the AWS API reference guide for Amazon DynamoDB's
  1269. // API operation DescribeBackup for usage and error information.
  1270. //
  1271. // Returned Error Codes:
  1272. // * ErrCodeBackupNotFoundException "BackupNotFoundException"
  1273. // Backup not found for the given BackupARN.
  1274. //
  1275. // * ErrCodeInternalServerError "InternalServerError"
  1276. // An error occurred on the server side.
  1277. //
  1278. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup
  1279. func (c *DynamoDB) DescribeBackup(input *DescribeBackupInput) (*DescribeBackupOutput, error) {
  1280. req, out := c.DescribeBackupRequest(input)
  1281. return out, req.Send()
  1282. }
  1283. // DescribeBackupWithContext is the same as DescribeBackup with the addition of
  1284. // the ability to pass a context and additional request options.
  1285. //
  1286. // See DescribeBackup for details on how to use this API operation.
  1287. //
  1288. // The context must be non-nil and will be used for request cancellation. If
  1289. // the context is nil a panic will occur. In the future the SDK may create
  1290. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1291. // for more information on using Contexts.
  1292. func (c *DynamoDB) DescribeBackupWithContext(ctx aws.Context, input *DescribeBackupInput, opts ...request.Option) (*DescribeBackupOutput, error) {
  1293. req, out := c.DescribeBackupRequest(input)
  1294. req.SetContext(ctx)
  1295. req.ApplyOptions(opts...)
  1296. return out, req.Send()
  1297. }
  1298. const opDescribeContinuousBackups = "DescribeContinuousBackups"
  1299. // DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the
  1300. // client's request for the DescribeContinuousBackups operation. The "output" return
  1301. // value will be populated with the request's response once the request completes
  1302. // successfully.
  1303. //
  1304. // Use "Send" method on the returned Request to send the API call to the service.
  1305. // the "output" return value is not valid until after Send returns without error.
  1306. //
  1307. // See DescribeContinuousBackups for more information on using the DescribeContinuousBackups
  1308. // API call, and error handling.
  1309. //
  1310. // This method is useful when you want to inject custom logic or configuration
  1311. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1312. //
  1313. //
  1314. // // Example sending a request using the DescribeContinuousBackupsRequest method.
  1315. // req, resp := client.DescribeContinuousBackupsRequest(params)
  1316. //
  1317. // err := req.Send()
  1318. // if err == nil { // resp is now filled
  1319. // fmt.Println(resp)
  1320. // }
  1321. //
  1322. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups
  1323. func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBackupsInput) (req *request.Request, output *DescribeContinuousBackupsOutput) {
  1324. op := &request.Operation{
  1325. Name: opDescribeContinuousBackups,
  1326. HTTPMethod: "POST",
  1327. HTTPPath: "/",
  1328. }
  1329. if input == nil {
  1330. input = &DescribeContinuousBackupsInput{}
  1331. }
  1332. output = &DescribeContinuousBackupsOutput{}
  1333. req = c.newRequest(op, input, output)
  1334. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1335. de := discovererDescribeEndpoints{
  1336. Required: false,
  1337. EndpointCache: c.endpointCache,
  1338. Params: map[string]*string{
  1339. "op": aws.String(req.Operation.Name),
  1340. },
  1341. Client: c,
  1342. }
  1343. for k, v := range de.Params {
  1344. if v == nil {
  1345. delete(de.Params, k)
  1346. }
  1347. }
  1348. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1349. Name: "crr.endpointdiscovery",
  1350. Fn: de.Handler,
  1351. })
  1352. }
  1353. return
  1354. }
  1355. // DescribeContinuousBackups API operation for Amazon DynamoDB.
  1356. //
  1357. // Checks the status of continuous backups and point in time recovery on the
  1358. // specified table. Continuous backups are ENABLED on all tables at table creation.
  1359. // If point in time recovery is enabled, PointInTimeRecoveryStatus will be set
  1360. // to ENABLED.
  1361. //
  1362. // Once continuous backups and point in time recovery are enabled, you can restore
  1363. // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.
  1364. //
  1365. // LatestRestorableDateTime is typically 5 minutes before the current time.
  1366. // You can restore your table to any point in time during the last 35 days.
  1367. //
  1368. // You can call DescribeContinuousBackups at a maximum rate of 10 times per
  1369. // second.
  1370. //
  1371. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1372. // with awserr.Error's Code and Message methods to get detailed information about
  1373. // the error.
  1374. //
  1375. // See the AWS API reference guide for Amazon DynamoDB's
  1376. // API operation DescribeContinuousBackups for usage and error information.
  1377. //
  1378. // Returned Error Codes:
  1379. // * ErrCodeTableNotFoundException "TableNotFoundException"
  1380. // A source table with the name TableName does not currently exist within the
  1381. // subscriber's account.
  1382. //
  1383. // * ErrCodeInternalServerError "InternalServerError"
  1384. // An error occurred on the server side.
  1385. //
  1386. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups
  1387. func (c *DynamoDB) DescribeContinuousBackups(input *DescribeContinuousBackupsInput) (*DescribeContinuousBackupsOutput, error) {
  1388. req, out := c.DescribeContinuousBackupsRequest(input)
  1389. return out, req.Send()
  1390. }
  1391. // DescribeContinuousBackupsWithContext is the same as DescribeContinuousBackups with the addition of
  1392. // the ability to pass a context and additional request options.
  1393. //
  1394. // See DescribeContinuousBackups for details on how to use this API operation.
  1395. //
  1396. // The context must be non-nil and will be used for request cancellation. If
  1397. // the context is nil a panic will occur. In the future the SDK may create
  1398. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1399. // for more information on using Contexts.
  1400. func (c *DynamoDB) DescribeContinuousBackupsWithContext(ctx aws.Context, input *DescribeContinuousBackupsInput, opts ...request.Option) (*DescribeContinuousBackupsOutput, error) {
  1401. req, out := c.DescribeContinuousBackupsRequest(input)
  1402. req.SetContext(ctx)
  1403. req.ApplyOptions(opts...)
  1404. return out, req.Send()
  1405. }
  1406. const opDescribeEndpoints = "DescribeEndpoints"
  1407. // DescribeEndpointsRequest generates a "aws/request.Request" representing the
  1408. // client's request for the DescribeEndpoints operation. The "output" return
  1409. // value will be populated with the request's response once the request completes
  1410. // successfully.
  1411. //
  1412. // Use "Send" method on the returned Request to send the API call to the service.
  1413. // the "output" return value is not valid until after Send returns without error.
  1414. //
  1415. // See DescribeEndpoints for more information on using the DescribeEndpoints
  1416. // API call, and error handling.
  1417. //
  1418. // This method is useful when you want to inject custom logic or configuration
  1419. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1420. //
  1421. //
  1422. // // Example sending a request using the DescribeEndpointsRequest method.
  1423. // req, resp := client.DescribeEndpointsRequest(params)
  1424. //
  1425. // err := req.Send()
  1426. // if err == nil { // resp is now filled
  1427. // fmt.Println(resp)
  1428. // }
  1429. //
  1430. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints
  1431. func (c *DynamoDB) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) {
  1432. op := &request.Operation{
  1433. Name: opDescribeEndpoints,
  1434. HTTPMethod: "POST",
  1435. HTTPPath: "/",
  1436. }
  1437. if input == nil {
  1438. input = &DescribeEndpointsInput{}
  1439. }
  1440. output = &DescribeEndpointsOutput{}
  1441. req = c.newRequest(op, input, output)
  1442. return
  1443. }
  1444. // DescribeEndpoints API operation for Amazon DynamoDB.
  1445. //
  1446. // Returns the regional endpoint information.
  1447. //
  1448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1449. // with awserr.Error's Code and Message methods to get detailed information about
  1450. // the error.
  1451. //
  1452. // See the AWS API reference guide for Amazon DynamoDB's
  1453. // API operation DescribeEndpoints for usage and error information.
  1454. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints
  1455. func (c *DynamoDB) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) {
  1456. req, out := c.DescribeEndpointsRequest(input)
  1457. return out, req.Send()
  1458. }
  1459. // DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of
  1460. // the ability to pass a context and additional request options.
  1461. //
  1462. // See DescribeEndpoints for details on how to use this API operation.
  1463. //
  1464. // The context must be non-nil and will be used for request cancellation. If
  1465. // the context is nil a panic will occur. In the future the SDK may create
  1466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1467. // for more information on using Contexts.
  1468. func (c *DynamoDB) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) {
  1469. req, out := c.DescribeEndpointsRequest(input)
  1470. req.SetContext(ctx)
  1471. req.ApplyOptions(opts...)
  1472. return out, req.Send()
  1473. }
  1474. type discovererDescribeEndpoints struct {
  1475. Client *DynamoDB
  1476. Required bool
  1477. EndpointCache *crr.EndpointCache
  1478. Params map[string]*string
  1479. Key string
  1480. }
  1481. func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) {
  1482. input := &DescribeEndpointsInput{}
  1483. resp, err := d.Client.DescribeEndpoints(input)
  1484. if err != nil {
  1485. return crr.Endpoint{}, err
  1486. }
  1487. endpoint := crr.Endpoint{
  1488. Key: d.Key,
  1489. }
  1490. for _, e := range resp.Endpoints {
  1491. if e.Address == nil {
  1492. continue
  1493. }
  1494. cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes)
  1495. u, err := url.Parse(*e.Address)
  1496. if err != nil {
  1497. continue
  1498. }
  1499. addr := crr.WeightedAddress{
  1500. URL: u,
  1501. Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute),
  1502. }
  1503. endpoint.Add(addr)
  1504. }
  1505. d.EndpointCache.Add(endpoint)
  1506. return endpoint, nil
  1507. }
  1508. func (d *discovererDescribeEndpoints) Handler(r *request.Request) {
  1509. endpointKey := crr.BuildEndpointKey(d.Params)
  1510. d.Key = endpointKey
  1511. endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required)
  1512. if err != nil {
  1513. r.Error = err
  1514. return
  1515. }
  1516. if endpoint.URL != nil && len(endpoint.URL.String()) > 0 {
  1517. r.HTTPRequest.URL = endpoint.URL
  1518. }
  1519. }
  1520. const opDescribeGlobalTable = "DescribeGlobalTable"
  1521. // DescribeGlobalTableRequest generates a "aws/request.Request" representing the
  1522. // client's request for the DescribeGlobalTable operation. The "output" return
  1523. // value will be populated with the request's response once the request completes
  1524. // successfully.
  1525. //
  1526. // Use "Send" method on the returned Request to send the API call to the service.
  1527. // the "output" return value is not valid until after Send returns without error.
  1528. //
  1529. // See DescribeGlobalTable for more information on using the DescribeGlobalTable
  1530. // API call, and error handling.
  1531. //
  1532. // This method is useful when you want to inject custom logic or configuration
  1533. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1534. //
  1535. //
  1536. // // Example sending a request using the DescribeGlobalTableRequest method.
  1537. // req, resp := client.DescribeGlobalTableRequest(params)
  1538. //
  1539. // err := req.Send()
  1540. // if err == nil { // resp is now filled
  1541. // fmt.Println(resp)
  1542. // }
  1543. //
  1544. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable
  1545. func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (req *request.Request, output *DescribeGlobalTableOutput) {
  1546. op := &request.Operation{
  1547. Name: opDescribeGlobalTable,
  1548. HTTPMethod: "POST",
  1549. HTTPPath: "/",
  1550. }
  1551. if input == nil {
  1552. input = &DescribeGlobalTableInput{}
  1553. }
  1554. output = &DescribeGlobalTableOutput{}
  1555. req = c.newRequest(op, input, output)
  1556. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1557. de := discovererDescribeEndpoints{
  1558. Required: false,
  1559. EndpointCache: c.endpointCache,
  1560. Params: map[string]*string{
  1561. "op": aws.String(req.Operation.Name),
  1562. },
  1563. Client: c,
  1564. }
  1565. for k, v := range de.Params {
  1566. if v == nil {
  1567. delete(de.Params, k)
  1568. }
  1569. }
  1570. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1571. Name: "crr.endpointdiscovery",
  1572. Fn: de.Handler,
  1573. })
  1574. }
  1575. return
  1576. }
  1577. // DescribeGlobalTable API operation for Amazon DynamoDB.
  1578. //
  1579. // Returns information about the specified global table.
  1580. //
  1581. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1582. // with awserr.Error's Code and Message methods to get detailed information about
  1583. // the error.
  1584. //
  1585. // See the AWS API reference guide for Amazon DynamoDB's
  1586. // API operation DescribeGlobalTable for usage and error information.
  1587. //
  1588. // Returned Error Codes:
  1589. // * ErrCodeInternalServerError "InternalServerError"
  1590. // An error occurred on the server side.
  1591. //
  1592. // * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
  1593. // The specified global table does not exist.
  1594. //
  1595. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable
  1596. func (c *DynamoDB) DescribeGlobalTable(input *DescribeGlobalTableInput) (*DescribeGlobalTableOutput, error) {
  1597. req, out := c.DescribeGlobalTableRequest(input)
  1598. return out, req.Send()
  1599. }
  1600. // DescribeGlobalTableWithContext is the same as DescribeGlobalTable with the addition of
  1601. // the ability to pass a context and additional request options.
  1602. //
  1603. // See DescribeGlobalTable for details on how to use this API operation.
  1604. //
  1605. // The context must be non-nil and will be used for request cancellation. If
  1606. // the context is nil a panic will occur. In the future the SDK may create
  1607. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1608. // for more information on using Contexts.
  1609. func (c *DynamoDB) DescribeGlobalTableWithContext(ctx aws.Context, input *DescribeGlobalTableInput, opts ...request.Option) (*DescribeGlobalTableOutput, error) {
  1610. req, out := c.DescribeGlobalTableRequest(input)
  1611. req.SetContext(ctx)
  1612. req.ApplyOptions(opts...)
  1613. return out, req.Send()
  1614. }
  1615. const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings"
  1616. // DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the
  1617. // client's request for the DescribeGlobalTableSettings operation. The "output" return
  1618. // value will be populated with the request's response once the request completes
  1619. // successfully.
  1620. //
  1621. // Use "Send" method on the returned Request to send the API call to the service.
  1622. // the "output" return value is not valid until after Send returns without error.
  1623. //
  1624. // See DescribeGlobalTableSettings for more information on using the DescribeGlobalTableSettings
  1625. // API call, and error handling.
  1626. //
  1627. // This method is useful when you want to inject custom logic or configuration
  1628. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1629. //
  1630. //
  1631. // // Example sending a request using the DescribeGlobalTableSettingsRequest method.
  1632. // req, resp := client.DescribeGlobalTableSettingsRequest(params)
  1633. //
  1634. // err := req.Send()
  1635. // if err == nil { // resp is now filled
  1636. // fmt.Println(resp)
  1637. // }
  1638. //
  1639. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings
  1640. func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTableSettingsInput) (req *request.Request, output *DescribeGlobalTableSettingsOutput) {
  1641. op := &request.Operation{
  1642. Name: opDescribeGlobalTableSettings,
  1643. HTTPMethod: "POST",
  1644. HTTPPath: "/",
  1645. }
  1646. if input == nil {
  1647. input = &DescribeGlobalTableSettingsInput{}
  1648. }
  1649. output = &DescribeGlobalTableSettingsOutput{}
  1650. req = c.newRequest(op, input, output)
  1651. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1652. de := discovererDescribeEndpoints{
  1653. Required: false,
  1654. EndpointCache: c.endpointCache,
  1655. Params: map[string]*string{
  1656. "op": aws.String(req.Operation.Name),
  1657. },
  1658. Client: c,
  1659. }
  1660. for k, v := range de.Params {
  1661. if v == nil {
  1662. delete(de.Params, k)
  1663. }
  1664. }
  1665. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1666. Name: "crr.endpointdiscovery",
  1667. Fn: de.Handler,
  1668. })
  1669. }
  1670. return
  1671. }
  1672. // DescribeGlobalTableSettings API operation for Amazon DynamoDB.
  1673. //
  1674. // Describes region specific settings for a global table.
  1675. //
  1676. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1677. // with awserr.Error's Code and Message methods to get detailed information about
  1678. // the error.
  1679. //
  1680. // See the AWS API reference guide for Amazon DynamoDB's
  1681. // API operation DescribeGlobalTableSettings for usage and error information.
  1682. //
  1683. // Returned Error Codes:
  1684. // * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
  1685. // The specified global table does not exist.
  1686. //
  1687. // * ErrCodeInternalServerError "InternalServerError"
  1688. // An error occurred on the server side.
  1689. //
  1690. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings
  1691. func (c *DynamoDB) DescribeGlobalTableSettings(input *DescribeGlobalTableSettingsInput) (*DescribeGlobalTableSettingsOutput, error) {
  1692. req, out := c.DescribeGlobalTableSettingsRequest(input)
  1693. return out, req.Send()
  1694. }
  1695. // DescribeGlobalTableSettingsWithContext is the same as DescribeGlobalTableSettings with the addition of
  1696. // the ability to pass a context and additional request options.
  1697. //
  1698. // See DescribeGlobalTableSettings for details on how to use this API operation.
  1699. //
  1700. // The context must be non-nil and will be used for request cancellation. If
  1701. // the context is nil a panic will occur. In the future the SDK may create
  1702. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1703. // for more information on using Contexts.
  1704. func (c *DynamoDB) DescribeGlobalTableSettingsWithContext(ctx aws.Context, input *DescribeGlobalTableSettingsInput, opts ...request.Option) (*DescribeGlobalTableSettingsOutput, error) {
  1705. req, out := c.DescribeGlobalTableSettingsRequest(input)
  1706. req.SetContext(ctx)
  1707. req.ApplyOptions(opts...)
  1708. return out, req.Send()
  1709. }
  1710. const opDescribeLimits = "DescribeLimits"
  1711. // DescribeLimitsRequest generates a "aws/request.Request" representing the
  1712. // client's request for the DescribeLimits operation. The "output" return
  1713. // value will be populated with the request's response once the request completes
  1714. // successfully.
  1715. //
  1716. // Use "Send" method on the returned Request to send the API call to the service.
  1717. // the "output" return value is not valid until after Send returns without error.
  1718. //
  1719. // See DescribeLimits for more information on using the DescribeLimits
  1720. // API call, and error handling.
  1721. //
  1722. // This method is useful when you want to inject custom logic or configuration
  1723. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1724. //
  1725. //
  1726. // // Example sending a request using the DescribeLimitsRequest method.
  1727. // req, resp := client.DescribeLimitsRequest(params)
  1728. //
  1729. // err := req.Send()
  1730. // if err == nil { // resp is now filled
  1731. // fmt.Println(resp)
  1732. // }
  1733. //
  1734. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits
  1735. func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput) {
  1736. op := &request.Operation{
  1737. Name: opDescribeLimits,
  1738. HTTPMethod: "POST",
  1739. HTTPPath: "/",
  1740. }
  1741. if input == nil {
  1742. input = &DescribeLimitsInput{}
  1743. }
  1744. output = &DescribeLimitsOutput{}
  1745. req = c.newRequest(op, input, output)
  1746. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1747. de := discovererDescribeEndpoints{
  1748. Required: false,
  1749. EndpointCache: c.endpointCache,
  1750. Params: map[string]*string{
  1751. "op": aws.String(req.Operation.Name),
  1752. },
  1753. Client: c,
  1754. }
  1755. for k, v := range de.Params {
  1756. if v == nil {
  1757. delete(de.Params, k)
  1758. }
  1759. }
  1760. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1761. Name: "crr.endpointdiscovery",
  1762. Fn: de.Handler,
  1763. })
  1764. }
  1765. return
  1766. }
  1767. // DescribeLimits API operation for Amazon DynamoDB.
  1768. //
  1769. // Returns the current provisioned-capacity limits for your AWS account in a
  1770. // region, both for the region as a whole and for any one DynamoDB table that
  1771. // you create there.
  1772. //
  1773. // When you establish an AWS account, the account has initial limits on the
  1774. // maximum read capacity units and write capacity units that you can provision
  1775. // across all of your DynamoDB tables in a given region. Also, there are per-table
  1776. // limits that apply when you create a table there. For more information, see
  1777. // Limits (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  1778. // page in the Amazon DynamoDB Developer Guide.
  1779. //
  1780. // Although you can increase these limits by filing a case at AWS Support Center
  1781. // (https://console.aws.amazon.com/support/home#/), obtaining the increase is
  1782. // not instantaneous. The DescribeLimits action lets you write code to compare
  1783. // the capacity you are currently using to those limits imposed by your account
  1784. // so that you have enough time to apply for an increase before you hit a limit.
  1785. //
  1786. // For example, you could use one of the AWS SDKs to do the following:
  1787. //
  1788. // Call DescribeLimits for a particular region to obtain your current account
  1789. // limits on provisioned capacity there.
  1790. //
  1791. // Create a variable to hold the aggregate read capacity units provisioned for
  1792. // all your tables in that region, and one to hold the aggregate write capacity
  1793. // units. Zero them both.
  1794. //
  1795. // Call ListTables to obtain a list of all your DynamoDB tables.
  1796. //
  1797. // For each table name listed by ListTables, do the following:
  1798. //
  1799. // Call DescribeTable with the table name.
  1800. //
  1801. // Use the data returned by DescribeTable to add the read capacity units and
  1802. // write capacity units provisioned for the table itself to your variables.
  1803. //
  1804. // If the table has one or more global secondary indexes (GSIs), loop over these
  1805. // GSIs and add their provisioned capacity values to your variables as well.
  1806. //
  1807. // Report the account limits for that region returned by DescribeLimits, along
  1808. // with the total current provisioned capacity levels you have calculated.
  1809. //
  1810. // This will let you see whether you are getting close to your account-level
  1811. // limits.
  1812. //
  1813. // The per-table limits apply only when you are creating a new table. They restrict
  1814. // the sum of the provisioned capacity of the new table itself and all its global
  1815. // secondary indexes.
  1816. //
  1817. // For existing tables and their GSIs, DynamoDB will not let you increase provisioned
  1818. // capacity extremely rapidly, but the only upper limit that applies is that
  1819. // the aggregate provisioned capacity over all your tables and GSIs cannot exceed
  1820. // either of the per-account limits.
  1821. //
  1822. // DescribeLimits should only be called periodically. You can expect throttling
  1823. // errors if you call it more than once in a minute.
  1824. //
  1825. // The DescribeLimits Request element has no content.
  1826. //
  1827. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1828. // with awserr.Error's Code and Message methods to get detailed information about
  1829. // the error.
  1830. //
  1831. // See the AWS API reference guide for Amazon DynamoDB's
  1832. // API operation DescribeLimits for usage and error information.
  1833. //
  1834. // Returned Error Codes:
  1835. // * ErrCodeInternalServerError "InternalServerError"
  1836. // An error occurred on the server side.
  1837. //
  1838. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits
  1839. func (c *DynamoDB) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error) {
  1840. req, out := c.DescribeLimitsRequest(input)
  1841. return out, req.Send()
  1842. }
  1843. // DescribeLimitsWithContext is the same as DescribeLimits with the addition of
  1844. // the ability to pass a context and additional request options.
  1845. //
  1846. // See DescribeLimits for details on how to use this API operation.
  1847. //
  1848. // The context must be non-nil and will be used for request cancellation. If
  1849. // the context is nil a panic will occur. In the future the SDK may create
  1850. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1851. // for more information on using Contexts.
  1852. func (c *DynamoDB) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error) {
  1853. req, out := c.DescribeLimitsRequest(input)
  1854. req.SetContext(ctx)
  1855. req.ApplyOptions(opts...)
  1856. return out, req.Send()
  1857. }
  1858. const opDescribeTable = "DescribeTable"
  1859. // DescribeTableRequest generates a "aws/request.Request" representing the
  1860. // client's request for the DescribeTable operation. The "output" return
  1861. // value will be populated with the request's response once the request completes
  1862. // successfully.
  1863. //
  1864. // Use "Send" method on the returned Request to send the API call to the service.
  1865. // the "output" return value is not valid until after Send returns without error.
  1866. //
  1867. // See DescribeTable for more information on using the DescribeTable
  1868. // API call, and error handling.
  1869. //
  1870. // This method is useful when you want to inject custom logic or configuration
  1871. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1872. //
  1873. //
  1874. // // Example sending a request using the DescribeTableRequest method.
  1875. // req, resp := client.DescribeTableRequest(params)
  1876. //
  1877. // err := req.Send()
  1878. // if err == nil { // resp is now filled
  1879. // fmt.Println(resp)
  1880. // }
  1881. //
  1882. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable
  1883. func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) {
  1884. op := &request.Operation{
  1885. Name: opDescribeTable,
  1886. HTTPMethod: "POST",
  1887. HTTPPath: "/",
  1888. }
  1889. if input == nil {
  1890. input = &DescribeTableInput{}
  1891. }
  1892. output = &DescribeTableOutput{}
  1893. req = c.newRequest(op, input, output)
  1894. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1895. de := discovererDescribeEndpoints{
  1896. Required: false,
  1897. EndpointCache: c.endpointCache,
  1898. Params: map[string]*string{
  1899. "op": aws.String(req.Operation.Name),
  1900. },
  1901. Client: c,
  1902. }
  1903. for k, v := range de.Params {
  1904. if v == nil {
  1905. delete(de.Params, k)
  1906. }
  1907. }
  1908. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  1909. Name: "crr.endpointdiscovery",
  1910. Fn: de.Handler,
  1911. })
  1912. }
  1913. return
  1914. }
  1915. // DescribeTable API operation for Amazon DynamoDB.
  1916. //
  1917. // Returns information about the table, including the current status of the
  1918. // table, when it was created, the primary key schema, and any indexes on the
  1919. // table.
  1920. //
  1921. // If you issue a DescribeTable request immediately after a CreateTable request,
  1922. // DynamoDB might return a ResourceNotFoundException. This is because DescribeTable
  1923. // uses an eventually consistent query, and the metadata for your table might
  1924. // not be available at that moment. Wait for a few seconds, and then try the
  1925. // DescribeTable request again.
  1926. //
  1927. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1928. // with awserr.Error's Code and Message methods to get detailed information about
  1929. // the error.
  1930. //
  1931. // See the AWS API reference guide for Amazon DynamoDB's
  1932. // API operation DescribeTable for usage and error information.
  1933. //
  1934. // Returned Error Codes:
  1935. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1936. // The operation tried to access a nonexistent table or index. The resource
  1937. // might not be specified correctly, or its status might not be ACTIVE.
  1938. //
  1939. // * ErrCodeInternalServerError "InternalServerError"
  1940. // An error occurred on the server side.
  1941. //
  1942. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable
  1943. func (c *DynamoDB) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) {
  1944. req, out := c.DescribeTableRequest(input)
  1945. return out, req.Send()
  1946. }
  1947. // DescribeTableWithContext is the same as DescribeTable with the addition of
  1948. // the ability to pass a context and additional request options.
  1949. //
  1950. // See DescribeTable for details on how to use this API operation.
  1951. //
  1952. // The context must be non-nil and will be used for request cancellation. If
  1953. // the context is nil a panic will occur. In the future the SDK may create
  1954. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1955. // for more information on using Contexts.
  1956. func (c *DynamoDB) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error) {
  1957. req, out := c.DescribeTableRequest(input)
  1958. req.SetContext(ctx)
  1959. req.ApplyOptions(opts...)
  1960. return out, req.Send()
  1961. }
  1962. const opDescribeTimeToLive = "DescribeTimeToLive"
  1963. // DescribeTimeToLiveRequest generates a "aws/request.Request" representing the
  1964. // client's request for the DescribeTimeToLive operation. The "output" return
  1965. // value will be populated with the request's response once the request completes
  1966. // successfully.
  1967. //
  1968. // Use "Send" method on the returned Request to send the API call to the service.
  1969. // the "output" return value is not valid until after Send returns without error.
  1970. //
  1971. // See DescribeTimeToLive for more information on using the DescribeTimeToLive
  1972. // API call, and error handling.
  1973. //
  1974. // This method is useful when you want to inject custom logic or configuration
  1975. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1976. //
  1977. //
  1978. // // Example sending a request using the DescribeTimeToLiveRequest method.
  1979. // req, resp := client.DescribeTimeToLiveRequest(params)
  1980. //
  1981. // err := req.Send()
  1982. // if err == nil { // resp is now filled
  1983. // fmt.Println(resp)
  1984. // }
  1985. //
  1986. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive
  1987. func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (req *request.Request, output *DescribeTimeToLiveOutput) {
  1988. op := &request.Operation{
  1989. Name: opDescribeTimeToLive,
  1990. HTTPMethod: "POST",
  1991. HTTPPath: "/",
  1992. }
  1993. if input == nil {
  1994. input = &DescribeTimeToLiveInput{}
  1995. }
  1996. output = &DescribeTimeToLiveOutput{}
  1997. req = c.newRequest(op, input, output)
  1998. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  1999. de := discovererDescribeEndpoints{
  2000. Required: false,
  2001. EndpointCache: c.endpointCache,
  2002. Params: map[string]*string{
  2003. "op": aws.String(req.Operation.Name),
  2004. },
  2005. Client: c,
  2006. }
  2007. for k, v := range de.Params {
  2008. if v == nil {
  2009. delete(de.Params, k)
  2010. }
  2011. }
  2012. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2013. Name: "crr.endpointdiscovery",
  2014. Fn: de.Handler,
  2015. })
  2016. }
  2017. return
  2018. }
  2019. // DescribeTimeToLive API operation for Amazon DynamoDB.
  2020. //
  2021. // Gives a description of the Time to Live (TTL) status on the specified table.
  2022. //
  2023. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2024. // with awserr.Error's Code and Message methods to get detailed information about
  2025. // the error.
  2026. //
  2027. // See the AWS API reference guide for Amazon DynamoDB's
  2028. // API operation DescribeTimeToLive for usage and error information.
  2029. //
  2030. // Returned Error Codes:
  2031. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2032. // The operation tried to access a nonexistent table or index. The resource
  2033. // might not be specified correctly, or its status might not be ACTIVE.
  2034. //
  2035. // * ErrCodeInternalServerError "InternalServerError"
  2036. // An error occurred on the server side.
  2037. //
  2038. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive
  2039. func (c *DynamoDB) DescribeTimeToLive(input *DescribeTimeToLiveInput) (*DescribeTimeToLiveOutput, error) {
  2040. req, out := c.DescribeTimeToLiveRequest(input)
  2041. return out, req.Send()
  2042. }
  2043. // DescribeTimeToLiveWithContext is the same as DescribeTimeToLive with the addition of
  2044. // the ability to pass a context and additional request options.
  2045. //
  2046. // See DescribeTimeToLive for details on how to use this API operation.
  2047. //
  2048. // The context must be non-nil and will be used for request cancellation. If
  2049. // the context is nil a panic will occur. In the future the SDK may create
  2050. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2051. // for more information on using Contexts.
  2052. func (c *DynamoDB) DescribeTimeToLiveWithContext(ctx aws.Context, input *DescribeTimeToLiveInput, opts ...request.Option) (*DescribeTimeToLiveOutput, error) {
  2053. req, out := c.DescribeTimeToLiveRequest(input)
  2054. req.SetContext(ctx)
  2055. req.ApplyOptions(opts...)
  2056. return out, req.Send()
  2057. }
  2058. const opGetItem = "GetItem"
  2059. // GetItemRequest generates a "aws/request.Request" representing the
  2060. // client's request for the GetItem operation. The "output" return
  2061. // value will be populated with the request's response once the request completes
  2062. // successfully.
  2063. //
  2064. // Use "Send" method on the returned Request to send the API call to the service.
  2065. // the "output" return value is not valid until after Send returns without error.
  2066. //
  2067. // See GetItem for more information on using the GetItem
  2068. // API call, and error handling.
  2069. //
  2070. // This method is useful when you want to inject custom logic or configuration
  2071. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2072. //
  2073. //
  2074. // // Example sending a request using the GetItemRequest method.
  2075. // req, resp := client.GetItemRequest(params)
  2076. //
  2077. // err := req.Send()
  2078. // if err == nil { // resp is now filled
  2079. // fmt.Println(resp)
  2080. // }
  2081. //
  2082. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem
  2083. func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, output *GetItemOutput) {
  2084. op := &request.Operation{
  2085. Name: opGetItem,
  2086. HTTPMethod: "POST",
  2087. HTTPPath: "/",
  2088. }
  2089. if input == nil {
  2090. input = &GetItemInput{}
  2091. }
  2092. output = &GetItemOutput{}
  2093. req = c.newRequest(op, input, output)
  2094. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2095. de := discovererDescribeEndpoints{
  2096. Required: false,
  2097. EndpointCache: c.endpointCache,
  2098. Params: map[string]*string{
  2099. "op": aws.String(req.Operation.Name),
  2100. },
  2101. Client: c,
  2102. }
  2103. for k, v := range de.Params {
  2104. if v == nil {
  2105. delete(de.Params, k)
  2106. }
  2107. }
  2108. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2109. Name: "crr.endpointdiscovery",
  2110. Fn: de.Handler,
  2111. })
  2112. }
  2113. return
  2114. }
  2115. // GetItem API operation for Amazon DynamoDB.
  2116. //
  2117. // The GetItem operation returns a set of attributes for the item with the given
  2118. // primary key. If there is no matching item, GetItem does not return any data
  2119. // and there will be no Item element in the response.
  2120. //
  2121. // GetItem provides an eventually consistent read by default. If your application
  2122. // requires a strongly consistent read, set ConsistentRead to true. Although
  2123. // a strongly consistent read might take more time than an eventually consistent
  2124. // read, it always returns the last updated value.
  2125. //
  2126. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2127. // with awserr.Error's Code and Message methods to get detailed information about
  2128. // the error.
  2129. //
  2130. // See the AWS API reference guide for Amazon DynamoDB's
  2131. // API operation GetItem for usage and error information.
  2132. //
  2133. // Returned Error Codes:
  2134. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  2135. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  2136. // requests that receive this exception. Your request is eventually successful,
  2137. // unless your retry queue is too large to finish. Reduce the frequency of requests
  2138. // and use exponential backoff. For more information, go to Error Retries and
  2139. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  2140. // in the Amazon DynamoDB Developer Guide.
  2141. //
  2142. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2143. // The operation tried to access a nonexistent table or index. The resource
  2144. // might not be specified correctly, or its status might not be ACTIVE.
  2145. //
  2146. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  2147. // Throughput exceeds the current throughput limit for your account. Please
  2148. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  2149. // to request a limit increase.
  2150. //
  2151. // * ErrCodeInternalServerError "InternalServerError"
  2152. // An error occurred on the server side.
  2153. //
  2154. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem
  2155. func (c *DynamoDB) GetItem(input *GetItemInput) (*GetItemOutput, error) {
  2156. req, out := c.GetItemRequest(input)
  2157. return out, req.Send()
  2158. }
  2159. // GetItemWithContext is the same as GetItem with the addition of
  2160. // the ability to pass a context and additional request options.
  2161. //
  2162. // See GetItem for details on how to use this API operation.
  2163. //
  2164. // The context must be non-nil and will be used for request cancellation. If
  2165. // the context is nil a panic will occur. In the future the SDK may create
  2166. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2167. // for more information on using Contexts.
  2168. func (c *DynamoDB) GetItemWithContext(ctx aws.Context, input *GetItemInput, opts ...request.Option) (*GetItemOutput, error) {
  2169. req, out := c.GetItemRequest(input)
  2170. req.SetContext(ctx)
  2171. req.ApplyOptions(opts...)
  2172. return out, req.Send()
  2173. }
  2174. const opListBackups = "ListBackups"
  2175. // ListBackupsRequest generates a "aws/request.Request" representing the
  2176. // client's request for the ListBackups operation. The "output" return
  2177. // value will be populated with the request's response once the request completes
  2178. // successfully.
  2179. //
  2180. // Use "Send" method on the returned Request to send the API call to the service.
  2181. // the "output" return value is not valid until after Send returns without error.
  2182. //
  2183. // See ListBackups for more information on using the ListBackups
  2184. // API call, and error handling.
  2185. //
  2186. // This method is useful when you want to inject custom logic or configuration
  2187. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2188. //
  2189. //
  2190. // // Example sending a request using the ListBackupsRequest method.
  2191. // req, resp := client.ListBackupsRequest(params)
  2192. //
  2193. // err := req.Send()
  2194. // if err == nil { // resp is now filled
  2195. // fmt.Println(resp)
  2196. // }
  2197. //
  2198. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups
  2199. func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Request, output *ListBackupsOutput) {
  2200. op := &request.Operation{
  2201. Name: opListBackups,
  2202. HTTPMethod: "POST",
  2203. HTTPPath: "/",
  2204. }
  2205. if input == nil {
  2206. input = &ListBackupsInput{}
  2207. }
  2208. output = &ListBackupsOutput{}
  2209. req = c.newRequest(op, input, output)
  2210. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2211. de := discovererDescribeEndpoints{
  2212. Required: false,
  2213. EndpointCache: c.endpointCache,
  2214. Params: map[string]*string{
  2215. "op": aws.String(req.Operation.Name),
  2216. },
  2217. Client: c,
  2218. }
  2219. for k, v := range de.Params {
  2220. if v == nil {
  2221. delete(de.Params, k)
  2222. }
  2223. }
  2224. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2225. Name: "crr.endpointdiscovery",
  2226. Fn: de.Handler,
  2227. })
  2228. }
  2229. return
  2230. }
  2231. // ListBackups API operation for Amazon DynamoDB.
  2232. //
  2233. // List backups associated with an AWS account. To list backups for a given
  2234. // table, specify TableName. ListBackups returns a paginated list of results
  2235. // with at most 1MB worth of items in a page. You can also specify a limit for
  2236. // the maximum number of entries to be returned in a page.
  2237. //
  2238. // In the request, start time is inclusive but end time is exclusive. Note that
  2239. // these limits are for the time at which the original backup was requested.
  2240. //
  2241. // You can call ListBackups a maximum of 5 times per second.
  2242. //
  2243. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2244. // with awserr.Error's Code and Message methods to get detailed information about
  2245. // the error.
  2246. //
  2247. // See the AWS API reference guide for Amazon DynamoDB's
  2248. // API operation ListBackups for usage and error information.
  2249. //
  2250. // Returned Error Codes:
  2251. // * ErrCodeInternalServerError "InternalServerError"
  2252. // An error occurred on the server side.
  2253. //
  2254. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups
  2255. func (c *DynamoDB) ListBackups(input *ListBackupsInput) (*ListBackupsOutput, error) {
  2256. req, out := c.ListBackupsRequest(input)
  2257. return out, req.Send()
  2258. }
  2259. // ListBackupsWithContext is the same as ListBackups with the addition of
  2260. // the ability to pass a context and additional request options.
  2261. //
  2262. // See ListBackups for details on how to use this API operation.
  2263. //
  2264. // The context must be non-nil and will be used for request cancellation. If
  2265. // the context is nil a panic will occur. In the future the SDK may create
  2266. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2267. // for more information on using Contexts.
  2268. func (c *DynamoDB) ListBackupsWithContext(ctx aws.Context, input *ListBackupsInput, opts ...request.Option) (*ListBackupsOutput, error) {
  2269. req, out := c.ListBackupsRequest(input)
  2270. req.SetContext(ctx)
  2271. req.ApplyOptions(opts...)
  2272. return out, req.Send()
  2273. }
  2274. const opListGlobalTables = "ListGlobalTables"
  2275. // ListGlobalTablesRequest generates a "aws/request.Request" representing the
  2276. // client's request for the ListGlobalTables operation. The "output" return
  2277. // value will be populated with the request's response once the request completes
  2278. // successfully.
  2279. //
  2280. // Use "Send" method on the returned Request to send the API call to the service.
  2281. // the "output" return value is not valid until after Send returns without error.
  2282. //
  2283. // See ListGlobalTables for more information on using the ListGlobalTables
  2284. // API call, and error handling.
  2285. //
  2286. // This method is useful when you want to inject custom logic or configuration
  2287. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2288. //
  2289. //
  2290. // // Example sending a request using the ListGlobalTablesRequest method.
  2291. // req, resp := client.ListGlobalTablesRequest(params)
  2292. //
  2293. // err := req.Send()
  2294. // if err == nil { // resp is now filled
  2295. // fmt.Println(resp)
  2296. // }
  2297. //
  2298. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
  2299. func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *request.Request, output *ListGlobalTablesOutput) {
  2300. op := &request.Operation{
  2301. Name: opListGlobalTables,
  2302. HTTPMethod: "POST",
  2303. HTTPPath: "/",
  2304. }
  2305. if input == nil {
  2306. input = &ListGlobalTablesInput{}
  2307. }
  2308. output = &ListGlobalTablesOutput{}
  2309. req = c.newRequest(op, input, output)
  2310. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2311. de := discovererDescribeEndpoints{
  2312. Required: false,
  2313. EndpointCache: c.endpointCache,
  2314. Params: map[string]*string{
  2315. "op": aws.String(req.Operation.Name),
  2316. },
  2317. Client: c,
  2318. }
  2319. for k, v := range de.Params {
  2320. if v == nil {
  2321. delete(de.Params, k)
  2322. }
  2323. }
  2324. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2325. Name: "crr.endpointdiscovery",
  2326. Fn: de.Handler,
  2327. })
  2328. }
  2329. return
  2330. }
  2331. // ListGlobalTables API operation for Amazon DynamoDB.
  2332. //
  2333. // Lists all global tables that have a replica in the specified region.
  2334. //
  2335. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2336. // with awserr.Error's Code and Message methods to get detailed information about
  2337. // the error.
  2338. //
  2339. // See the AWS API reference guide for Amazon DynamoDB's
  2340. // API operation ListGlobalTables for usage and error information.
  2341. //
  2342. // Returned Error Codes:
  2343. // * ErrCodeInternalServerError "InternalServerError"
  2344. // An error occurred on the server side.
  2345. //
  2346. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables
  2347. func (c *DynamoDB) ListGlobalTables(input *ListGlobalTablesInput) (*ListGlobalTablesOutput, error) {
  2348. req, out := c.ListGlobalTablesRequest(input)
  2349. return out, req.Send()
  2350. }
  2351. // ListGlobalTablesWithContext is the same as ListGlobalTables with the addition of
  2352. // the ability to pass a context and additional request options.
  2353. //
  2354. // See ListGlobalTables for details on how to use this API operation.
  2355. //
  2356. // The context must be non-nil and will be used for request cancellation. If
  2357. // the context is nil a panic will occur. In the future the SDK may create
  2358. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2359. // for more information on using Contexts.
  2360. func (c *DynamoDB) ListGlobalTablesWithContext(ctx aws.Context, input *ListGlobalTablesInput, opts ...request.Option) (*ListGlobalTablesOutput, error) {
  2361. req, out := c.ListGlobalTablesRequest(input)
  2362. req.SetContext(ctx)
  2363. req.ApplyOptions(opts...)
  2364. return out, req.Send()
  2365. }
  2366. const opListTables = "ListTables"
  2367. // ListTablesRequest generates a "aws/request.Request" representing the
  2368. // client's request for the ListTables operation. The "output" return
  2369. // value will be populated with the request's response once the request completes
  2370. // successfully.
  2371. //
  2372. // Use "Send" method on the returned Request to send the API call to the service.
  2373. // the "output" return value is not valid until after Send returns without error.
  2374. //
  2375. // See ListTables for more information on using the ListTables
  2376. // API call, and error handling.
  2377. //
  2378. // This method is useful when you want to inject custom logic or configuration
  2379. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2380. //
  2381. //
  2382. // // Example sending a request using the ListTablesRequest method.
  2383. // req, resp := client.ListTablesRequest(params)
  2384. //
  2385. // err := req.Send()
  2386. // if err == nil { // resp is now filled
  2387. // fmt.Println(resp)
  2388. // }
  2389. //
  2390. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables
  2391. func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) {
  2392. op := &request.Operation{
  2393. Name: opListTables,
  2394. HTTPMethod: "POST",
  2395. HTTPPath: "/",
  2396. Paginator: &request.Paginator{
  2397. InputTokens: []string{"ExclusiveStartTableName"},
  2398. OutputTokens: []string{"LastEvaluatedTableName"},
  2399. LimitToken: "Limit",
  2400. TruncationToken: "",
  2401. },
  2402. }
  2403. if input == nil {
  2404. input = &ListTablesInput{}
  2405. }
  2406. output = &ListTablesOutput{}
  2407. req = c.newRequest(op, input, output)
  2408. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2409. de := discovererDescribeEndpoints{
  2410. Required: false,
  2411. EndpointCache: c.endpointCache,
  2412. Params: map[string]*string{
  2413. "op": aws.String(req.Operation.Name),
  2414. },
  2415. Client: c,
  2416. }
  2417. for k, v := range de.Params {
  2418. if v == nil {
  2419. delete(de.Params, k)
  2420. }
  2421. }
  2422. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2423. Name: "crr.endpointdiscovery",
  2424. Fn: de.Handler,
  2425. })
  2426. }
  2427. return
  2428. }
  2429. // ListTables API operation for Amazon DynamoDB.
  2430. //
  2431. // Returns an array of table names associated with the current account and endpoint.
  2432. // The output from ListTables is paginated, with each page returning a maximum
  2433. // of 100 table names.
  2434. //
  2435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2436. // with awserr.Error's Code and Message methods to get detailed information about
  2437. // the error.
  2438. //
  2439. // See the AWS API reference guide for Amazon DynamoDB's
  2440. // API operation ListTables for usage and error information.
  2441. //
  2442. // Returned Error Codes:
  2443. // * ErrCodeInternalServerError "InternalServerError"
  2444. // An error occurred on the server side.
  2445. //
  2446. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables
  2447. func (c *DynamoDB) ListTables(input *ListTablesInput) (*ListTablesOutput, error) {
  2448. req, out := c.ListTablesRequest(input)
  2449. return out, req.Send()
  2450. }
  2451. // ListTablesWithContext is the same as ListTables with the addition of
  2452. // the ability to pass a context and additional request options.
  2453. //
  2454. // See ListTables for details on how to use this API operation.
  2455. //
  2456. // The context must be non-nil and will be used for request cancellation. If
  2457. // the context is nil a panic will occur. In the future the SDK may create
  2458. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2459. // for more information on using Contexts.
  2460. func (c *DynamoDB) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error) {
  2461. req, out := c.ListTablesRequest(input)
  2462. req.SetContext(ctx)
  2463. req.ApplyOptions(opts...)
  2464. return out, req.Send()
  2465. }
  2466. // ListTablesPages iterates over the pages of a ListTables operation,
  2467. // calling the "fn" function with the response data for each page. To stop
  2468. // iterating, return false from the fn function.
  2469. //
  2470. // See ListTables method for more information on how to use this operation.
  2471. //
  2472. // Note: This operation can generate multiple requests to a service.
  2473. //
  2474. // // Example iterating over at most 3 pages of a ListTables operation.
  2475. // pageNum := 0
  2476. // err := client.ListTablesPages(params,
  2477. // func(page *ListTablesOutput, lastPage bool) bool {
  2478. // pageNum++
  2479. // fmt.Println(page)
  2480. // return pageNum <= 3
  2481. // })
  2482. //
  2483. func (c *DynamoDB) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error {
  2484. return c.ListTablesPagesWithContext(aws.BackgroundContext(), input, fn)
  2485. }
  2486. // ListTablesPagesWithContext same as ListTablesPages except
  2487. // it takes a Context and allows setting request options on the pages.
  2488. //
  2489. // The context must be non-nil and will be used for request cancellation. If
  2490. // the context is nil a panic will occur. In the future the SDK may create
  2491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2492. // for more information on using Contexts.
  2493. func (c *DynamoDB) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error {
  2494. p := request.Pagination{
  2495. NewRequest: func() (*request.Request, error) {
  2496. var inCpy *ListTablesInput
  2497. if input != nil {
  2498. tmp := *input
  2499. inCpy = &tmp
  2500. }
  2501. req, _ := c.ListTablesRequest(inCpy)
  2502. req.SetContext(ctx)
  2503. req.ApplyOptions(opts...)
  2504. return req, nil
  2505. },
  2506. }
  2507. cont := true
  2508. for p.Next() && cont {
  2509. cont = fn(p.Page().(*ListTablesOutput), !p.HasNextPage())
  2510. }
  2511. return p.Err()
  2512. }
  2513. const opListTagsOfResource = "ListTagsOfResource"
  2514. // ListTagsOfResourceRequest generates a "aws/request.Request" representing the
  2515. // client's request for the ListTagsOfResource operation. The "output" return
  2516. // value will be populated with the request's response once the request completes
  2517. // successfully.
  2518. //
  2519. // Use "Send" method on the returned Request to send the API call to the service.
  2520. // the "output" return value is not valid until after Send returns without error.
  2521. //
  2522. // See ListTagsOfResource for more information on using the ListTagsOfResource
  2523. // API call, and error handling.
  2524. //
  2525. // This method is useful when you want to inject custom logic or configuration
  2526. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2527. //
  2528. //
  2529. // // Example sending a request using the ListTagsOfResourceRequest method.
  2530. // req, resp := client.ListTagsOfResourceRequest(params)
  2531. //
  2532. // err := req.Send()
  2533. // if err == nil { // resp is now filled
  2534. // fmt.Println(resp)
  2535. // }
  2536. //
  2537. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource
  2538. func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (req *request.Request, output *ListTagsOfResourceOutput) {
  2539. op := &request.Operation{
  2540. Name: opListTagsOfResource,
  2541. HTTPMethod: "POST",
  2542. HTTPPath: "/",
  2543. }
  2544. if input == nil {
  2545. input = &ListTagsOfResourceInput{}
  2546. }
  2547. output = &ListTagsOfResourceOutput{}
  2548. req = c.newRequest(op, input, output)
  2549. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2550. de := discovererDescribeEndpoints{
  2551. Required: false,
  2552. EndpointCache: c.endpointCache,
  2553. Params: map[string]*string{
  2554. "op": aws.String(req.Operation.Name),
  2555. },
  2556. Client: c,
  2557. }
  2558. for k, v := range de.Params {
  2559. if v == nil {
  2560. delete(de.Params, k)
  2561. }
  2562. }
  2563. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2564. Name: "crr.endpointdiscovery",
  2565. Fn: de.Handler,
  2566. })
  2567. }
  2568. return
  2569. }
  2570. // ListTagsOfResource API operation for Amazon DynamoDB.
  2571. //
  2572. // List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource
  2573. // up to 10 times per second, per account.
  2574. //
  2575. // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html)
  2576. // in the Amazon DynamoDB Developer Guide.
  2577. //
  2578. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2579. // with awserr.Error's Code and Message methods to get detailed information about
  2580. // the error.
  2581. //
  2582. // See the AWS API reference guide for Amazon DynamoDB's
  2583. // API operation ListTagsOfResource for usage and error information.
  2584. //
  2585. // Returned Error Codes:
  2586. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2587. // The operation tried to access a nonexistent table or index. The resource
  2588. // might not be specified correctly, or its status might not be ACTIVE.
  2589. //
  2590. // * ErrCodeInternalServerError "InternalServerError"
  2591. // An error occurred on the server side.
  2592. //
  2593. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource
  2594. func (c *DynamoDB) ListTagsOfResource(input *ListTagsOfResourceInput) (*ListTagsOfResourceOutput, error) {
  2595. req, out := c.ListTagsOfResourceRequest(input)
  2596. return out, req.Send()
  2597. }
  2598. // ListTagsOfResourceWithContext is the same as ListTagsOfResource with the addition of
  2599. // the ability to pass a context and additional request options.
  2600. //
  2601. // See ListTagsOfResource for details on how to use this API operation.
  2602. //
  2603. // The context must be non-nil and will be used for request cancellation. If
  2604. // the context is nil a panic will occur. In the future the SDK may create
  2605. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2606. // for more information on using Contexts.
  2607. func (c *DynamoDB) ListTagsOfResourceWithContext(ctx aws.Context, input *ListTagsOfResourceInput, opts ...request.Option) (*ListTagsOfResourceOutput, error) {
  2608. req, out := c.ListTagsOfResourceRequest(input)
  2609. req.SetContext(ctx)
  2610. req.ApplyOptions(opts...)
  2611. return out, req.Send()
  2612. }
  2613. const opPutItem = "PutItem"
  2614. // PutItemRequest generates a "aws/request.Request" representing the
  2615. // client's request for the PutItem operation. The "output" return
  2616. // value will be populated with the request's response once the request completes
  2617. // successfully.
  2618. //
  2619. // Use "Send" method on the returned Request to send the API call to the service.
  2620. // the "output" return value is not valid until after Send returns without error.
  2621. //
  2622. // See PutItem for more information on using the PutItem
  2623. // API call, and error handling.
  2624. //
  2625. // This method is useful when you want to inject custom logic or configuration
  2626. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2627. //
  2628. //
  2629. // // Example sending a request using the PutItemRequest method.
  2630. // req, resp := client.PutItemRequest(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/dynamodb-2012-08-10/PutItem
  2638. func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, output *PutItemOutput) {
  2639. op := &request.Operation{
  2640. Name: opPutItem,
  2641. HTTPMethod: "POST",
  2642. HTTPPath: "/",
  2643. }
  2644. if input == nil {
  2645. input = &PutItemInput{}
  2646. }
  2647. output = &PutItemOutput{}
  2648. req = c.newRequest(op, input, output)
  2649. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2650. de := discovererDescribeEndpoints{
  2651. Required: false,
  2652. EndpointCache: c.endpointCache,
  2653. Params: map[string]*string{
  2654. "op": aws.String(req.Operation.Name),
  2655. },
  2656. Client: c,
  2657. }
  2658. for k, v := range de.Params {
  2659. if v == nil {
  2660. delete(de.Params, k)
  2661. }
  2662. }
  2663. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2664. Name: "crr.endpointdiscovery",
  2665. Fn: de.Handler,
  2666. })
  2667. }
  2668. return
  2669. }
  2670. // PutItem API operation for Amazon DynamoDB.
  2671. //
  2672. // Creates a new item, or replaces an old item with a new item. If an item that
  2673. // has the same primary key as the new item already exists in the specified
  2674. // table, the new item completely replaces the existing item. You can perform
  2675. // a conditional put operation (add a new item if one with the specified primary
  2676. // key doesn't exist), or replace an existing item if it has certain attribute
  2677. // values. You can return the item's attribute values in the same operation,
  2678. // using the ReturnValues parameter.
  2679. //
  2680. // This topic provides general information about the PutItem API.
  2681. //
  2682. // For information on how to call the PutItem API using the AWS SDK in specific
  2683. // languages, see the following:
  2684. //
  2685. // PutItem in the AWS Command Line Interface (http://docs.aws.amazon.com/goto/aws-cli/dynamodb-2012-08-10/PutItem)
  2686. //
  2687. // PutItem in the AWS SDK for .NET (http://docs.aws.amazon.com/goto/DotNetSDKV3/dynamodb-2012-08-10/PutItem)
  2688. //
  2689. // PutItem in the AWS SDK for C++ (http://docs.aws.amazon.com/goto/SdkForCpp/dynamodb-2012-08-10/PutItem)
  2690. //
  2691. // PutItem in the AWS SDK for Go (http://docs.aws.amazon.com/goto/SdkForGoV1/dynamodb-2012-08-10/PutItem)
  2692. //
  2693. // PutItem in the AWS SDK for Java (http://docs.aws.amazon.com/goto/SdkForJava/dynamodb-2012-08-10/PutItem)
  2694. //
  2695. // PutItem in the AWS SDK for JavaScript (http://docs.aws.amazon.com/goto/AWSJavaScriptSDK/dynamodb-2012-08-10/PutItem)
  2696. //
  2697. // PutItem in the AWS SDK for PHP V3 (http://docs.aws.amazon.com/goto/SdkForPHPV3/dynamodb-2012-08-10/PutItem)
  2698. //
  2699. // PutItem in the AWS SDK for Python (http://docs.aws.amazon.com/goto/boto3/dynamodb-2012-08-10/PutItem)
  2700. //
  2701. // PutItem in the AWS SDK for Ruby V2 (http://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem)
  2702. //
  2703. // When you add an item, the primary key attribute(s) are the only required
  2704. // attributes. Attribute values cannot be null. String and Binary type attributes
  2705. // must have lengths greater than zero. Set type attributes cannot be empty.
  2706. // Requests with empty values will be rejected with a ValidationException exception.
  2707. //
  2708. // To prevent a new item from replacing an existing item, use a conditional
  2709. // expression that contains the attribute_not_exists function with the name
  2710. // of the attribute being used as the partition key for the table. Since every
  2711. // record must contain that attribute, the attribute_not_exists function will
  2712. // only succeed if no matching item exists.
  2713. //
  2714. // For more information about PutItem, see Working with Items (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html)
  2715. // in the Amazon DynamoDB Developer Guide.
  2716. //
  2717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2718. // with awserr.Error's Code and Message methods to get detailed information about
  2719. // the error.
  2720. //
  2721. // See the AWS API reference guide for Amazon DynamoDB's
  2722. // API operation PutItem for usage and error information.
  2723. //
  2724. // Returned Error Codes:
  2725. // * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
  2726. // A condition specified in the operation could not be evaluated.
  2727. //
  2728. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  2729. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  2730. // requests that receive this exception. Your request is eventually successful,
  2731. // unless your retry queue is too large to finish. Reduce the frequency of requests
  2732. // and use exponential backoff. For more information, go to Error Retries and
  2733. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  2734. // in the Amazon DynamoDB Developer Guide.
  2735. //
  2736. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2737. // The operation tried to access a nonexistent table or index. The resource
  2738. // might not be specified correctly, or its status might not be ACTIVE.
  2739. //
  2740. // * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
  2741. // An item collection is too large. This exception is only returned for tables
  2742. // that have one or more local secondary indexes.
  2743. //
  2744. // * ErrCodeTransactionConflictException "TransactionConflictException"
  2745. // Operation was rejected because there is an ongoing transaction for the item.
  2746. //
  2747. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  2748. // Throughput exceeds the current throughput limit for your account. Please
  2749. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  2750. // to request a limit increase.
  2751. //
  2752. // * ErrCodeInternalServerError "InternalServerError"
  2753. // An error occurred on the server side.
  2754. //
  2755. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem
  2756. func (c *DynamoDB) PutItem(input *PutItemInput) (*PutItemOutput, error) {
  2757. req, out := c.PutItemRequest(input)
  2758. return out, req.Send()
  2759. }
  2760. // PutItemWithContext is the same as PutItem with the addition of
  2761. // the ability to pass a context and additional request options.
  2762. //
  2763. // See PutItem for details on how to use this API operation.
  2764. //
  2765. // The context must be non-nil and will be used for request cancellation. If
  2766. // the context is nil a panic will occur. In the future the SDK may create
  2767. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2768. // for more information on using Contexts.
  2769. func (c *DynamoDB) PutItemWithContext(ctx aws.Context, input *PutItemInput, opts ...request.Option) (*PutItemOutput, error) {
  2770. req, out := c.PutItemRequest(input)
  2771. req.SetContext(ctx)
  2772. req.ApplyOptions(opts...)
  2773. return out, req.Send()
  2774. }
  2775. const opQuery = "Query"
  2776. // QueryRequest generates a "aws/request.Request" representing the
  2777. // client's request for the Query operation. The "output" return
  2778. // value will be populated with the request's response once the request completes
  2779. // successfully.
  2780. //
  2781. // Use "Send" method on the returned Request to send the API call to the service.
  2782. // the "output" return value is not valid until after Send returns without error.
  2783. //
  2784. // See Query for more information on using the Query
  2785. // API call, and error handling.
  2786. //
  2787. // This method is useful when you want to inject custom logic or configuration
  2788. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2789. //
  2790. //
  2791. // // Example sending a request using the QueryRequest method.
  2792. // req, resp := client.QueryRequest(params)
  2793. //
  2794. // err := req.Send()
  2795. // if err == nil { // resp is now filled
  2796. // fmt.Println(resp)
  2797. // }
  2798. //
  2799. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query
  2800. func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput) {
  2801. op := &request.Operation{
  2802. Name: opQuery,
  2803. HTTPMethod: "POST",
  2804. HTTPPath: "/",
  2805. Paginator: &request.Paginator{
  2806. InputTokens: []string{"ExclusiveStartKey"},
  2807. OutputTokens: []string{"LastEvaluatedKey"},
  2808. LimitToken: "Limit",
  2809. TruncationToken: "",
  2810. },
  2811. }
  2812. if input == nil {
  2813. input = &QueryInput{}
  2814. }
  2815. output = &QueryOutput{}
  2816. req = c.newRequest(op, input, output)
  2817. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  2818. de := discovererDescribeEndpoints{
  2819. Required: false,
  2820. EndpointCache: c.endpointCache,
  2821. Params: map[string]*string{
  2822. "op": aws.String(req.Operation.Name),
  2823. },
  2824. Client: c,
  2825. }
  2826. for k, v := range de.Params {
  2827. if v == nil {
  2828. delete(de.Params, k)
  2829. }
  2830. }
  2831. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  2832. Name: "crr.endpointdiscovery",
  2833. Fn: de.Handler,
  2834. })
  2835. }
  2836. return
  2837. }
  2838. // Query API operation for Amazon DynamoDB.
  2839. //
  2840. // The Query operation finds items based on primary key values. You can query
  2841. // any table or secondary index that has a composite primary key (a partition
  2842. // key and a sort key).
  2843. //
  2844. // Use the KeyConditionExpression parameter to provide a specific value for
  2845. // the partition key. The Query operation will return all of the items from
  2846. // the table or index with that partition key value. You can optionally narrow
  2847. // the scope of the Query operation by specifying a sort key value and a comparison
  2848. // operator in KeyConditionExpression. To further refine the Query results,
  2849. // you can optionally provide a FilterExpression. A FilterExpression determines
  2850. // which items within the results should be returned to you. All of the other
  2851. // results are discarded.
  2852. //
  2853. // A Query operation always returns a result set. If no matching items are found,
  2854. // the result set will be empty. Queries that do not return results consume
  2855. // the minimum number of read capacity units for that type of read operation.
  2856. //
  2857. // DynamoDB calculates the number of read capacity units consumed based on item
  2858. // size, not on the amount of data that is returned to an application. The number
  2859. // of capacity units consumed will be the same whether you request all of the
  2860. // attributes (the default behavior) or just some of them (using a projection
  2861. // expression). The number will also be the same whether or not you use a FilterExpression.
  2862. //
  2863. // Query results are always sorted by the sort key value. If the data type of
  2864. // the sort key is Number, the results are returned in numeric order; otherwise,
  2865. // the results are returned in order of UTF-8 bytes. By default, the sort order
  2866. // is ascending. To reverse the order, set the ScanIndexForward parameter to
  2867. // false.
  2868. //
  2869. // A single Query operation will read up to the maximum number of items set
  2870. // (if using the Limit parameter) or a maximum of 1 MB of data and then apply
  2871. // any filtering to the results using FilterExpression. If LastEvaluatedKey
  2872. // is present in the response, you will need to paginate the result set. For
  2873. // more information, see Paginating the Results (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination)
  2874. // in the Amazon DynamoDB Developer Guide.
  2875. //
  2876. // FilterExpression is applied after a Query finishes, but before the results
  2877. // are returned. A FilterExpression cannot contain partition key or sort key
  2878. // attributes. You need to specify those attributes in the KeyConditionExpression.
  2879. //
  2880. // A Query operation can return an empty result set and a LastEvaluatedKey if
  2881. // all the items read for the page of results are filtered out.
  2882. //
  2883. // You can query a table, a local secondary index, or a global secondary index.
  2884. // For a query on a table or on a local secondary index, you can set the ConsistentRead
  2885. // parameter to true and obtain a strongly consistent result. Global secondary
  2886. // indexes support eventually consistent reads only, so do not specify ConsistentRead
  2887. // when querying a global secondary index.
  2888. //
  2889. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2890. // with awserr.Error's Code and Message methods to get detailed information about
  2891. // the error.
  2892. //
  2893. // See the AWS API reference guide for Amazon DynamoDB's
  2894. // API operation Query for usage and error information.
  2895. //
  2896. // Returned Error Codes:
  2897. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  2898. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  2899. // requests that receive this exception. Your request is eventually successful,
  2900. // unless your retry queue is too large to finish. Reduce the frequency of requests
  2901. // and use exponential backoff. For more information, go to Error Retries and
  2902. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  2903. // in the Amazon DynamoDB Developer Guide.
  2904. //
  2905. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  2906. // The operation tried to access a nonexistent table or index. The resource
  2907. // might not be specified correctly, or its status might not be ACTIVE.
  2908. //
  2909. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  2910. // Throughput exceeds the current throughput limit for your account. Please
  2911. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  2912. // to request a limit increase.
  2913. //
  2914. // * ErrCodeInternalServerError "InternalServerError"
  2915. // An error occurred on the server side.
  2916. //
  2917. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query
  2918. func (c *DynamoDB) Query(input *QueryInput) (*QueryOutput, error) {
  2919. req, out := c.QueryRequest(input)
  2920. return out, req.Send()
  2921. }
  2922. // QueryWithContext is the same as Query with the addition of
  2923. // the ability to pass a context and additional request options.
  2924. //
  2925. // See Query for details on how to use this API operation.
  2926. //
  2927. // The context must be non-nil and will be used for request cancellation. If
  2928. // the context is nil a panic will occur. In the future the SDK may create
  2929. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2930. // for more information on using Contexts.
  2931. func (c *DynamoDB) QueryWithContext(ctx aws.Context, input *QueryInput, opts ...request.Option) (*QueryOutput, error) {
  2932. req, out := c.QueryRequest(input)
  2933. req.SetContext(ctx)
  2934. req.ApplyOptions(opts...)
  2935. return out, req.Send()
  2936. }
  2937. // QueryPages iterates over the pages of a Query operation,
  2938. // calling the "fn" function with the response data for each page. To stop
  2939. // iterating, return false from the fn function.
  2940. //
  2941. // See Query method for more information on how to use this operation.
  2942. //
  2943. // Note: This operation can generate multiple requests to a service.
  2944. //
  2945. // // Example iterating over at most 3 pages of a Query operation.
  2946. // pageNum := 0
  2947. // err := client.QueryPages(params,
  2948. // func(page *QueryOutput, lastPage bool) bool {
  2949. // pageNum++
  2950. // fmt.Println(page)
  2951. // return pageNum <= 3
  2952. // })
  2953. //
  2954. func (c *DynamoDB) QueryPages(input *QueryInput, fn func(*QueryOutput, bool) bool) error {
  2955. return c.QueryPagesWithContext(aws.BackgroundContext(), input, fn)
  2956. }
  2957. // QueryPagesWithContext same as QueryPages except
  2958. // it takes a Context and allows setting request options on the pages.
  2959. //
  2960. // The context must be non-nil and will be used for request cancellation. If
  2961. // the context is nil a panic will occur. In the future the SDK may create
  2962. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2963. // for more information on using Contexts.
  2964. func (c *DynamoDB) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn func(*QueryOutput, bool) bool, opts ...request.Option) error {
  2965. p := request.Pagination{
  2966. NewRequest: func() (*request.Request, error) {
  2967. var inCpy *QueryInput
  2968. if input != nil {
  2969. tmp := *input
  2970. inCpy = &tmp
  2971. }
  2972. req, _ := c.QueryRequest(inCpy)
  2973. req.SetContext(ctx)
  2974. req.ApplyOptions(opts...)
  2975. return req, nil
  2976. },
  2977. }
  2978. cont := true
  2979. for p.Next() && cont {
  2980. cont = fn(p.Page().(*QueryOutput), !p.HasNextPage())
  2981. }
  2982. return p.Err()
  2983. }
  2984. const opRestoreTableFromBackup = "RestoreTableFromBackup"
  2985. // RestoreTableFromBackupRequest generates a "aws/request.Request" representing the
  2986. // client's request for the RestoreTableFromBackup operation. The "output" return
  2987. // value will be populated with the request's response once the request completes
  2988. // successfully.
  2989. //
  2990. // Use "Send" method on the returned Request to send the API call to the service.
  2991. // the "output" return value is not valid until after Send returns without error.
  2992. //
  2993. // See RestoreTableFromBackup for more information on using the RestoreTableFromBackup
  2994. // API call, and error handling.
  2995. //
  2996. // This method is useful when you want to inject custom logic or configuration
  2997. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2998. //
  2999. //
  3000. // // Example sending a request using the RestoreTableFromBackupRequest method.
  3001. // req, resp := client.RestoreTableFromBackupRequest(params)
  3002. //
  3003. // err := req.Send()
  3004. // if err == nil { // resp is now filled
  3005. // fmt.Println(resp)
  3006. // }
  3007. //
  3008. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup
  3009. func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupInput) (req *request.Request, output *RestoreTableFromBackupOutput) {
  3010. op := &request.Operation{
  3011. Name: opRestoreTableFromBackup,
  3012. HTTPMethod: "POST",
  3013. HTTPPath: "/",
  3014. }
  3015. if input == nil {
  3016. input = &RestoreTableFromBackupInput{}
  3017. }
  3018. output = &RestoreTableFromBackupOutput{}
  3019. req = c.newRequest(op, input, output)
  3020. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3021. de := discovererDescribeEndpoints{
  3022. Required: false,
  3023. EndpointCache: c.endpointCache,
  3024. Params: map[string]*string{
  3025. "op": aws.String(req.Operation.Name),
  3026. },
  3027. Client: c,
  3028. }
  3029. for k, v := range de.Params {
  3030. if v == nil {
  3031. delete(de.Params, k)
  3032. }
  3033. }
  3034. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3035. Name: "crr.endpointdiscovery",
  3036. Fn: de.Handler,
  3037. })
  3038. }
  3039. return
  3040. }
  3041. // RestoreTableFromBackup API operation for Amazon DynamoDB.
  3042. //
  3043. // Creates a new table from an existing backup. Any number of users can execute
  3044. // up to 4 concurrent restores (any type of restore) in a given account.
  3045. //
  3046. // You can call RestoreTableFromBackup at a maximum rate of 10 times per second.
  3047. //
  3048. // You must manually set up the following on the restored table:
  3049. //
  3050. // * Auto scaling policies
  3051. //
  3052. // * IAM policies
  3053. //
  3054. // * Cloudwatch metrics and alarms
  3055. //
  3056. // * Tags
  3057. //
  3058. // * Stream settings
  3059. //
  3060. // * Time to Live (TTL) settings
  3061. //
  3062. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3063. // with awserr.Error's Code and Message methods to get detailed information about
  3064. // the error.
  3065. //
  3066. // See the AWS API reference guide for Amazon DynamoDB's
  3067. // API operation RestoreTableFromBackup for usage and error information.
  3068. //
  3069. // Returned Error Codes:
  3070. // * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException"
  3071. // A target table with the specified name already exists.
  3072. //
  3073. // * ErrCodeTableInUseException "TableInUseException"
  3074. // A target table with the specified name is either being created or deleted.
  3075. //
  3076. // * ErrCodeBackupNotFoundException "BackupNotFoundException"
  3077. // Backup not found for the given BackupARN.
  3078. //
  3079. // * ErrCodeBackupInUseException "BackupInUseException"
  3080. // There is another ongoing conflicting backup control plane operation on the
  3081. // table. The backup is either being created, deleted or restored to a table.
  3082. //
  3083. // * ErrCodeLimitExceededException "LimitExceededException"
  3084. // There is no limit to the number of daily on-demand backups that can be taken.
  3085. //
  3086. // Up to 10 simultaneous table operations are allowed per account. These operations
  3087. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  3088. // and RestoreTableToPointInTime.
  3089. //
  3090. // For tables with secondary indexes, only one of those tables can be in the
  3091. // CREATING state at any point in time. Do not attempt to create more than one
  3092. // such table simultaneously.
  3093. //
  3094. // The total limit of tables in the ACTIVE state is 250.
  3095. //
  3096. // * ErrCodeInternalServerError "InternalServerError"
  3097. // An error occurred on the server side.
  3098. //
  3099. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup
  3100. func (c *DynamoDB) RestoreTableFromBackup(input *RestoreTableFromBackupInput) (*RestoreTableFromBackupOutput, error) {
  3101. req, out := c.RestoreTableFromBackupRequest(input)
  3102. return out, req.Send()
  3103. }
  3104. // RestoreTableFromBackupWithContext is the same as RestoreTableFromBackup with the addition of
  3105. // the ability to pass a context and additional request options.
  3106. //
  3107. // See RestoreTableFromBackup for details on how to use this API operation.
  3108. //
  3109. // The context must be non-nil and will be used for request cancellation. If
  3110. // the context is nil a panic will occur. In the future the SDK may create
  3111. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3112. // for more information on using Contexts.
  3113. func (c *DynamoDB) RestoreTableFromBackupWithContext(ctx aws.Context, input *RestoreTableFromBackupInput, opts ...request.Option) (*RestoreTableFromBackupOutput, error) {
  3114. req, out := c.RestoreTableFromBackupRequest(input)
  3115. req.SetContext(ctx)
  3116. req.ApplyOptions(opts...)
  3117. return out, req.Send()
  3118. }
  3119. const opRestoreTableToPointInTime = "RestoreTableToPointInTime"
  3120. // RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the
  3121. // client's request for the RestoreTableToPointInTime operation. The "output" return
  3122. // value will be populated with the request's response once the request completes
  3123. // successfully.
  3124. //
  3125. // Use "Send" method on the returned Request to send the API call to the service.
  3126. // the "output" return value is not valid until after Send returns without error.
  3127. //
  3128. // See RestoreTableToPointInTime for more information on using the RestoreTableToPointInTime
  3129. // API call, and error handling.
  3130. //
  3131. // This method is useful when you want to inject custom logic or configuration
  3132. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3133. //
  3134. //
  3135. // // Example sending a request using the RestoreTableToPointInTimeRequest method.
  3136. // req, resp := client.RestoreTableToPointInTimeRequest(params)
  3137. //
  3138. // err := req.Send()
  3139. // if err == nil { // resp is now filled
  3140. // fmt.Println(resp)
  3141. // }
  3142. //
  3143. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime
  3144. func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointInTimeInput) (req *request.Request, output *RestoreTableToPointInTimeOutput) {
  3145. op := &request.Operation{
  3146. Name: opRestoreTableToPointInTime,
  3147. HTTPMethod: "POST",
  3148. HTTPPath: "/",
  3149. }
  3150. if input == nil {
  3151. input = &RestoreTableToPointInTimeInput{}
  3152. }
  3153. output = &RestoreTableToPointInTimeOutput{}
  3154. req = c.newRequest(op, input, output)
  3155. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3156. de := discovererDescribeEndpoints{
  3157. Required: false,
  3158. EndpointCache: c.endpointCache,
  3159. Params: map[string]*string{
  3160. "op": aws.String(req.Operation.Name),
  3161. },
  3162. Client: c,
  3163. }
  3164. for k, v := range de.Params {
  3165. if v == nil {
  3166. delete(de.Params, k)
  3167. }
  3168. }
  3169. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3170. Name: "crr.endpointdiscovery",
  3171. Fn: de.Handler,
  3172. })
  3173. }
  3174. return
  3175. }
  3176. // RestoreTableToPointInTime API operation for Amazon DynamoDB.
  3177. //
  3178. // Restores the specified table to the specified point in time within EarliestRestorableDateTime
  3179. // and LatestRestorableDateTime. You can restore your table to any point in
  3180. // time during the last 35 days. Any number of users can execute up to 4 concurrent
  3181. // restores (any type of restore) in a given account.
  3182. //
  3183. // When you restore using point in time recovery, DynamoDB restores your table
  3184. // data to the state based on the selected date and time (day:hour:minute:second)
  3185. // to a new table.
  3186. //
  3187. // Along with data, the following are also included on the new restored table
  3188. // using point in time recovery:
  3189. //
  3190. // * Global secondary indexes (GSIs)
  3191. //
  3192. // * Local secondary indexes (LSIs)
  3193. //
  3194. // * Provisioned read and write capacity
  3195. //
  3196. // * Encryption settings
  3197. //
  3198. // All these settings come from the current settings of the source table at
  3199. // the time of restore.
  3200. //
  3201. // You must manually set up the following on the restored table:
  3202. //
  3203. // * Auto scaling policies
  3204. //
  3205. // * IAM policies
  3206. //
  3207. // * Cloudwatch metrics and alarms
  3208. //
  3209. // * Tags
  3210. //
  3211. // * Stream settings
  3212. //
  3213. // * Time to Live (TTL) settings
  3214. //
  3215. // * Point in time recovery settings
  3216. //
  3217. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3218. // with awserr.Error's Code and Message methods to get detailed information about
  3219. // the error.
  3220. //
  3221. // See the AWS API reference guide for Amazon DynamoDB's
  3222. // API operation RestoreTableToPointInTime for usage and error information.
  3223. //
  3224. // Returned Error Codes:
  3225. // * ErrCodeTableAlreadyExistsException "TableAlreadyExistsException"
  3226. // A target table with the specified name already exists.
  3227. //
  3228. // * ErrCodeTableNotFoundException "TableNotFoundException"
  3229. // A source table with the name TableName does not currently exist within the
  3230. // subscriber's account.
  3231. //
  3232. // * ErrCodeTableInUseException "TableInUseException"
  3233. // A target table with the specified name is either being created or deleted.
  3234. //
  3235. // * ErrCodeLimitExceededException "LimitExceededException"
  3236. // There is no limit to the number of daily on-demand backups that can be taken.
  3237. //
  3238. // Up to 10 simultaneous table operations are allowed per account. These operations
  3239. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  3240. // and RestoreTableToPointInTime.
  3241. //
  3242. // For tables with secondary indexes, only one of those tables can be in the
  3243. // CREATING state at any point in time. Do not attempt to create more than one
  3244. // such table simultaneously.
  3245. //
  3246. // The total limit of tables in the ACTIVE state is 250.
  3247. //
  3248. // * ErrCodeInvalidRestoreTimeException "InvalidRestoreTimeException"
  3249. // An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime
  3250. // and LatestRestorableDateTime.
  3251. //
  3252. // * ErrCodePointInTimeRecoveryUnavailableException "PointInTimeRecoveryUnavailableException"
  3253. // Point in time recovery has not yet been enabled for this source table.
  3254. //
  3255. // * ErrCodeInternalServerError "InternalServerError"
  3256. // An error occurred on the server side.
  3257. //
  3258. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime
  3259. func (c *DynamoDB) RestoreTableToPointInTime(input *RestoreTableToPointInTimeInput) (*RestoreTableToPointInTimeOutput, error) {
  3260. req, out := c.RestoreTableToPointInTimeRequest(input)
  3261. return out, req.Send()
  3262. }
  3263. // RestoreTableToPointInTimeWithContext is the same as RestoreTableToPointInTime with the addition of
  3264. // the ability to pass a context and additional request options.
  3265. //
  3266. // See RestoreTableToPointInTime for details on how to use this API operation.
  3267. //
  3268. // The context must be non-nil and will be used for request cancellation. If
  3269. // the context is nil a panic will occur. In the future the SDK may create
  3270. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3271. // for more information on using Contexts.
  3272. func (c *DynamoDB) RestoreTableToPointInTimeWithContext(ctx aws.Context, input *RestoreTableToPointInTimeInput, opts ...request.Option) (*RestoreTableToPointInTimeOutput, error) {
  3273. req, out := c.RestoreTableToPointInTimeRequest(input)
  3274. req.SetContext(ctx)
  3275. req.ApplyOptions(opts...)
  3276. return out, req.Send()
  3277. }
  3278. const opScan = "Scan"
  3279. // ScanRequest generates a "aws/request.Request" representing the
  3280. // client's request for the Scan operation. The "output" return
  3281. // value will be populated with the request's response once the request completes
  3282. // successfully.
  3283. //
  3284. // Use "Send" method on the returned Request to send the API call to the service.
  3285. // the "output" return value is not valid until after Send returns without error.
  3286. //
  3287. // See Scan for more information on using the Scan
  3288. // API call, and error handling.
  3289. //
  3290. // This method is useful when you want to inject custom logic or configuration
  3291. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3292. //
  3293. //
  3294. // // Example sending a request using the ScanRequest method.
  3295. // req, resp := client.ScanRequest(params)
  3296. //
  3297. // err := req.Send()
  3298. // if err == nil { // resp is now filled
  3299. // fmt.Println(resp)
  3300. // }
  3301. //
  3302. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan
  3303. func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *ScanOutput) {
  3304. op := &request.Operation{
  3305. Name: opScan,
  3306. HTTPMethod: "POST",
  3307. HTTPPath: "/",
  3308. Paginator: &request.Paginator{
  3309. InputTokens: []string{"ExclusiveStartKey"},
  3310. OutputTokens: []string{"LastEvaluatedKey"},
  3311. LimitToken: "Limit",
  3312. TruncationToken: "",
  3313. },
  3314. }
  3315. if input == nil {
  3316. input = &ScanInput{}
  3317. }
  3318. output = &ScanOutput{}
  3319. req = c.newRequest(op, input, output)
  3320. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3321. de := discovererDescribeEndpoints{
  3322. Required: false,
  3323. EndpointCache: c.endpointCache,
  3324. Params: map[string]*string{
  3325. "op": aws.String(req.Operation.Name),
  3326. },
  3327. Client: c,
  3328. }
  3329. for k, v := range de.Params {
  3330. if v == nil {
  3331. delete(de.Params, k)
  3332. }
  3333. }
  3334. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3335. Name: "crr.endpointdiscovery",
  3336. Fn: de.Handler,
  3337. })
  3338. }
  3339. return
  3340. }
  3341. // Scan API operation for Amazon DynamoDB.
  3342. //
  3343. // The Scan operation returns one or more items and item attributes by accessing
  3344. // every item in a table or a secondary index. To have DynamoDB return fewer
  3345. // items, you can provide a FilterExpression operation.
  3346. //
  3347. // If the total number of scanned items exceeds the maximum data set size limit
  3348. // of 1 MB, the scan stops and results are returned to the user as a LastEvaluatedKey
  3349. // value to continue the scan in a subsequent operation. The results also include
  3350. // the number of items exceeding the limit. A scan can result in no table data
  3351. // meeting the filter criteria.
  3352. //
  3353. // A single Scan operation will read up to the maximum number of items set (if
  3354. // using the Limit parameter) or a maximum of 1 MB of data and then apply any
  3355. // filtering to the results using FilterExpression. If LastEvaluatedKey is present
  3356. // in the response, you will need to paginate the result set. For more information,
  3357. // see Paginating the Results (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination)
  3358. // in the Amazon DynamoDB Developer Guide.
  3359. //
  3360. // Scan operations proceed sequentially; however, for faster performance on
  3361. // a large table or secondary index, applications can request a parallel Scan
  3362. // operation by providing the Segment and TotalSegments parameters. For more
  3363. // information, see Parallel Scan (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan)
  3364. // in the Amazon DynamoDB Developer Guide.
  3365. //
  3366. // Scan uses eventually consistent reads when accessing the data in a table;
  3367. // therefore, the result set might not include the changes to data in the table
  3368. // immediately before the operation began. If you need a consistent copy of
  3369. // the data, as of the time that the Scan begins, you can set the ConsistentRead
  3370. // parameter to true.
  3371. //
  3372. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3373. // with awserr.Error's Code and Message methods to get detailed information about
  3374. // the error.
  3375. //
  3376. // See the AWS API reference guide for Amazon DynamoDB's
  3377. // API operation Scan for usage and error information.
  3378. //
  3379. // Returned Error Codes:
  3380. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  3381. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  3382. // requests that receive this exception. Your request is eventually successful,
  3383. // unless your retry queue is too large to finish. Reduce the frequency of requests
  3384. // and use exponential backoff. For more information, go to Error Retries and
  3385. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  3386. // in the Amazon DynamoDB Developer Guide.
  3387. //
  3388. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3389. // The operation tried to access a nonexistent table or index. The resource
  3390. // might not be specified correctly, or its status might not be ACTIVE.
  3391. //
  3392. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  3393. // Throughput exceeds the current throughput limit for your account. Please
  3394. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  3395. // to request a limit increase.
  3396. //
  3397. // * ErrCodeInternalServerError "InternalServerError"
  3398. // An error occurred on the server side.
  3399. //
  3400. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan
  3401. func (c *DynamoDB) Scan(input *ScanInput) (*ScanOutput, error) {
  3402. req, out := c.ScanRequest(input)
  3403. return out, req.Send()
  3404. }
  3405. // ScanWithContext is the same as Scan with the addition of
  3406. // the ability to pass a context and additional request options.
  3407. //
  3408. // See Scan for details on how to use this API operation.
  3409. //
  3410. // The context must be non-nil and will be used for request cancellation. If
  3411. // the context is nil a panic will occur. In the future the SDK may create
  3412. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3413. // for more information on using Contexts.
  3414. func (c *DynamoDB) ScanWithContext(ctx aws.Context, input *ScanInput, opts ...request.Option) (*ScanOutput, error) {
  3415. req, out := c.ScanRequest(input)
  3416. req.SetContext(ctx)
  3417. req.ApplyOptions(opts...)
  3418. return out, req.Send()
  3419. }
  3420. // ScanPages iterates over the pages of a Scan operation,
  3421. // calling the "fn" function with the response data for each page. To stop
  3422. // iterating, return false from the fn function.
  3423. //
  3424. // See Scan method for more information on how to use this operation.
  3425. //
  3426. // Note: This operation can generate multiple requests to a service.
  3427. //
  3428. // // Example iterating over at most 3 pages of a Scan operation.
  3429. // pageNum := 0
  3430. // err := client.ScanPages(params,
  3431. // func(page *ScanOutput, lastPage bool) bool {
  3432. // pageNum++
  3433. // fmt.Println(page)
  3434. // return pageNum <= 3
  3435. // })
  3436. //
  3437. func (c *DynamoDB) ScanPages(input *ScanInput, fn func(*ScanOutput, bool) bool) error {
  3438. return c.ScanPagesWithContext(aws.BackgroundContext(), input, fn)
  3439. }
  3440. // ScanPagesWithContext same as ScanPages except
  3441. // it takes a Context and allows setting request options on the pages.
  3442. //
  3443. // The context must be non-nil and will be used for request cancellation. If
  3444. // the context is nil a panic will occur. In the future the SDK may create
  3445. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3446. // for more information on using Contexts.
  3447. func (c *DynamoDB) ScanPagesWithContext(ctx aws.Context, input *ScanInput, fn func(*ScanOutput, bool) bool, opts ...request.Option) error {
  3448. p := request.Pagination{
  3449. NewRequest: func() (*request.Request, error) {
  3450. var inCpy *ScanInput
  3451. if input != nil {
  3452. tmp := *input
  3453. inCpy = &tmp
  3454. }
  3455. req, _ := c.ScanRequest(inCpy)
  3456. req.SetContext(ctx)
  3457. req.ApplyOptions(opts...)
  3458. return req, nil
  3459. },
  3460. }
  3461. cont := true
  3462. for p.Next() && cont {
  3463. cont = fn(p.Page().(*ScanOutput), !p.HasNextPage())
  3464. }
  3465. return p.Err()
  3466. }
  3467. const opTagResource = "TagResource"
  3468. // TagResourceRequest generates a "aws/request.Request" representing the
  3469. // client's request for the TagResource operation. The "output" return
  3470. // value will be populated with the request's response once the request completes
  3471. // successfully.
  3472. //
  3473. // Use "Send" method on the returned Request to send the API call to the service.
  3474. // the "output" return value is not valid until after Send returns without error.
  3475. //
  3476. // See TagResource for more information on using the TagResource
  3477. // API call, and error handling.
  3478. //
  3479. // This method is useful when you want to inject custom logic or configuration
  3480. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3481. //
  3482. //
  3483. // // Example sending a request using the TagResourceRequest method.
  3484. // req, resp := client.TagResourceRequest(params)
  3485. //
  3486. // err := req.Send()
  3487. // if err == nil { // resp is now filled
  3488. // fmt.Println(resp)
  3489. // }
  3490. //
  3491. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource
  3492. func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  3493. op := &request.Operation{
  3494. Name: opTagResource,
  3495. HTTPMethod: "POST",
  3496. HTTPPath: "/",
  3497. }
  3498. if input == nil {
  3499. input = &TagResourceInput{}
  3500. }
  3501. output = &TagResourceOutput{}
  3502. req = c.newRequest(op, input, output)
  3503. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3504. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3505. de := discovererDescribeEndpoints{
  3506. Required: false,
  3507. EndpointCache: c.endpointCache,
  3508. Params: map[string]*string{
  3509. "op": aws.String(req.Operation.Name),
  3510. },
  3511. Client: c,
  3512. }
  3513. for k, v := range de.Params {
  3514. if v == nil {
  3515. delete(de.Params, k)
  3516. }
  3517. }
  3518. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3519. Name: "crr.endpointdiscovery",
  3520. Fn: de.Handler,
  3521. })
  3522. }
  3523. return
  3524. }
  3525. // TagResource API operation for Amazon DynamoDB.
  3526. //
  3527. // Associate a set of tags with an Amazon DynamoDB resource. You can then activate
  3528. // these user-defined tags so that they appear on the Billing and Cost Management
  3529. // console for cost allocation tracking. You can call TagResource up to 5 times
  3530. // per second, per account.
  3531. //
  3532. // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html)
  3533. // in the Amazon DynamoDB Developer Guide.
  3534. //
  3535. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3536. // with awserr.Error's Code and Message methods to get detailed information about
  3537. // the error.
  3538. //
  3539. // See the AWS API reference guide for Amazon DynamoDB's
  3540. // API operation TagResource for usage and error information.
  3541. //
  3542. // Returned Error Codes:
  3543. // * ErrCodeLimitExceededException "LimitExceededException"
  3544. // There is no limit to the number of daily on-demand backups that can be taken.
  3545. //
  3546. // Up to 10 simultaneous table operations are allowed per account. These operations
  3547. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  3548. // and RestoreTableToPointInTime.
  3549. //
  3550. // For tables with secondary indexes, only one of those tables can be in the
  3551. // CREATING state at any point in time. Do not attempt to create more than one
  3552. // such table simultaneously.
  3553. //
  3554. // The total limit of tables in the ACTIVE state is 250.
  3555. //
  3556. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3557. // The operation tried to access a nonexistent table or index. The resource
  3558. // might not be specified correctly, or its status might not be ACTIVE.
  3559. //
  3560. // * ErrCodeInternalServerError "InternalServerError"
  3561. // An error occurred on the server side.
  3562. //
  3563. // * ErrCodeResourceInUseException "ResourceInUseException"
  3564. // The operation conflicts with the resource's availability. For example, you
  3565. // attempted to recreate an existing table, or tried to delete a table currently
  3566. // in the CREATING state.
  3567. //
  3568. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource
  3569. func (c *DynamoDB) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  3570. req, out := c.TagResourceRequest(input)
  3571. return out, req.Send()
  3572. }
  3573. // TagResourceWithContext is the same as TagResource with the addition of
  3574. // the ability to pass a context and additional request options.
  3575. //
  3576. // See TagResource for details on how to use this API operation.
  3577. //
  3578. // The context must be non-nil and will be used for request cancellation. If
  3579. // the context is nil a panic will occur. In the future the SDK may create
  3580. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3581. // for more information on using Contexts.
  3582. func (c *DynamoDB) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
  3583. req, out := c.TagResourceRequest(input)
  3584. req.SetContext(ctx)
  3585. req.ApplyOptions(opts...)
  3586. return out, req.Send()
  3587. }
  3588. const opTransactGetItems = "TransactGetItems"
  3589. // TransactGetItemsRequest generates a "aws/request.Request" representing the
  3590. // client's request for the TransactGetItems operation. The "output" return
  3591. // value will be populated with the request's response once the request completes
  3592. // successfully.
  3593. //
  3594. // Use "Send" method on the returned Request to send the API call to the service.
  3595. // the "output" return value is not valid until after Send returns without error.
  3596. //
  3597. // See TransactGetItems for more information on using the TransactGetItems
  3598. // API call, and error handling.
  3599. //
  3600. // This method is useful when you want to inject custom logic or configuration
  3601. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3602. //
  3603. //
  3604. // // Example sending a request using the TransactGetItemsRequest method.
  3605. // req, resp := client.TransactGetItemsRequest(params)
  3606. //
  3607. // err := req.Send()
  3608. // if err == nil { // resp is now filled
  3609. // fmt.Println(resp)
  3610. // }
  3611. //
  3612. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems
  3613. func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *request.Request, output *TransactGetItemsOutput) {
  3614. op := &request.Operation{
  3615. Name: opTransactGetItems,
  3616. HTTPMethod: "POST",
  3617. HTTPPath: "/",
  3618. }
  3619. if input == nil {
  3620. input = &TransactGetItemsInput{}
  3621. }
  3622. output = &TransactGetItemsOutput{}
  3623. req = c.newRequest(op, input, output)
  3624. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3625. de := discovererDescribeEndpoints{
  3626. Required: false,
  3627. EndpointCache: c.endpointCache,
  3628. Params: map[string]*string{
  3629. "op": aws.String(req.Operation.Name),
  3630. },
  3631. Client: c,
  3632. }
  3633. for k, v := range de.Params {
  3634. if v == nil {
  3635. delete(de.Params, k)
  3636. }
  3637. }
  3638. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3639. Name: "crr.endpointdiscovery",
  3640. Fn: de.Handler,
  3641. })
  3642. }
  3643. return
  3644. }
  3645. // TransactGetItems API operation for Amazon DynamoDB.
  3646. //
  3647. // TransactGetItems is a synchronous operation that atomically retrieves multiple
  3648. // items from one or more tables (but not from indexes) in a single account
  3649. // and region. A TransactGetItems call can contain up to 10 TransactGetItem
  3650. // objects, each of which contains a Get structure that specifies an item to
  3651. // retrieve from a table in the account and region. A call to TransactGetItems
  3652. // cannot retrieve items from tables in more than one AWS account or region.
  3653. //
  3654. // DynamoDB rejects the entire TransactGetItems request if any of the following
  3655. // is true:
  3656. //
  3657. // * A conflicting operation is in the process of updating an item to be
  3658. // read.
  3659. //
  3660. // * There is insufficient provisioned capacity for the transaction to be
  3661. // completed.
  3662. //
  3663. // * There is a user error, such as an invalid data format.
  3664. //
  3665. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3666. // with awserr.Error's Code and Message methods to get detailed information about
  3667. // the error.
  3668. //
  3669. // See the AWS API reference guide for Amazon DynamoDB's
  3670. // API operation TransactGetItems for usage and error information.
  3671. //
  3672. // Returned Error Codes:
  3673. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3674. // The operation tried to access a nonexistent table or index. The resource
  3675. // might not be specified correctly, or its status might not be ACTIVE.
  3676. //
  3677. // * ErrCodeTransactionCanceledException "TransactionCanceledException"
  3678. // The entire transaction request was rejected.
  3679. //
  3680. // DynamoDB rejects a TransactWriteItems request under the following circumstances:
  3681. //
  3682. // * A condition in one of the condition expressions is not met.
  3683. //
  3684. // * A table in the TransactWriteItems request is in a different account
  3685. // or region.
  3686. //
  3687. // * More than one action in the TransactWriteItems operation targets the
  3688. // same item.
  3689. //
  3690. // * There is insufficient provisioned capacity for the transaction to be
  3691. // completed.
  3692. //
  3693. // * An item size becomes too large (larger than 400 KB), or a local secondary
  3694. // index (LSI) becomes too large, or a similar validation error occurs because
  3695. // of changes made by the transaction.
  3696. //
  3697. // * There is a user error, such as an invalid data format.
  3698. //
  3699. // DynamoDB rejects a TransactGetItems request under the following circumstances:
  3700. //
  3701. // * There is an ongoing TransactGetItems operation that conflicts with a
  3702. // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request.
  3703. // In this case the TransactGetItems operation fails with a TransactionCanceledException.
  3704. //
  3705. // * A table in the TransactGetItems request is in a different account or
  3706. // region.
  3707. //
  3708. // * There is insufficient provisioned capacity for the transaction to be
  3709. // completed.
  3710. //
  3711. // * There is a user error, such as an invalid data format.
  3712. //
  3713. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  3714. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  3715. // requests that receive this exception. Your request is eventually successful,
  3716. // unless your retry queue is too large to finish. Reduce the frequency of requests
  3717. // and use exponential backoff. For more information, go to Error Retries and
  3718. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  3719. // in the Amazon DynamoDB Developer Guide.
  3720. //
  3721. // * ErrCodeInternalServerError "InternalServerError"
  3722. // An error occurred on the server side.
  3723. //
  3724. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems
  3725. func (c *DynamoDB) TransactGetItems(input *TransactGetItemsInput) (*TransactGetItemsOutput, error) {
  3726. req, out := c.TransactGetItemsRequest(input)
  3727. return out, req.Send()
  3728. }
  3729. // TransactGetItemsWithContext is the same as TransactGetItems with the addition of
  3730. // the ability to pass a context and additional request options.
  3731. //
  3732. // See TransactGetItems for details on how to use this API operation.
  3733. //
  3734. // The context must be non-nil and will be used for request cancellation. If
  3735. // the context is nil a panic will occur. In the future the SDK may create
  3736. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3737. // for more information on using Contexts.
  3738. func (c *DynamoDB) TransactGetItemsWithContext(ctx aws.Context, input *TransactGetItemsInput, opts ...request.Option) (*TransactGetItemsOutput, error) {
  3739. req, out := c.TransactGetItemsRequest(input)
  3740. req.SetContext(ctx)
  3741. req.ApplyOptions(opts...)
  3742. return out, req.Send()
  3743. }
  3744. const opTransactWriteItems = "TransactWriteItems"
  3745. // TransactWriteItemsRequest generates a "aws/request.Request" representing the
  3746. // client's request for the TransactWriteItems operation. The "output" return
  3747. // value will be populated with the request's response once the request completes
  3748. // successfully.
  3749. //
  3750. // Use "Send" method on the returned Request to send the API call to the service.
  3751. // the "output" return value is not valid until after Send returns without error.
  3752. //
  3753. // See TransactWriteItems for more information on using the TransactWriteItems
  3754. // API call, and error handling.
  3755. //
  3756. // This method is useful when you want to inject custom logic or configuration
  3757. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3758. //
  3759. //
  3760. // // Example sending a request using the TransactWriteItemsRequest method.
  3761. // req, resp := client.TransactWriteItemsRequest(params)
  3762. //
  3763. // err := req.Send()
  3764. // if err == nil { // resp is now filled
  3765. // fmt.Println(resp)
  3766. // }
  3767. //
  3768. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems
  3769. func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (req *request.Request, output *TransactWriteItemsOutput) {
  3770. op := &request.Operation{
  3771. Name: opTransactWriteItems,
  3772. HTTPMethod: "POST",
  3773. HTTPPath: "/",
  3774. }
  3775. if input == nil {
  3776. input = &TransactWriteItemsInput{}
  3777. }
  3778. output = &TransactWriteItemsOutput{}
  3779. req = c.newRequest(op, input, output)
  3780. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3781. de := discovererDescribeEndpoints{
  3782. Required: false,
  3783. EndpointCache: c.endpointCache,
  3784. Params: map[string]*string{
  3785. "op": aws.String(req.Operation.Name),
  3786. },
  3787. Client: c,
  3788. }
  3789. for k, v := range de.Params {
  3790. if v == nil {
  3791. delete(de.Params, k)
  3792. }
  3793. }
  3794. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3795. Name: "crr.endpointdiscovery",
  3796. Fn: de.Handler,
  3797. })
  3798. }
  3799. return
  3800. }
  3801. // TransactWriteItems API operation for Amazon DynamoDB.
  3802. //
  3803. // TransactWriteItems is a synchronous write operation that groups up to 10
  3804. // action requests. These actions can target items in different tables, but
  3805. // not in different AWS accounts or regions, and no two actions can target the
  3806. // same item. For example, you cannot both ConditionCheck and Update the same
  3807. // item.
  3808. //
  3809. // The actions are completed atomically so that either all of them succeed,
  3810. // or all of them fail. They are defined by the following objects:
  3811. //
  3812. // * Put  —   Initiates a PutItem operation to write a new item. This structure
  3813. // specifies the primary key of the item to be written, the name of the table
  3814. // to write it in, an optional condition expression that must be satisfied
  3815. // for the write to succeed, a list of the item's attributes, and a field
  3816. // indicating whether or not to retrieve the item's attributes if the condition
  3817. // is not met.
  3818. //
  3819. // * Update  —   Initiates an UpdateItem operation to update an existing
  3820. // item. This structure specifies the primary key of the item to be updated,
  3821. // the name of the table where it resides, an optional condition expression
  3822. // that must be satisfied for the update to succeed, an expression that defines
  3823. // one or more attributes to be updated, and a field indicating whether or
  3824. // not to retrieve the item's attributes if the condition is not met.
  3825. //
  3826. // * Delete  —   Initiates a DeleteItem operation to delete an existing item.
  3827. // This structure specifies the primary key of the item to be deleted, the
  3828. // name of the table where it resides, an optional condition expression that
  3829. // must be satisfied for the deletion to succeed, and a field indicating
  3830. // whether or not to retrieve the item's attributes if the condition is not
  3831. // met.
  3832. //
  3833. // * ConditionCheck  —   Applies a condition to an item that is not being
  3834. // modified by the transaction. This structure specifies the primary key
  3835. // of the item to be checked, the name of the table where it resides, a condition
  3836. // expression that must be satisfied for the transaction to succeed, and
  3837. // a field indicating whether or not to retrieve the item's attributes if
  3838. // the condition is not met.
  3839. //
  3840. // DynamoDB rejects the entire TransactWriteItems request if any of the following
  3841. // is true:
  3842. //
  3843. // * A condition in one of the condition expressions is not met.
  3844. //
  3845. // * A conflicting operation is in the process of updating the same item.
  3846. //
  3847. // * There is insufficient provisioned capacity for the transaction to be
  3848. // completed.
  3849. //
  3850. // * An item size becomes too large (bigger than 400 KB), a Local Secondary
  3851. // Index (LSI) becomes too large, or a similar validation error occurs because
  3852. // of changes made by the transaction.
  3853. //
  3854. // * There is a user error, such as an invalid data format.
  3855. //
  3856. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3857. // with awserr.Error's Code and Message methods to get detailed information about
  3858. // the error.
  3859. //
  3860. // See the AWS API reference guide for Amazon DynamoDB's
  3861. // API operation TransactWriteItems for usage and error information.
  3862. //
  3863. // Returned Error Codes:
  3864. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  3865. // The operation tried to access a nonexistent table or index. The resource
  3866. // might not be specified correctly, or its status might not be ACTIVE.
  3867. //
  3868. // * ErrCodeTransactionCanceledException "TransactionCanceledException"
  3869. // The entire transaction request was rejected.
  3870. //
  3871. // DynamoDB rejects a TransactWriteItems request under the following circumstances:
  3872. //
  3873. // * A condition in one of the condition expressions is not met.
  3874. //
  3875. // * A table in the TransactWriteItems request is in a different account
  3876. // or region.
  3877. //
  3878. // * More than one action in the TransactWriteItems operation targets the
  3879. // same item.
  3880. //
  3881. // * There is insufficient provisioned capacity for the transaction to be
  3882. // completed.
  3883. //
  3884. // * An item size becomes too large (larger than 400 KB), or a local secondary
  3885. // index (LSI) becomes too large, or a similar validation error occurs because
  3886. // of changes made by the transaction.
  3887. //
  3888. // * There is a user error, such as an invalid data format.
  3889. //
  3890. // DynamoDB rejects a TransactGetItems request under the following circumstances:
  3891. //
  3892. // * There is an ongoing TransactGetItems operation that conflicts with a
  3893. // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request.
  3894. // In this case the TransactGetItems operation fails with a TransactionCanceledException.
  3895. //
  3896. // * A table in the TransactGetItems request is in a different account or
  3897. // region.
  3898. //
  3899. // * There is insufficient provisioned capacity for the transaction to be
  3900. // completed.
  3901. //
  3902. // * There is a user error, such as an invalid data format.
  3903. //
  3904. // * ErrCodeTransactionInProgressException "TransactionInProgressException"
  3905. // The transaction with the given request token is already in progress.
  3906. //
  3907. // * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException"
  3908. // DynamoDB rejected the request because you retried a request with a different
  3909. // payload but with an idempotent token that was already used.
  3910. //
  3911. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  3912. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  3913. // requests that receive this exception. Your request is eventually successful,
  3914. // unless your retry queue is too large to finish. Reduce the frequency of requests
  3915. // and use exponential backoff. For more information, go to Error Retries and
  3916. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  3917. // in the Amazon DynamoDB Developer Guide.
  3918. //
  3919. // * ErrCodeInternalServerError "InternalServerError"
  3920. // An error occurred on the server side.
  3921. //
  3922. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems
  3923. func (c *DynamoDB) TransactWriteItems(input *TransactWriteItemsInput) (*TransactWriteItemsOutput, error) {
  3924. req, out := c.TransactWriteItemsRequest(input)
  3925. return out, req.Send()
  3926. }
  3927. // TransactWriteItemsWithContext is the same as TransactWriteItems with the addition of
  3928. // the ability to pass a context and additional request options.
  3929. //
  3930. // See TransactWriteItems for details on how to use this API operation.
  3931. //
  3932. // The context must be non-nil and will be used for request cancellation. If
  3933. // the context is nil a panic will occur. In the future the SDK may create
  3934. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3935. // for more information on using Contexts.
  3936. func (c *DynamoDB) TransactWriteItemsWithContext(ctx aws.Context, input *TransactWriteItemsInput, opts ...request.Option) (*TransactWriteItemsOutput, error) {
  3937. req, out := c.TransactWriteItemsRequest(input)
  3938. req.SetContext(ctx)
  3939. req.ApplyOptions(opts...)
  3940. return out, req.Send()
  3941. }
  3942. const opUntagResource = "UntagResource"
  3943. // UntagResourceRequest generates a "aws/request.Request" representing the
  3944. // client's request for the UntagResource operation. The "output" return
  3945. // value will be populated with the request's response once the request completes
  3946. // successfully.
  3947. //
  3948. // Use "Send" method on the returned Request to send the API call to the service.
  3949. // the "output" return value is not valid until after Send returns without error.
  3950. //
  3951. // See UntagResource for more information on using the UntagResource
  3952. // API call, and error handling.
  3953. //
  3954. // This method is useful when you want to inject custom logic or configuration
  3955. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3956. //
  3957. //
  3958. // // Example sending a request using the UntagResourceRequest method.
  3959. // req, resp := client.UntagResourceRequest(params)
  3960. //
  3961. // err := req.Send()
  3962. // if err == nil { // resp is now filled
  3963. // fmt.Println(resp)
  3964. // }
  3965. //
  3966. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource
  3967. func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  3968. op := &request.Operation{
  3969. Name: opUntagResource,
  3970. HTTPMethod: "POST",
  3971. HTTPPath: "/",
  3972. }
  3973. if input == nil {
  3974. input = &UntagResourceInput{}
  3975. }
  3976. output = &UntagResourceOutput{}
  3977. req = c.newRequest(op, input, output)
  3978. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3979. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  3980. de := discovererDescribeEndpoints{
  3981. Required: false,
  3982. EndpointCache: c.endpointCache,
  3983. Params: map[string]*string{
  3984. "op": aws.String(req.Operation.Name),
  3985. },
  3986. Client: c,
  3987. }
  3988. for k, v := range de.Params {
  3989. if v == nil {
  3990. delete(de.Params, k)
  3991. }
  3992. }
  3993. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  3994. Name: "crr.endpointdiscovery",
  3995. Fn: de.Handler,
  3996. })
  3997. }
  3998. return
  3999. }
  4000. // UntagResource API operation for Amazon DynamoDB.
  4001. //
  4002. // Removes the association of tags from an Amazon DynamoDB resource. You can
  4003. // call UntagResource up to 5 times per second, per account.
  4004. //
  4005. // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html)
  4006. // in the Amazon DynamoDB Developer Guide.
  4007. //
  4008. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4009. // with awserr.Error's Code and Message methods to get detailed information about
  4010. // the error.
  4011. //
  4012. // See the AWS API reference guide for Amazon DynamoDB's
  4013. // API operation UntagResource for usage and error information.
  4014. //
  4015. // Returned Error Codes:
  4016. // * ErrCodeLimitExceededException "LimitExceededException"
  4017. // There is no limit to the number of daily on-demand backups that can be taken.
  4018. //
  4019. // Up to 10 simultaneous table operations are allowed per account. These operations
  4020. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  4021. // and RestoreTableToPointInTime.
  4022. //
  4023. // For tables with secondary indexes, only one of those tables can be in the
  4024. // CREATING state at any point in time. Do not attempt to create more than one
  4025. // such table simultaneously.
  4026. //
  4027. // The total limit of tables in the ACTIVE state is 250.
  4028. //
  4029. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4030. // The operation tried to access a nonexistent table or index. The resource
  4031. // might not be specified correctly, or its status might not be ACTIVE.
  4032. //
  4033. // * ErrCodeInternalServerError "InternalServerError"
  4034. // An error occurred on the server side.
  4035. //
  4036. // * ErrCodeResourceInUseException "ResourceInUseException"
  4037. // The operation conflicts with the resource's availability. For example, you
  4038. // attempted to recreate an existing table, or tried to delete a table currently
  4039. // in the CREATING state.
  4040. //
  4041. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource
  4042. func (c *DynamoDB) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  4043. req, out := c.UntagResourceRequest(input)
  4044. return out, req.Send()
  4045. }
  4046. // UntagResourceWithContext is the same as UntagResource with the addition of
  4047. // the ability to pass a context and additional request options.
  4048. //
  4049. // See UntagResource for details on how to use this API operation.
  4050. //
  4051. // The context must be non-nil and will be used for request cancellation. If
  4052. // the context is nil a panic will occur. In the future the SDK may create
  4053. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4054. // for more information on using Contexts.
  4055. func (c *DynamoDB) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
  4056. req, out := c.UntagResourceRequest(input)
  4057. req.SetContext(ctx)
  4058. req.ApplyOptions(opts...)
  4059. return out, req.Send()
  4060. }
  4061. const opUpdateContinuousBackups = "UpdateContinuousBackups"
  4062. // UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the
  4063. // client's request for the UpdateContinuousBackups operation. The "output" return
  4064. // value will be populated with the request's response once the request completes
  4065. // successfully.
  4066. //
  4067. // Use "Send" method on the returned Request to send the API call to the service.
  4068. // the "output" return value is not valid until after Send returns without error.
  4069. //
  4070. // See UpdateContinuousBackups for more information on using the UpdateContinuousBackups
  4071. // API call, and error handling.
  4072. //
  4073. // This method is useful when you want to inject custom logic or configuration
  4074. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4075. //
  4076. //
  4077. // // Example sending a request using the UpdateContinuousBackupsRequest method.
  4078. // req, resp := client.UpdateContinuousBackupsRequest(params)
  4079. //
  4080. // err := req.Send()
  4081. // if err == nil { // resp is now filled
  4082. // fmt.Println(resp)
  4083. // }
  4084. //
  4085. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups
  4086. func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackupsInput) (req *request.Request, output *UpdateContinuousBackupsOutput) {
  4087. op := &request.Operation{
  4088. Name: opUpdateContinuousBackups,
  4089. HTTPMethod: "POST",
  4090. HTTPPath: "/",
  4091. }
  4092. if input == nil {
  4093. input = &UpdateContinuousBackupsInput{}
  4094. }
  4095. output = &UpdateContinuousBackupsOutput{}
  4096. req = c.newRequest(op, input, output)
  4097. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4098. de := discovererDescribeEndpoints{
  4099. Required: false,
  4100. EndpointCache: c.endpointCache,
  4101. Params: map[string]*string{
  4102. "op": aws.String(req.Operation.Name),
  4103. },
  4104. Client: c,
  4105. }
  4106. for k, v := range de.Params {
  4107. if v == nil {
  4108. delete(de.Params, k)
  4109. }
  4110. }
  4111. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4112. Name: "crr.endpointdiscovery",
  4113. Fn: de.Handler,
  4114. })
  4115. }
  4116. return
  4117. }
  4118. // UpdateContinuousBackups API operation for Amazon DynamoDB.
  4119. //
  4120. // UpdateContinuousBackups enables or disables point in time recovery for the
  4121. // specified table. A successful UpdateContinuousBackups call returns the current
  4122. // ContinuousBackupsDescription. Continuous backups are ENABLED on all tables
  4123. // at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus
  4124. // will be set to ENABLED.
  4125. //
  4126. // Once continuous backups and point in time recovery are enabled, you can restore
  4127. // to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.
  4128. //
  4129. // LatestRestorableDateTime is typically 5 minutes before the current time.
  4130. // You can restore your table to any point in time during the last 35 days..
  4131. //
  4132. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4133. // with awserr.Error's Code and Message methods to get detailed information about
  4134. // the error.
  4135. //
  4136. // See the AWS API reference guide for Amazon DynamoDB's
  4137. // API operation UpdateContinuousBackups for usage and error information.
  4138. //
  4139. // Returned Error Codes:
  4140. // * ErrCodeTableNotFoundException "TableNotFoundException"
  4141. // A source table with the name TableName does not currently exist within the
  4142. // subscriber's account.
  4143. //
  4144. // * ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException"
  4145. // Backups have not yet been enabled for this table.
  4146. //
  4147. // * ErrCodeInternalServerError "InternalServerError"
  4148. // An error occurred on the server side.
  4149. //
  4150. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups
  4151. func (c *DynamoDB) UpdateContinuousBackups(input *UpdateContinuousBackupsInput) (*UpdateContinuousBackupsOutput, error) {
  4152. req, out := c.UpdateContinuousBackupsRequest(input)
  4153. return out, req.Send()
  4154. }
  4155. // UpdateContinuousBackupsWithContext is the same as UpdateContinuousBackups with the addition of
  4156. // the ability to pass a context and additional request options.
  4157. //
  4158. // See UpdateContinuousBackups for details on how to use this API operation.
  4159. //
  4160. // The context must be non-nil and will be used for request cancellation. If
  4161. // the context is nil a panic will occur. In the future the SDK may create
  4162. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4163. // for more information on using Contexts.
  4164. func (c *DynamoDB) UpdateContinuousBackupsWithContext(ctx aws.Context, input *UpdateContinuousBackupsInput, opts ...request.Option) (*UpdateContinuousBackupsOutput, error) {
  4165. req, out := c.UpdateContinuousBackupsRequest(input)
  4166. req.SetContext(ctx)
  4167. req.ApplyOptions(opts...)
  4168. return out, req.Send()
  4169. }
  4170. const opUpdateGlobalTable = "UpdateGlobalTable"
  4171. // UpdateGlobalTableRequest generates a "aws/request.Request" representing the
  4172. // client's request for the UpdateGlobalTable operation. The "output" return
  4173. // value will be populated with the request's response once the request completes
  4174. // successfully.
  4175. //
  4176. // Use "Send" method on the returned Request to send the API call to the service.
  4177. // the "output" return value is not valid until after Send returns without error.
  4178. //
  4179. // See UpdateGlobalTable for more information on using the UpdateGlobalTable
  4180. // API call, and error handling.
  4181. //
  4182. // This method is useful when you want to inject custom logic or configuration
  4183. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4184. //
  4185. //
  4186. // // Example sending a request using the UpdateGlobalTableRequest method.
  4187. // req, resp := client.UpdateGlobalTableRequest(params)
  4188. //
  4189. // err := req.Send()
  4190. // if err == nil { // resp is now filled
  4191. // fmt.Println(resp)
  4192. // }
  4193. //
  4194. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable
  4195. func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req *request.Request, output *UpdateGlobalTableOutput) {
  4196. op := &request.Operation{
  4197. Name: opUpdateGlobalTable,
  4198. HTTPMethod: "POST",
  4199. HTTPPath: "/",
  4200. }
  4201. if input == nil {
  4202. input = &UpdateGlobalTableInput{}
  4203. }
  4204. output = &UpdateGlobalTableOutput{}
  4205. req = c.newRequest(op, input, output)
  4206. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4207. de := discovererDescribeEndpoints{
  4208. Required: false,
  4209. EndpointCache: c.endpointCache,
  4210. Params: map[string]*string{
  4211. "op": aws.String(req.Operation.Name),
  4212. },
  4213. Client: c,
  4214. }
  4215. for k, v := range de.Params {
  4216. if v == nil {
  4217. delete(de.Params, k)
  4218. }
  4219. }
  4220. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4221. Name: "crr.endpointdiscovery",
  4222. Fn: de.Handler,
  4223. })
  4224. }
  4225. return
  4226. }
  4227. // UpdateGlobalTable API operation for Amazon DynamoDB.
  4228. //
  4229. // Adds or removes replicas in the specified global table. The global table
  4230. // must already exist to be able to use this operation. Any replica to be added
  4231. // must be empty, must have the same name as the global table, must have the
  4232. // same key schema, and must have DynamoDB Streams enabled and must have same
  4233. // provisioned and maximum write capacity units.
  4234. //
  4235. // Although you can use UpdateGlobalTable to add replicas and remove replicas
  4236. // in a single request, for simplicity we recommend that you issue separate
  4237. // requests for adding or removing replicas.
  4238. //
  4239. // If global secondary indexes are specified, then the following conditions
  4240. // must also be met:
  4241. //
  4242. // * The global secondary indexes must have the same name.
  4243. //
  4244. // * The global secondary indexes must have the same hash key and sort key
  4245. // (if present).
  4246. //
  4247. // * The global secondary indexes must have the same provisioned and maximum
  4248. // write capacity units.
  4249. //
  4250. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4251. // with awserr.Error's Code and Message methods to get detailed information about
  4252. // the error.
  4253. //
  4254. // See the AWS API reference guide for Amazon DynamoDB's
  4255. // API operation UpdateGlobalTable for usage and error information.
  4256. //
  4257. // Returned Error Codes:
  4258. // * ErrCodeInternalServerError "InternalServerError"
  4259. // An error occurred on the server side.
  4260. //
  4261. // * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
  4262. // The specified global table does not exist.
  4263. //
  4264. // * ErrCodeReplicaAlreadyExistsException "ReplicaAlreadyExistsException"
  4265. // The specified replica is already part of the global table.
  4266. //
  4267. // * ErrCodeReplicaNotFoundException "ReplicaNotFoundException"
  4268. // The specified replica is no longer part of the global table.
  4269. //
  4270. // * ErrCodeTableNotFoundException "TableNotFoundException"
  4271. // A source table with the name TableName does not currently exist within the
  4272. // subscriber's account.
  4273. //
  4274. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable
  4275. func (c *DynamoDB) UpdateGlobalTable(input *UpdateGlobalTableInput) (*UpdateGlobalTableOutput, error) {
  4276. req, out := c.UpdateGlobalTableRequest(input)
  4277. return out, req.Send()
  4278. }
  4279. // UpdateGlobalTableWithContext is the same as UpdateGlobalTable with the addition of
  4280. // the ability to pass a context and additional request options.
  4281. //
  4282. // See UpdateGlobalTable for details on how to use this API operation.
  4283. //
  4284. // The context must be non-nil and will be used for request cancellation. If
  4285. // the context is nil a panic will occur. In the future the SDK may create
  4286. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4287. // for more information on using Contexts.
  4288. func (c *DynamoDB) UpdateGlobalTableWithContext(ctx aws.Context, input *UpdateGlobalTableInput, opts ...request.Option) (*UpdateGlobalTableOutput, error) {
  4289. req, out := c.UpdateGlobalTableRequest(input)
  4290. req.SetContext(ctx)
  4291. req.ApplyOptions(opts...)
  4292. return out, req.Send()
  4293. }
  4294. const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings"
  4295. // UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the
  4296. // client's request for the UpdateGlobalTableSettings operation. The "output" return
  4297. // value will be populated with the request's response once the request completes
  4298. // successfully.
  4299. //
  4300. // Use "Send" method on the returned Request to send the API call to the service.
  4301. // the "output" return value is not valid until after Send returns without error.
  4302. //
  4303. // See UpdateGlobalTableSettings for more information on using the UpdateGlobalTableSettings
  4304. // API call, and error handling.
  4305. //
  4306. // This method is useful when you want to inject custom logic or configuration
  4307. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4308. //
  4309. //
  4310. // // Example sending a request using the UpdateGlobalTableSettingsRequest method.
  4311. // req, resp := client.UpdateGlobalTableSettingsRequest(params)
  4312. //
  4313. // err := req.Send()
  4314. // if err == nil { // resp is now filled
  4315. // fmt.Println(resp)
  4316. // }
  4317. //
  4318. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings
  4319. func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSettingsInput) (req *request.Request, output *UpdateGlobalTableSettingsOutput) {
  4320. op := &request.Operation{
  4321. Name: opUpdateGlobalTableSettings,
  4322. HTTPMethod: "POST",
  4323. HTTPPath: "/",
  4324. }
  4325. if input == nil {
  4326. input = &UpdateGlobalTableSettingsInput{}
  4327. }
  4328. output = &UpdateGlobalTableSettingsOutput{}
  4329. req = c.newRequest(op, input, output)
  4330. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4331. de := discovererDescribeEndpoints{
  4332. Required: false,
  4333. EndpointCache: c.endpointCache,
  4334. Params: map[string]*string{
  4335. "op": aws.String(req.Operation.Name),
  4336. },
  4337. Client: c,
  4338. }
  4339. for k, v := range de.Params {
  4340. if v == nil {
  4341. delete(de.Params, k)
  4342. }
  4343. }
  4344. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4345. Name: "crr.endpointdiscovery",
  4346. Fn: de.Handler,
  4347. })
  4348. }
  4349. return
  4350. }
  4351. // UpdateGlobalTableSettings API operation for Amazon DynamoDB.
  4352. //
  4353. // Updates settings for a global table.
  4354. //
  4355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4356. // with awserr.Error's Code and Message methods to get detailed information about
  4357. // the error.
  4358. //
  4359. // See the AWS API reference guide for Amazon DynamoDB's
  4360. // API operation UpdateGlobalTableSettings for usage and error information.
  4361. //
  4362. // Returned Error Codes:
  4363. // * ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException"
  4364. // The specified global table does not exist.
  4365. //
  4366. // * ErrCodeReplicaNotFoundException "ReplicaNotFoundException"
  4367. // The specified replica is no longer part of the global table.
  4368. //
  4369. // * ErrCodeIndexNotFoundException "IndexNotFoundException"
  4370. // The operation tried to access a nonexistent index.
  4371. //
  4372. // * ErrCodeLimitExceededException "LimitExceededException"
  4373. // There is no limit to the number of daily on-demand backups that can be taken.
  4374. //
  4375. // Up to 10 simultaneous table operations are allowed per account. These operations
  4376. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  4377. // and RestoreTableToPointInTime.
  4378. //
  4379. // For tables with secondary indexes, only one of those tables can be in the
  4380. // CREATING state at any point in time. Do not attempt to create more than one
  4381. // such table simultaneously.
  4382. //
  4383. // The total limit of tables in the ACTIVE state is 250.
  4384. //
  4385. // * ErrCodeResourceInUseException "ResourceInUseException"
  4386. // The operation conflicts with the resource's availability. For example, you
  4387. // attempted to recreate an existing table, or tried to delete a table currently
  4388. // in the CREATING state.
  4389. //
  4390. // * ErrCodeInternalServerError "InternalServerError"
  4391. // An error occurred on the server side.
  4392. //
  4393. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings
  4394. func (c *DynamoDB) UpdateGlobalTableSettings(input *UpdateGlobalTableSettingsInput) (*UpdateGlobalTableSettingsOutput, error) {
  4395. req, out := c.UpdateGlobalTableSettingsRequest(input)
  4396. return out, req.Send()
  4397. }
  4398. // UpdateGlobalTableSettingsWithContext is the same as UpdateGlobalTableSettings with the addition of
  4399. // the ability to pass a context and additional request options.
  4400. //
  4401. // See UpdateGlobalTableSettings for details on how to use this API operation.
  4402. //
  4403. // The context must be non-nil and will be used for request cancellation. If
  4404. // the context is nil a panic will occur. In the future the SDK may create
  4405. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4406. // for more information on using Contexts.
  4407. func (c *DynamoDB) UpdateGlobalTableSettingsWithContext(ctx aws.Context, input *UpdateGlobalTableSettingsInput, opts ...request.Option) (*UpdateGlobalTableSettingsOutput, error) {
  4408. req, out := c.UpdateGlobalTableSettingsRequest(input)
  4409. req.SetContext(ctx)
  4410. req.ApplyOptions(opts...)
  4411. return out, req.Send()
  4412. }
  4413. const opUpdateItem = "UpdateItem"
  4414. // UpdateItemRequest generates a "aws/request.Request" representing the
  4415. // client's request for the UpdateItem operation. The "output" return
  4416. // value will be populated with the request's response once the request completes
  4417. // successfully.
  4418. //
  4419. // Use "Send" method on the returned Request to send the API call to the service.
  4420. // the "output" return value is not valid until after Send returns without error.
  4421. //
  4422. // See UpdateItem for more information on using the UpdateItem
  4423. // API call, and error handling.
  4424. //
  4425. // This method is useful when you want to inject custom logic or configuration
  4426. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4427. //
  4428. //
  4429. // // Example sending a request using the UpdateItemRequest method.
  4430. // req, resp := client.UpdateItemRequest(params)
  4431. //
  4432. // err := req.Send()
  4433. // if err == nil { // resp is now filled
  4434. // fmt.Println(resp)
  4435. // }
  4436. //
  4437. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem
  4438. func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Request, output *UpdateItemOutput) {
  4439. op := &request.Operation{
  4440. Name: opUpdateItem,
  4441. HTTPMethod: "POST",
  4442. HTTPPath: "/",
  4443. }
  4444. if input == nil {
  4445. input = &UpdateItemInput{}
  4446. }
  4447. output = &UpdateItemOutput{}
  4448. req = c.newRequest(op, input, output)
  4449. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4450. de := discovererDescribeEndpoints{
  4451. Required: false,
  4452. EndpointCache: c.endpointCache,
  4453. Params: map[string]*string{
  4454. "op": aws.String(req.Operation.Name),
  4455. },
  4456. Client: c,
  4457. }
  4458. for k, v := range de.Params {
  4459. if v == nil {
  4460. delete(de.Params, k)
  4461. }
  4462. }
  4463. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4464. Name: "crr.endpointdiscovery",
  4465. Fn: de.Handler,
  4466. })
  4467. }
  4468. return
  4469. }
  4470. // UpdateItem API operation for Amazon DynamoDB.
  4471. //
  4472. // Edits an existing item's attributes, or adds a new item to the table if it
  4473. // does not already exist. You can put, delete, or add attribute values. You
  4474. // can also perform a conditional update on an existing item (insert a new attribute
  4475. // name-value pair if it doesn't exist, or replace an existing name-value pair
  4476. // if it has certain expected attribute values).
  4477. //
  4478. // You can also return the item's attribute values in the same UpdateItem operation
  4479. // using the ReturnValues parameter.
  4480. //
  4481. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4482. // with awserr.Error's Code and Message methods to get detailed information about
  4483. // the error.
  4484. //
  4485. // See the AWS API reference guide for Amazon DynamoDB's
  4486. // API operation UpdateItem for usage and error information.
  4487. //
  4488. // Returned Error Codes:
  4489. // * ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException"
  4490. // A condition specified in the operation could not be evaluated.
  4491. //
  4492. // * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException"
  4493. // Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
  4494. // requests that receive this exception. Your request is eventually successful,
  4495. // unless your retry queue is too large to finish. Reduce the frequency of requests
  4496. // and use exponential backoff. For more information, go to Error Retries and
  4497. // Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
  4498. // in the Amazon DynamoDB Developer Guide.
  4499. //
  4500. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4501. // The operation tried to access a nonexistent table or index. The resource
  4502. // might not be specified correctly, or its status might not be ACTIVE.
  4503. //
  4504. // * ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException"
  4505. // An item collection is too large. This exception is only returned for tables
  4506. // that have one or more local secondary indexes.
  4507. //
  4508. // * ErrCodeTransactionConflictException "TransactionConflictException"
  4509. // Operation was rejected because there is an ongoing transaction for the item.
  4510. //
  4511. // * ErrCodeRequestLimitExceeded "RequestLimitExceeded"
  4512. // Throughput exceeds the current throughput limit for your account. Please
  4513. // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support)
  4514. // to request a limit increase.
  4515. //
  4516. // * ErrCodeInternalServerError "InternalServerError"
  4517. // An error occurred on the server side.
  4518. //
  4519. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem
  4520. func (c *DynamoDB) UpdateItem(input *UpdateItemInput) (*UpdateItemOutput, error) {
  4521. req, out := c.UpdateItemRequest(input)
  4522. return out, req.Send()
  4523. }
  4524. // UpdateItemWithContext is the same as UpdateItem with the addition of
  4525. // the ability to pass a context and additional request options.
  4526. //
  4527. // See UpdateItem for details on how to use this API operation.
  4528. //
  4529. // The context must be non-nil and will be used for request cancellation. If
  4530. // the context is nil a panic will occur. In the future the SDK may create
  4531. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4532. // for more information on using Contexts.
  4533. func (c *DynamoDB) UpdateItemWithContext(ctx aws.Context, input *UpdateItemInput, opts ...request.Option) (*UpdateItemOutput, error) {
  4534. req, out := c.UpdateItemRequest(input)
  4535. req.SetContext(ctx)
  4536. req.ApplyOptions(opts...)
  4537. return out, req.Send()
  4538. }
  4539. const opUpdateTable = "UpdateTable"
  4540. // UpdateTableRequest generates a "aws/request.Request" representing the
  4541. // client's request for the UpdateTable operation. The "output" return
  4542. // value will be populated with the request's response once the request completes
  4543. // successfully.
  4544. //
  4545. // Use "Send" method on the returned Request to send the API call to the service.
  4546. // the "output" return value is not valid until after Send returns without error.
  4547. //
  4548. // See UpdateTable for more information on using the UpdateTable
  4549. // API call, and error handling.
  4550. //
  4551. // This method is useful when you want to inject custom logic or configuration
  4552. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4553. //
  4554. //
  4555. // // Example sending a request using the UpdateTableRequest method.
  4556. // req, resp := client.UpdateTableRequest(params)
  4557. //
  4558. // err := req.Send()
  4559. // if err == nil { // resp is now filled
  4560. // fmt.Println(resp)
  4561. // }
  4562. //
  4563. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable
  4564. func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) {
  4565. op := &request.Operation{
  4566. Name: opUpdateTable,
  4567. HTTPMethod: "POST",
  4568. HTTPPath: "/",
  4569. }
  4570. if input == nil {
  4571. input = &UpdateTableInput{}
  4572. }
  4573. output = &UpdateTableOutput{}
  4574. req = c.newRequest(op, input, output)
  4575. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4576. de := discovererDescribeEndpoints{
  4577. Required: false,
  4578. EndpointCache: c.endpointCache,
  4579. Params: map[string]*string{
  4580. "op": aws.String(req.Operation.Name),
  4581. },
  4582. Client: c,
  4583. }
  4584. for k, v := range de.Params {
  4585. if v == nil {
  4586. delete(de.Params, k)
  4587. }
  4588. }
  4589. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4590. Name: "crr.endpointdiscovery",
  4591. Fn: de.Handler,
  4592. })
  4593. }
  4594. return
  4595. }
  4596. // UpdateTable API operation for Amazon DynamoDB.
  4597. //
  4598. // Modifies the provisioned throughput settings, global secondary indexes, or
  4599. // DynamoDB Streams settings for a given table.
  4600. //
  4601. // You can only perform one of the following operations at once:
  4602. //
  4603. // * Modify the provisioned throughput settings of the table.
  4604. //
  4605. // * Enable or disable Streams on the table.
  4606. //
  4607. // * Remove a global secondary index from the table.
  4608. //
  4609. // * Create a new global secondary index on the table. Once the index begins
  4610. // backfilling, you can use UpdateTable to perform other operations.
  4611. //
  4612. // UpdateTable is an asynchronous operation; while it is executing, the table
  4613. // status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot
  4614. // issue another UpdateTable request. When the table returns to the ACTIVE state,
  4615. // the UpdateTable operation is complete.
  4616. //
  4617. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4618. // with awserr.Error's Code and Message methods to get detailed information about
  4619. // the error.
  4620. //
  4621. // See the AWS API reference guide for Amazon DynamoDB's
  4622. // API operation UpdateTable for usage and error information.
  4623. //
  4624. // Returned Error Codes:
  4625. // * ErrCodeResourceInUseException "ResourceInUseException"
  4626. // The operation conflicts with the resource's availability. For example, you
  4627. // attempted to recreate an existing table, or tried to delete a table currently
  4628. // in the CREATING state.
  4629. //
  4630. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4631. // The operation tried to access a nonexistent table or index. The resource
  4632. // might not be specified correctly, or its status might not be ACTIVE.
  4633. //
  4634. // * ErrCodeLimitExceededException "LimitExceededException"
  4635. // There is no limit to the number of daily on-demand backups that can be taken.
  4636. //
  4637. // Up to 10 simultaneous table operations are allowed per account. These operations
  4638. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  4639. // and RestoreTableToPointInTime.
  4640. //
  4641. // For tables with secondary indexes, only one of those tables can be in the
  4642. // CREATING state at any point in time. Do not attempt to create more than one
  4643. // such table simultaneously.
  4644. //
  4645. // The total limit of tables in the ACTIVE state is 250.
  4646. //
  4647. // * ErrCodeInternalServerError "InternalServerError"
  4648. // An error occurred on the server side.
  4649. //
  4650. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable
  4651. func (c *DynamoDB) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) {
  4652. req, out := c.UpdateTableRequest(input)
  4653. return out, req.Send()
  4654. }
  4655. // UpdateTableWithContext is the same as UpdateTable with the addition of
  4656. // the ability to pass a context and additional request options.
  4657. //
  4658. // See UpdateTable for details on how to use this API operation.
  4659. //
  4660. // The context must be non-nil and will be used for request cancellation. If
  4661. // the context is nil a panic will occur. In the future the SDK may create
  4662. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4663. // for more information on using Contexts.
  4664. func (c *DynamoDB) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error) {
  4665. req, out := c.UpdateTableRequest(input)
  4666. req.SetContext(ctx)
  4667. req.ApplyOptions(opts...)
  4668. return out, req.Send()
  4669. }
  4670. const opUpdateTimeToLive = "UpdateTimeToLive"
  4671. // UpdateTimeToLiveRequest generates a "aws/request.Request" representing the
  4672. // client's request for the UpdateTimeToLive operation. The "output" return
  4673. // value will be populated with the request's response once the request completes
  4674. // successfully.
  4675. //
  4676. // Use "Send" method on the returned Request to send the API call to the service.
  4677. // the "output" return value is not valid until after Send returns without error.
  4678. //
  4679. // See UpdateTimeToLive for more information on using the UpdateTimeToLive
  4680. // API call, and error handling.
  4681. //
  4682. // This method is useful when you want to inject custom logic or configuration
  4683. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4684. //
  4685. //
  4686. // // Example sending a request using the UpdateTimeToLiveRequest method.
  4687. // req, resp := client.UpdateTimeToLiveRequest(params)
  4688. //
  4689. // err := req.Send()
  4690. // if err == nil { // resp is now filled
  4691. // fmt.Println(resp)
  4692. // }
  4693. //
  4694. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive
  4695. func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *request.Request, output *UpdateTimeToLiveOutput) {
  4696. op := &request.Operation{
  4697. Name: opUpdateTimeToLive,
  4698. HTTPMethod: "POST",
  4699. HTTPPath: "/",
  4700. }
  4701. if input == nil {
  4702. input = &UpdateTimeToLiveInput{}
  4703. }
  4704. output = &UpdateTimeToLiveOutput{}
  4705. req = c.newRequest(op, input, output)
  4706. if aws.BoolValue(req.Config.EnableEndpointDiscovery) {
  4707. de := discovererDescribeEndpoints{
  4708. Required: false,
  4709. EndpointCache: c.endpointCache,
  4710. Params: map[string]*string{
  4711. "op": aws.String(req.Operation.Name),
  4712. },
  4713. Client: c,
  4714. }
  4715. for k, v := range de.Params {
  4716. if v == nil {
  4717. delete(de.Params, k)
  4718. }
  4719. }
  4720. req.Handlers.Build.PushFrontNamed(request.NamedHandler{
  4721. Name: "crr.endpointdiscovery",
  4722. Fn: de.Handler,
  4723. })
  4724. }
  4725. return
  4726. }
  4727. // UpdateTimeToLive API operation for Amazon DynamoDB.
  4728. //
  4729. // The UpdateTimeToLive method will enable or disable TTL for the specified
  4730. // table. A successful UpdateTimeToLive call returns the current TimeToLiveSpecification;
  4731. // it may take up to one hour for the change to fully process. Any additional
  4732. // UpdateTimeToLive calls for the same table during this one hour duration result
  4733. // in a ValidationException.
  4734. //
  4735. // TTL compares the current time in epoch time format to the time stored in
  4736. // the TTL attribute of an item. If the epoch time value stored in the attribute
  4737. // is less than the current time, the item is marked as expired and subsequently
  4738. // deleted.
  4739. //
  4740. // The epoch time format is the number of seconds elapsed since 12:00:00 AM
  4741. // January 1st, 1970 UTC.
  4742. //
  4743. // DynamoDB deletes expired items on a best-effort basis to ensure availability
  4744. // of throughput for other data operations.
  4745. //
  4746. // DynamoDB typically deletes expired items within two days of expiration. The
  4747. // exact duration within which an item gets deleted after expiration is specific
  4748. // to the nature of the workload. Items that have expired and not been deleted
  4749. // will still show up in reads, queries, and scans.
  4750. //
  4751. // As items are deleted, they are removed from any Local Secondary Index and
  4752. // Global Secondary Index immediately in the same eventually consistent way
  4753. // as a standard delete operation.
  4754. //
  4755. // For more information, see Time To Live (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html)
  4756. // in the Amazon DynamoDB Developer Guide.
  4757. //
  4758. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4759. // with awserr.Error's Code and Message methods to get detailed information about
  4760. // the error.
  4761. //
  4762. // See the AWS API reference guide for Amazon DynamoDB's
  4763. // API operation UpdateTimeToLive for usage and error information.
  4764. //
  4765. // Returned Error Codes:
  4766. // * ErrCodeResourceInUseException "ResourceInUseException"
  4767. // The operation conflicts with the resource's availability. For example, you
  4768. // attempted to recreate an existing table, or tried to delete a table currently
  4769. // in the CREATING state.
  4770. //
  4771. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  4772. // The operation tried to access a nonexistent table or index. The resource
  4773. // might not be specified correctly, or its status might not be ACTIVE.
  4774. //
  4775. // * ErrCodeLimitExceededException "LimitExceededException"
  4776. // There is no limit to the number of daily on-demand backups that can be taken.
  4777. //
  4778. // Up to 10 simultaneous table operations are allowed per account. These operations
  4779. // include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
  4780. // and RestoreTableToPointInTime.
  4781. //
  4782. // For tables with secondary indexes, only one of those tables can be in the
  4783. // CREATING state at any point in time. Do not attempt to create more than one
  4784. // such table simultaneously.
  4785. //
  4786. // The total limit of tables in the ACTIVE state is 250.
  4787. //
  4788. // * ErrCodeInternalServerError "InternalServerError"
  4789. // An error occurred on the server side.
  4790. //
  4791. // See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive
  4792. func (c *DynamoDB) UpdateTimeToLive(input *UpdateTimeToLiveInput) (*UpdateTimeToLiveOutput, error) {
  4793. req, out := c.UpdateTimeToLiveRequest(input)
  4794. return out, req.Send()
  4795. }
  4796. // UpdateTimeToLiveWithContext is the same as UpdateTimeToLive with the addition of
  4797. // the ability to pass a context and additional request options.
  4798. //
  4799. // See UpdateTimeToLive for details on how to use this API operation.
  4800. //
  4801. // The context must be non-nil and will be used for request cancellation. If
  4802. // the context is nil a panic will occur. In the future the SDK may create
  4803. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4804. // for more information on using Contexts.
  4805. func (c *DynamoDB) UpdateTimeToLiveWithContext(ctx aws.Context, input *UpdateTimeToLiveInput, opts ...request.Option) (*UpdateTimeToLiveOutput, error) {
  4806. req, out := c.UpdateTimeToLiveRequest(input)
  4807. req.SetContext(ctx)
  4808. req.ApplyOptions(opts...)
  4809. return out, req.Send()
  4810. }
  4811. // Represents an attribute for describing the key schema for the table and indexes.
  4812. type AttributeDefinition struct {
  4813. _ struct{} `type:"structure"`
  4814. // A name for the attribute.
  4815. //
  4816. // AttributeName is a required field
  4817. AttributeName *string `min:"1" type:"string" required:"true"`
  4818. // The data type for the attribute, where:
  4819. //
  4820. // * S - the attribute is of type String
  4821. //
  4822. // * N - the attribute is of type Number
  4823. //
  4824. // * B - the attribute is of type Binary
  4825. //
  4826. // AttributeType is a required field
  4827. AttributeType *string `type:"string" required:"true" enum:"ScalarAttributeType"`
  4828. }
  4829. // String returns the string representation
  4830. func (s AttributeDefinition) String() string {
  4831. return awsutil.Prettify(s)
  4832. }
  4833. // GoString returns the string representation
  4834. func (s AttributeDefinition) GoString() string {
  4835. return s.String()
  4836. }
  4837. // Validate inspects the fields of the type to determine if they are valid.
  4838. func (s *AttributeDefinition) Validate() error {
  4839. invalidParams := request.ErrInvalidParams{Context: "AttributeDefinition"}
  4840. if s.AttributeName == nil {
  4841. invalidParams.Add(request.NewErrParamRequired("AttributeName"))
  4842. }
  4843. if s.AttributeName != nil && len(*s.AttributeName) < 1 {
  4844. invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1))
  4845. }
  4846. if s.AttributeType == nil {
  4847. invalidParams.Add(request.NewErrParamRequired("AttributeType"))
  4848. }
  4849. if invalidParams.Len() > 0 {
  4850. return invalidParams
  4851. }
  4852. return nil
  4853. }
  4854. // SetAttributeName sets the AttributeName field's value.
  4855. func (s *AttributeDefinition) SetAttributeName(v string) *AttributeDefinition {
  4856. s.AttributeName = &v
  4857. return s
  4858. }
  4859. // SetAttributeType sets the AttributeType field's value.
  4860. func (s *AttributeDefinition) SetAttributeType(v string) *AttributeDefinition {
  4861. s.AttributeType = &v
  4862. return s
  4863. }
  4864. // Represents the data for an attribute.
  4865. //
  4866. // Each attribute value is described as a name-value pair. The name is the data
  4867. // type, and the value is the data itself.
  4868. //
  4869. // For more information, see Data Types (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes)
  4870. // in the Amazon DynamoDB Developer Guide.
  4871. type AttributeValue struct {
  4872. _ struct{} `type:"structure"`
  4873. // An attribute of type Binary. For example:
  4874. //
  4875. // "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
  4876. //
  4877. // B is automatically base64 encoded/decoded by the SDK.
  4878. B []byte `type:"blob"`
  4879. // An attribute of type Boolean. For example:
  4880. //
  4881. // "BOOL": true
  4882. BOOL *bool `type:"boolean"`
  4883. // An attribute of type Binary Set. For example:
  4884. //
  4885. // "BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
  4886. BS [][]byte `type:"list"`
  4887. // An attribute of type List. For example:
  4888. //
  4889. // "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}]
  4890. L []*AttributeValue `type:"list"`
  4891. // An attribute of type Map. For example:
  4892. //
  4893. // "M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
  4894. M map[string]*AttributeValue `type:"map"`
  4895. // An attribute of type Number. For example:
  4896. //
  4897. // "N": "123.45"
  4898. //
  4899. // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility
  4900. // across languages and libraries. However, DynamoDB treats them as number type
  4901. // attributes for mathematical operations.
  4902. N *string `type:"string"`
  4903. // An attribute of type Number Set. For example:
  4904. //
  4905. // "NS": ["42.2", "-19", "7.5", "3.14"]
  4906. //
  4907. // Numbers are sent across the network to DynamoDB as strings, to maximize compatibility
  4908. // across languages and libraries. However, DynamoDB treats them as number type
  4909. // attributes for mathematical operations.
  4910. NS []*string `type:"list"`
  4911. // An attribute of type Null. For example:
  4912. //
  4913. // "NULL": true
  4914. NULL *bool `type:"boolean"`
  4915. // An attribute of type String. For example:
  4916. //
  4917. // "S": "Hello"
  4918. S *string `type:"string"`
  4919. // An attribute of type String Set. For example:
  4920. //
  4921. // "SS": ["Giraffe", "Hippo" ,"Zebra"]
  4922. SS []*string `type:"list"`
  4923. }
  4924. // String returns the string representation
  4925. func (s AttributeValue) String() string {
  4926. return awsutil.Prettify(s)
  4927. }
  4928. // GoString returns the string representation
  4929. func (s AttributeValue) GoString() string {
  4930. return s.String()
  4931. }
  4932. // SetB sets the B field's value.
  4933. func (s *AttributeValue) SetB(v []byte) *AttributeValue {
  4934. s.B = v
  4935. return s
  4936. }
  4937. // SetBOOL sets the BOOL field's value.
  4938. func (s *AttributeValue) SetBOOL(v bool) *AttributeValue {
  4939. s.BOOL = &v
  4940. return s
  4941. }
  4942. // SetBS sets the BS field's value.
  4943. func (s *AttributeValue) SetBS(v [][]byte) *AttributeValue {
  4944. s.BS = v
  4945. return s
  4946. }
  4947. // SetL sets the L field's value.
  4948. func (s *AttributeValue) SetL(v []*AttributeValue) *AttributeValue {
  4949. s.L = v
  4950. return s
  4951. }
  4952. // SetM sets the M field's value.
  4953. func (s *AttributeValue) SetM(v map[string]*AttributeValue) *AttributeValue {
  4954. s.M = v
  4955. return s
  4956. }
  4957. // SetN sets the N field's value.
  4958. func (s *AttributeValue) SetN(v string) *AttributeValue {
  4959. s.N = &v
  4960. return s
  4961. }
  4962. // SetNS sets the NS field's value.
  4963. func (s *AttributeValue) SetNS(v []*string) *AttributeValue {
  4964. s.NS = v
  4965. return s
  4966. }
  4967. // SetNULL sets the NULL field's value.
  4968. func (s *AttributeValue) SetNULL(v bool) *AttributeValue {
  4969. s.NULL = &v
  4970. return s
  4971. }
  4972. // SetS sets the S field's value.
  4973. func (s *AttributeValue) SetS(v string) *AttributeValue {
  4974. s.S = &v
  4975. return s
  4976. }
  4977. // SetSS sets the SS field's value.
  4978. func (s *AttributeValue) SetSS(v []*string) *AttributeValue {
  4979. s.SS = v
  4980. return s
  4981. }
  4982. // For the UpdateItem operation, represents the attributes to be modified, the
  4983. // action to perform on each, and the new value for each.
  4984. //
  4985. // You cannot use UpdateItem to update any primary key attributes. Instead,
  4986. // you will need to delete the item, and then use PutItem to create a new item
  4987. // with new attributes.
  4988. //
  4989. // Attribute values cannot be null; string and binary type attributes must have
  4990. // lengths greater than zero; and set type attributes must not be empty. Requests
  4991. // with empty values will be rejected with a ValidationException exception.
  4992. type AttributeValueUpdate struct {
  4993. _ struct{} `type:"structure"`
  4994. // Specifies how to perform the update. Valid values are PUT (default), DELETE,
  4995. // and ADD. The behavior depends on whether the specified primary key already
  4996. // exists in the table.
  4997. //
  4998. // If an item with the specified Key is found in the table:
  4999. //
  5000. // * PUT - Adds the specified attribute to the item. If the attribute already
  5001. // exists, it is replaced by the new value.
  5002. //
  5003. // * DELETE - If no value is specified, the attribute and its value are removed
  5004. // from the item. The data type of the specified value must match the existing
  5005. // value's data type.
  5006. //
  5007. // If a set of values is specified, then those values are subtracted from the
  5008. // old set. For example, if the attribute value was the set [a,b,c] and the
  5009. // DELETE action specified [a,c], then the final attribute value would be
  5010. // [b]. Specifying an empty set is an error.
  5011. //
  5012. // * ADD - If the attribute does not already exist, then the attribute and
  5013. // its values are added to the item. If the attribute does exist, then the
  5014. // behavior of ADD depends on the data type of the attribute:
  5015. //
  5016. // If the existing attribute is a number, and if Value is also a number, then
  5017. // the Value is mathematically added to the existing attribute. If Value
  5018. // is a negative number, then it is subtracted from the existing attribute.
  5019. //
  5020. // If you use ADD to increment or decrement a number value for an item that
  5021. // doesn't exist before the update, DynamoDB uses 0 as the initial value.
  5022. //
  5023. // In addition, if you use ADD to update an existing item, and intend to increment
  5024. // or decrement an attribute value which does not yet exist, DynamoDB uses
  5025. // 0 as the initial value. For example, suppose that the item you want to
  5026. // update does not yet have an attribute named itemcount, but you decide
  5027. // to ADD the number 3 to this attribute anyway, even though it currently
  5028. // does not exist. DynamoDB will create the itemcount attribute, set its
  5029. // initial value to 0, and finally add 3 to it. The result will be a new
  5030. // itemcount attribute in the item, with a value of 3.
  5031. //
  5032. // If the existing data type is a set, and if the Value is also a set, then
  5033. // the Value is added to the existing set. (This is a set operation, not
  5034. // mathematical addition.) For example, if the attribute value was the set
  5035. // [1,2], and the ADD action specified [3], then the final attribute value
  5036. // would be [1,2,3]. An error occurs if an Add action is specified for a
  5037. // set attribute and the attribute type specified does not match the existing
  5038. // set type.
  5039. //
  5040. // Both sets must have the same primitive data type. For example, if the existing
  5041. // data type is a set of strings, the Value must also be a set of strings.
  5042. // The same holds true for number sets and binary sets.
  5043. //
  5044. // This action is only valid for an existing attribute whose data type is number
  5045. // or is a set. Do not use ADD for any other data types.
  5046. //
  5047. // If no item with the specified Key is found:
  5048. //
  5049. // * PUT - DynamoDB creates a new item with the specified primary key, and
  5050. // then adds the attribute.
  5051. //
  5052. // * DELETE - Nothing happens; there is no attribute to delete.
  5053. //
  5054. // * ADD - DynamoDB creates an item with the supplied primary key and number
  5055. // (or set of numbers) for the attribute value. The only data types allowed
  5056. // are number and number set; no other data types can be specified.
  5057. Action *string `type:"string" enum:"AttributeAction"`
  5058. // Represents the data for an attribute.
  5059. //
  5060. // Each attribute value is described as a name-value pair. The name is the data
  5061. // type, and the value is the data itself.
  5062. //
  5063. // For more information, see Data Types (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes)
  5064. // in the Amazon DynamoDB Developer Guide.
  5065. Value *AttributeValue `type:"structure"`
  5066. }
  5067. // String returns the string representation
  5068. func (s AttributeValueUpdate) String() string {
  5069. return awsutil.Prettify(s)
  5070. }
  5071. // GoString returns the string representation
  5072. func (s AttributeValueUpdate) GoString() string {
  5073. return s.String()
  5074. }
  5075. // SetAction sets the Action field's value.
  5076. func (s *AttributeValueUpdate) SetAction(v string) *AttributeValueUpdate {
  5077. s.Action = &v
  5078. return s
  5079. }
  5080. // SetValue sets the Value field's value.
  5081. func (s *AttributeValueUpdate) SetValue(v *AttributeValue) *AttributeValueUpdate {
  5082. s.Value = v
  5083. return s
  5084. }
  5085. // Represents the properties of the scaling policy.
  5086. type AutoScalingPolicyDescription struct {
  5087. _ struct{} `type:"structure"`
  5088. // The name of the scaling policy.
  5089. PolicyName *string `min:"1" type:"string"`
  5090. // Represents a target tracking scaling policy configuration.
  5091. TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationDescription `type:"structure"`
  5092. }
  5093. // String returns the string representation
  5094. func (s AutoScalingPolicyDescription) String() string {
  5095. return awsutil.Prettify(s)
  5096. }
  5097. // GoString returns the string representation
  5098. func (s AutoScalingPolicyDescription) GoString() string {
  5099. return s.String()
  5100. }
  5101. // SetPolicyName sets the PolicyName field's value.
  5102. func (s *AutoScalingPolicyDescription) SetPolicyName(v string) *AutoScalingPolicyDescription {
  5103. s.PolicyName = &v
  5104. return s
  5105. }
  5106. // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value.
  5107. func (s *AutoScalingPolicyDescription) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) *AutoScalingPolicyDescription {
  5108. s.TargetTrackingScalingPolicyConfiguration = v
  5109. return s
  5110. }
  5111. // Represents the autoscaling policy to be modified.
  5112. type AutoScalingPolicyUpdate struct {
  5113. _ struct{} `type:"structure"`
  5114. // The name of the scaling policy.
  5115. PolicyName *string `min:"1" type:"string"`
  5116. // Represents a target tracking scaling policy configuration.
  5117. //
  5118. // TargetTrackingScalingPolicyConfiguration is a required field
  5119. TargetTrackingScalingPolicyConfiguration *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate `type:"structure" required:"true"`
  5120. }
  5121. // String returns the string representation
  5122. func (s AutoScalingPolicyUpdate) String() string {
  5123. return awsutil.Prettify(s)
  5124. }
  5125. // GoString returns the string representation
  5126. func (s AutoScalingPolicyUpdate) GoString() string {
  5127. return s.String()
  5128. }
  5129. // Validate inspects the fields of the type to determine if they are valid.
  5130. func (s *AutoScalingPolicyUpdate) Validate() error {
  5131. invalidParams := request.ErrInvalidParams{Context: "AutoScalingPolicyUpdate"}
  5132. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  5133. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  5134. }
  5135. if s.TargetTrackingScalingPolicyConfiguration == nil {
  5136. invalidParams.Add(request.NewErrParamRequired("TargetTrackingScalingPolicyConfiguration"))
  5137. }
  5138. if s.TargetTrackingScalingPolicyConfiguration != nil {
  5139. if err := s.TargetTrackingScalingPolicyConfiguration.Validate(); err != nil {
  5140. invalidParams.AddNested("TargetTrackingScalingPolicyConfiguration", err.(request.ErrInvalidParams))
  5141. }
  5142. }
  5143. if invalidParams.Len() > 0 {
  5144. return invalidParams
  5145. }
  5146. return nil
  5147. }
  5148. // SetPolicyName sets the PolicyName field's value.
  5149. func (s *AutoScalingPolicyUpdate) SetPolicyName(v string) *AutoScalingPolicyUpdate {
  5150. s.PolicyName = &v
  5151. return s
  5152. }
  5153. // SetTargetTrackingScalingPolicyConfiguration sets the TargetTrackingScalingPolicyConfiguration field's value.
  5154. func (s *AutoScalingPolicyUpdate) SetTargetTrackingScalingPolicyConfiguration(v *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) *AutoScalingPolicyUpdate {
  5155. s.TargetTrackingScalingPolicyConfiguration = v
  5156. return s
  5157. }
  5158. // Represents the autoscaling settings for a global table or global secondary
  5159. // index.
  5160. type AutoScalingSettingsDescription struct {
  5161. _ struct{} `type:"structure"`
  5162. // Disabled autoscaling for this global table or global secondary index.
  5163. AutoScalingDisabled *bool `type:"boolean"`
  5164. // Role ARN used for configuring autoScaling policy.
  5165. AutoScalingRoleArn *string `type:"string"`
  5166. // The maximum capacity units that a global table or global secondary index
  5167. // should be scaled up to.
  5168. MaximumUnits *int64 `min:"1" type:"long"`
  5169. // The minimum capacity units that a global table or global secondary index
  5170. // should be scaled down to.
  5171. MinimumUnits *int64 `min:"1" type:"long"`
  5172. // Information about the scaling policies.
  5173. ScalingPolicies []*AutoScalingPolicyDescription `type:"list"`
  5174. }
  5175. // String returns the string representation
  5176. func (s AutoScalingSettingsDescription) String() string {
  5177. return awsutil.Prettify(s)
  5178. }
  5179. // GoString returns the string representation
  5180. func (s AutoScalingSettingsDescription) GoString() string {
  5181. return s.String()
  5182. }
  5183. // SetAutoScalingDisabled sets the AutoScalingDisabled field's value.
  5184. func (s *AutoScalingSettingsDescription) SetAutoScalingDisabled(v bool) *AutoScalingSettingsDescription {
  5185. s.AutoScalingDisabled = &v
  5186. return s
  5187. }
  5188. // SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value.
  5189. func (s *AutoScalingSettingsDescription) SetAutoScalingRoleArn(v string) *AutoScalingSettingsDescription {
  5190. s.AutoScalingRoleArn = &v
  5191. return s
  5192. }
  5193. // SetMaximumUnits sets the MaximumUnits field's value.
  5194. func (s *AutoScalingSettingsDescription) SetMaximumUnits(v int64) *AutoScalingSettingsDescription {
  5195. s.MaximumUnits = &v
  5196. return s
  5197. }
  5198. // SetMinimumUnits sets the MinimumUnits field's value.
  5199. func (s *AutoScalingSettingsDescription) SetMinimumUnits(v int64) *AutoScalingSettingsDescription {
  5200. s.MinimumUnits = &v
  5201. return s
  5202. }
  5203. // SetScalingPolicies sets the ScalingPolicies field's value.
  5204. func (s *AutoScalingSettingsDescription) SetScalingPolicies(v []*AutoScalingPolicyDescription) *AutoScalingSettingsDescription {
  5205. s.ScalingPolicies = v
  5206. return s
  5207. }
  5208. // Represents the autoscaling settings to be modified for a global table or
  5209. // global secondary index.
  5210. type AutoScalingSettingsUpdate struct {
  5211. _ struct{} `type:"structure"`
  5212. // Disabled autoscaling for this global table or global secondary index.
  5213. AutoScalingDisabled *bool `type:"boolean"`
  5214. // Role ARN used for configuring autoscaling policy.
  5215. AutoScalingRoleArn *string `min:"1" type:"string"`
  5216. // The maximum capacity units that a global table or global secondary index
  5217. // should be scaled up to.
  5218. MaximumUnits *int64 `min:"1" type:"long"`
  5219. // The minimum capacity units that a global table or global secondary index
  5220. // should be scaled down to.
  5221. MinimumUnits *int64 `min:"1" type:"long"`
  5222. // The scaling policy to apply for scaling target global table or global secondary
  5223. // index capacity units.
  5224. ScalingPolicyUpdate *AutoScalingPolicyUpdate `type:"structure"`
  5225. }
  5226. // String returns the string representation
  5227. func (s AutoScalingSettingsUpdate) String() string {
  5228. return awsutil.Prettify(s)
  5229. }
  5230. // GoString returns the string representation
  5231. func (s AutoScalingSettingsUpdate) GoString() string {
  5232. return s.String()
  5233. }
  5234. // Validate inspects the fields of the type to determine if they are valid.
  5235. func (s *AutoScalingSettingsUpdate) Validate() error {
  5236. invalidParams := request.ErrInvalidParams{Context: "AutoScalingSettingsUpdate"}
  5237. if s.AutoScalingRoleArn != nil && len(*s.AutoScalingRoleArn) < 1 {
  5238. invalidParams.Add(request.NewErrParamMinLen("AutoScalingRoleArn", 1))
  5239. }
  5240. if s.MaximumUnits != nil && *s.MaximumUnits < 1 {
  5241. invalidParams.Add(request.NewErrParamMinValue("MaximumUnits", 1))
  5242. }
  5243. if s.MinimumUnits != nil && *s.MinimumUnits < 1 {
  5244. invalidParams.Add(request.NewErrParamMinValue("MinimumUnits", 1))
  5245. }
  5246. if s.ScalingPolicyUpdate != nil {
  5247. if err := s.ScalingPolicyUpdate.Validate(); err != nil {
  5248. invalidParams.AddNested("ScalingPolicyUpdate", err.(request.ErrInvalidParams))
  5249. }
  5250. }
  5251. if invalidParams.Len() > 0 {
  5252. return invalidParams
  5253. }
  5254. return nil
  5255. }
  5256. // SetAutoScalingDisabled sets the AutoScalingDisabled field's value.
  5257. func (s *AutoScalingSettingsUpdate) SetAutoScalingDisabled(v bool) *AutoScalingSettingsUpdate {
  5258. s.AutoScalingDisabled = &v
  5259. return s
  5260. }
  5261. // SetAutoScalingRoleArn sets the AutoScalingRoleArn field's value.
  5262. func (s *AutoScalingSettingsUpdate) SetAutoScalingRoleArn(v string) *AutoScalingSettingsUpdate {
  5263. s.AutoScalingRoleArn = &v
  5264. return s
  5265. }
  5266. // SetMaximumUnits sets the MaximumUnits field's value.
  5267. func (s *AutoScalingSettingsUpdate) SetMaximumUnits(v int64) *AutoScalingSettingsUpdate {
  5268. s.MaximumUnits = &v
  5269. return s
  5270. }
  5271. // SetMinimumUnits sets the MinimumUnits field's value.
  5272. func (s *AutoScalingSettingsUpdate) SetMinimumUnits(v int64) *AutoScalingSettingsUpdate {
  5273. s.MinimumUnits = &v
  5274. return s
  5275. }
  5276. // SetScalingPolicyUpdate sets the ScalingPolicyUpdate field's value.
  5277. func (s *AutoScalingSettingsUpdate) SetScalingPolicyUpdate(v *AutoScalingPolicyUpdate) *AutoScalingSettingsUpdate {
  5278. s.ScalingPolicyUpdate = v
  5279. return s
  5280. }
  5281. // Represents the properties of a target tracking scaling policy.
  5282. type AutoScalingTargetTrackingScalingPolicyConfigurationDescription struct {
  5283. _ struct{} `type:"structure"`
  5284. // Indicates whether scale in by the target tracking policy is disabled. If
  5285. // the value is true, scale in is disabled and the target tracking policy won't
  5286. // remove capacity from the scalable resource. Otherwise, scale in is enabled
  5287. // and the target tracking policy can remove capacity from the scalable resource.
  5288. // The default value is false.
  5289. DisableScaleIn *bool `type:"boolean"`
  5290. // The amount of time, in seconds, after a scale in activity completes before
  5291. // another scale in activity can start. The cooldown period is used to block
  5292. // subsequent scale in requests until it has expired. You should scale in conservatively
  5293. // to protect your application's availability. However, if another alarm triggers
  5294. // a scale out policy during the cooldown period after a scale-in, application
  5295. // autoscaling scales out your scalable target immediately.
  5296. ScaleInCooldown *int64 `type:"integer"`
  5297. // The amount of time, in seconds, after a scale out activity completes before
  5298. // another scale out activity can start. While the cooldown period is in effect,
  5299. // the capacity that has been added by the previous scale out event that initiated
  5300. // the cooldown is calculated as part of the desired capacity for the next scale
  5301. // out. You should continuously (but not excessively) scale out.
  5302. ScaleOutCooldown *int64 `type:"integer"`
  5303. // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
  5304. // (Base 10) or 2e-360 to 2e360 (Base 2).
  5305. //
  5306. // TargetValue is a required field
  5307. TargetValue *float64 `type:"double" required:"true"`
  5308. }
  5309. // String returns the string representation
  5310. func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) String() string {
  5311. return awsutil.Prettify(s)
  5312. }
  5313. // GoString returns the string representation
  5314. func (s AutoScalingTargetTrackingScalingPolicyConfigurationDescription) GoString() string {
  5315. return s.String()
  5316. }
  5317. // SetDisableScaleIn sets the DisableScaleIn field's value.
  5318. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription {
  5319. s.DisableScaleIn = &v
  5320. return s
  5321. }
  5322. // SetScaleInCooldown sets the ScaleInCooldown field's value.
  5323. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription {
  5324. s.ScaleInCooldown = &v
  5325. return s
  5326. }
  5327. // SetScaleOutCooldown sets the ScaleOutCooldown field's value.
  5328. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription {
  5329. s.ScaleOutCooldown = &v
  5330. return s
  5331. }
  5332. // SetTargetValue sets the TargetValue field's value.
  5333. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationDescription) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationDescription {
  5334. s.TargetValue = &v
  5335. return s
  5336. }
  5337. // Represents the settings of a target tracking scaling policy that will be
  5338. // modified.
  5339. type AutoScalingTargetTrackingScalingPolicyConfigurationUpdate struct {
  5340. _ struct{} `type:"structure"`
  5341. // Indicates whether scale in by the target tracking policy is disabled. If
  5342. // the value is true, scale in is disabled and the target tracking policy won't
  5343. // remove capacity from the scalable resource. Otherwise, scale in is enabled
  5344. // and the target tracking policy can remove capacity from the scalable resource.
  5345. // The default value is false.
  5346. DisableScaleIn *bool `type:"boolean"`
  5347. // The amount of time, in seconds, after a scale in activity completes before
  5348. // another scale in activity can start. The cooldown period is used to block
  5349. // subsequent scale in requests until it has expired. You should scale in conservatively
  5350. // to protect your application's availability. However, if another alarm triggers
  5351. // a scale out policy during the cooldown period after a scale-in, application
  5352. // autoscaling scales out your scalable target immediately.
  5353. ScaleInCooldown *int64 `type:"integer"`
  5354. // The amount of time, in seconds, after a scale out activity completes before
  5355. // another scale out activity can start. While the cooldown period is in effect,
  5356. // the capacity that has been added by the previous scale out event that initiated
  5357. // the cooldown is calculated as part of the desired capacity for the next scale
  5358. // out. You should continuously (but not excessively) scale out.
  5359. ScaleOutCooldown *int64 `type:"integer"`
  5360. // The target value for the metric. The range is 8.515920e-109 to 1.174271e+108
  5361. // (Base 10) or 2e-360 to 2e360 (Base 2).
  5362. //
  5363. // TargetValue is a required field
  5364. TargetValue *float64 `type:"double" required:"true"`
  5365. }
  5366. // String returns the string representation
  5367. func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) String() string {
  5368. return awsutil.Prettify(s)
  5369. }
  5370. // GoString returns the string representation
  5371. func (s AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) GoString() string {
  5372. return s.String()
  5373. }
  5374. // Validate inspects the fields of the type to determine if they are valid.
  5375. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) Validate() error {
  5376. invalidParams := request.ErrInvalidParams{Context: "AutoScalingTargetTrackingScalingPolicyConfigurationUpdate"}
  5377. if s.TargetValue == nil {
  5378. invalidParams.Add(request.NewErrParamRequired("TargetValue"))
  5379. }
  5380. if invalidParams.Len() > 0 {
  5381. return invalidParams
  5382. }
  5383. return nil
  5384. }
  5385. // SetDisableScaleIn sets the DisableScaleIn field's value.
  5386. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetDisableScaleIn(v bool) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {
  5387. s.DisableScaleIn = &v
  5388. return s
  5389. }
  5390. // SetScaleInCooldown sets the ScaleInCooldown field's value.
  5391. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleInCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {
  5392. s.ScaleInCooldown = &v
  5393. return s
  5394. }
  5395. // SetScaleOutCooldown sets the ScaleOutCooldown field's value.
  5396. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetScaleOutCooldown(v int64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {
  5397. s.ScaleOutCooldown = &v
  5398. return s
  5399. }
  5400. // SetTargetValue sets the TargetValue field's value.
  5401. func (s *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate) SetTargetValue(v float64) *AutoScalingTargetTrackingScalingPolicyConfigurationUpdate {
  5402. s.TargetValue = &v
  5403. return s
  5404. }
  5405. // Contains the description of the backup created for the table.
  5406. type BackupDescription struct {
  5407. _ struct{} `type:"structure"`
  5408. // Contains the details of the backup created for the table.
  5409. BackupDetails *BackupDetails `type:"structure"`
  5410. // Contains the details of the table when the backup was created.
  5411. SourceTableDetails *SourceTableDetails `type:"structure"`
  5412. // Contains the details of the features enabled on the table when the backup
  5413. // was created. For example, LSIs, GSIs, streams, TTL.
  5414. SourceTableFeatureDetails *SourceTableFeatureDetails `type:"structure"`
  5415. }
  5416. // String returns the string representation
  5417. func (s BackupDescription) String() string {
  5418. return awsutil.Prettify(s)
  5419. }
  5420. // GoString returns the string representation
  5421. func (s BackupDescription) GoString() string {
  5422. return s.String()
  5423. }
  5424. // SetBackupDetails sets the BackupDetails field's value.
  5425. func (s *BackupDescription) SetBackupDetails(v *BackupDetails) *BackupDescription {
  5426. s.BackupDetails = v
  5427. return s
  5428. }
  5429. // SetSourceTableDetails sets the SourceTableDetails field's value.
  5430. func (s *BackupDescription) SetSourceTableDetails(v *SourceTableDetails) *BackupDescription {
  5431. s.SourceTableDetails = v
  5432. return s
  5433. }
  5434. // SetSourceTableFeatureDetails sets the SourceTableFeatureDetails field's value.
  5435. func (s *BackupDescription) SetSourceTableFeatureDetails(v *SourceTableFeatureDetails) *BackupDescription {
  5436. s.SourceTableFeatureDetails = v
  5437. return s
  5438. }
  5439. // Contains the details of the backup created for the table.
  5440. type BackupDetails struct {
  5441. _ struct{} `type:"structure"`
  5442. // ARN associated with the backup.
  5443. //
  5444. // BackupArn is a required field
  5445. BackupArn *string `min:"37" type:"string" required:"true"`
  5446. // Time at which the backup was created. This is the request time of the backup.
  5447. //
  5448. // BackupCreationDateTime is a required field
  5449. BackupCreationDateTime *time.Time `type:"timestamp" required:"true"`
  5450. // Time at which the automatic on-demand backup created by DynamoDB will expire.
  5451. // This SYSTEM on-demand backup expires automatically 35 days after its creation.
  5452. BackupExpiryDateTime *time.Time `type:"timestamp"`
  5453. // Name of the requested backup.
  5454. //
  5455. // BackupName is a required field
  5456. BackupName *string `min:"3" type:"string" required:"true"`
  5457. // Size of the backup in bytes.
  5458. BackupSizeBytes *int64 `type:"long"`
  5459. // Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
  5460. //
  5461. // BackupStatus is a required field
  5462. BackupStatus *string `type:"string" required:"true" enum:"BackupStatus"`
  5463. // BackupType:
  5464. //
  5465. // * USER - You create and manage these using the on-demand backup feature.
  5466. //
  5467. // * SYSTEM - If you delete a table with point-in-time recovery enabled,
  5468. // a SYSTEM backup is automatically created and is retained for 35 days (at
  5469. // no additional cost). System backups allow you to restore the deleted table
  5470. // to the state it was in just before the point of deletion.
  5471. //
  5472. // * AWS_BACKUP - On-demand backup created by you from AWS Backup service.
  5473. //
  5474. // BackupType is a required field
  5475. BackupType *string `type:"string" required:"true" enum:"BackupType"`
  5476. }
  5477. // String returns the string representation
  5478. func (s BackupDetails) String() string {
  5479. return awsutil.Prettify(s)
  5480. }
  5481. // GoString returns the string representation
  5482. func (s BackupDetails) GoString() string {
  5483. return s.String()
  5484. }
  5485. // SetBackupArn sets the BackupArn field's value.
  5486. func (s *BackupDetails) SetBackupArn(v string) *BackupDetails {
  5487. s.BackupArn = &v
  5488. return s
  5489. }
  5490. // SetBackupCreationDateTime sets the BackupCreationDateTime field's value.
  5491. func (s *BackupDetails) SetBackupCreationDateTime(v time.Time) *BackupDetails {
  5492. s.BackupCreationDateTime = &v
  5493. return s
  5494. }
  5495. // SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value.
  5496. func (s *BackupDetails) SetBackupExpiryDateTime(v time.Time) *BackupDetails {
  5497. s.BackupExpiryDateTime = &v
  5498. return s
  5499. }
  5500. // SetBackupName sets the BackupName field's value.
  5501. func (s *BackupDetails) SetBackupName(v string) *BackupDetails {
  5502. s.BackupName = &v
  5503. return s
  5504. }
  5505. // SetBackupSizeBytes sets the BackupSizeBytes field's value.
  5506. func (s *BackupDetails) SetBackupSizeBytes(v int64) *BackupDetails {
  5507. s.BackupSizeBytes = &v
  5508. return s
  5509. }
  5510. // SetBackupStatus sets the BackupStatus field's value.
  5511. func (s *BackupDetails) SetBackupStatus(v string) *BackupDetails {
  5512. s.BackupStatus = &v
  5513. return s
  5514. }
  5515. // SetBackupType sets the BackupType field's value.
  5516. func (s *BackupDetails) SetBackupType(v string) *BackupDetails {
  5517. s.BackupType = &v
  5518. return s
  5519. }
  5520. // Contains details for the backup.
  5521. type BackupSummary struct {
  5522. _ struct{} `type:"structure"`
  5523. // ARN associated with the backup.
  5524. BackupArn *string `min:"37" type:"string"`
  5525. // Time at which the backup was created.
  5526. BackupCreationDateTime *time.Time `type:"timestamp"`
  5527. // Time at which the automatic on-demand backup created by DynamoDB will expire.
  5528. // This SYSTEM on-demand backup expires automatically 35 days after its creation.
  5529. BackupExpiryDateTime *time.Time `type:"timestamp"`
  5530. // Name of the specified backup.
  5531. BackupName *string `min:"3" type:"string"`
  5532. // Size of the backup in bytes.
  5533. BackupSizeBytes *int64 `type:"long"`
  5534. // Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
  5535. BackupStatus *string `type:"string" enum:"BackupStatus"`
  5536. // BackupType:
  5537. //
  5538. // * USER - You create and manage these using the on-demand backup feature.
  5539. //
  5540. // * SYSTEM - If you delete a table with point-in-time recovery enabled,
  5541. // a SYSTEM backup is automatically created and is retained for 35 days (at
  5542. // no additional cost). System backups allow you to restore the deleted table
  5543. // to the state it was in just before the point of deletion.
  5544. //
  5545. // * AWS_BACKUP - On-demand backup created by you from AWS Backup service.
  5546. BackupType *string `type:"string" enum:"BackupType"`
  5547. // ARN associated with the table.
  5548. TableArn *string `type:"string"`
  5549. // Unique identifier for the table.
  5550. TableId *string `type:"string"`
  5551. // Name of the table.
  5552. TableName *string `min:"3" type:"string"`
  5553. }
  5554. // String returns the string representation
  5555. func (s BackupSummary) String() string {
  5556. return awsutil.Prettify(s)
  5557. }
  5558. // GoString returns the string representation
  5559. func (s BackupSummary) GoString() string {
  5560. return s.String()
  5561. }
  5562. // SetBackupArn sets the BackupArn field's value.
  5563. func (s *BackupSummary) SetBackupArn(v string) *BackupSummary {
  5564. s.BackupArn = &v
  5565. return s
  5566. }
  5567. // SetBackupCreationDateTime sets the BackupCreationDateTime field's value.
  5568. func (s *BackupSummary) SetBackupCreationDateTime(v time.Time) *BackupSummary {
  5569. s.BackupCreationDateTime = &v
  5570. return s
  5571. }
  5572. // SetBackupExpiryDateTime sets the BackupExpiryDateTime field's value.
  5573. func (s *BackupSummary) SetBackupExpiryDateTime(v time.Time) *BackupSummary {
  5574. s.BackupExpiryDateTime = &v
  5575. return s
  5576. }
  5577. // SetBackupName sets the BackupName field's value.
  5578. func (s *BackupSummary) SetBackupName(v string) *BackupSummary {
  5579. s.BackupName = &v
  5580. return s
  5581. }
  5582. // SetBackupSizeBytes sets the BackupSizeBytes field's value.
  5583. func (s *BackupSummary) SetBackupSizeBytes(v int64) *BackupSummary {
  5584. s.BackupSizeBytes = &v
  5585. return s
  5586. }
  5587. // SetBackupStatus sets the BackupStatus field's value.
  5588. func (s *BackupSummary) SetBackupStatus(v string) *BackupSummary {
  5589. s.BackupStatus = &v
  5590. return s
  5591. }
  5592. // SetBackupType sets the BackupType field's value.
  5593. func (s *BackupSummary) SetBackupType(v string) *BackupSummary {
  5594. s.BackupType = &v
  5595. return s
  5596. }
  5597. // SetTableArn sets the TableArn field's value.
  5598. func (s *BackupSummary) SetTableArn(v string) *BackupSummary {
  5599. s.TableArn = &v
  5600. return s
  5601. }
  5602. // SetTableId sets the TableId field's value.
  5603. func (s *BackupSummary) SetTableId(v string) *BackupSummary {
  5604. s.TableId = &v
  5605. return s
  5606. }
  5607. // SetTableName sets the TableName field's value.
  5608. func (s *BackupSummary) SetTableName(v string) *BackupSummary {
  5609. s.TableName = &v
  5610. return s
  5611. }
  5612. // Represents the input of a BatchGetItem operation.
  5613. type BatchGetItemInput struct {
  5614. _ struct{} `type:"structure"`
  5615. // A map of one or more table names and, for each table, a map that describes
  5616. // one or more items to retrieve from that table. Each table name can be used
  5617. // only once per BatchGetItem request.
  5618. //
  5619. // Each element in the map of items to retrieve consists of the following:
  5620. //
  5621. // * ConsistentRead - If true, a strongly consistent read is used; if false
  5622. // (the default), an eventually consistent read is used.
  5623. //
  5624. // * ExpressionAttributeNames - One or more substitution tokens for attribute
  5625. // names in the ProjectionExpression parameter. The following are some use
  5626. // cases for using ExpressionAttributeNames:
  5627. //
  5628. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  5629. //
  5630. // To create a placeholder for repeating occurrences of an attribute name in
  5631. // an expression.
  5632. //
  5633. // To prevent special characters in an attribute name from being misinterpreted
  5634. // in an expression.
  5635. //
  5636. // Use the # character in an expression to dereference an attribute name. For
  5637. // example, consider the following attribute name:
  5638. //
  5639. // Percentile
  5640. //
  5641. // The name of this attribute conflicts with a reserved word, so it cannot be
  5642. // used directly in an expression. (For the complete list of reserved words,
  5643. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  5644. // in the Amazon DynamoDB Developer Guide). To work around this, you could
  5645. // specify the following for ExpressionAttributeNames:
  5646. //
  5647. // {"#P":"Percentile"}
  5648. //
  5649. // You could then use this substitution in an expression, as in this example:
  5650. //
  5651. // #P = :val
  5652. //
  5653. // Tokens that begin with the : character are expression attribute values, which
  5654. // are placeholders for the actual value at runtime.
  5655. //
  5656. // For more information on expression attribute names, see Accessing Item Attributes
  5657. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  5658. // in the Amazon DynamoDB Developer Guide.
  5659. //
  5660. // * Keys - An array of primary key attribute values that define specific
  5661. // items in the table. For each primary key, you must provide all of the
  5662. // key attributes. For example, with a simple primary key, you only need
  5663. // to provide the partition key value. For a composite key, you must provide
  5664. // both the partition key value and the sort key value.
  5665. //
  5666. // * ProjectionExpression - A string that identifies one or more attributes
  5667. // to retrieve from the table. These attributes can include scalars, sets,
  5668. // or elements of a JSON document. The attributes in the expression must
  5669. // be separated by commas.
  5670. //
  5671. // If no attribute names are specified, then all attributes will be returned.
  5672. // If any of the requested attributes are not found, they will not appear
  5673. // in the result.
  5674. //
  5675. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  5676. // in the Amazon DynamoDB Developer Guide.
  5677. //
  5678. // * AttributesToGet - This is a legacy parameter. Use ProjectionExpression
  5679. // instead. For more information, see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html)
  5680. // in the Amazon DynamoDB Developer Guide.
  5681. //
  5682. // RequestItems is a required field
  5683. RequestItems map[string]*KeysAndAttributes `min:"1" type:"map" required:"true"`
  5684. // Determines the level of detail about provisioned throughput consumption that
  5685. // is returned in the response:
  5686. //
  5687. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  5688. // operation, together with ConsumedCapacity for each table and secondary
  5689. // index that was accessed.
  5690. //
  5691. // Note that some operations, such as GetItem and BatchGetItem, do not access
  5692. // any indexes at all. In these cases, specifying INDEXES will only return
  5693. // ConsumedCapacity information for table(s).
  5694. //
  5695. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  5696. // the operation.
  5697. //
  5698. // * NONE - No ConsumedCapacity details are included in the response.
  5699. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  5700. }
  5701. // String returns the string representation
  5702. func (s BatchGetItemInput) String() string {
  5703. return awsutil.Prettify(s)
  5704. }
  5705. // GoString returns the string representation
  5706. func (s BatchGetItemInput) GoString() string {
  5707. return s.String()
  5708. }
  5709. // Validate inspects the fields of the type to determine if they are valid.
  5710. func (s *BatchGetItemInput) Validate() error {
  5711. invalidParams := request.ErrInvalidParams{Context: "BatchGetItemInput"}
  5712. if s.RequestItems == nil {
  5713. invalidParams.Add(request.NewErrParamRequired("RequestItems"))
  5714. }
  5715. if s.RequestItems != nil && len(s.RequestItems) < 1 {
  5716. invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1))
  5717. }
  5718. if s.RequestItems != nil {
  5719. for i, v := range s.RequestItems {
  5720. if v == nil {
  5721. continue
  5722. }
  5723. if err := v.Validate(); err != nil {
  5724. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RequestItems", i), err.(request.ErrInvalidParams))
  5725. }
  5726. }
  5727. }
  5728. if invalidParams.Len() > 0 {
  5729. return invalidParams
  5730. }
  5731. return nil
  5732. }
  5733. // SetRequestItems sets the RequestItems field's value.
  5734. func (s *BatchGetItemInput) SetRequestItems(v map[string]*KeysAndAttributes) *BatchGetItemInput {
  5735. s.RequestItems = v
  5736. return s
  5737. }
  5738. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  5739. func (s *BatchGetItemInput) SetReturnConsumedCapacity(v string) *BatchGetItemInput {
  5740. s.ReturnConsumedCapacity = &v
  5741. return s
  5742. }
  5743. // Represents the output of a BatchGetItem operation.
  5744. type BatchGetItemOutput struct {
  5745. _ struct{} `type:"structure"`
  5746. // The read capacity units consumed by the entire BatchGetItem operation.
  5747. //
  5748. // Each element consists of:
  5749. //
  5750. // * TableName - The table that consumed the provisioned throughput.
  5751. //
  5752. // * CapacityUnits - The total number of capacity units consumed.
  5753. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  5754. // A map of table name to a list of items. Each object in Responses consists
  5755. // of a table name, along with a map of attribute data consisting of the data
  5756. // type and attribute value.
  5757. Responses map[string][]map[string]*AttributeValue `type:"map"`
  5758. // A map of tables and their respective keys that were not processed with the
  5759. // current response. The UnprocessedKeys value is in the same form as RequestItems,
  5760. // so the value can be provided directly to a subsequent BatchGetItem operation.
  5761. // For more information, see RequestItems in the Request Parameters section.
  5762. //
  5763. // Each element consists of:
  5764. //
  5765. // * Keys - An array of primary key attribute values that define specific
  5766. // items in the table.
  5767. //
  5768. // * ProjectionExpression - One or more attributes to be retrieved from the
  5769. // table or index. By default, all attributes are returned. If a requested
  5770. // attribute is not found, it does not appear in the result.
  5771. //
  5772. // * ConsistentRead - The consistency of a read operation. If set to true,
  5773. // then a strongly consistent read is used; otherwise, an eventually consistent
  5774. // read is used.
  5775. //
  5776. // If there are no unprocessed keys remaining, the response contains an empty
  5777. // UnprocessedKeys map.
  5778. UnprocessedKeys map[string]*KeysAndAttributes `min:"1" type:"map"`
  5779. }
  5780. // String returns the string representation
  5781. func (s BatchGetItemOutput) String() string {
  5782. return awsutil.Prettify(s)
  5783. }
  5784. // GoString returns the string representation
  5785. func (s BatchGetItemOutput) GoString() string {
  5786. return s.String()
  5787. }
  5788. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  5789. func (s *BatchGetItemOutput) SetConsumedCapacity(v []*ConsumedCapacity) *BatchGetItemOutput {
  5790. s.ConsumedCapacity = v
  5791. return s
  5792. }
  5793. // SetResponses sets the Responses field's value.
  5794. func (s *BatchGetItemOutput) SetResponses(v map[string][]map[string]*AttributeValue) *BatchGetItemOutput {
  5795. s.Responses = v
  5796. return s
  5797. }
  5798. // SetUnprocessedKeys sets the UnprocessedKeys field's value.
  5799. func (s *BatchGetItemOutput) SetUnprocessedKeys(v map[string]*KeysAndAttributes) *BatchGetItemOutput {
  5800. s.UnprocessedKeys = v
  5801. return s
  5802. }
  5803. // Represents the input of a BatchWriteItem operation.
  5804. type BatchWriteItemInput struct {
  5805. _ struct{} `type:"structure"`
  5806. // A map of one or more table names and, for each table, a list of operations
  5807. // to be performed (DeleteRequest or PutRequest). Each element in the map consists
  5808. // of the following:
  5809. //
  5810. // * DeleteRequest - Perform a DeleteItem operation on the specified item.
  5811. // The item to be deleted is identified by a Key subelement:
  5812. //
  5813. // Key - A map of primary key attribute values that uniquely identify the item.
  5814. // Each entry in this map consists of an attribute name and an attribute
  5815. // value. For each primary key, you must provide all of the key attributes.
  5816. // For example, with a simple primary key, you only need to provide a value
  5817. // for the partition key. For a composite primary key, you must provide values
  5818. // for both the partition key and the sort key.
  5819. //
  5820. // * PutRequest - Perform a PutItem operation on the specified item. The
  5821. // item to be put is identified by an Item subelement:
  5822. //
  5823. // Item - A map of attributes and their values. Each entry in this map consists
  5824. // of an attribute name and an attribute value. Attribute values must not
  5825. // be null; string and binary type attributes must have lengths greater than
  5826. // zero; and set type attributes must not be empty. Requests that contain
  5827. // empty values will be rejected with a ValidationException exception.
  5828. //
  5829. // If you specify any attributes that are part of an index key, then the data
  5830. // types for those attributes must match those of the schema in the table's
  5831. // attribute definition.
  5832. //
  5833. // RequestItems is a required field
  5834. RequestItems map[string][]*WriteRequest `min:"1" type:"map" required:"true"`
  5835. // Determines the level of detail about provisioned throughput consumption that
  5836. // is returned in the response:
  5837. //
  5838. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  5839. // operation, together with ConsumedCapacity for each table and secondary
  5840. // index that was accessed.
  5841. //
  5842. // Note that some operations, such as GetItem and BatchGetItem, do not access
  5843. // any indexes at all. In these cases, specifying INDEXES will only return
  5844. // ConsumedCapacity information for table(s).
  5845. //
  5846. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  5847. // the operation.
  5848. //
  5849. // * NONE - No ConsumedCapacity details are included in the response.
  5850. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  5851. // Determines whether item collection metrics are returned. If set to SIZE,
  5852. // the response includes statistics about item collections, if any, that were
  5853. // modified during the operation are returned in the response. If set to NONE
  5854. // (the default), no statistics are returned.
  5855. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  5856. }
  5857. // String returns the string representation
  5858. func (s BatchWriteItemInput) String() string {
  5859. return awsutil.Prettify(s)
  5860. }
  5861. // GoString returns the string representation
  5862. func (s BatchWriteItemInput) GoString() string {
  5863. return s.String()
  5864. }
  5865. // Validate inspects the fields of the type to determine if they are valid.
  5866. func (s *BatchWriteItemInput) Validate() error {
  5867. invalidParams := request.ErrInvalidParams{Context: "BatchWriteItemInput"}
  5868. if s.RequestItems == nil {
  5869. invalidParams.Add(request.NewErrParamRequired("RequestItems"))
  5870. }
  5871. if s.RequestItems != nil && len(s.RequestItems) < 1 {
  5872. invalidParams.Add(request.NewErrParamMinLen("RequestItems", 1))
  5873. }
  5874. if invalidParams.Len() > 0 {
  5875. return invalidParams
  5876. }
  5877. return nil
  5878. }
  5879. // SetRequestItems sets the RequestItems field's value.
  5880. func (s *BatchWriteItemInput) SetRequestItems(v map[string][]*WriteRequest) *BatchWriteItemInput {
  5881. s.RequestItems = v
  5882. return s
  5883. }
  5884. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  5885. func (s *BatchWriteItemInput) SetReturnConsumedCapacity(v string) *BatchWriteItemInput {
  5886. s.ReturnConsumedCapacity = &v
  5887. return s
  5888. }
  5889. // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value.
  5890. func (s *BatchWriteItemInput) SetReturnItemCollectionMetrics(v string) *BatchWriteItemInput {
  5891. s.ReturnItemCollectionMetrics = &v
  5892. return s
  5893. }
  5894. // Represents the output of a BatchWriteItem operation.
  5895. type BatchWriteItemOutput struct {
  5896. _ struct{} `type:"structure"`
  5897. // The capacity units consumed by the entire BatchWriteItem operation.
  5898. //
  5899. // Each element consists of:
  5900. //
  5901. // * TableName - The table that consumed the provisioned throughput.
  5902. //
  5903. // * CapacityUnits - The total number of capacity units consumed.
  5904. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  5905. // A list of tables that were processed by BatchWriteItem and, for each table,
  5906. // information about any item collections that were affected by individual DeleteItem
  5907. // or PutItem operations.
  5908. //
  5909. // Each entry consists of the following subelements:
  5910. //
  5911. // * ItemCollectionKey - The partition key value of the item collection.
  5912. // This is the same as the partition key value of the item.
  5913. //
  5914. // * SizeEstimateRangeGB - An estimate of item collection size, expressed
  5915. // in GB. This is a two-element array containing a lower bound and an upper
  5916. // bound for the estimate. The estimate includes the size of all the items
  5917. // in the table, plus the size of all attributes projected into all of the
  5918. // local secondary indexes on the table. Use this estimate to measure whether
  5919. // a local secondary index is approaching its size limit.
  5920. //
  5921. // The estimate is subject to change over time; therefore, do not rely on the
  5922. // precision or accuracy of the estimate.
  5923. ItemCollectionMetrics map[string][]*ItemCollectionMetrics `type:"map"`
  5924. // A map of tables and requests against those tables that were not processed.
  5925. // The UnprocessedItems value is in the same form as RequestItems, so you can
  5926. // provide this value directly to a subsequent BatchGetItem operation. For more
  5927. // information, see RequestItems in the Request Parameters section.
  5928. //
  5929. // Each UnprocessedItems entry consists of a table name and, for that table,
  5930. // a list of operations to perform (DeleteRequest or PutRequest).
  5931. //
  5932. // * DeleteRequest - Perform a DeleteItem operation on the specified item.
  5933. // The item to be deleted is identified by a Key subelement:
  5934. //
  5935. // Key - A map of primary key attribute values that uniquely identify the item.
  5936. // Each entry in this map consists of an attribute name and an attribute
  5937. // value.
  5938. //
  5939. // * PutRequest - Perform a PutItem operation on the specified item. The
  5940. // item to be put is identified by an Item subelement:
  5941. //
  5942. // Item - A map of attributes and their values. Each entry in this map consists
  5943. // of an attribute name and an attribute value. Attribute values must not
  5944. // be null; string and binary type attributes must have lengths greater than
  5945. // zero; and set type attributes must not be empty. Requests that contain
  5946. // empty values will be rejected with a ValidationException exception.
  5947. //
  5948. // If you specify any attributes that are part of an index key, then the data
  5949. // types for those attributes must match those of the schema in the table's
  5950. // attribute definition.
  5951. //
  5952. // If there are no unprocessed items remaining, the response contains an empty
  5953. // UnprocessedItems map.
  5954. UnprocessedItems map[string][]*WriteRequest `min:"1" type:"map"`
  5955. }
  5956. // String returns the string representation
  5957. func (s BatchWriteItemOutput) String() string {
  5958. return awsutil.Prettify(s)
  5959. }
  5960. // GoString returns the string representation
  5961. func (s BatchWriteItemOutput) GoString() string {
  5962. return s.String()
  5963. }
  5964. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  5965. func (s *BatchWriteItemOutput) SetConsumedCapacity(v []*ConsumedCapacity) *BatchWriteItemOutput {
  5966. s.ConsumedCapacity = v
  5967. return s
  5968. }
  5969. // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value.
  5970. func (s *BatchWriteItemOutput) SetItemCollectionMetrics(v map[string][]*ItemCollectionMetrics) *BatchWriteItemOutput {
  5971. s.ItemCollectionMetrics = v
  5972. return s
  5973. }
  5974. // SetUnprocessedItems sets the UnprocessedItems field's value.
  5975. func (s *BatchWriteItemOutput) SetUnprocessedItems(v map[string][]*WriteRequest) *BatchWriteItemOutput {
  5976. s.UnprocessedItems = v
  5977. return s
  5978. }
  5979. // Contains the details for the read/write capacity mode.
  5980. type BillingModeSummary struct {
  5981. _ struct{} `type:"structure"`
  5982. // Controls how you are charged for read and write throughput and how you manage
  5983. // capacity. This setting can be changed later.
  5984. //
  5985. // * PROVISIONED - Sets the read/write capacity mode to PROVISIONED. We recommend
  5986. // using PROVISIONED for predictable workloads.
  5987. //
  5988. // * PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST.
  5989. // We recommend using PAY_PER_REQUEST for unpredictable workloads.
  5990. BillingMode *string `type:"string" enum:"BillingMode"`
  5991. // Represents the time when PAY_PER_REQUEST was last set as the read/write capacity
  5992. // mode.
  5993. LastUpdateToPayPerRequestDateTime *time.Time `type:"timestamp"`
  5994. }
  5995. // String returns the string representation
  5996. func (s BillingModeSummary) String() string {
  5997. return awsutil.Prettify(s)
  5998. }
  5999. // GoString returns the string representation
  6000. func (s BillingModeSummary) GoString() string {
  6001. return s.String()
  6002. }
  6003. // SetBillingMode sets the BillingMode field's value.
  6004. func (s *BillingModeSummary) SetBillingMode(v string) *BillingModeSummary {
  6005. s.BillingMode = &v
  6006. return s
  6007. }
  6008. // SetLastUpdateToPayPerRequestDateTime sets the LastUpdateToPayPerRequestDateTime field's value.
  6009. func (s *BillingModeSummary) SetLastUpdateToPayPerRequestDateTime(v time.Time) *BillingModeSummary {
  6010. s.LastUpdateToPayPerRequestDateTime = &v
  6011. return s
  6012. }
  6013. // An ordered list of errors for each item in the request which caused the transaction
  6014. // to get cancelled. The values of the list are ordered according to the ordering
  6015. // of the TransactWriteItems request parameter. If no error occurred for the
  6016. // associated item an error with a Null code and Null message will be present.
  6017. type CancellationReason struct {
  6018. _ struct{} `type:"structure"`
  6019. // Status code for the result of the cancelled transaction.
  6020. Code *string `type:"string"`
  6021. // Item in the request which caused the transaction to get cancelled.
  6022. Item map[string]*AttributeValue `type:"map"`
  6023. // Cancellation reason message description.
  6024. Message *string `type:"string"`
  6025. }
  6026. // String returns the string representation
  6027. func (s CancellationReason) String() string {
  6028. return awsutil.Prettify(s)
  6029. }
  6030. // GoString returns the string representation
  6031. func (s CancellationReason) GoString() string {
  6032. return s.String()
  6033. }
  6034. // SetCode sets the Code field's value.
  6035. func (s *CancellationReason) SetCode(v string) *CancellationReason {
  6036. s.Code = &v
  6037. return s
  6038. }
  6039. // SetItem sets the Item field's value.
  6040. func (s *CancellationReason) SetItem(v map[string]*AttributeValue) *CancellationReason {
  6041. s.Item = v
  6042. return s
  6043. }
  6044. // SetMessage sets the Message field's value.
  6045. func (s *CancellationReason) SetMessage(v string) *CancellationReason {
  6046. s.Message = &v
  6047. return s
  6048. }
  6049. // Represents the amount of provisioned throughput capacity consumed on a table
  6050. // or an index.
  6051. type Capacity struct {
  6052. _ struct{} `type:"structure"`
  6053. // The total number of capacity units consumed on a table or an index.
  6054. CapacityUnits *float64 `type:"double"`
  6055. // The total number of read capacity units consumed on a table or an index.
  6056. ReadCapacityUnits *float64 `type:"double"`
  6057. // The total number of write capacity units consumed on a table or an index.
  6058. WriteCapacityUnits *float64 `type:"double"`
  6059. }
  6060. // String returns the string representation
  6061. func (s Capacity) String() string {
  6062. return awsutil.Prettify(s)
  6063. }
  6064. // GoString returns the string representation
  6065. func (s Capacity) GoString() string {
  6066. return s.String()
  6067. }
  6068. // SetCapacityUnits sets the CapacityUnits field's value.
  6069. func (s *Capacity) SetCapacityUnits(v float64) *Capacity {
  6070. s.CapacityUnits = &v
  6071. return s
  6072. }
  6073. // SetReadCapacityUnits sets the ReadCapacityUnits field's value.
  6074. func (s *Capacity) SetReadCapacityUnits(v float64) *Capacity {
  6075. s.ReadCapacityUnits = &v
  6076. return s
  6077. }
  6078. // SetWriteCapacityUnits sets the WriteCapacityUnits field's value.
  6079. func (s *Capacity) SetWriteCapacityUnits(v float64) *Capacity {
  6080. s.WriteCapacityUnits = &v
  6081. return s
  6082. }
  6083. // Represents the selection criteria for a Query or Scan operation:
  6084. //
  6085. // * For a Query operation, Condition is used for specifying the KeyConditions
  6086. // to use when querying a table or an index. For KeyConditions, only the
  6087. // following comparison operators are supported:
  6088. //
  6089. // EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN
  6090. //
  6091. // Condition is also used in a QueryFilter, which evaluates the query results
  6092. // and returns only the desired values.
  6093. //
  6094. // * For a Scan operation, Condition is used in a ScanFilter, which evaluates
  6095. // the scan results and returns only the desired values.
  6096. type Condition struct {
  6097. _ struct{} `type:"structure"`
  6098. // One or more values to evaluate against the supplied attribute. The number
  6099. // of values in the list depends on the ComparisonOperator being used.
  6100. //
  6101. // For type Number, value comparisons are numeric.
  6102. //
  6103. // String value comparisons for greater than, equals, or less than are based
  6104. // on ASCII character code values. For example, a is greater than A, and a is
  6105. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  6106. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  6107. //
  6108. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  6109. // it compares binary values.
  6110. AttributeValueList []*AttributeValue `type:"list"`
  6111. // A comparator for evaluating attributes. For example, equals, greater than,
  6112. // less than, etc.
  6113. //
  6114. // The following comparison operators are available:
  6115. //
  6116. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |
  6117. // BEGINS_WITH | IN | BETWEEN
  6118. //
  6119. // The following are descriptions of each comparison operator.
  6120. //
  6121. // * EQ : Equal. EQ is supported for all data types, including lists and
  6122. // maps.
  6123. //
  6124. // AttributeValueList can contain only one AttributeValue element of type String,
  6125. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  6126. // an AttributeValue element of a different type than the one provided in
  6127. // the request, the value does not match. For example, {"S":"6"} does not
  6128. // equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  6129. //
  6130. // * NE : Not equal. NE is supported for all data types, including lists
  6131. // and maps.
  6132. //
  6133. // * AttributeValueList can contain only one AttributeValue of type String,
  6134. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  6135. // an AttributeValue of a different type than the one provided in the request,
  6136. // the value does not match. For example, {"S":"6"} does not equal {"N":"6"}.
  6137. // Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  6138. //
  6139. // * LE : Less than or equal.
  6140. //
  6141. // AttributeValueList can contain only one AttributeValue element of type String,
  6142. // Number, or Binary (not a set type). If an item contains an AttributeValue
  6143. // element of a different type than the one provided in the request, the value
  6144. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  6145. // does not compare to {"NS":["6", "2", "1"]}.
  6146. //
  6147. // LT: Less than.
  6148. //
  6149. // AttributeValueListcan contain only one AttributeValueof type String, Number, or Binary (not a set type). If an item contains an
  6150. // AttributeValueelement of a different type than the one provided in the request, the value
  6151. // does not match. For example, {"S":"6"}does not equal {"N":"6"}. Also, {"N":"6"}does not compare to {"NS":["6", "2", "1"]}
  6152. //
  6153. // ComparisonOperator is a required field
  6154. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  6155. }
  6156. // String returns the string representation
  6157. func (s Condition) String() string {
  6158. return awsutil.Prettify(s)
  6159. }
  6160. // GoString returns the string representation
  6161. func (s Condition) GoString() string {
  6162. return s.String()
  6163. }
  6164. // Validate inspects the fields of the type to determine if they are valid.
  6165. func (s *Condition) Validate() error {
  6166. invalidParams := request.ErrInvalidParams{Context: "Condition"}
  6167. if s.ComparisonOperator == nil {
  6168. invalidParams.Add(request.NewErrParamRequired("ComparisonOperator"))
  6169. }
  6170. if invalidParams.Len() > 0 {
  6171. return invalidParams
  6172. }
  6173. return nil
  6174. }
  6175. // SetAttributeValueList sets the AttributeValueList field's value.
  6176. func (s *Condition) SetAttributeValueList(v []*AttributeValue) *Condition {
  6177. s.AttributeValueList = v
  6178. return s
  6179. }
  6180. // SetComparisonOperator sets the ComparisonOperator field's value.
  6181. func (s *Condition) SetComparisonOperator(v string) *Condition {
  6182. s.ComparisonOperator = &v
  6183. return s
  6184. }
  6185. // Represents a request to perform a check that an item exists or to check the
  6186. // condition of specific attributes of the item..
  6187. type ConditionCheck struct {
  6188. _ struct{} `type:"structure"`
  6189. // A condition that must be satisfied in order for a conditional update to succeed.
  6190. //
  6191. // ConditionExpression is a required field
  6192. ConditionExpression *string `type:"string" required:"true"`
  6193. // One or more substitution tokens for attribute names in an expression.
  6194. ExpressionAttributeNames map[string]*string `type:"map"`
  6195. // One or more values that can be substituted in an expression.
  6196. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  6197. // The primary key of the item to be checked. Each element consists of an attribute
  6198. // name and a value for that attribute.
  6199. //
  6200. // Key is a required field
  6201. Key map[string]*AttributeValue `type:"map" required:"true"`
  6202. // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the
  6203. // ConditionCheck condition fails. For ReturnValuesOnConditionCheckFailure,
  6204. // the valid values are: NONE and ALL_OLD.
  6205. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"`
  6206. // Name of the table for the check item request.
  6207. //
  6208. // TableName is a required field
  6209. TableName *string `min:"3" type:"string" required:"true"`
  6210. }
  6211. // String returns the string representation
  6212. func (s ConditionCheck) String() string {
  6213. return awsutil.Prettify(s)
  6214. }
  6215. // GoString returns the string representation
  6216. func (s ConditionCheck) GoString() string {
  6217. return s.String()
  6218. }
  6219. // Validate inspects the fields of the type to determine if they are valid.
  6220. func (s *ConditionCheck) Validate() error {
  6221. invalidParams := request.ErrInvalidParams{Context: "ConditionCheck"}
  6222. if s.ConditionExpression == nil {
  6223. invalidParams.Add(request.NewErrParamRequired("ConditionExpression"))
  6224. }
  6225. if s.Key == nil {
  6226. invalidParams.Add(request.NewErrParamRequired("Key"))
  6227. }
  6228. if s.TableName == nil {
  6229. invalidParams.Add(request.NewErrParamRequired("TableName"))
  6230. }
  6231. if s.TableName != nil && len(*s.TableName) < 3 {
  6232. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  6233. }
  6234. if invalidParams.Len() > 0 {
  6235. return invalidParams
  6236. }
  6237. return nil
  6238. }
  6239. // SetConditionExpression sets the ConditionExpression field's value.
  6240. func (s *ConditionCheck) SetConditionExpression(v string) *ConditionCheck {
  6241. s.ConditionExpression = &v
  6242. return s
  6243. }
  6244. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  6245. func (s *ConditionCheck) SetExpressionAttributeNames(v map[string]*string) *ConditionCheck {
  6246. s.ExpressionAttributeNames = v
  6247. return s
  6248. }
  6249. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  6250. func (s *ConditionCheck) SetExpressionAttributeValues(v map[string]*AttributeValue) *ConditionCheck {
  6251. s.ExpressionAttributeValues = v
  6252. return s
  6253. }
  6254. // SetKey sets the Key field's value.
  6255. func (s *ConditionCheck) SetKey(v map[string]*AttributeValue) *ConditionCheck {
  6256. s.Key = v
  6257. return s
  6258. }
  6259. // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value.
  6260. func (s *ConditionCheck) SetReturnValuesOnConditionCheckFailure(v string) *ConditionCheck {
  6261. s.ReturnValuesOnConditionCheckFailure = &v
  6262. return s
  6263. }
  6264. // SetTableName sets the TableName field's value.
  6265. func (s *ConditionCheck) SetTableName(v string) *ConditionCheck {
  6266. s.TableName = &v
  6267. return s
  6268. }
  6269. // The capacity units consumed by an operation. The data returned includes the
  6270. // total provisioned throughput consumed, along with statistics for the table
  6271. // and any indexes involved in the operation. ConsumedCapacity is only returned
  6272. // if the request asked for it. For more information, see Provisioned Throughput
  6273. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  6274. // in the Amazon DynamoDB Developer Guide.
  6275. type ConsumedCapacity struct {
  6276. _ struct{} `type:"structure"`
  6277. // The total number of capacity units consumed by the operation.
  6278. CapacityUnits *float64 `type:"double"`
  6279. // The amount of throughput consumed on each global index affected by the operation.
  6280. GlobalSecondaryIndexes map[string]*Capacity `type:"map"`
  6281. // The amount of throughput consumed on each local index affected by the operation.
  6282. LocalSecondaryIndexes map[string]*Capacity `type:"map"`
  6283. // The total number of read capacity units consumed by the operation.
  6284. ReadCapacityUnits *float64 `type:"double"`
  6285. // The amount of throughput consumed on the table affected by the operation.
  6286. Table *Capacity `type:"structure"`
  6287. // The name of the table that was affected by the operation.
  6288. TableName *string `min:"3" type:"string"`
  6289. // The total number of write capacity units consumed by the operation.
  6290. WriteCapacityUnits *float64 `type:"double"`
  6291. }
  6292. // String returns the string representation
  6293. func (s ConsumedCapacity) String() string {
  6294. return awsutil.Prettify(s)
  6295. }
  6296. // GoString returns the string representation
  6297. func (s ConsumedCapacity) GoString() string {
  6298. return s.String()
  6299. }
  6300. // SetCapacityUnits sets the CapacityUnits field's value.
  6301. func (s *ConsumedCapacity) SetCapacityUnits(v float64) *ConsumedCapacity {
  6302. s.CapacityUnits = &v
  6303. return s
  6304. }
  6305. // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
  6306. func (s *ConsumedCapacity) SetGlobalSecondaryIndexes(v map[string]*Capacity) *ConsumedCapacity {
  6307. s.GlobalSecondaryIndexes = v
  6308. return s
  6309. }
  6310. // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value.
  6311. func (s *ConsumedCapacity) SetLocalSecondaryIndexes(v map[string]*Capacity) *ConsumedCapacity {
  6312. s.LocalSecondaryIndexes = v
  6313. return s
  6314. }
  6315. // SetReadCapacityUnits sets the ReadCapacityUnits field's value.
  6316. func (s *ConsumedCapacity) SetReadCapacityUnits(v float64) *ConsumedCapacity {
  6317. s.ReadCapacityUnits = &v
  6318. return s
  6319. }
  6320. // SetTable sets the Table field's value.
  6321. func (s *ConsumedCapacity) SetTable(v *Capacity) *ConsumedCapacity {
  6322. s.Table = v
  6323. return s
  6324. }
  6325. // SetTableName sets the TableName field's value.
  6326. func (s *ConsumedCapacity) SetTableName(v string) *ConsumedCapacity {
  6327. s.TableName = &v
  6328. return s
  6329. }
  6330. // SetWriteCapacityUnits sets the WriteCapacityUnits field's value.
  6331. func (s *ConsumedCapacity) SetWriteCapacityUnits(v float64) *ConsumedCapacity {
  6332. s.WriteCapacityUnits = &v
  6333. return s
  6334. }
  6335. // Represents the continuous backups and point in time recovery settings on
  6336. // the table.
  6337. type ContinuousBackupsDescription struct {
  6338. _ struct{} `type:"structure"`
  6339. // ContinuousBackupsStatus can be one of the following states: ENABLED, DISABLED
  6340. //
  6341. // ContinuousBackupsStatus is a required field
  6342. ContinuousBackupsStatus *string `type:"string" required:"true" enum:"ContinuousBackupsStatus"`
  6343. // The description of the point in time recovery settings applied to the table.
  6344. PointInTimeRecoveryDescription *PointInTimeRecoveryDescription `type:"structure"`
  6345. }
  6346. // String returns the string representation
  6347. func (s ContinuousBackupsDescription) String() string {
  6348. return awsutil.Prettify(s)
  6349. }
  6350. // GoString returns the string representation
  6351. func (s ContinuousBackupsDescription) GoString() string {
  6352. return s.String()
  6353. }
  6354. // SetContinuousBackupsStatus sets the ContinuousBackupsStatus field's value.
  6355. func (s *ContinuousBackupsDescription) SetContinuousBackupsStatus(v string) *ContinuousBackupsDescription {
  6356. s.ContinuousBackupsStatus = &v
  6357. return s
  6358. }
  6359. // SetPointInTimeRecoveryDescription sets the PointInTimeRecoveryDescription field's value.
  6360. func (s *ContinuousBackupsDescription) SetPointInTimeRecoveryDescription(v *PointInTimeRecoveryDescription) *ContinuousBackupsDescription {
  6361. s.PointInTimeRecoveryDescription = v
  6362. return s
  6363. }
  6364. type CreateBackupInput struct {
  6365. _ struct{} `type:"structure"`
  6366. // Specified name for the backup.
  6367. //
  6368. // BackupName is a required field
  6369. BackupName *string `min:"3" type:"string" required:"true"`
  6370. // The name of the table.
  6371. //
  6372. // TableName is a required field
  6373. TableName *string `min:"3" type:"string" required:"true"`
  6374. }
  6375. // String returns the string representation
  6376. func (s CreateBackupInput) String() string {
  6377. return awsutil.Prettify(s)
  6378. }
  6379. // GoString returns the string representation
  6380. func (s CreateBackupInput) GoString() string {
  6381. return s.String()
  6382. }
  6383. // Validate inspects the fields of the type to determine if they are valid.
  6384. func (s *CreateBackupInput) Validate() error {
  6385. invalidParams := request.ErrInvalidParams{Context: "CreateBackupInput"}
  6386. if s.BackupName == nil {
  6387. invalidParams.Add(request.NewErrParamRequired("BackupName"))
  6388. }
  6389. if s.BackupName != nil && len(*s.BackupName) < 3 {
  6390. invalidParams.Add(request.NewErrParamMinLen("BackupName", 3))
  6391. }
  6392. if s.TableName == nil {
  6393. invalidParams.Add(request.NewErrParamRequired("TableName"))
  6394. }
  6395. if s.TableName != nil && len(*s.TableName) < 3 {
  6396. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  6397. }
  6398. if invalidParams.Len() > 0 {
  6399. return invalidParams
  6400. }
  6401. return nil
  6402. }
  6403. // SetBackupName sets the BackupName field's value.
  6404. func (s *CreateBackupInput) SetBackupName(v string) *CreateBackupInput {
  6405. s.BackupName = &v
  6406. return s
  6407. }
  6408. // SetTableName sets the TableName field's value.
  6409. func (s *CreateBackupInput) SetTableName(v string) *CreateBackupInput {
  6410. s.TableName = &v
  6411. return s
  6412. }
  6413. type CreateBackupOutput struct {
  6414. _ struct{} `type:"structure"`
  6415. // Contains the details of the backup created for the table.
  6416. BackupDetails *BackupDetails `type:"structure"`
  6417. }
  6418. // String returns the string representation
  6419. func (s CreateBackupOutput) String() string {
  6420. return awsutil.Prettify(s)
  6421. }
  6422. // GoString returns the string representation
  6423. func (s CreateBackupOutput) GoString() string {
  6424. return s.String()
  6425. }
  6426. // SetBackupDetails sets the BackupDetails field's value.
  6427. func (s *CreateBackupOutput) SetBackupDetails(v *BackupDetails) *CreateBackupOutput {
  6428. s.BackupDetails = v
  6429. return s
  6430. }
  6431. // Represents a new global secondary index to be added to an existing table.
  6432. type CreateGlobalSecondaryIndexAction struct {
  6433. _ struct{} `type:"structure"`
  6434. // The name of the global secondary index to be created.
  6435. //
  6436. // IndexName is a required field
  6437. IndexName *string `min:"3" type:"string" required:"true"`
  6438. // The key schema for the global secondary index.
  6439. //
  6440. // KeySchema is a required field
  6441. KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"`
  6442. // Represents attributes that are copied (projected) from the table into an
  6443. // index. These are in addition to the primary key attributes and index key
  6444. // attributes, which are automatically projected.
  6445. //
  6446. // Projection is a required field
  6447. Projection *Projection `type:"structure" required:"true"`
  6448. // Represents the provisioned throughput settings for the specified global secondary
  6449. // index.
  6450. //
  6451. // For current minimum and maximum provisioned throughput values, see Limits
  6452. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  6453. // in the Amazon DynamoDB Developer Guide.
  6454. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  6455. }
  6456. // String returns the string representation
  6457. func (s CreateGlobalSecondaryIndexAction) String() string {
  6458. return awsutil.Prettify(s)
  6459. }
  6460. // GoString returns the string representation
  6461. func (s CreateGlobalSecondaryIndexAction) GoString() string {
  6462. return s.String()
  6463. }
  6464. // Validate inspects the fields of the type to determine if they are valid.
  6465. func (s *CreateGlobalSecondaryIndexAction) Validate() error {
  6466. invalidParams := request.ErrInvalidParams{Context: "CreateGlobalSecondaryIndexAction"}
  6467. if s.IndexName == nil {
  6468. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  6469. }
  6470. if s.IndexName != nil && len(*s.IndexName) < 3 {
  6471. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  6472. }
  6473. if s.KeySchema == nil {
  6474. invalidParams.Add(request.NewErrParamRequired("KeySchema"))
  6475. }
  6476. if s.KeySchema != nil && len(s.KeySchema) < 1 {
  6477. invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1))
  6478. }
  6479. if s.Projection == nil {
  6480. invalidParams.Add(request.NewErrParamRequired("Projection"))
  6481. }
  6482. if s.KeySchema != nil {
  6483. for i, v := range s.KeySchema {
  6484. if v == nil {
  6485. continue
  6486. }
  6487. if err := v.Validate(); err != nil {
  6488. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams))
  6489. }
  6490. }
  6491. }
  6492. if s.Projection != nil {
  6493. if err := s.Projection.Validate(); err != nil {
  6494. invalidParams.AddNested("Projection", err.(request.ErrInvalidParams))
  6495. }
  6496. }
  6497. if s.ProvisionedThroughput != nil {
  6498. if err := s.ProvisionedThroughput.Validate(); err != nil {
  6499. invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
  6500. }
  6501. }
  6502. if invalidParams.Len() > 0 {
  6503. return invalidParams
  6504. }
  6505. return nil
  6506. }
  6507. // SetIndexName sets the IndexName field's value.
  6508. func (s *CreateGlobalSecondaryIndexAction) SetIndexName(v string) *CreateGlobalSecondaryIndexAction {
  6509. s.IndexName = &v
  6510. return s
  6511. }
  6512. // SetKeySchema sets the KeySchema field's value.
  6513. func (s *CreateGlobalSecondaryIndexAction) SetKeySchema(v []*KeySchemaElement) *CreateGlobalSecondaryIndexAction {
  6514. s.KeySchema = v
  6515. return s
  6516. }
  6517. // SetProjection sets the Projection field's value.
  6518. func (s *CreateGlobalSecondaryIndexAction) SetProjection(v *Projection) *CreateGlobalSecondaryIndexAction {
  6519. s.Projection = v
  6520. return s
  6521. }
  6522. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  6523. func (s *CreateGlobalSecondaryIndexAction) SetProvisionedThroughput(v *ProvisionedThroughput) *CreateGlobalSecondaryIndexAction {
  6524. s.ProvisionedThroughput = v
  6525. return s
  6526. }
  6527. type CreateGlobalTableInput struct {
  6528. _ struct{} `type:"structure"`
  6529. // The global table name.
  6530. //
  6531. // GlobalTableName is a required field
  6532. GlobalTableName *string `min:"3" type:"string" required:"true"`
  6533. // The regions where the global table needs to be created.
  6534. //
  6535. // ReplicationGroup is a required field
  6536. ReplicationGroup []*Replica `type:"list" required:"true"`
  6537. }
  6538. // String returns the string representation
  6539. func (s CreateGlobalTableInput) String() string {
  6540. return awsutil.Prettify(s)
  6541. }
  6542. // GoString returns the string representation
  6543. func (s CreateGlobalTableInput) GoString() string {
  6544. return s.String()
  6545. }
  6546. // Validate inspects the fields of the type to determine if they are valid.
  6547. func (s *CreateGlobalTableInput) Validate() error {
  6548. invalidParams := request.ErrInvalidParams{Context: "CreateGlobalTableInput"}
  6549. if s.GlobalTableName == nil {
  6550. invalidParams.Add(request.NewErrParamRequired("GlobalTableName"))
  6551. }
  6552. if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 {
  6553. invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3))
  6554. }
  6555. if s.ReplicationGroup == nil {
  6556. invalidParams.Add(request.NewErrParamRequired("ReplicationGroup"))
  6557. }
  6558. if invalidParams.Len() > 0 {
  6559. return invalidParams
  6560. }
  6561. return nil
  6562. }
  6563. // SetGlobalTableName sets the GlobalTableName field's value.
  6564. func (s *CreateGlobalTableInput) SetGlobalTableName(v string) *CreateGlobalTableInput {
  6565. s.GlobalTableName = &v
  6566. return s
  6567. }
  6568. // SetReplicationGroup sets the ReplicationGroup field's value.
  6569. func (s *CreateGlobalTableInput) SetReplicationGroup(v []*Replica) *CreateGlobalTableInput {
  6570. s.ReplicationGroup = v
  6571. return s
  6572. }
  6573. type CreateGlobalTableOutput struct {
  6574. _ struct{} `type:"structure"`
  6575. // Contains the details of the global table.
  6576. GlobalTableDescription *GlobalTableDescription `type:"structure"`
  6577. }
  6578. // String returns the string representation
  6579. func (s CreateGlobalTableOutput) String() string {
  6580. return awsutil.Prettify(s)
  6581. }
  6582. // GoString returns the string representation
  6583. func (s CreateGlobalTableOutput) GoString() string {
  6584. return s.String()
  6585. }
  6586. // SetGlobalTableDescription sets the GlobalTableDescription field's value.
  6587. func (s *CreateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *CreateGlobalTableOutput {
  6588. s.GlobalTableDescription = v
  6589. return s
  6590. }
  6591. // Represents a replica to be added.
  6592. type CreateReplicaAction struct {
  6593. _ struct{} `type:"structure"`
  6594. // The region of the replica to be added.
  6595. //
  6596. // RegionName is a required field
  6597. RegionName *string `type:"string" required:"true"`
  6598. }
  6599. // String returns the string representation
  6600. func (s CreateReplicaAction) String() string {
  6601. return awsutil.Prettify(s)
  6602. }
  6603. // GoString returns the string representation
  6604. func (s CreateReplicaAction) GoString() string {
  6605. return s.String()
  6606. }
  6607. // Validate inspects the fields of the type to determine if they are valid.
  6608. func (s *CreateReplicaAction) Validate() error {
  6609. invalidParams := request.ErrInvalidParams{Context: "CreateReplicaAction"}
  6610. if s.RegionName == nil {
  6611. invalidParams.Add(request.NewErrParamRequired("RegionName"))
  6612. }
  6613. if invalidParams.Len() > 0 {
  6614. return invalidParams
  6615. }
  6616. return nil
  6617. }
  6618. // SetRegionName sets the RegionName field's value.
  6619. func (s *CreateReplicaAction) SetRegionName(v string) *CreateReplicaAction {
  6620. s.RegionName = &v
  6621. return s
  6622. }
  6623. // Represents the input of a CreateTable operation.
  6624. type CreateTableInput struct {
  6625. _ struct{} `type:"structure"`
  6626. // An array of attributes that describe the key schema for the table and indexes.
  6627. //
  6628. // AttributeDefinitions is a required field
  6629. AttributeDefinitions []*AttributeDefinition `type:"list" required:"true"`
  6630. // Controls how you are charged for read and write throughput and how you manage
  6631. // capacity. This setting can be changed later.
  6632. //
  6633. // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using
  6634. // PROVISIONED for predictable workloads.
  6635. //
  6636. // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend
  6637. // using PAY_PER_REQUEST for unpredictable workloads.
  6638. BillingMode *string `type:"string" enum:"BillingMode"`
  6639. // One or more global secondary indexes (the maximum is 20) to be created on
  6640. // the table. Each global secondary index in the array includes the following:
  6641. //
  6642. // * IndexName - The name of the global secondary index. Must be unique only
  6643. // for this table.
  6644. //
  6645. // * KeySchema - Specifies the key schema for the global secondary index.
  6646. //
  6647. // * Projection - Specifies attributes that are copied (projected) from the
  6648. // table into the index. These are in addition to the primary key attributes
  6649. // and index key attributes, which are automatically projected. Each attribute
  6650. // specification is composed of:
  6651. //
  6652. // * ProjectionType - One of the following:
  6653. //
  6654. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  6655. //
  6656. // INCLUDE - Only the specified table attributes are projected into the index.
  6657. // The list of projected attributes are in NonKeyAttributes.
  6658. //
  6659. // ALL - All of the table attributes are projected into the index.
  6660. //
  6661. // NonKeyAttributes - A list of one or more non-key attribute names that are
  6662. // projected into the secondary index. The total count of attributes provided
  6663. // in NonKeyAttributes, summed across all of the secondary indexes, must
  6664. // not exceed 100. If you project the same attribute into two different indexes,
  6665. // this counts as two distinct attributes when determining the total.
  6666. //
  6667. // * ProvisionedThroughput - The provisioned throughput settings for the
  6668. // global secondary index, consisting of read and write capacity units.
  6669. GlobalSecondaryIndexes []*GlobalSecondaryIndex `type:"list"`
  6670. // Specifies the attributes that make up the primary key for a table or an index.
  6671. // The attributes in KeySchema must also be defined in the AttributeDefinitions
  6672. // array. For more information, see Data Model (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)
  6673. // in the Amazon DynamoDB Developer Guide.
  6674. //
  6675. // Each KeySchemaElement in the array is composed of:
  6676. //
  6677. // * AttributeName - The name of this key attribute.
  6678. //
  6679. // * KeyType - The role that the key attribute will assume:
  6680. //
  6681. // HASH - partition key
  6682. //
  6683. // RANGE - sort key
  6684. //
  6685. // The partition key of an item is also known as its hash attribute. The term
  6686. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  6687. // to evenly distribute data items across partitions, based on their partition
  6688. // key values.
  6689. //
  6690. // The sort key of an item is also known as its range attribute. The term "range
  6691. // attribute" derives from the way DynamoDB stores items with the same partition
  6692. // key physically close together, in sorted order by the sort key value.
  6693. //
  6694. // For a simple primary key (partition key), you must provide exactly one element
  6695. // with a KeyType of HASH.
  6696. //
  6697. // For a composite primary key (partition key and sort key), you must provide
  6698. // exactly two elements, in this order: The first element must have a KeyType
  6699. // of HASH, and the second element must have a KeyType of RANGE.
  6700. //
  6701. // For more information, see Specifying the Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key)
  6702. // in the Amazon DynamoDB Developer Guide.
  6703. //
  6704. // KeySchema is a required field
  6705. KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"`
  6706. // One or more local secondary indexes (the maximum is 5) to be created on the
  6707. // table. Each index is scoped to a given partition key value. There is a 10
  6708. // GB size limit per partition key value; otherwise, the size of a local secondary
  6709. // index is unconstrained.
  6710. //
  6711. // Each local secondary index in the array includes the following:
  6712. //
  6713. // * IndexName - The name of the local secondary index. Must be unique only
  6714. // for this table.
  6715. //
  6716. // * KeySchema - Specifies the key schema for the local secondary index.
  6717. // The key schema must begin with the same partition key as the table.
  6718. //
  6719. // * Projection - Specifies attributes that are copied (projected) from the
  6720. // table into the index. These are in addition to the primary key attributes
  6721. // and index key attributes, which are automatically projected. Each attribute
  6722. // specification is composed of:
  6723. //
  6724. // * ProjectionType - One of the following:
  6725. //
  6726. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  6727. //
  6728. // INCLUDE - Only the specified table attributes are projected into the index.
  6729. // The list of projected attributes are in NonKeyAttributes.
  6730. //
  6731. // ALL - All of the table attributes are projected into the index.
  6732. //
  6733. // NonKeyAttributes - A list of one or more non-key attribute names that are
  6734. // projected into the secondary index. The total count of attributes provided
  6735. // in NonKeyAttributes, summed across all of the secondary indexes, must
  6736. // not exceed 100. If you project the same attribute into two different indexes,
  6737. // this counts as two distinct attributes when determining the total.
  6738. LocalSecondaryIndexes []*LocalSecondaryIndex `type:"list"`
  6739. // Represents the provisioned throughput settings for a specified table or index.
  6740. // The settings can be modified using the UpdateTable operation.
  6741. //
  6742. // If you set BillingMode as PROVISIONED, you must specify this property. If
  6743. // you set BillingMode as PAY_PER_REQUEST, you cannot specify this property.
  6744. //
  6745. // For current minimum and maximum provisioned throughput values, see Limits
  6746. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  6747. // in the Amazon DynamoDB Developer Guide.
  6748. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  6749. // Represents the settings used to enable server-side encryption.
  6750. SSESpecification *SSESpecification `type:"structure"`
  6751. // The settings for DynamoDB Streams on the table. These settings consist of:
  6752. //
  6753. // * StreamEnabled - Indicates whether Streams is to be enabled (true) or
  6754. // disabled (false).
  6755. //
  6756. // * StreamViewType - When an item in the table is modified, StreamViewType
  6757. // determines what information is written to the table's stream. Valid values
  6758. // for StreamViewType are:
  6759. //
  6760. // KEYS_ONLY - Only the key attributes of the modified item are written to the
  6761. // stream.
  6762. //
  6763. // NEW_IMAGE - The entire item, as it appears after it was modified, is written
  6764. // to the stream.
  6765. //
  6766. // OLD_IMAGE - The entire item, as it appeared before it was modified, is written
  6767. // to the stream.
  6768. //
  6769. // NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are
  6770. // written to the stream.
  6771. StreamSpecification *StreamSpecification `type:"structure"`
  6772. // The name of the table to create.
  6773. //
  6774. // TableName is a required field
  6775. TableName *string `min:"3" type:"string" required:"true"`
  6776. }
  6777. // String returns the string representation
  6778. func (s CreateTableInput) String() string {
  6779. return awsutil.Prettify(s)
  6780. }
  6781. // GoString returns the string representation
  6782. func (s CreateTableInput) GoString() string {
  6783. return s.String()
  6784. }
  6785. // Validate inspects the fields of the type to determine if they are valid.
  6786. func (s *CreateTableInput) Validate() error {
  6787. invalidParams := request.ErrInvalidParams{Context: "CreateTableInput"}
  6788. if s.AttributeDefinitions == nil {
  6789. invalidParams.Add(request.NewErrParamRequired("AttributeDefinitions"))
  6790. }
  6791. if s.KeySchema == nil {
  6792. invalidParams.Add(request.NewErrParamRequired("KeySchema"))
  6793. }
  6794. if s.KeySchema != nil && len(s.KeySchema) < 1 {
  6795. invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1))
  6796. }
  6797. if s.TableName == nil {
  6798. invalidParams.Add(request.NewErrParamRequired("TableName"))
  6799. }
  6800. if s.TableName != nil && len(*s.TableName) < 3 {
  6801. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  6802. }
  6803. if s.AttributeDefinitions != nil {
  6804. for i, v := range s.AttributeDefinitions {
  6805. if v == nil {
  6806. continue
  6807. }
  6808. if err := v.Validate(); err != nil {
  6809. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams))
  6810. }
  6811. }
  6812. }
  6813. if s.GlobalSecondaryIndexes != nil {
  6814. for i, v := range s.GlobalSecondaryIndexes {
  6815. if v == nil {
  6816. continue
  6817. }
  6818. if err := v.Validate(); err != nil {
  6819. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexes", i), err.(request.ErrInvalidParams))
  6820. }
  6821. }
  6822. }
  6823. if s.KeySchema != nil {
  6824. for i, v := range s.KeySchema {
  6825. if v == nil {
  6826. continue
  6827. }
  6828. if err := v.Validate(); err != nil {
  6829. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams))
  6830. }
  6831. }
  6832. }
  6833. if s.LocalSecondaryIndexes != nil {
  6834. for i, v := range s.LocalSecondaryIndexes {
  6835. if v == nil {
  6836. continue
  6837. }
  6838. if err := v.Validate(); err != nil {
  6839. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LocalSecondaryIndexes", i), err.(request.ErrInvalidParams))
  6840. }
  6841. }
  6842. }
  6843. if s.ProvisionedThroughput != nil {
  6844. if err := s.ProvisionedThroughput.Validate(); err != nil {
  6845. invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
  6846. }
  6847. }
  6848. if invalidParams.Len() > 0 {
  6849. return invalidParams
  6850. }
  6851. return nil
  6852. }
  6853. // SetAttributeDefinitions sets the AttributeDefinitions field's value.
  6854. func (s *CreateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *CreateTableInput {
  6855. s.AttributeDefinitions = v
  6856. return s
  6857. }
  6858. // SetBillingMode sets the BillingMode field's value.
  6859. func (s *CreateTableInput) SetBillingMode(v string) *CreateTableInput {
  6860. s.BillingMode = &v
  6861. return s
  6862. }
  6863. // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
  6864. func (s *CreateTableInput) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndex) *CreateTableInput {
  6865. s.GlobalSecondaryIndexes = v
  6866. return s
  6867. }
  6868. // SetKeySchema sets the KeySchema field's value.
  6869. func (s *CreateTableInput) SetKeySchema(v []*KeySchemaElement) *CreateTableInput {
  6870. s.KeySchema = v
  6871. return s
  6872. }
  6873. // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value.
  6874. func (s *CreateTableInput) SetLocalSecondaryIndexes(v []*LocalSecondaryIndex) *CreateTableInput {
  6875. s.LocalSecondaryIndexes = v
  6876. return s
  6877. }
  6878. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  6879. func (s *CreateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *CreateTableInput {
  6880. s.ProvisionedThroughput = v
  6881. return s
  6882. }
  6883. // SetSSESpecification sets the SSESpecification field's value.
  6884. func (s *CreateTableInput) SetSSESpecification(v *SSESpecification) *CreateTableInput {
  6885. s.SSESpecification = v
  6886. return s
  6887. }
  6888. // SetStreamSpecification sets the StreamSpecification field's value.
  6889. func (s *CreateTableInput) SetStreamSpecification(v *StreamSpecification) *CreateTableInput {
  6890. s.StreamSpecification = v
  6891. return s
  6892. }
  6893. // SetTableName sets the TableName field's value.
  6894. func (s *CreateTableInput) SetTableName(v string) *CreateTableInput {
  6895. s.TableName = &v
  6896. return s
  6897. }
  6898. // Represents the output of a CreateTable operation.
  6899. type CreateTableOutput struct {
  6900. _ struct{} `type:"structure"`
  6901. // Represents the properties of the table.
  6902. TableDescription *TableDescription `type:"structure"`
  6903. }
  6904. // String returns the string representation
  6905. func (s CreateTableOutput) String() string {
  6906. return awsutil.Prettify(s)
  6907. }
  6908. // GoString returns the string representation
  6909. func (s CreateTableOutput) GoString() string {
  6910. return s.String()
  6911. }
  6912. // SetTableDescription sets the TableDescription field's value.
  6913. func (s *CreateTableOutput) SetTableDescription(v *TableDescription) *CreateTableOutput {
  6914. s.TableDescription = v
  6915. return s
  6916. }
  6917. // Represents a request to perform a DeleteItem operation.
  6918. type Delete struct {
  6919. _ struct{} `type:"structure"`
  6920. // A condition that must be satisfied in order for a conditional delete to succeed.
  6921. ConditionExpression *string `type:"string"`
  6922. // One or more substitution tokens for attribute names in an expression.
  6923. ExpressionAttributeNames map[string]*string `type:"map"`
  6924. // One or more values that can be substituted in an expression.
  6925. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  6926. // The primary key of the item to be deleted. Each element consists of an attribute
  6927. // name and a value for that attribute.
  6928. //
  6929. // Key is a required field
  6930. Key map[string]*AttributeValue `type:"map" required:"true"`
  6931. // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the
  6932. // Delete condition fails. For ReturnValuesOnConditionCheckFailure, the valid
  6933. // values are: NONE and ALL_OLD.
  6934. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"`
  6935. // Name of the table in which the item to be deleted resides.
  6936. //
  6937. // TableName is a required field
  6938. TableName *string `min:"3" type:"string" required:"true"`
  6939. }
  6940. // String returns the string representation
  6941. func (s Delete) String() string {
  6942. return awsutil.Prettify(s)
  6943. }
  6944. // GoString returns the string representation
  6945. func (s Delete) GoString() string {
  6946. return s.String()
  6947. }
  6948. // Validate inspects the fields of the type to determine if they are valid.
  6949. func (s *Delete) Validate() error {
  6950. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  6951. if s.Key == nil {
  6952. invalidParams.Add(request.NewErrParamRequired("Key"))
  6953. }
  6954. if s.TableName == nil {
  6955. invalidParams.Add(request.NewErrParamRequired("TableName"))
  6956. }
  6957. if s.TableName != nil && len(*s.TableName) < 3 {
  6958. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  6959. }
  6960. if invalidParams.Len() > 0 {
  6961. return invalidParams
  6962. }
  6963. return nil
  6964. }
  6965. // SetConditionExpression sets the ConditionExpression field's value.
  6966. func (s *Delete) SetConditionExpression(v string) *Delete {
  6967. s.ConditionExpression = &v
  6968. return s
  6969. }
  6970. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  6971. func (s *Delete) SetExpressionAttributeNames(v map[string]*string) *Delete {
  6972. s.ExpressionAttributeNames = v
  6973. return s
  6974. }
  6975. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  6976. func (s *Delete) SetExpressionAttributeValues(v map[string]*AttributeValue) *Delete {
  6977. s.ExpressionAttributeValues = v
  6978. return s
  6979. }
  6980. // SetKey sets the Key field's value.
  6981. func (s *Delete) SetKey(v map[string]*AttributeValue) *Delete {
  6982. s.Key = v
  6983. return s
  6984. }
  6985. // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value.
  6986. func (s *Delete) SetReturnValuesOnConditionCheckFailure(v string) *Delete {
  6987. s.ReturnValuesOnConditionCheckFailure = &v
  6988. return s
  6989. }
  6990. // SetTableName sets the TableName field's value.
  6991. func (s *Delete) SetTableName(v string) *Delete {
  6992. s.TableName = &v
  6993. return s
  6994. }
  6995. type DeleteBackupInput struct {
  6996. _ struct{} `type:"structure"`
  6997. // The ARN associated with the backup.
  6998. //
  6999. // BackupArn is a required field
  7000. BackupArn *string `min:"37" type:"string" required:"true"`
  7001. }
  7002. // String returns the string representation
  7003. func (s DeleteBackupInput) String() string {
  7004. return awsutil.Prettify(s)
  7005. }
  7006. // GoString returns the string representation
  7007. func (s DeleteBackupInput) GoString() string {
  7008. return s.String()
  7009. }
  7010. // Validate inspects the fields of the type to determine if they are valid.
  7011. func (s *DeleteBackupInput) Validate() error {
  7012. invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"}
  7013. if s.BackupArn == nil {
  7014. invalidParams.Add(request.NewErrParamRequired("BackupArn"))
  7015. }
  7016. if s.BackupArn != nil && len(*s.BackupArn) < 37 {
  7017. invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37))
  7018. }
  7019. if invalidParams.Len() > 0 {
  7020. return invalidParams
  7021. }
  7022. return nil
  7023. }
  7024. // SetBackupArn sets the BackupArn field's value.
  7025. func (s *DeleteBackupInput) SetBackupArn(v string) *DeleteBackupInput {
  7026. s.BackupArn = &v
  7027. return s
  7028. }
  7029. type DeleteBackupOutput struct {
  7030. _ struct{} `type:"structure"`
  7031. // Contains the description of the backup created for the table.
  7032. BackupDescription *BackupDescription `type:"structure"`
  7033. }
  7034. // String returns the string representation
  7035. func (s DeleteBackupOutput) String() string {
  7036. return awsutil.Prettify(s)
  7037. }
  7038. // GoString returns the string representation
  7039. func (s DeleteBackupOutput) GoString() string {
  7040. return s.String()
  7041. }
  7042. // SetBackupDescription sets the BackupDescription field's value.
  7043. func (s *DeleteBackupOutput) SetBackupDescription(v *BackupDescription) *DeleteBackupOutput {
  7044. s.BackupDescription = v
  7045. return s
  7046. }
  7047. // Represents a global secondary index to be deleted from an existing table.
  7048. type DeleteGlobalSecondaryIndexAction struct {
  7049. _ struct{} `type:"structure"`
  7050. // The name of the global secondary index to be deleted.
  7051. //
  7052. // IndexName is a required field
  7053. IndexName *string `min:"3" type:"string" required:"true"`
  7054. }
  7055. // String returns the string representation
  7056. func (s DeleteGlobalSecondaryIndexAction) String() string {
  7057. return awsutil.Prettify(s)
  7058. }
  7059. // GoString returns the string representation
  7060. func (s DeleteGlobalSecondaryIndexAction) GoString() string {
  7061. return s.String()
  7062. }
  7063. // Validate inspects the fields of the type to determine if they are valid.
  7064. func (s *DeleteGlobalSecondaryIndexAction) Validate() error {
  7065. invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalSecondaryIndexAction"}
  7066. if s.IndexName == nil {
  7067. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  7068. }
  7069. if s.IndexName != nil && len(*s.IndexName) < 3 {
  7070. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  7071. }
  7072. if invalidParams.Len() > 0 {
  7073. return invalidParams
  7074. }
  7075. return nil
  7076. }
  7077. // SetIndexName sets the IndexName field's value.
  7078. func (s *DeleteGlobalSecondaryIndexAction) SetIndexName(v string) *DeleteGlobalSecondaryIndexAction {
  7079. s.IndexName = &v
  7080. return s
  7081. }
  7082. // Represents the input of a DeleteItem operation.
  7083. type DeleteItemInput struct {
  7084. _ struct{} `type:"structure"`
  7085. // A condition that must be satisfied in order for a conditional DeleteItem
  7086. // to succeed.
  7087. //
  7088. // An expression can contain any of the following:
  7089. //
  7090. // * Functions: attribute_exists | attribute_not_exists | attribute_type
  7091. // | contains | begins_with | size
  7092. //
  7093. // These function names are case-sensitive.
  7094. //
  7095. // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  7096. //
  7097. // * Logical operators: AND | OR | NOT
  7098. //
  7099. // For more information on condition expressions, see Specifying Conditions
  7100. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  7101. // in the Amazon DynamoDB Developer Guide.
  7102. ConditionExpression *string `type:"string"`
  7103. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  7104. // see ConditionalOperator (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
  7105. // in the Amazon DynamoDB Developer Guide.
  7106. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  7107. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  7108. // see Expected (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html)
  7109. // in the Amazon DynamoDB Developer Guide.
  7110. Expected map[string]*ExpectedAttributeValue `type:"map"`
  7111. // One or more substitution tokens for attribute names in an expression. The
  7112. // following are some use cases for using ExpressionAttributeNames:
  7113. //
  7114. // * To access an attribute whose name conflicts with a DynamoDB reserved
  7115. // word.
  7116. //
  7117. // * To create a placeholder for repeating occurrences of an attribute name
  7118. // in an expression.
  7119. //
  7120. // * To prevent special characters in an attribute name from being misinterpreted
  7121. // in an expression.
  7122. //
  7123. // Use the # character in an expression to dereference an attribute name. For
  7124. // example, consider the following attribute name:
  7125. //
  7126. // * Percentile
  7127. //
  7128. // The name of this attribute conflicts with a reserved word, so it cannot be
  7129. // used directly in an expression. (For the complete list of reserved words,
  7130. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  7131. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  7132. // the following for ExpressionAttributeNames:
  7133. //
  7134. // * {"#P":"Percentile"}
  7135. //
  7136. // You could then use this substitution in an expression, as in this example:
  7137. //
  7138. // * #P = :val
  7139. //
  7140. // Tokens that begin with the : character are expression attribute values, which
  7141. // are placeholders for the actual value at runtime.
  7142. //
  7143. // For more information on expression attribute names, see Accessing Item Attributes
  7144. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  7145. // in the Amazon DynamoDB Developer Guide.
  7146. ExpressionAttributeNames map[string]*string `type:"map"`
  7147. // One or more values that can be substituted in an expression.
  7148. //
  7149. // Use the : (colon) character in an expression to dereference an attribute
  7150. // value. For example, suppose that you wanted to check whether the value of
  7151. // the ProductStatus attribute was one of the following:
  7152. //
  7153. // Available | Backordered | Discontinued
  7154. //
  7155. // You would first need to specify ExpressionAttributeValues as follows:
  7156. //
  7157. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  7158. // }
  7159. //
  7160. // You could then use these values in an expression, such as this:
  7161. //
  7162. // ProductStatus IN (:avail, :back, :disc)
  7163. //
  7164. // For more information on expression attribute values, see Specifying Conditions
  7165. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  7166. // in the Amazon DynamoDB Developer Guide.
  7167. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  7168. // A map of attribute names to AttributeValue objects, representing the primary
  7169. // key of the item to delete.
  7170. //
  7171. // For the primary key, you must provide all of the attributes. For example,
  7172. // with a simple primary key, you only need to provide a value for the partition
  7173. // key. For a composite primary key, you must provide values for both the partition
  7174. // key and the sort key.
  7175. //
  7176. // Key is a required field
  7177. Key map[string]*AttributeValue `type:"map" required:"true"`
  7178. // Determines the level of detail about provisioned throughput consumption that
  7179. // is returned in the response:
  7180. //
  7181. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  7182. // operation, together with ConsumedCapacity for each table and secondary
  7183. // index that was accessed.
  7184. //
  7185. // Note that some operations, such as GetItem and BatchGetItem, do not access
  7186. // any indexes at all. In these cases, specifying INDEXES will only return
  7187. // ConsumedCapacity information for table(s).
  7188. //
  7189. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  7190. // the operation.
  7191. //
  7192. // * NONE - No ConsumedCapacity details are included in the response.
  7193. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  7194. // Determines whether item collection metrics are returned. If set to SIZE,
  7195. // the response includes statistics about item collections, if any, that were
  7196. // modified during the operation are returned in the response. If set to NONE
  7197. // (the default), no statistics are returned.
  7198. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  7199. // Use ReturnValues if you want to get the item attributes as they appeared
  7200. // before they were deleted. For DeleteItem, the valid values are:
  7201. //
  7202. // * NONE - If ReturnValues is not specified, or if its value is NONE, then
  7203. // nothing is returned. (This setting is the default for ReturnValues.)
  7204. //
  7205. // * ALL_OLD - The content of the old item is returned.
  7206. //
  7207. // The ReturnValues parameter is used by several DynamoDB operations; however,
  7208. // DeleteItem does not recognize any values other than NONE or ALL_OLD.
  7209. ReturnValues *string `type:"string" enum:"ReturnValue"`
  7210. // The name of the table from which to delete the item.
  7211. //
  7212. // TableName is a required field
  7213. TableName *string `min:"3" type:"string" required:"true"`
  7214. }
  7215. // String returns the string representation
  7216. func (s DeleteItemInput) String() string {
  7217. return awsutil.Prettify(s)
  7218. }
  7219. // GoString returns the string representation
  7220. func (s DeleteItemInput) GoString() string {
  7221. return s.String()
  7222. }
  7223. // Validate inspects the fields of the type to determine if they are valid.
  7224. func (s *DeleteItemInput) Validate() error {
  7225. invalidParams := request.ErrInvalidParams{Context: "DeleteItemInput"}
  7226. if s.Key == nil {
  7227. invalidParams.Add(request.NewErrParamRequired("Key"))
  7228. }
  7229. if s.TableName == nil {
  7230. invalidParams.Add(request.NewErrParamRequired("TableName"))
  7231. }
  7232. if s.TableName != nil && len(*s.TableName) < 3 {
  7233. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  7234. }
  7235. if invalidParams.Len() > 0 {
  7236. return invalidParams
  7237. }
  7238. return nil
  7239. }
  7240. // SetConditionExpression sets the ConditionExpression field's value.
  7241. func (s *DeleteItemInput) SetConditionExpression(v string) *DeleteItemInput {
  7242. s.ConditionExpression = &v
  7243. return s
  7244. }
  7245. // SetConditionalOperator sets the ConditionalOperator field's value.
  7246. func (s *DeleteItemInput) SetConditionalOperator(v string) *DeleteItemInput {
  7247. s.ConditionalOperator = &v
  7248. return s
  7249. }
  7250. // SetExpected sets the Expected field's value.
  7251. func (s *DeleteItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *DeleteItemInput {
  7252. s.Expected = v
  7253. return s
  7254. }
  7255. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  7256. func (s *DeleteItemInput) SetExpressionAttributeNames(v map[string]*string) *DeleteItemInput {
  7257. s.ExpressionAttributeNames = v
  7258. return s
  7259. }
  7260. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  7261. func (s *DeleteItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *DeleteItemInput {
  7262. s.ExpressionAttributeValues = v
  7263. return s
  7264. }
  7265. // SetKey sets the Key field's value.
  7266. func (s *DeleteItemInput) SetKey(v map[string]*AttributeValue) *DeleteItemInput {
  7267. s.Key = v
  7268. return s
  7269. }
  7270. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  7271. func (s *DeleteItemInput) SetReturnConsumedCapacity(v string) *DeleteItemInput {
  7272. s.ReturnConsumedCapacity = &v
  7273. return s
  7274. }
  7275. // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value.
  7276. func (s *DeleteItemInput) SetReturnItemCollectionMetrics(v string) *DeleteItemInput {
  7277. s.ReturnItemCollectionMetrics = &v
  7278. return s
  7279. }
  7280. // SetReturnValues sets the ReturnValues field's value.
  7281. func (s *DeleteItemInput) SetReturnValues(v string) *DeleteItemInput {
  7282. s.ReturnValues = &v
  7283. return s
  7284. }
  7285. // SetTableName sets the TableName field's value.
  7286. func (s *DeleteItemInput) SetTableName(v string) *DeleteItemInput {
  7287. s.TableName = &v
  7288. return s
  7289. }
  7290. // Represents the output of a DeleteItem operation.
  7291. type DeleteItemOutput struct {
  7292. _ struct{} `type:"structure"`
  7293. // A map of attribute names to AttributeValue objects, representing the item
  7294. // as it appeared before the DeleteItem operation. This map appears in the response
  7295. // only if ReturnValues was specified as ALL_OLD in the request.
  7296. Attributes map[string]*AttributeValue `type:"map"`
  7297. // The capacity units consumed by the DeleteItem operation. The data returned
  7298. // includes the total provisioned throughput consumed, along with statistics
  7299. // for the table and any indexes involved in the operation. ConsumedCapacity
  7300. // is only returned if the ReturnConsumedCapacity parameter was specified. For
  7301. // more information, see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  7302. // in the Amazon DynamoDB Developer Guide.
  7303. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  7304. // Information about item collections, if any, that were affected by the DeleteItem
  7305. // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics
  7306. // parameter was specified. If the table does not have any local secondary indexes,
  7307. // this information is not returned in the response.
  7308. //
  7309. // Each ItemCollectionMetrics element consists of:
  7310. //
  7311. // * ItemCollectionKey - The partition key value of the item collection.
  7312. // This is the same as the partition key value of the item itself.
  7313. //
  7314. // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes.
  7315. // This value is a two-element array containing a lower bound and an upper
  7316. // bound for the estimate. The estimate includes the size of all the items
  7317. // in the table, plus the size of all attributes projected into all of the
  7318. // local secondary indexes on that table. Use this estimate to measure whether
  7319. // a local secondary index is approaching its size limit.
  7320. //
  7321. // The estimate is subject to change over time; therefore, do not rely on the
  7322. // precision or accuracy of the estimate.
  7323. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  7324. }
  7325. // String returns the string representation
  7326. func (s DeleteItemOutput) String() string {
  7327. return awsutil.Prettify(s)
  7328. }
  7329. // GoString returns the string representation
  7330. func (s DeleteItemOutput) GoString() string {
  7331. return s.String()
  7332. }
  7333. // SetAttributes sets the Attributes field's value.
  7334. func (s *DeleteItemOutput) SetAttributes(v map[string]*AttributeValue) *DeleteItemOutput {
  7335. s.Attributes = v
  7336. return s
  7337. }
  7338. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  7339. func (s *DeleteItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *DeleteItemOutput {
  7340. s.ConsumedCapacity = v
  7341. return s
  7342. }
  7343. // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value.
  7344. func (s *DeleteItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *DeleteItemOutput {
  7345. s.ItemCollectionMetrics = v
  7346. return s
  7347. }
  7348. // Represents a replica to be removed.
  7349. type DeleteReplicaAction struct {
  7350. _ struct{} `type:"structure"`
  7351. // The region of the replica to be removed.
  7352. //
  7353. // RegionName is a required field
  7354. RegionName *string `type:"string" required:"true"`
  7355. }
  7356. // String returns the string representation
  7357. func (s DeleteReplicaAction) String() string {
  7358. return awsutil.Prettify(s)
  7359. }
  7360. // GoString returns the string representation
  7361. func (s DeleteReplicaAction) GoString() string {
  7362. return s.String()
  7363. }
  7364. // Validate inspects the fields of the type to determine if they are valid.
  7365. func (s *DeleteReplicaAction) Validate() error {
  7366. invalidParams := request.ErrInvalidParams{Context: "DeleteReplicaAction"}
  7367. if s.RegionName == nil {
  7368. invalidParams.Add(request.NewErrParamRequired("RegionName"))
  7369. }
  7370. if invalidParams.Len() > 0 {
  7371. return invalidParams
  7372. }
  7373. return nil
  7374. }
  7375. // SetRegionName sets the RegionName field's value.
  7376. func (s *DeleteReplicaAction) SetRegionName(v string) *DeleteReplicaAction {
  7377. s.RegionName = &v
  7378. return s
  7379. }
  7380. // Represents a request to perform a DeleteItem operation on an item.
  7381. type DeleteRequest struct {
  7382. _ struct{} `type:"structure"`
  7383. // A map of attribute name to attribute values, representing the primary key
  7384. // of the item to delete. All of the table's primary key attributes must be
  7385. // specified, and their data types must match those of the table's key schema.
  7386. //
  7387. // Key is a required field
  7388. Key map[string]*AttributeValue `type:"map" required:"true"`
  7389. }
  7390. // String returns the string representation
  7391. func (s DeleteRequest) String() string {
  7392. return awsutil.Prettify(s)
  7393. }
  7394. // GoString returns the string representation
  7395. func (s DeleteRequest) GoString() string {
  7396. return s.String()
  7397. }
  7398. // SetKey sets the Key field's value.
  7399. func (s *DeleteRequest) SetKey(v map[string]*AttributeValue) *DeleteRequest {
  7400. s.Key = v
  7401. return s
  7402. }
  7403. // Represents the input of a DeleteTable operation.
  7404. type DeleteTableInput struct {
  7405. _ struct{} `type:"structure"`
  7406. // The name of the table to delete.
  7407. //
  7408. // TableName is a required field
  7409. TableName *string `min:"3" type:"string" required:"true"`
  7410. }
  7411. // String returns the string representation
  7412. func (s DeleteTableInput) String() string {
  7413. return awsutil.Prettify(s)
  7414. }
  7415. // GoString returns the string representation
  7416. func (s DeleteTableInput) GoString() string {
  7417. return s.String()
  7418. }
  7419. // Validate inspects the fields of the type to determine if they are valid.
  7420. func (s *DeleteTableInput) Validate() error {
  7421. invalidParams := request.ErrInvalidParams{Context: "DeleteTableInput"}
  7422. if s.TableName == nil {
  7423. invalidParams.Add(request.NewErrParamRequired("TableName"))
  7424. }
  7425. if s.TableName != nil && len(*s.TableName) < 3 {
  7426. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  7427. }
  7428. if invalidParams.Len() > 0 {
  7429. return invalidParams
  7430. }
  7431. return nil
  7432. }
  7433. // SetTableName sets the TableName field's value.
  7434. func (s *DeleteTableInput) SetTableName(v string) *DeleteTableInput {
  7435. s.TableName = &v
  7436. return s
  7437. }
  7438. // Represents the output of a DeleteTable operation.
  7439. type DeleteTableOutput struct {
  7440. _ struct{} `type:"structure"`
  7441. // Represents the properties of a table.
  7442. TableDescription *TableDescription `type:"structure"`
  7443. }
  7444. // String returns the string representation
  7445. func (s DeleteTableOutput) String() string {
  7446. return awsutil.Prettify(s)
  7447. }
  7448. // GoString returns the string representation
  7449. func (s DeleteTableOutput) GoString() string {
  7450. return s.String()
  7451. }
  7452. // SetTableDescription sets the TableDescription field's value.
  7453. func (s *DeleteTableOutput) SetTableDescription(v *TableDescription) *DeleteTableOutput {
  7454. s.TableDescription = v
  7455. return s
  7456. }
  7457. type DescribeBackupInput struct {
  7458. _ struct{} `type:"structure"`
  7459. // The ARN associated with the backup.
  7460. //
  7461. // BackupArn is a required field
  7462. BackupArn *string `min:"37" type:"string" required:"true"`
  7463. }
  7464. // String returns the string representation
  7465. func (s DescribeBackupInput) String() string {
  7466. return awsutil.Prettify(s)
  7467. }
  7468. // GoString returns the string representation
  7469. func (s DescribeBackupInput) GoString() string {
  7470. return s.String()
  7471. }
  7472. // Validate inspects the fields of the type to determine if they are valid.
  7473. func (s *DescribeBackupInput) Validate() error {
  7474. invalidParams := request.ErrInvalidParams{Context: "DescribeBackupInput"}
  7475. if s.BackupArn == nil {
  7476. invalidParams.Add(request.NewErrParamRequired("BackupArn"))
  7477. }
  7478. if s.BackupArn != nil && len(*s.BackupArn) < 37 {
  7479. invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37))
  7480. }
  7481. if invalidParams.Len() > 0 {
  7482. return invalidParams
  7483. }
  7484. return nil
  7485. }
  7486. // SetBackupArn sets the BackupArn field's value.
  7487. func (s *DescribeBackupInput) SetBackupArn(v string) *DescribeBackupInput {
  7488. s.BackupArn = &v
  7489. return s
  7490. }
  7491. type DescribeBackupOutput struct {
  7492. _ struct{} `type:"structure"`
  7493. // Contains the description of the backup created for the table.
  7494. BackupDescription *BackupDescription `type:"structure"`
  7495. }
  7496. // String returns the string representation
  7497. func (s DescribeBackupOutput) String() string {
  7498. return awsutil.Prettify(s)
  7499. }
  7500. // GoString returns the string representation
  7501. func (s DescribeBackupOutput) GoString() string {
  7502. return s.String()
  7503. }
  7504. // SetBackupDescription sets the BackupDescription field's value.
  7505. func (s *DescribeBackupOutput) SetBackupDescription(v *BackupDescription) *DescribeBackupOutput {
  7506. s.BackupDescription = v
  7507. return s
  7508. }
  7509. type DescribeContinuousBackupsInput struct {
  7510. _ struct{} `type:"structure"`
  7511. // Name of the table for which the customer wants to check the continuous backups
  7512. // and point in time recovery settings.
  7513. //
  7514. // TableName is a required field
  7515. TableName *string `min:"3" type:"string" required:"true"`
  7516. }
  7517. // String returns the string representation
  7518. func (s DescribeContinuousBackupsInput) String() string {
  7519. return awsutil.Prettify(s)
  7520. }
  7521. // GoString returns the string representation
  7522. func (s DescribeContinuousBackupsInput) GoString() string {
  7523. return s.String()
  7524. }
  7525. // Validate inspects the fields of the type to determine if they are valid.
  7526. func (s *DescribeContinuousBackupsInput) Validate() error {
  7527. invalidParams := request.ErrInvalidParams{Context: "DescribeContinuousBackupsInput"}
  7528. if s.TableName == nil {
  7529. invalidParams.Add(request.NewErrParamRequired("TableName"))
  7530. }
  7531. if s.TableName != nil && len(*s.TableName) < 3 {
  7532. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  7533. }
  7534. if invalidParams.Len() > 0 {
  7535. return invalidParams
  7536. }
  7537. return nil
  7538. }
  7539. // SetTableName sets the TableName field's value.
  7540. func (s *DescribeContinuousBackupsInput) SetTableName(v string) *DescribeContinuousBackupsInput {
  7541. s.TableName = &v
  7542. return s
  7543. }
  7544. type DescribeContinuousBackupsOutput struct {
  7545. _ struct{} `type:"structure"`
  7546. // Represents the continuous backups and point in time recovery settings on
  7547. // the table.
  7548. ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"`
  7549. }
  7550. // String returns the string representation
  7551. func (s DescribeContinuousBackupsOutput) String() string {
  7552. return awsutil.Prettify(s)
  7553. }
  7554. // GoString returns the string representation
  7555. func (s DescribeContinuousBackupsOutput) GoString() string {
  7556. return s.String()
  7557. }
  7558. // SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value.
  7559. func (s *DescribeContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *DescribeContinuousBackupsOutput {
  7560. s.ContinuousBackupsDescription = v
  7561. return s
  7562. }
  7563. type DescribeEndpointsInput struct {
  7564. _ struct{} `type:"structure"`
  7565. }
  7566. // String returns the string representation
  7567. func (s DescribeEndpointsInput) String() string {
  7568. return awsutil.Prettify(s)
  7569. }
  7570. // GoString returns the string representation
  7571. func (s DescribeEndpointsInput) GoString() string {
  7572. return s.String()
  7573. }
  7574. type DescribeEndpointsOutput struct {
  7575. _ struct{} `type:"structure"`
  7576. // List of endpoints.
  7577. //
  7578. // Endpoints is a required field
  7579. Endpoints []*Endpoint `type:"list" required:"true"`
  7580. }
  7581. // String returns the string representation
  7582. func (s DescribeEndpointsOutput) String() string {
  7583. return awsutil.Prettify(s)
  7584. }
  7585. // GoString returns the string representation
  7586. func (s DescribeEndpointsOutput) GoString() string {
  7587. return s.String()
  7588. }
  7589. // SetEndpoints sets the Endpoints field's value.
  7590. func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput {
  7591. s.Endpoints = v
  7592. return s
  7593. }
  7594. type DescribeGlobalTableInput struct {
  7595. _ struct{} `type:"structure"`
  7596. // The name of the global table.
  7597. //
  7598. // GlobalTableName is a required field
  7599. GlobalTableName *string `min:"3" type:"string" required:"true"`
  7600. }
  7601. // String returns the string representation
  7602. func (s DescribeGlobalTableInput) String() string {
  7603. return awsutil.Prettify(s)
  7604. }
  7605. // GoString returns the string representation
  7606. func (s DescribeGlobalTableInput) GoString() string {
  7607. return s.String()
  7608. }
  7609. // Validate inspects the fields of the type to determine if they are valid.
  7610. func (s *DescribeGlobalTableInput) Validate() error {
  7611. invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableInput"}
  7612. if s.GlobalTableName == nil {
  7613. invalidParams.Add(request.NewErrParamRequired("GlobalTableName"))
  7614. }
  7615. if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 {
  7616. invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3))
  7617. }
  7618. if invalidParams.Len() > 0 {
  7619. return invalidParams
  7620. }
  7621. return nil
  7622. }
  7623. // SetGlobalTableName sets the GlobalTableName field's value.
  7624. func (s *DescribeGlobalTableInput) SetGlobalTableName(v string) *DescribeGlobalTableInput {
  7625. s.GlobalTableName = &v
  7626. return s
  7627. }
  7628. type DescribeGlobalTableOutput struct {
  7629. _ struct{} `type:"structure"`
  7630. // Contains the details of the global table.
  7631. GlobalTableDescription *GlobalTableDescription `type:"structure"`
  7632. }
  7633. // String returns the string representation
  7634. func (s DescribeGlobalTableOutput) String() string {
  7635. return awsutil.Prettify(s)
  7636. }
  7637. // GoString returns the string representation
  7638. func (s DescribeGlobalTableOutput) GoString() string {
  7639. return s.String()
  7640. }
  7641. // SetGlobalTableDescription sets the GlobalTableDescription field's value.
  7642. func (s *DescribeGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *DescribeGlobalTableOutput {
  7643. s.GlobalTableDescription = v
  7644. return s
  7645. }
  7646. type DescribeGlobalTableSettingsInput struct {
  7647. _ struct{} `type:"structure"`
  7648. // The name of the global table to describe.
  7649. //
  7650. // GlobalTableName is a required field
  7651. GlobalTableName *string `min:"3" type:"string" required:"true"`
  7652. }
  7653. // String returns the string representation
  7654. func (s DescribeGlobalTableSettingsInput) String() string {
  7655. return awsutil.Prettify(s)
  7656. }
  7657. // GoString returns the string representation
  7658. func (s DescribeGlobalTableSettingsInput) GoString() string {
  7659. return s.String()
  7660. }
  7661. // Validate inspects the fields of the type to determine if they are valid.
  7662. func (s *DescribeGlobalTableSettingsInput) Validate() error {
  7663. invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalTableSettingsInput"}
  7664. if s.GlobalTableName == nil {
  7665. invalidParams.Add(request.NewErrParamRequired("GlobalTableName"))
  7666. }
  7667. if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 {
  7668. invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3))
  7669. }
  7670. if invalidParams.Len() > 0 {
  7671. return invalidParams
  7672. }
  7673. return nil
  7674. }
  7675. // SetGlobalTableName sets the GlobalTableName field's value.
  7676. func (s *DescribeGlobalTableSettingsInput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsInput {
  7677. s.GlobalTableName = &v
  7678. return s
  7679. }
  7680. type DescribeGlobalTableSettingsOutput struct {
  7681. _ struct{} `type:"structure"`
  7682. // The name of the global table.
  7683. GlobalTableName *string `min:"3" type:"string"`
  7684. // The region specific settings for the global table.
  7685. ReplicaSettings []*ReplicaSettingsDescription `type:"list"`
  7686. }
  7687. // String returns the string representation
  7688. func (s DescribeGlobalTableSettingsOutput) String() string {
  7689. return awsutil.Prettify(s)
  7690. }
  7691. // GoString returns the string representation
  7692. func (s DescribeGlobalTableSettingsOutput) GoString() string {
  7693. return s.String()
  7694. }
  7695. // SetGlobalTableName sets the GlobalTableName field's value.
  7696. func (s *DescribeGlobalTableSettingsOutput) SetGlobalTableName(v string) *DescribeGlobalTableSettingsOutput {
  7697. s.GlobalTableName = &v
  7698. return s
  7699. }
  7700. // SetReplicaSettings sets the ReplicaSettings field's value.
  7701. func (s *DescribeGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *DescribeGlobalTableSettingsOutput {
  7702. s.ReplicaSettings = v
  7703. return s
  7704. }
  7705. // Represents the input of a DescribeLimits operation. Has no content.
  7706. type DescribeLimitsInput struct {
  7707. _ struct{} `type:"structure"`
  7708. }
  7709. // String returns the string representation
  7710. func (s DescribeLimitsInput) String() string {
  7711. return awsutil.Prettify(s)
  7712. }
  7713. // GoString returns the string representation
  7714. func (s DescribeLimitsInput) GoString() string {
  7715. return s.String()
  7716. }
  7717. // Represents the output of a DescribeLimits operation.
  7718. type DescribeLimitsOutput struct {
  7719. _ struct{} `type:"structure"`
  7720. // The maximum total read capacity units that your account allows you to provision
  7721. // across all of your tables in this region.
  7722. AccountMaxReadCapacityUnits *int64 `min:"1" type:"long"`
  7723. // The maximum total write capacity units that your account allows you to provision
  7724. // across all of your tables in this region.
  7725. AccountMaxWriteCapacityUnits *int64 `min:"1" type:"long"`
  7726. // The maximum read capacity units that your account allows you to provision
  7727. // for a new table that you are creating in this region, including the read
  7728. // capacity units provisioned for its global secondary indexes (GSIs).
  7729. TableMaxReadCapacityUnits *int64 `min:"1" type:"long"`
  7730. // The maximum write capacity units that your account allows you to provision
  7731. // for a new table that you are creating in this region, including the write
  7732. // capacity units provisioned for its global secondary indexes (GSIs).
  7733. TableMaxWriteCapacityUnits *int64 `min:"1" type:"long"`
  7734. }
  7735. // String returns the string representation
  7736. func (s DescribeLimitsOutput) String() string {
  7737. return awsutil.Prettify(s)
  7738. }
  7739. // GoString returns the string representation
  7740. func (s DescribeLimitsOutput) GoString() string {
  7741. return s.String()
  7742. }
  7743. // SetAccountMaxReadCapacityUnits sets the AccountMaxReadCapacityUnits field's value.
  7744. func (s *DescribeLimitsOutput) SetAccountMaxReadCapacityUnits(v int64) *DescribeLimitsOutput {
  7745. s.AccountMaxReadCapacityUnits = &v
  7746. return s
  7747. }
  7748. // SetAccountMaxWriteCapacityUnits sets the AccountMaxWriteCapacityUnits field's value.
  7749. func (s *DescribeLimitsOutput) SetAccountMaxWriteCapacityUnits(v int64) *DescribeLimitsOutput {
  7750. s.AccountMaxWriteCapacityUnits = &v
  7751. return s
  7752. }
  7753. // SetTableMaxReadCapacityUnits sets the TableMaxReadCapacityUnits field's value.
  7754. func (s *DescribeLimitsOutput) SetTableMaxReadCapacityUnits(v int64) *DescribeLimitsOutput {
  7755. s.TableMaxReadCapacityUnits = &v
  7756. return s
  7757. }
  7758. // SetTableMaxWriteCapacityUnits sets the TableMaxWriteCapacityUnits field's value.
  7759. func (s *DescribeLimitsOutput) SetTableMaxWriteCapacityUnits(v int64) *DescribeLimitsOutput {
  7760. s.TableMaxWriteCapacityUnits = &v
  7761. return s
  7762. }
  7763. // Represents the input of a DescribeTable operation.
  7764. type DescribeTableInput struct {
  7765. _ struct{} `type:"structure"`
  7766. // The name of the table to describe.
  7767. //
  7768. // TableName is a required field
  7769. TableName *string `min:"3" type:"string" required:"true"`
  7770. }
  7771. // String returns the string representation
  7772. func (s DescribeTableInput) String() string {
  7773. return awsutil.Prettify(s)
  7774. }
  7775. // GoString returns the string representation
  7776. func (s DescribeTableInput) GoString() string {
  7777. return s.String()
  7778. }
  7779. // Validate inspects the fields of the type to determine if they are valid.
  7780. func (s *DescribeTableInput) Validate() error {
  7781. invalidParams := request.ErrInvalidParams{Context: "DescribeTableInput"}
  7782. if s.TableName == nil {
  7783. invalidParams.Add(request.NewErrParamRequired("TableName"))
  7784. }
  7785. if s.TableName != nil && len(*s.TableName) < 3 {
  7786. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  7787. }
  7788. if invalidParams.Len() > 0 {
  7789. return invalidParams
  7790. }
  7791. return nil
  7792. }
  7793. // SetTableName sets the TableName field's value.
  7794. func (s *DescribeTableInput) SetTableName(v string) *DescribeTableInput {
  7795. s.TableName = &v
  7796. return s
  7797. }
  7798. // Represents the output of a DescribeTable operation.
  7799. type DescribeTableOutput struct {
  7800. _ struct{} `type:"structure"`
  7801. // The properties of the table.
  7802. Table *TableDescription `type:"structure"`
  7803. }
  7804. // String returns the string representation
  7805. func (s DescribeTableOutput) String() string {
  7806. return awsutil.Prettify(s)
  7807. }
  7808. // GoString returns the string representation
  7809. func (s DescribeTableOutput) GoString() string {
  7810. return s.String()
  7811. }
  7812. // SetTable sets the Table field's value.
  7813. func (s *DescribeTableOutput) SetTable(v *TableDescription) *DescribeTableOutput {
  7814. s.Table = v
  7815. return s
  7816. }
  7817. type DescribeTimeToLiveInput struct {
  7818. _ struct{} `type:"structure"`
  7819. // The name of the table to be described.
  7820. //
  7821. // TableName is a required field
  7822. TableName *string `min:"3" type:"string" required:"true"`
  7823. }
  7824. // String returns the string representation
  7825. func (s DescribeTimeToLiveInput) String() string {
  7826. return awsutil.Prettify(s)
  7827. }
  7828. // GoString returns the string representation
  7829. func (s DescribeTimeToLiveInput) GoString() string {
  7830. return s.String()
  7831. }
  7832. // Validate inspects the fields of the type to determine if they are valid.
  7833. func (s *DescribeTimeToLiveInput) Validate() error {
  7834. invalidParams := request.ErrInvalidParams{Context: "DescribeTimeToLiveInput"}
  7835. if s.TableName == nil {
  7836. invalidParams.Add(request.NewErrParamRequired("TableName"))
  7837. }
  7838. if s.TableName != nil && len(*s.TableName) < 3 {
  7839. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  7840. }
  7841. if invalidParams.Len() > 0 {
  7842. return invalidParams
  7843. }
  7844. return nil
  7845. }
  7846. // SetTableName sets the TableName field's value.
  7847. func (s *DescribeTimeToLiveInput) SetTableName(v string) *DescribeTimeToLiveInput {
  7848. s.TableName = &v
  7849. return s
  7850. }
  7851. type DescribeTimeToLiveOutput struct {
  7852. _ struct{} `type:"structure"`
  7853. // The description of the Time to Live (TTL) status on the specified table.
  7854. TimeToLiveDescription *TimeToLiveDescription `type:"structure"`
  7855. }
  7856. // String returns the string representation
  7857. func (s DescribeTimeToLiveOutput) String() string {
  7858. return awsutil.Prettify(s)
  7859. }
  7860. // GoString returns the string representation
  7861. func (s DescribeTimeToLiveOutput) GoString() string {
  7862. return s.String()
  7863. }
  7864. // SetTimeToLiveDescription sets the TimeToLiveDescription field's value.
  7865. func (s *DescribeTimeToLiveOutput) SetTimeToLiveDescription(v *TimeToLiveDescription) *DescribeTimeToLiveOutput {
  7866. s.TimeToLiveDescription = v
  7867. return s
  7868. }
  7869. // An endpoint information details.
  7870. type Endpoint struct {
  7871. _ struct{} `type:"structure"`
  7872. // IP address of the endpoint.
  7873. //
  7874. // Address is a required field
  7875. Address *string `type:"string" required:"true"`
  7876. // Endpoint cache time to live (TTL) value.
  7877. //
  7878. // CachePeriodInMinutes is a required field
  7879. CachePeriodInMinutes *int64 `type:"long" required:"true"`
  7880. }
  7881. // String returns the string representation
  7882. func (s Endpoint) String() string {
  7883. return awsutil.Prettify(s)
  7884. }
  7885. // GoString returns the string representation
  7886. func (s Endpoint) GoString() string {
  7887. return s.String()
  7888. }
  7889. // SetAddress sets the Address field's value.
  7890. func (s *Endpoint) SetAddress(v string) *Endpoint {
  7891. s.Address = &v
  7892. return s
  7893. }
  7894. // SetCachePeriodInMinutes sets the CachePeriodInMinutes field's value.
  7895. func (s *Endpoint) SetCachePeriodInMinutes(v int64) *Endpoint {
  7896. s.CachePeriodInMinutes = &v
  7897. return s
  7898. }
  7899. // Represents a condition to be compared with an attribute value. This condition
  7900. // can be used with DeleteItem, PutItem or UpdateItem operations; if the comparison
  7901. // evaluates to true, the operation succeeds; if not, the operation fails. You
  7902. // can use ExpectedAttributeValue in one of two different ways:
  7903. //
  7904. // * Use AttributeValueList to specify one or more values to compare against
  7905. // an attribute. Use ComparisonOperator to specify how you want to perform
  7906. // the comparison. If the comparison evaluates to true, then the conditional
  7907. // operation succeeds.
  7908. //
  7909. // * Use Value to specify a value that DynamoDB will compare against an attribute.
  7910. // If the values match, then ExpectedAttributeValue evaluates to true and
  7911. // the conditional operation succeeds. Optionally, you can also set Exists
  7912. // to false, indicating that you do not expect to find the attribute value
  7913. // in the table. In this case, the conditional operation succeeds only if
  7914. // the comparison evaluates to false.
  7915. //
  7916. // Value and Exists are incompatible with AttributeValueList and ComparisonOperator.
  7917. // Note that if you use both sets of parameters at once, DynamoDB will return
  7918. // a ValidationException exception.
  7919. type ExpectedAttributeValue struct {
  7920. _ struct{} `type:"structure"`
  7921. // One or more values to evaluate against the supplied attribute. The number
  7922. // of values in the list depends on the ComparisonOperator being used.
  7923. //
  7924. // For type Number, value comparisons are numeric.
  7925. //
  7926. // String value comparisons for greater than, equals, or less than are based
  7927. // on ASCII character code values. For example, a is greater than A, and a is
  7928. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  7929. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  7930. //
  7931. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  7932. // it compares binary values.
  7933. //
  7934. // For information on specifying data types in JSON, see JSON Data Format (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html)
  7935. // in the Amazon DynamoDB Developer Guide.
  7936. AttributeValueList []*AttributeValue `type:"list"`
  7937. // A comparator for evaluating attributes in the AttributeValueList. For example,
  7938. // equals, greater than, less than, etc.
  7939. //
  7940. // The following comparison operators are available:
  7941. //
  7942. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS |
  7943. // BEGINS_WITH | IN | BETWEEN
  7944. //
  7945. // The following are descriptions of each comparison operator.
  7946. //
  7947. // * EQ : Equal. EQ is supported for all data types, including lists and
  7948. // maps.
  7949. //
  7950. // AttributeValueList can contain only one AttributeValue element of type String,
  7951. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  7952. // an AttributeValue element of a different type than the one provided in
  7953. // the request, the value does not match. For example, {"S":"6"} does not
  7954. // equal {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  7955. //
  7956. // * NE : Not equal. NE is supported for all data types, including lists
  7957. // and maps.
  7958. //
  7959. // * AttributeValueList can contain only one AttributeValue of type String,
  7960. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  7961. // an AttributeValue of a different type than the one provided in the request,
  7962. // the value does not match. For example, {"S":"6"} does not equal {"N":"6"}.
  7963. // Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  7964. //
  7965. // * LE : Less than or equal.
  7966. //
  7967. // AttributeValueList can contain only one AttributeValue element of type String,
  7968. // Number, or Binary (not a set type). If an item contains an AttributeValue
  7969. // element of a different type than the one provided in the request, the value
  7970. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  7971. // does not compare to {"NS":["6", "2", "1"]}.
  7972. //
  7973. // LT: Less than.
  7974. //
  7975. // AttributeValueListcan contain only one AttributeValueof type String, Number, or Binary (not a set type). If an item contains an
  7976. // AttributeValueelement of a different type than the one provided in the request, the value
  7977. // does not match. For example, {"S":"6"}does not equal {"N":"6"}. Also, {"N":"6"}does not compare to {"NS":["6", "2", "1"]}
  7978. ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
  7979. // Causes DynamoDB to evaluate the value before attempting a conditional operation:
  7980. //
  7981. // * If Exists is true, DynamoDB will check to see if that attribute value
  7982. // already exists in the table. If it is found, then the operation succeeds.
  7983. // If it is not found, the operation fails with a ConditionCheckFailedException.
  7984. //
  7985. // * If Exists is false, DynamoDB assumes that the attribute value does not
  7986. // exist in the table. If in fact the value does not exist, then the assumption
  7987. // is valid and the operation succeeds. If the value is found, despite the
  7988. // assumption that it does not exist, the operation fails with a ConditionCheckFailedException.
  7989. //
  7990. // The default setting for Exists is true. If you supply a Value all by itself,
  7991. // DynamoDB assumes the attribute exists: You don't have to set Exists to true,
  7992. // because it is implied.
  7993. //
  7994. // DynamoDB returns a ValidationException if:
  7995. //
  7996. // * Exists is true but there is no Value to check. (You expect a value to
  7997. // exist, but don't specify what that value is.)
  7998. //
  7999. // * Exists is false but you also provide a Value. (You cannot expect an
  8000. // attribute to have a value, while also expecting it not to exist.)
  8001. Exists *bool `type:"boolean"`
  8002. // Represents the data for the expected attribute.
  8003. //
  8004. // Each attribute value is described as a name-value pair. The name is the data
  8005. // type, and the value is the data itself.
  8006. //
  8007. // For more information, see Data Types (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes)
  8008. // in the Amazon DynamoDB Developer Guide.
  8009. Value *AttributeValue `type:"structure"`
  8010. }
  8011. // String returns the string representation
  8012. func (s ExpectedAttributeValue) String() string {
  8013. return awsutil.Prettify(s)
  8014. }
  8015. // GoString returns the string representation
  8016. func (s ExpectedAttributeValue) GoString() string {
  8017. return s.String()
  8018. }
  8019. // SetAttributeValueList sets the AttributeValueList field's value.
  8020. func (s *ExpectedAttributeValue) SetAttributeValueList(v []*AttributeValue) *ExpectedAttributeValue {
  8021. s.AttributeValueList = v
  8022. return s
  8023. }
  8024. // SetComparisonOperator sets the ComparisonOperator field's value.
  8025. func (s *ExpectedAttributeValue) SetComparisonOperator(v string) *ExpectedAttributeValue {
  8026. s.ComparisonOperator = &v
  8027. return s
  8028. }
  8029. // SetExists sets the Exists field's value.
  8030. func (s *ExpectedAttributeValue) SetExists(v bool) *ExpectedAttributeValue {
  8031. s.Exists = &v
  8032. return s
  8033. }
  8034. // SetValue sets the Value field's value.
  8035. func (s *ExpectedAttributeValue) SetValue(v *AttributeValue) *ExpectedAttributeValue {
  8036. s.Value = v
  8037. return s
  8038. }
  8039. // Specifies an item and related attribute values to retrieve in a TransactGetItem
  8040. // object.
  8041. type Get struct {
  8042. _ struct{} `type:"structure"`
  8043. // One or more substitution tokens for attribute names in the ProjectionExpression
  8044. // parameter.
  8045. ExpressionAttributeNames map[string]*string `type:"map"`
  8046. // A map of attribute names to AttributeValue objects that specifies the primary
  8047. // key of the item to retrieve.
  8048. //
  8049. // Key is a required field
  8050. Key map[string]*AttributeValue `type:"map" required:"true"`
  8051. // A string that identifies one or more attributes of the specified item to
  8052. // retrieve from the table. The attributes in the expression must be separated
  8053. // by commas. If no attribute names are specified, then all attributes of the
  8054. // specified item are returned. If any of the requested attributes are not found,
  8055. // they do not appear in the result.
  8056. ProjectionExpression *string `type:"string"`
  8057. // The name of the table from which to retrieve the specified item.
  8058. //
  8059. // TableName is a required field
  8060. TableName *string `min:"3" type:"string" required:"true"`
  8061. }
  8062. // String returns the string representation
  8063. func (s Get) String() string {
  8064. return awsutil.Prettify(s)
  8065. }
  8066. // GoString returns the string representation
  8067. func (s Get) GoString() string {
  8068. return s.String()
  8069. }
  8070. // Validate inspects the fields of the type to determine if they are valid.
  8071. func (s *Get) Validate() error {
  8072. invalidParams := request.ErrInvalidParams{Context: "Get"}
  8073. if s.Key == nil {
  8074. invalidParams.Add(request.NewErrParamRequired("Key"))
  8075. }
  8076. if s.TableName == nil {
  8077. invalidParams.Add(request.NewErrParamRequired("TableName"))
  8078. }
  8079. if s.TableName != nil && len(*s.TableName) < 3 {
  8080. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  8081. }
  8082. if invalidParams.Len() > 0 {
  8083. return invalidParams
  8084. }
  8085. return nil
  8086. }
  8087. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  8088. func (s *Get) SetExpressionAttributeNames(v map[string]*string) *Get {
  8089. s.ExpressionAttributeNames = v
  8090. return s
  8091. }
  8092. // SetKey sets the Key field's value.
  8093. func (s *Get) SetKey(v map[string]*AttributeValue) *Get {
  8094. s.Key = v
  8095. return s
  8096. }
  8097. // SetProjectionExpression sets the ProjectionExpression field's value.
  8098. func (s *Get) SetProjectionExpression(v string) *Get {
  8099. s.ProjectionExpression = &v
  8100. return s
  8101. }
  8102. // SetTableName sets the TableName field's value.
  8103. func (s *Get) SetTableName(v string) *Get {
  8104. s.TableName = &v
  8105. return s
  8106. }
  8107. // Represents the input of a GetItem operation.
  8108. type GetItemInput struct {
  8109. _ struct{} `type:"structure"`
  8110. // This is a legacy parameter. Use ProjectionExpression instead. For more information,
  8111. // see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html)
  8112. // in the Amazon DynamoDB Developer Guide.
  8113. AttributesToGet []*string `min:"1" type:"list"`
  8114. // Determines the read consistency model: If set to true, then the operation
  8115. // uses strongly consistent reads; otherwise, the operation uses eventually
  8116. // consistent reads.
  8117. ConsistentRead *bool `type:"boolean"`
  8118. // One or more substitution tokens for attribute names in an expression. The
  8119. // following are some use cases for using ExpressionAttributeNames:
  8120. //
  8121. // * To access an attribute whose name conflicts with a DynamoDB reserved
  8122. // word.
  8123. //
  8124. // * To create a placeholder for repeating occurrences of an attribute name
  8125. // in an expression.
  8126. //
  8127. // * To prevent special characters in an attribute name from being misinterpreted
  8128. // in an expression.
  8129. //
  8130. // Use the # character in an expression to dereference an attribute name. For
  8131. // example, consider the following attribute name:
  8132. //
  8133. // * Percentile
  8134. //
  8135. // The name of this attribute conflicts with a reserved word, so it cannot be
  8136. // used directly in an expression. (For the complete list of reserved words,
  8137. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  8138. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  8139. // the following for ExpressionAttributeNames:
  8140. //
  8141. // * {"#P":"Percentile"}
  8142. //
  8143. // You could then use this substitution in an expression, as in this example:
  8144. //
  8145. // * #P = :val
  8146. //
  8147. // Tokens that begin with the : character are expression attribute values, which
  8148. // are placeholders for the actual value at runtime.
  8149. //
  8150. // For more information on expression attribute names, see Accessing Item Attributes
  8151. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  8152. // in the Amazon DynamoDB Developer Guide.
  8153. ExpressionAttributeNames map[string]*string `type:"map"`
  8154. // A map of attribute names to AttributeValue objects, representing the primary
  8155. // key of the item to retrieve.
  8156. //
  8157. // For the primary key, you must provide all of the attributes. For example,
  8158. // with a simple primary key, you only need to provide a value for the partition
  8159. // key. For a composite primary key, you must provide values for both the partition
  8160. // key and the sort key.
  8161. //
  8162. // Key is a required field
  8163. Key map[string]*AttributeValue `type:"map" required:"true"`
  8164. // A string that identifies one or more attributes to retrieve from the table.
  8165. // These attributes can include scalars, sets, or elements of a JSON document.
  8166. // The attributes in the expression must be separated by commas.
  8167. //
  8168. // If no attribute names are specified, then all attributes will be returned.
  8169. // If any of the requested attributes are not found, they will not appear in
  8170. // the result.
  8171. //
  8172. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  8173. // in the Amazon DynamoDB Developer Guide.
  8174. ProjectionExpression *string `type:"string"`
  8175. // Determines the level of detail about provisioned throughput consumption that
  8176. // is returned in the response:
  8177. //
  8178. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  8179. // operation, together with ConsumedCapacity for each table and secondary
  8180. // index that was accessed.
  8181. //
  8182. // Note that some operations, such as GetItem and BatchGetItem, do not access
  8183. // any indexes at all. In these cases, specifying INDEXES will only return
  8184. // ConsumedCapacity information for table(s).
  8185. //
  8186. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  8187. // the operation.
  8188. //
  8189. // * NONE - No ConsumedCapacity details are included in the response.
  8190. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  8191. // The name of the table containing the requested item.
  8192. //
  8193. // TableName is a required field
  8194. TableName *string `min:"3" type:"string" required:"true"`
  8195. }
  8196. // String returns the string representation
  8197. func (s GetItemInput) String() string {
  8198. return awsutil.Prettify(s)
  8199. }
  8200. // GoString returns the string representation
  8201. func (s GetItemInput) GoString() string {
  8202. return s.String()
  8203. }
  8204. // Validate inspects the fields of the type to determine if they are valid.
  8205. func (s *GetItemInput) Validate() error {
  8206. invalidParams := request.ErrInvalidParams{Context: "GetItemInput"}
  8207. if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 {
  8208. invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1))
  8209. }
  8210. if s.Key == nil {
  8211. invalidParams.Add(request.NewErrParamRequired("Key"))
  8212. }
  8213. if s.TableName == nil {
  8214. invalidParams.Add(request.NewErrParamRequired("TableName"))
  8215. }
  8216. if s.TableName != nil && len(*s.TableName) < 3 {
  8217. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  8218. }
  8219. if invalidParams.Len() > 0 {
  8220. return invalidParams
  8221. }
  8222. return nil
  8223. }
  8224. // SetAttributesToGet sets the AttributesToGet field's value.
  8225. func (s *GetItemInput) SetAttributesToGet(v []*string) *GetItemInput {
  8226. s.AttributesToGet = v
  8227. return s
  8228. }
  8229. // SetConsistentRead sets the ConsistentRead field's value.
  8230. func (s *GetItemInput) SetConsistentRead(v bool) *GetItemInput {
  8231. s.ConsistentRead = &v
  8232. return s
  8233. }
  8234. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  8235. func (s *GetItemInput) SetExpressionAttributeNames(v map[string]*string) *GetItemInput {
  8236. s.ExpressionAttributeNames = v
  8237. return s
  8238. }
  8239. // SetKey sets the Key field's value.
  8240. func (s *GetItemInput) SetKey(v map[string]*AttributeValue) *GetItemInput {
  8241. s.Key = v
  8242. return s
  8243. }
  8244. // SetProjectionExpression sets the ProjectionExpression field's value.
  8245. func (s *GetItemInput) SetProjectionExpression(v string) *GetItemInput {
  8246. s.ProjectionExpression = &v
  8247. return s
  8248. }
  8249. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  8250. func (s *GetItemInput) SetReturnConsumedCapacity(v string) *GetItemInput {
  8251. s.ReturnConsumedCapacity = &v
  8252. return s
  8253. }
  8254. // SetTableName sets the TableName field's value.
  8255. func (s *GetItemInput) SetTableName(v string) *GetItemInput {
  8256. s.TableName = &v
  8257. return s
  8258. }
  8259. // Represents the output of a GetItem operation.
  8260. type GetItemOutput struct {
  8261. _ struct{} `type:"structure"`
  8262. // The capacity units consumed by the GetItem operation. The data returned includes
  8263. // the total provisioned throughput consumed, along with statistics for the
  8264. // table and any indexes involved in the operation. ConsumedCapacity is only
  8265. // returned if the ReturnConsumedCapacity parameter was specified. For more
  8266. // information, see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  8267. // in the Amazon DynamoDB Developer Guide.
  8268. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  8269. // A map of attribute names to AttributeValue objects, as specified by ProjectionExpression.
  8270. Item map[string]*AttributeValue `type:"map"`
  8271. }
  8272. // String returns the string representation
  8273. func (s GetItemOutput) String() string {
  8274. return awsutil.Prettify(s)
  8275. }
  8276. // GoString returns the string representation
  8277. func (s GetItemOutput) GoString() string {
  8278. return s.String()
  8279. }
  8280. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  8281. func (s *GetItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *GetItemOutput {
  8282. s.ConsumedCapacity = v
  8283. return s
  8284. }
  8285. // SetItem sets the Item field's value.
  8286. func (s *GetItemOutput) SetItem(v map[string]*AttributeValue) *GetItemOutput {
  8287. s.Item = v
  8288. return s
  8289. }
  8290. // Represents the properties of a global secondary index.
  8291. type GlobalSecondaryIndex struct {
  8292. _ struct{} `type:"structure"`
  8293. // The name of the global secondary index. The name must be unique among all
  8294. // other indexes on this table.
  8295. //
  8296. // IndexName is a required field
  8297. IndexName *string `min:"3" type:"string" required:"true"`
  8298. // The complete key schema for a global secondary index, which consists of one
  8299. // or more pairs of attribute names and key types:
  8300. //
  8301. // * HASH - partition key
  8302. //
  8303. // * RANGE - sort key
  8304. //
  8305. // The partition key of an item is also known as its hash attribute. The term
  8306. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  8307. // to evenly distribute data items across partitions, based on their partition
  8308. // key values.
  8309. //
  8310. // The sort key of an item is also known as its range attribute. The term "range
  8311. // attribute" derives from the way DynamoDB stores items with the same partition
  8312. // key physically close together, in sorted order by the sort key value.
  8313. //
  8314. // KeySchema is a required field
  8315. KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"`
  8316. // Represents attributes that are copied (projected) from the table into the
  8317. // global secondary index. These are in addition to the primary key attributes
  8318. // and index key attributes, which are automatically projected.
  8319. //
  8320. // Projection is a required field
  8321. Projection *Projection `type:"structure" required:"true"`
  8322. // Represents the provisioned throughput settings for the specified global secondary
  8323. // index.
  8324. //
  8325. // For current minimum and maximum provisioned throughput values, see Limits
  8326. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  8327. // in the Amazon DynamoDB Developer Guide.
  8328. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  8329. }
  8330. // String returns the string representation
  8331. func (s GlobalSecondaryIndex) String() string {
  8332. return awsutil.Prettify(s)
  8333. }
  8334. // GoString returns the string representation
  8335. func (s GlobalSecondaryIndex) GoString() string {
  8336. return s.String()
  8337. }
  8338. // Validate inspects the fields of the type to determine if they are valid.
  8339. func (s *GlobalSecondaryIndex) Validate() error {
  8340. invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndex"}
  8341. if s.IndexName == nil {
  8342. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  8343. }
  8344. if s.IndexName != nil && len(*s.IndexName) < 3 {
  8345. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  8346. }
  8347. if s.KeySchema == nil {
  8348. invalidParams.Add(request.NewErrParamRequired("KeySchema"))
  8349. }
  8350. if s.KeySchema != nil && len(s.KeySchema) < 1 {
  8351. invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1))
  8352. }
  8353. if s.Projection == nil {
  8354. invalidParams.Add(request.NewErrParamRequired("Projection"))
  8355. }
  8356. if s.KeySchema != nil {
  8357. for i, v := range s.KeySchema {
  8358. if v == nil {
  8359. continue
  8360. }
  8361. if err := v.Validate(); err != nil {
  8362. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams))
  8363. }
  8364. }
  8365. }
  8366. if s.Projection != nil {
  8367. if err := s.Projection.Validate(); err != nil {
  8368. invalidParams.AddNested("Projection", err.(request.ErrInvalidParams))
  8369. }
  8370. }
  8371. if s.ProvisionedThroughput != nil {
  8372. if err := s.ProvisionedThroughput.Validate(); err != nil {
  8373. invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
  8374. }
  8375. }
  8376. if invalidParams.Len() > 0 {
  8377. return invalidParams
  8378. }
  8379. return nil
  8380. }
  8381. // SetIndexName sets the IndexName field's value.
  8382. func (s *GlobalSecondaryIndex) SetIndexName(v string) *GlobalSecondaryIndex {
  8383. s.IndexName = &v
  8384. return s
  8385. }
  8386. // SetKeySchema sets the KeySchema field's value.
  8387. func (s *GlobalSecondaryIndex) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndex {
  8388. s.KeySchema = v
  8389. return s
  8390. }
  8391. // SetProjection sets the Projection field's value.
  8392. func (s *GlobalSecondaryIndex) SetProjection(v *Projection) *GlobalSecondaryIndex {
  8393. s.Projection = v
  8394. return s
  8395. }
  8396. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  8397. func (s *GlobalSecondaryIndex) SetProvisionedThroughput(v *ProvisionedThroughput) *GlobalSecondaryIndex {
  8398. s.ProvisionedThroughput = v
  8399. return s
  8400. }
  8401. // Represents the properties of a global secondary index.
  8402. type GlobalSecondaryIndexDescription struct {
  8403. _ struct{} `type:"structure"`
  8404. // Indicates whether the index is currently backfilling. Backfilling is the
  8405. // process of reading items from the table and determining whether they can
  8406. // be added to the index. (Not all items will qualify: For example, a partition
  8407. // key cannot have any duplicate values.) If an item can be added to the index,
  8408. // DynamoDB will do so. After all items have been processed, the backfilling
  8409. // operation is complete and Backfilling is false.
  8410. //
  8411. // For indexes that were created during a CreateTable operation, the Backfilling
  8412. // attribute does not appear in the DescribeTable output.
  8413. Backfilling *bool `type:"boolean"`
  8414. // The Amazon Resource Name (ARN) that uniquely identifies the index.
  8415. IndexArn *string `type:"string"`
  8416. // The name of the global secondary index.
  8417. IndexName *string `min:"3" type:"string"`
  8418. // The total size of the specified index, in bytes. DynamoDB updates this value
  8419. // approximately every six hours. Recent changes might not be reflected in this
  8420. // value.
  8421. IndexSizeBytes *int64 `type:"long"`
  8422. // The current state of the global secondary index:
  8423. //
  8424. // * CREATING - The index is being created.
  8425. //
  8426. // * UPDATING - The index is being updated.
  8427. //
  8428. // * DELETING - The index is being deleted.
  8429. //
  8430. // * ACTIVE - The index is ready for use.
  8431. IndexStatus *string `type:"string" enum:"IndexStatus"`
  8432. // The number of items in the specified index. DynamoDB updates this value approximately
  8433. // every six hours. Recent changes might not be reflected in this value.
  8434. ItemCount *int64 `type:"long"`
  8435. // The complete key schema for a global secondary index, which consists of one
  8436. // or more pairs of attribute names and key types:
  8437. //
  8438. // * HASH - partition key
  8439. //
  8440. // * RANGE - sort key
  8441. //
  8442. // The partition key of an item is also known as its hash attribute. The term
  8443. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  8444. // to evenly distribute data items across partitions, based on their partition
  8445. // key values.
  8446. //
  8447. // The sort key of an item is also known as its range attribute. The term "range
  8448. // attribute" derives from the way DynamoDB stores items with the same partition
  8449. // key physically close together, in sorted order by the sort key value.
  8450. KeySchema []*KeySchemaElement `min:"1" type:"list"`
  8451. // Represents attributes that are copied (projected) from the table into the
  8452. // global secondary index. These are in addition to the primary key attributes
  8453. // and index key attributes, which are automatically projected.
  8454. Projection *Projection `type:"structure"`
  8455. // Represents the provisioned throughput settings for the specified global secondary
  8456. // index.
  8457. //
  8458. // For current minimum and maximum provisioned throughput values, see Limits
  8459. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  8460. // in the Amazon DynamoDB Developer Guide.
  8461. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"`
  8462. }
  8463. // String returns the string representation
  8464. func (s GlobalSecondaryIndexDescription) String() string {
  8465. return awsutil.Prettify(s)
  8466. }
  8467. // GoString returns the string representation
  8468. func (s GlobalSecondaryIndexDescription) GoString() string {
  8469. return s.String()
  8470. }
  8471. // SetBackfilling sets the Backfilling field's value.
  8472. func (s *GlobalSecondaryIndexDescription) SetBackfilling(v bool) *GlobalSecondaryIndexDescription {
  8473. s.Backfilling = &v
  8474. return s
  8475. }
  8476. // SetIndexArn sets the IndexArn field's value.
  8477. func (s *GlobalSecondaryIndexDescription) SetIndexArn(v string) *GlobalSecondaryIndexDescription {
  8478. s.IndexArn = &v
  8479. return s
  8480. }
  8481. // SetIndexName sets the IndexName field's value.
  8482. func (s *GlobalSecondaryIndexDescription) SetIndexName(v string) *GlobalSecondaryIndexDescription {
  8483. s.IndexName = &v
  8484. return s
  8485. }
  8486. // SetIndexSizeBytes sets the IndexSizeBytes field's value.
  8487. func (s *GlobalSecondaryIndexDescription) SetIndexSizeBytes(v int64) *GlobalSecondaryIndexDescription {
  8488. s.IndexSizeBytes = &v
  8489. return s
  8490. }
  8491. // SetIndexStatus sets the IndexStatus field's value.
  8492. func (s *GlobalSecondaryIndexDescription) SetIndexStatus(v string) *GlobalSecondaryIndexDescription {
  8493. s.IndexStatus = &v
  8494. return s
  8495. }
  8496. // SetItemCount sets the ItemCount field's value.
  8497. func (s *GlobalSecondaryIndexDescription) SetItemCount(v int64) *GlobalSecondaryIndexDescription {
  8498. s.ItemCount = &v
  8499. return s
  8500. }
  8501. // SetKeySchema sets the KeySchema field's value.
  8502. func (s *GlobalSecondaryIndexDescription) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndexDescription {
  8503. s.KeySchema = v
  8504. return s
  8505. }
  8506. // SetProjection sets the Projection field's value.
  8507. func (s *GlobalSecondaryIndexDescription) SetProjection(v *Projection) *GlobalSecondaryIndexDescription {
  8508. s.Projection = v
  8509. return s
  8510. }
  8511. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  8512. func (s *GlobalSecondaryIndexDescription) SetProvisionedThroughput(v *ProvisionedThroughputDescription) *GlobalSecondaryIndexDescription {
  8513. s.ProvisionedThroughput = v
  8514. return s
  8515. }
  8516. // Represents the properties of a global secondary index for the table when
  8517. // the backup was created.
  8518. type GlobalSecondaryIndexInfo struct {
  8519. _ struct{} `type:"structure"`
  8520. // The name of the global secondary index.
  8521. IndexName *string `min:"3" type:"string"`
  8522. // The complete key schema for a global secondary index, which consists of one
  8523. // or more pairs of attribute names and key types:
  8524. //
  8525. // * HASH - partition key
  8526. //
  8527. // * RANGE - sort key
  8528. //
  8529. // The partition key of an item is also known as its hash attribute. The term
  8530. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  8531. // to evenly distribute data items across partitions, based on their partition
  8532. // key values.
  8533. //
  8534. // The sort key of an item is also known as its range attribute. The term "range
  8535. // attribute" derives from the way DynamoDB stores items with the same partition
  8536. // key physically close together, in sorted order by the sort key value.
  8537. KeySchema []*KeySchemaElement `min:"1" type:"list"`
  8538. // Represents attributes that are copied (projected) from the table into the
  8539. // global secondary index. These are in addition to the primary key attributes
  8540. // and index key attributes, which are automatically projected.
  8541. Projection *Projection `type:"structure"`
  8542. // Represents the provisioned throughput settings for the specified global secondary
  8543. // index.
  8544. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  8545. }
  8546. // String returns the string representation
  8547. func (s GlobalSecondaryIndexInfo) String() string {
  8548. return awsutil.Prettify(s)
  8549. }
  8550. // GoString returns the string representation
  8551. func (s GlobalSecondaryIndexInfo) GoString() string {
  8552. return s.String()
  8553. }
  8554. // SetIndexName sets the IndexName field's value.
  8555. func (s *GlobalSecondaryIndexInfo) SetIndexName(v string) *GlobalSecondaryIndexInfo {
  8556. s.IndexName = &v
  8557. return s
  8558. }
  8559. // SetKeySchema sets the KeySchema field's value.
  8560. func (s *GlobalSecondaryIndexInfo) SetKeySchema(v []*KeySchemaElement) *GlobalSecondaryIndexInfo {
  8561. s.KeySchema = v
  8562. return s
  8563. }
  8564. // SetProjection sets the Projection field's value.
  8565. func (s *GlobalSecondaryIndexInfo) SetProjection(v *Projection) *GlobalSecondaryIndexInfo {
  8566. s.Projection = v
  8567. return s
  8568. }
  8569. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  8570. func (s *GlobalSecondaryIndexInfo) SetProvisionedThroughput(v *ProvisionedThroughput) *GlobalSecondaryIndexInfo {
  8571. s.ProvisionedThroughput = v
  8572. return s
  8573. }
  8574. // Represents one of the following:
  8575. //
  8576. // * A new global secondary index to be added to an existing table.
  8577. //
  8578. // * New provisioned throughput parameters for an existing global secondary
  8579. // index.
  8580. //
  8581. // * An existing global secondary index to be removed from an existing table.
  8582. type GlobalSecondaryIndexUpdate struct {
  8583. _ struct{} `type:"structure"`
  8584. // The parameters required for creating a global secondary index on an existing
  8585. // table:
  8586. //
  8587. // * IndexName
  8588. //
  8589. // * KeySchema
  8590. //
  8591. // * AttributeDefinitions
  8592. //
  8593. // * Projection
  8594. //
  8595. // * ProvisionedThroughput
  8596. Create *CreateGlobalSecondaryIndexAction `type:"structure"`
  8597. // The name of an existing global secondary index to be removed.
  8598. Delete *DeleteGlobalSecondaryIndexAction `type:"structure"`
  8599. // The name of an existing global secondary index, along with new provisioned
  8600. // throughput settings to be applied to that index.
  8601. Update *UpdateGlobalSecondaryIndexAction `type:"structure"`
  8602. }
  8603. // String returns the string representation
  8604. func (s GlobalSecondaryIndexUpdate) String() string {
  8605. return awsutil.Prettify(s)
  8606. }
  8607. // GoString returns the string representation
  8608. func (s GlobalSecondaryIndexUpdate) GoString() string {
  8609. return s.String()
  8610. }
  8611. // Validate inspects the fields of the type to determine if they are valid.
  8612. func (s *GlobalSecondaryIndexUpdate) Validate() error {
  8613. invalidParams := request.ErrInvalidParams{Context: "GlobalSecondaryIndexUpdate"}
  8614. if s.Create != nil {
  8615. if err := s.Create.Validate(); err != nil {
  8616. invalidParams.AddNested("Create", err.(request.ErrInvalidParams))
  8617. }
  8618. }
  8619. if s.Delete != nil {
  8620. if err := s.Delete.Validate(); err != nil {
  8621. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8622. }
  8623. }
  8624. if s.Update != nil {
  8625. if err := s.Update.Validate(); err != nil {
  8626. invalidParams.AddNested("Update", err.(request.ErrInvalidParams))
  8627. }
  8628. }
  8629. if invalidParams.Len() > 0 {
  8630. return invalidParams
  8631. }
  8632. return nil
  8633. }
  8634. // SetCreate sets the Create field's value.
  8635. func (s *GlobalSecondaryIndexUpdate) SetCreate(v *CreateGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate {
  8636. s.Create = v
  8637. return s
  8638. }
  8639. // SetDelete sets the Delete field's value.
  8640. func (s *GlobalSecondaryIndexUpdate) SetDelete(v *DeleteGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate {
  8641. s.Delete = v
  8642. return s
  8643. }
  8644. // SetUpdate sets the Update field's value.
  8645. func (s *GlobalSecondaryIndexUpdate) SetUpdate(v *UpdateGlobalSecondaryIndexAction) *GlobalSecondaryIndexUpdate {
  8646. s.Update = v
  8647. return s
  8648. }
  8649. // Represents the properties of a global table.
  8650. type GlobalTable struct {
  8651. _ struct{} `type:"structure"`
  8652. // The global table name.
  8653. GlobalTableName *string `min:"3" type:"string"`
  8654. // The regions where the global table has replicas.
  8655. ReplicationGroup []*Replica `type:"list"`
  8656. }
  8657. // String returns the string representation
  8658. func (s GlobalTable) String() string {
  8659. return awsutil.Prettify(s)
  8660. }
  8661. // GoString returns the string representation
  8662. func (s GlobalTable) GoString() string {
  8663. return s.String()
  8664. }
  8665. // SetGlobalTableName sets the GlobalTableName field's value.
  8666. func (s *GlobalTable) SetGlobalTableName(v string) *GlobalTable {
  8667. s.GlobalTableName = &v
  8668. return s
  8669. }
  8670. // SetReplicationGroup sets the ReplicationGroup field's value.
  8671. func (s *GlobalTable) SetReplicationGroup(v []*Replica) *GlobalTable {
  8672. s.ReplicationGroup = v
  8673. return s
  8674. }
  8675. // Contains details about the global table.
  8676. type GlobalTableDescription struct {
  8677. _ struct{} `type:"structure"`
  8678. // The creation time of the global table.
  8679. CreationDateTime *time.Time `type:"timestamp"`
  8680. // The unique identifier of the global table.
  8681. GlobalTableArn *string `type:"string"`
  8682. // The global table name.
  8683. GlobalTableName *string `min:"3" type:"string"`
  8684. // The current state of the global table:
  8685. //
  8686. // * CREATING - The global table is being created.
  8687. //
  8688. // * UPDATING - The global table is being updated.
  8689. //
  8690. // * DELETING - The global table is being deleted.
  8691. //
  8692. // * ACTIVE - The global table is ready for use.
  8693. GlobalTableStatus *string `type:"string" enum:"GlobalTableStatus"`
  8694. // The regions where the global table has replicas.
  8695. ReplicationGroup []*ReplicaDescription `type:"list"`
  8696. }
  8697. // String returns the string representation
  8698. func (s GlobalTableDescription) String() string {
  8699. return awsutil.Prettify(s)
  8700. }
  8701. // GoString returns the string representation
  8702. func (s GlobalTableDescription) GoString() string {
  8703. return s.String()
  8704. }
  8705. // SetCreationDateTime sets the CreationDateTime field's value.
  8706. func (s *GlobalTableDescription) SetCreationDateTime(v time.Time) *GlobalTableDescription {
  8707. s.CreationDateTime = &v
  8708. return s
  8709. }
  8710. // SetGlobalTableArn sets the GlobalTableArn field's value.
  8711. func (s *GlobalTableDescription) SetGlobalTableArn(v string) *GlobalTableDescription {
  8712. s.GlobalTableArn = &v
  8713. return s
  8714. }
  8715. // SetGlobalTableName sets the GlobalTableName field's value.
  8716. func (s *GlobalTableDescription) SetGlobalTableName(v string) *GlobalTableDescription {
  8717. s.GlobalTableName = &v
  8718. return s
  8719. }
  8720. // SetGlobalTableStatus sets the GlobalTableStatus field's value.
  8721. func (s *GlobalTableDescription) SetGlobalTableStatus(v string) *GlobalTableDescription {
  8722. s.GlobalTableStatus = &v
  8723. return s
  8724. }
  8725. // SetReplicationGroup sets the ReplicationGroup field's value.
  8726. func (s *GlobalTableDescription) SetReplicationGroup(v []*ReplicaDescription) *GlobalTableDescription {
  8727. s.ReplicationGroup = v
  8728. return s
  8729. }
  8730. // Represents the settings of a global secondary index for a global table that
  8731. // will be modified.
  8732. type GlobalTableGlobalSecondaryIndexSettingsUpdate struct {
  8733. _ struct{} `type:"structure"`
  8734. // The name of the global secondary index. The name must be unique among all
  8735. // other indexes on this table.
  8736. //
  8737. // IndexName is a required field
  8738. IndexName *string `min:"3" type:"string" required:"true"`
  8739. // AutoScaling settings for managing a global secondary index's write capacity
  8740. // units.
  8741. ProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
  8742. // The maximum number of writes consumed per second before DynamoDB returns
  8743. // a ThrottlingException.
  8744. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"`
  8745. }
  8746. // String returns the string representation
  8747. func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) String() string {
  8748. return awsutil.Prettify(s)
  8749. }
  8750. // GoString returns the string representation
  8751. func (s GlobalTableGlobalSecondaryIndexSettingsUpdate) GoString() string {
  8752. return s.String()
  8753. }
  8754. // Validate inspects the fields of the type to determine if they are valid.
  8755. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) Validate() error {
  8756. invalidParams := request.ErrInvalidParams{Context: "GlobalTableGlobalSecondaryIndexSettingsUpdate"}
  8757. if s.IndexName == nil {
  8758. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  8759. }
  8760. if s.IndexName != nil && len(*s.IndexName) < 3 {
  8761. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  8762. }
  8763. if s.ProvisionedWriteCapacityUnits != nil && *s.ProvisionedWriteCapacityUnits < 1 {
  8764. invalidParams.Add(request.NewErrParamMinValue("ProvisionedWriteCapacityUnits", 1))
  8765. }
  8766. if s.ProvisionedWriteCapacityAutoScalingSettingsUpdate != nil {
  8767. if err := s.ProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil {
  8768. invalidParams.AddNested("ProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams))
  8769. }
  8770. }
  8771. if invalidParams.Len() > 0 {
  8772. return invalidParams
  8773. }
  8774. return nil
  8775. }
  8776. // SetIndexName sets the IndexName field's value.
  8777. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *GlobalTableGlobalSecondaryIndexSettingsUpdate {
  8778. s.IndexName = &v
  8779. return s
  8780. }
  8781. // SetProvisionedWriteCapacityAutoScalingSettingsUpdate sets the ProvisionedWriteCapacityAutoScalingSettingsUpdate field's value.
  8782. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *GlobalTableGlobalSecondaryIndexSettingsUpdate {
  8783. s.ProvisionedWriteCapacityAutoScalingSettingsUpdate = v
  8784. return s
  8785. }
  8786. // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value.
  8787. func (s *GlobalTableGlobalSecondaryIndexSettingsUpdate) SetProvisionedWriteCapacityUnits(v int64) *GlobalTableGlobalSecondaryIndexSettingsUpdate {
  8788. s.ProvisionedWriteCapacityUnits = &v
  8789. return s
  8790. }
  8791. // Information about item collections, if any, that were affected by the operation.
  8792. // ItemCollectionMetrics is only returned if the request asked for it. If the
  8793. // table does not have any local secondary indexes, this information is not
  8794. // returned in the response.
  8795. type ItemCollectionMetrics struct {
  8796. _ struct{} `type:"structure"`
  8797. // The partition key value of the item collection. This value is the same as
  8798. // the partition key value of the item.
  8799. ItemCollectionKey map[string]*AttributeValue `type:"map"`
  8800. // An estimate of item collection size, in gigabytes. This value is a two-element
  8801. // array containing a lower bound and an upper bound for the estimate. The estimate
  8802. // includes the size of all the items in the table, plus the size of all attributes
  8803. // projected into all of the local secondary indexes on that table. Use this
  8804. // estimate to measure whether a local secondary index is approaching its size
  8805. // limit.
  8806. //
  8807. // The estimate is subject to change over time; therefore, do not rely on the
  8808. // precision or accuracy of the estimate.
  8809. SizeEstimateRangeGB []*float64 `type:"list"`
  8810. }
  8811. // String returns the string representation
  8812. func (s ItemCollectionMetrics) String() string {
  8813. return awsutil.Prettify(s)
  8814. }
  8815. // GoString returns the string representation
  8816. func (s ItemCollectionMetrics) GoString() string {
  8817. return s.String()
  8818. }
  8819. // SetItemCollectionKey sets the ItemCollectionKey field's value.
  8820. func (s *ItemCollectionMetrics) SetItemCollectionKey(v map[string]*AttributeValue) *ItemCollectionMetrics {
  8821. s.ItemCollectionKey = v
  8822. return s
  8823. }
  8824. // SetSizeEstimateRangeGB sets the SizeEstimateRangeGB field's value.
  8825. func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollectionMetrics {
  8826. s.SizeEstimateRangeGB = v
  8827. return s
  8828. }
  8829. // Details for the requested item.
  8830. type ItemResponse struct {
  8831. _ struct{} `type:"structure"`
  8832. // Map of attribute data consisting of the data type and attribute value.
  8833. Item map[string]*AttributeValue `type:"map"`
  8834. }
  8835. // String returns the string representation
  8836. func (s ItemResponse) String() string {
  8837. return awsutil.Prettify(s)
  8838. }
  8839. // GoString returns the string representation
  8840. func (s ItemResponse) GoString() string {
  8841. return s.String()
  8842. }
  8843. // SetItem sets the Item field's value.
  8844. func (s *ItemResponse) SetItem(v map[string]*AttributeValue) *ItemResponse {
  8845. s.Item = v
  8846. return s
  8847. }
  8848. // Represents a single element of a key schema. A key schema specifies the attributes
  8849. // that make up the primary key of a table, or the key attributes of an index.
  8850. //
  8851. // A KeySchemaElement represents exactly one attribute of the primary key. For
  8852. // example, a simple primary key would be represented by one KeySchemaElement
  8853. // (for the partition key). A composite primary key would require one KeySchemaElement
  8854. // for the partition key, and another KeySchemaElement for the sort key.
  8855. //
  8856. // A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute).
  8857. // The data type must be one of String, Number, or Binary. The attribute cannot
  8858. // be nested within a List or a Map.
  8859. type KeySchemaElement struct {
  8860. _ struct{} `type:"structure"`
  8861. // The name of a key attribute.
  8862. //
  8863. // AttributeName is a required field
  8864. AttributeName *string `min:"1" type:"string" required:"true"`
  8865. // The role that this key attribute will assume:
  8866. //
  8867. // * HASH - partition key
  8868. //
  8869. // * RANGE - sort key
  8870. //
  8871. // The partition key of an item is also known as its hash attribute. The term
  8872. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  8873. // to evenly distribute data items across partitions, based on their partition
  8874. // key values.
  8875. //
  8876. // The sort key of an item is also known as its range attribute. The term "range
  8877. // attribute" derives from the way DynamoDB stores items with the same partition
  8878. // key physically close together, in sorted order by the sort key value.
  8879. //
  8880. // KeyType is a required field
  8881. KeyType *string `type:"string" required:"true" enum:"KeyType"`
  8882. }
  8883. // String returns the string representation
  8884. func (s KeySchemaElement) String() string {
  8885. return awsutil.Prettify(s)
  8886. }
  8887. // GoString returns the string representation
  8888. func (s KeySchemaElement) GoString() string {
  8889. return s.String()
  8890. }
  8891. // Validate inspects the fields of the type to determine if they are valid.
  8892. func (s *KeySchemaElement) Validate() error {
  8893. invalidParams := request.ErrInvalidParams{Context: "KeySchemaElement"}
  8894. if s.AttributeName == nil {
  8895. invalidParams.Add(request.NewErrParamRequired("AttributeName"))
  8896. }
  8897. if s.AttributeName != nil && len(*s.AttributeName) < 1 {
  8898. invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1))
  8899. }
  8900. if s.KeyType == nil {
  8901. invalidParams.Add(request.NewErrParamRequired("KeyType"))
  8902. }
  8903. if invalidParams.Len() > 0 {
  8904. return invalidParams
  8905. }
  8906. return nil
  8907. }
  8908. // SetAttributeName sets the AttributeName field's value.
  8909. func (s *KeySchemaElement) SetAttributeName(v string) *KeySchemaElement {
  8910. s.AttributeName = &v
  8911. return s
  8912. }
  8913. // SetKeyType sets the KeyType field's value.
  8914. func (s *KeySchemaElement) SetKeyType(v string) *KeySchemaElement {
  8915. s.KeyType = &v
  8916. return s
  8917. }
  8918. // Represents a set of primary keys and, for each key, the attributes to retrieve
  8919. // from the table.
  8920. //
  8921. // For each primary key, you must provide all of the key attributes. For example,
  8922. // with a simple primary key, you only need to provide the partition key. For
  8923. // a composite primary key, you must provide both the partition key and the
  8924. // sort key.
  8925. type KeysAndAttributes struct {
  8926. _ struct{} `type:"structure"`
  8927. // This is a legacy parameter. Use ProjectionExpression instead. For more information,
  8928. // see Legacy Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  8929. // in the Amazon DynamoDB Developer Guide.
  8930. AttributesToGet []*string `min:"1" type:"list"`
  8931. // The consistency of a read operation. If set to true, then a strongly consistent
  8932. // read is used; otherwise, an eventually consistent read is used.
  8933. ConsistentRead *bool `type:"boolean"`
  8934. // One or more substitution tokens for attribute names in an expression. The
  8935. // following are some use cases for using ExpressionAttributeNames:
  8936. //
  8937. // * To access an attribute whose name conflicts with a DynamoDB reserved
  8938. // word.
  8939. //
  8940. // * To create a placeholder for repeating occurrences of an attribute name
  8941. // in an expression.
  8942. //
  8943. // * To prevent special characters in an attribute name from being misinterpreted
  8944. // in an expression.
  8945. //
  8946. // Use the # character in an expression to dereference an attribute name. For
  8947. // example, consider the following attribute name:
  8948. //
  8949. // * Percentile
  8950. //
  8951. // The name of this attribute conflicts with a reserved word, so it cannot be
  8952. // used directly in an expression. (For the complete list of reserved words,
  8953. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  8954. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  8955. // the following for ExpressionAttributeNames:
  8956. //
  8957. // * {"#P":"Percentile"}
  8958. //
  8959. // You could then use this substitution in an expression, as in this example:
  8960. //
  8961. // * #P = :val
  8962. //
  8963. // Tokens that begin with the : character are expression attribute values, which
  8964. // are placeholders for the actual value at runtime.
  8965. //
  8966. // For more information on expression attribute names, see Accessing Item Attributes
  8967. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  8968. // in the Amazon DynamoDB Developer Guide.
  8969. ExpressionAttributeNames map[string]*string `type:"map"`
  8970. // The primary key attribute values that define the items and the attributes
  8971. // associated with the items.
  8972. //
  8973. // Keys is a required field
  8974. Keys []map[string]*AttributeValue `min:"1" type:"list" required:"true"`
  8975. // A string that identifies one or more attributes to retrieve from the table.
  8976. // These attributes can include scalars, sets, or elements of a JSON document.
  8977. // The attributes in the ProjectionExpression must be separated by commas.
  8978. //
  8979. // If no attribute names are specified, then all attributes will be returned.
  8980. // If any of the requested attributes are not found, they will not appear in
  8981. // the result.
  8982. //
  8983. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  8984. // in the Amazon DynamoDB Developer Guide.
  8985. ProjectionExpression *string `type:"string"`
  8986. }
  8987. // String returns the string representation
  8988. func (s KeysAndAttributes) String() string {
  8989. return awsutil.Prettify(s)
  8990. }
  8991. // GoString returns the string representation
  8992. func (s KeysAndAttributes) GoString() string {
  8993. return s.String()
  8994. }
  8995. // Validate inspects the fields of the type to determine if they are valid.
  8996. func (s *KeysAndAttributes) Validate() error {
  8997. invalidParams := request.ErrInvalidParams{Context: "KeysAndAttributes"}
  8998. if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 {
  8999. invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1))
  9000. }
  9001. if s.Keys == nil {
  9002. invalidParams.Add(request.NewErrParamRequired("Keys"))
  9003. }
  9004. if s.Keys != nil && len(s.Keys) < 1 {
  9005. invalidParams.Add(request.NewErrParamMinLen("Keys", 1))
  9006. }
  9007. if invalidParams.Len() > 0 {
  9008. return invalidParams
  9009. }
  9010. return nil
  9011. }
  9012. // SetAttributesToGet sets the AttributesToGet field's value.
  9013. func (s *KeysAndAttributes) SetAttributesToGet(v []*string) *KeysAndAttributes {
  9014. s.AttributesToGet = v
  9015. return s
  9016. }
  9017. // SetConsistentRead sets the ConsistentRead field's value.
  9018. func (s *KeysAndAttributes) SetConsistentRead(v bool) *KeysAndAttributes {
  9019. s.ConsistentRead = &v
  9020. return s
  9021. }
  9022. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  9023. func (s *KeysAndAttributes) SetExpressionAttributeNames(v map[string]*string) *KeysAndAttributes {
  9024. s.ExpressionAttributeNames = v
  9025. return s
  9026. }
  9027. // SetKeys sets the Keys field's value.
  9028. func (s *KeysAndAttributes) SetKeys(v []map[string]*AttributeValue) *KeysAndAttributes {
  9029. s.Keys = v
  9030. return s
  9031. }
  9032. // SetProjectionExpression sets the ProjectionExpression field's value.
  9033. func (s *KeysAndAttributes) SetProjectionExpression(v string) *KeysAndAttributes {
  9034. s.ProjectionExpression = &v
  9035. return s
  9036. }
  9037. type ListBackupsInput struct {
  9038. _ struct{} `type:"structure"`
  9039. // The backups from the table specified by BackupType are listed.
  9040. //
  9041. // Where BackupType can be:
  9042. //
  9043. // * USER - On-demand backup created by you.
  9044. //
  9045. // * SYSTEM - On-demand backup automatically created by DynamoDB.
  9046. //
  9047. // * ALL - All types of on-demand backups (USER and SYSTEM).
  9048. BackupType *string `type:"string" enum:"BackupTypeFilter"`
  9049. // LastEvaluatedBackupArn is the ARN of the backup last evaluated when the current
  9050. // page of results was returned, inclusive of the current page of results. This
  9051. // value may be specified as the ExclusiveStartBackupArn of a new ListBackups
  9052. // operation in order to fetch the next page of results.
  9053. ExclusiveStartBackupArn *string `min:"37" type:"string"`
  9054. // Maximum number of backups to return at once.
  9055. Limit *int64 `min:"1" type:"integer"`
  9056. // The backups from the table specified by TableName are listed.
  9057. TableName *string `min:"3" type:"string"`
  9058. // Only backups created after this time are listed. TimeRangeLowerBound is inclusive.
  9059. TimeRangeLowerBound *time.Time `type:"timestamp"`
  9060. // Only backups created before this time are listed. TimeRangeUpperBound is
  9061. // exclusive.
  9062. TimeRangeUpperBound *time.Time `type:"timestamp"`
  9063. }
  9064. // String returns the string representation
  9065. func (s ListBackupsInput) String() string {
  9066. return awsutil.Prettify(s)
  9067. }
  9068. // GoString returns the string representation
  9069. func (s ListBackupsInput) GoString() string {
  9070. return s.String()
  9071. }
  9072. // Validate inspects the fields of the type to determine if they are valid.
  9073. func (s *ListBackupsInput) Validate() error {
  9074. invalidParams := request.ErrInvalidParams{Context: "ListBackupsInput"}
  9075. if s.ExclusiveStartBackupArn != nil && len(*s.ExclusiveStartBackupArn) < 37 {
  9076. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartBackupArn", 37))
  9077. }
  9078. if s.Limit != nil && *s.Limit < 1 {
  9079. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  9080. }
  9081. if s.TableName != nil && len(*s.TableName) < 3 {
  9082. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  9083. }
  9084. if invalidParams.Len() > 0 {
  9085. return invalidParams
  9086. }
  9087. return nil
  9088. }
  9089. // SetBackupType sets the BackupType field's value.
  9090. func (s *ListBackupsInput) SetBackupType(v string) *ListBackupsInput {
  9091. s.BackupType = &v
  9092. return s
  9093. }
  9094. // SetExclusiveStartBackupArn sets the ExclusiveStartBackupArn field's value.
  9095. func (s *ListBackupsInput) SetExclusiveStartBackupArn(v string) *ListBackupsInput {
  9096. s.ExclusiveStartBackupArn = &v
  9097. return s
  9098. }
  9099. // SetLimit sets the Limit field's value.
  9100. func (s *ListBackupsInput) SetLimit(v int64) *ListBackupsInput {
  9101. s.Limit = &v
  9102. return s
  9103. }
  9104. // SetTableName sets the TableName field's value.
  9105. func (s *ListBackupsInput) SetTableName(v string) *ListBackupsInput {
  9106. s.TableName = &v
  9107. return s
  9108. }
  9109. // SetTimeRangeLowerBound sets the TimeRangeLowerBound field's value.
  9110. func (s *ListBackupsInput) SetTimeRangeLowerBound(v time.Time) *ListBackupsInput {
  9111. s.TimeRangeLowerBound = &v
  9112. return s
  9113. }
  9114. // SetTimeRangeUpperBound sets the TimeRangeUpperBound field's value.
  9115. func (s *ListBackupsInput) SetTimeRangeUpperBound(v time.Time) *ListBackupsInput {
  9116. s.TimeRangeUpperBound = &v
  9117. return s
  9118. }
  9119. type ListBackupsOutput struct {
  9120. _ struct{} `type:"structure"`
  9121. // List of BackupSummary objects.
  9122. BackupSummaries []*BackupSummary `type:"list"`
  9123. // The ARN of the backup last evaluated when the current page of results was
  9124. // returned, inclusive of the current page of results. This value may be specified
  9125. // as the ExclusiveStartBackupArn of a new ListBackups operation in order to
  9126. // fetch the next page of results.
  9127. //
  9128. // If LastEvaluatedBackupArn is empty, then the last page of results has been
  9129. // processed and there are no more results to be retrieved.
  9130. //
  9131. // If LastEvaluatedBackupArn is not empty, this may or may not indicate there
  9132. // is more data to be returned. All results are guaranteed to have been returned
  9133. // if and only if no value for LastEvaluatedBackupArn is returned.
  9134. LastEvaluatedBackupArn *string `min:"37" type:"string"`
  9135. }
  9136. // String returns the string representation
  9137. func (s ListBackupsOutput) String() string {
  9138. return awsutil.Prettify(s)
  9139. }
  9140. // GoString returns the string representation
  9141. func (s ListBackupsOutput) GoString() string {
  9142. return s.String()
  9143. }
  9144. // SetBackupSummaries sets the BackupSummaries field's value.
  9145. func (s *ListBackupsOutput) SetBackupSummaries(v []*BackupSummary) *ListBackupsOutput {
  9146. s.BackupSummaries = v
  9147. return s
  9148. }
  9149. // SetLastEvaluatedBackupArn sets the LastEvaluatedBackupArn field's value.
  9150. func (s *ListBackupsOutput) SetLastEvaluatedBackupArn(v string) *ListBackupsOutput {
  9151. s.LastEvaluatedBackupArn = &v
  9152. return s
  9153. }
  9154. type ListGlobalTablesInput struct {
  9155. _ struct{} `type:"structure"`
  9156. // The first global table name that this operation will evaluate.
  9157. ExclusiveStartGlobalTableName *string `min:"3" type:"string"`
  9158. // The maximum number of table names to return.
  9159. Limit *int64 `min:"1" type:"integer"`
  9160. // Lists the global tables in a specific region.
  9161. RegionName *string `type:"string"`
  9162. }
  9163. // String returns the string representation
  9164. func (s ListGlobalTablesInput) String() string {
  9165. return awsutil.Prettify(s)
  9166. }
  9167. // GoString returns the string representation
  9168. func (s ListGlobalTablesInput) GoString() string {
  9169. return s.String()
  9170. }
  9171. // Validate inspects the fields of the type to determine if they are valid.
  9172. func (s *ListGlobalTablesInput) Validate() error {
  9173. invalidParams := request.ErrInvalidParams{Context: "ListGlobalTablesInput"}
  9174. if s.ExclusiveStartGlobalTableName != nil && len(*s.ExclusiveStartGlobalTableName) < 3 {
  9175. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartGlobalTableName", 3))
  9176. }
  9177. if s.Limit != nil && *s.Limit < 1 {
  9178. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  9179. }
  9180. if invalidParams.Len() > 0 {
  9181. return invalidParams
  9182. }
  9183. return nil
  9184. }
  9185. // SetExclusiveStartGlobalTableName sets the ExclusiveStartGlobalTableName field's value.
  9186. func (s *ListGlobalTablesInput) SetExclusiveStartGlobalTableName(v string) *ListGlobalTablesInput {
  9187. s.ExclusiveStartGlobalTableName = &v
  9188. return s
  9189. }
  9190. // SetLimit sets the Limit field's value.
  9191. func (s *ListGlobalTablesInput) SetLimit(v int64) *ListGlobalTablesInput {
  9192. s.Limit = &v
  9193. return s
  9194. }
  9195. // SetRegionName sets the RegionName field's value.
  9196. func (s *ListGlobalTablesInput) SetRegionName(v string) *ListGlobalTablesInput {
  9197. s.RegionName = &v
  9198. return s
  9199. }
  9200. type ListGlobalTablesOutput struct {
  9201. _ struct{} `type:"structure"`
  9202. // List of global table names.
  9203. GlobalTables []*GlobalTable `type:"list"`
  9204. // Last evaluated global table name.
  9205. LastEvaluatedGlobalTableName *string `min:"3" type:"string"`
  9206. }
  9207. // String returns the string representation
  9208. func (s ListGlobalTablesOutput) String() string {
  9209. return awsutil.Prettify(s)
  9210. }
  9211. // GoString returns the string representation
  9212. func (s ListGlobalTablesOutput) GoString() string {
  9213. return s.String()
  9214. }
  9215. // SetGlobalTables sets the GlobalTables field's value.
  9216. func (s *ListGlobalTablesOutput) SetGlobalTables(v []*GlobalTable) *ListGlobalTablesOutput {
  9217. s.GlobalTables = v
  9218. return s
  9219. }
  9220. // SetLastEvaluatedGlobalTableName sets the LastEvaluatedGlobalTableName field's value.
  9221. func (s *ListGlobalTablesOutput) SetLastEvaluatedGlobalTableName(v string) *ListGlobalTablesOutput {
  9222. s.LastEvaluatedGlobalTableName = &v
  9223. return s
  9224. }
  9225. // Represents the input of a ListTables operation.
  9226. type ListTablesInput struct {
  9227. _ struct{} `type:"structure"`
  9228. // The first table name that this operation will evaluate. Use the value that
  9229. // was returned for LastEvaluatedTableName in a previous operation, so that
  9230. // you can obtain the next page of results.
  9231. ExclusiveStartTableName *string `min:"3" type:"string"`
  9232. // A maximum number of table names to return. If this parameter is not specified,
  9233. // the limit is 100.
  9234. Limit *int64 `min:"1" type:"integer"`
  9235. }
  9236. // String returns the string representation
  9237. func (s ListTablesInput) String() string {
  9238. return awsutil.Prettify(s)
  9239. }
  9240. // GoString returns the string representation
  9241. func (s ListTablesInput) GoString() string {
  9242. return s.String()
  9243. }
  9244. // Validate inspects the fields of the type to determine if they are valid.
  9245. func (s *ListTablesInput) Validate() error {
  9246. invalidParams := request.ErrInvalidParams{Context: "ListTablesInput"}
  9247. if s.ExclusiveStartTableName != nil && len(*s.ExclusiveStartTableName) < 3 {
  9248. invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartTableName", 3))
  9249. }
  9250. if s.Limit != nil && *s.Limit < 1 {
  9251. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  9252. }
  9253. if invalidParams.Len() > 0 {
  9254. return invalidParams
  9255. }
  9256. return nil
  9257. }
  9258. // SetExclusiveStartTableName sets the ExclusiveStartTableName field's value.
  9259. func (s *ListTablesInput) SetExclusiveStartTableName(v string) *ListTablesInput {
  9260. s.ExclusiveStartTableName = &v
  9261. return s
  9262. }
  9263. // SetLimit sets the Limit field's value.
  9264. func (s *ListTablesInput) SetLimit(v int64) *ListTablesInput {
  9265. s.Limit = &v
  9266. return s
  9267. }
  9268. // Represents the output of a ListTables operation.
  9269. type ListTablesOutput struct {
  9270. _ struct{} `type:"structure"`
  9271. // The name of the last table in the current page of results. Use this value
  9272. // as the ExclusiveStartTableName in a new request to obtain the next page of
  9273. // results, until all the table names are returned.
  9274. //
  9275. // If you do not receive a LastEvaluatedTableName value in the response, this
  9276. // means that there are no more table names to be retrieved.
  9277. LastEvaluatedTableName *string `min:"3" type:"string"`
  9278. // The names of the tables associated with the current account at the current
  9279. // endpoint. The maximum size of this array is 100.
  9280. //
  9281. // If LastEvaluatedTableName also appears in the output, you can use this value
  9282. // as the ExclusiveStartTableName parameter in a subsequent ListTables request
  9283. // and obtain the next page of results.
  9284. TableNames []*string `type:"list"`
  9285. }
  9286. // String returns the string representation
  9287. func (s ListTablesOutput) String() string {
  9288. return awsutil.Prettify(s)
  9289. }
  9290. // GoString returns the string representation
  9291. func (s ListTablesOutput) GoString() string {
  9292. return s.String()
  9293. }
  9294. // SetLastEvaluatedTableName sets the LastEvaluatedTableName field's value.
  9295. func (s *ListTablesOutput) SetLastEvaluatedTableName(v string) *ListTablesOutput {
  9296. s.LastEvaluatedTableName = &v
  9297. return s
  9298. }
  9299. // SetTableNames sets the TableNames field's value.
  9300. func (s *ListTablesOutput) SetTableNames(v []*string) *ListTablesOutput {
  9301. s.TableNames = v
  9302. return s
  9303. }
  9304. type ListTagsOfResourceInput struct {
  9305. _ struct{} `type:"structure"`
  9306. // An optional string that, if supplied, must be copied from the output of a
  9307. // previous call to ListTagOfResource. When provided in this manner, this API
  9308. // fetches the next page of results.
  9309. NextToken *string `type:"string"`
  9310. // The Amazon DynamoDB resource with tags to be listed. This value is an Amazon
  9311. // Resource Name (ARN).
  9312. //
  9313. // ResourceArn is a required field
  9314. ResourceArn *string `min:"1" type:"string" required:"true"`
  9315. }
  9316. // String returns the string representation
  9317. func (s ListTagsOfResourceInput) String() string {
  9318. return awsutil.Prettify(s)
  9319. }
  9320. // GoString returns the string representation
  9321. func (s ListTagsOfResourceInput) GoString() string {
  9322. return s.String()
  9323. }
  9324. // Validate inspects the fields of the type to determine if they are valid.
  9325. func (s *ListTagsOfResourceInput) Validate() error {
  9326. invalidParams := request.ErrInvalidParams{Context: "ListTagsOfResourceInput"}
  9327. if s.ResourceArn == nil {
  9328. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  9329. }
  9330. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  9331. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  9332. }
  9333. if invalidParams.Len() > 0 {
  9334. return invalidParams
  9335. }
  9336. return nil
  9337. }
  9338. // SetNextToken sets the NextToken field's value.
  9339. func (s *ListTagsOfResourceInput) SetNextToken(v string) *ListTagsOfResourceInput {
  9340. s.NextToken = &v
  9341. return s
  9342. }
  9343. // SetResourceArn sets the ResourceArn field's value.
  9344. func (s *ListTagsOfResourceInput) SetResourceArn(v string) *ListTagsOfResourceInput {
  9345. s.ResourceArn = &v
  9346. return s
  9347. }
  9348. type ListTagsOfResourceOutput struct {
  9349. _ struct{} `type:"structure"`
  9350. // If this value is returned, there are additional results to be displayed.
  9351. // To retrieve them, call ListTagsOfResource again, with NextToken set to this
  9352. // value.
  9353. NextToken *string `type:"string"`
  9354. // The tags currently associated with the Amazon DynamoDB resource.
  9355. Tags []*Tag `type:"list"`
  9356. }
  9357. // String returns the string representation
  9358. func (s ListTagsOfResourceOutput) String() string {
  9359. return awsutil.Prettify(s)
  9360. }
  9361. // GoString returns the string representation
  9362. func (s ListTagsOfResourceOutput) GoString() string {
  9363. return s.String()
  9364. }
  9365. // SetNextToken sets the NextToken field's value.
  9366. func (s *ListTagsOfResourceOutput) SetNextToken(v string) *ListTagsOfResourceOutput {
  9367. s.NextToken = &v
  9368. return s
  9369. }
  9370. // SetTags sets the Tags field's value.
  9371. func (s *ListTagsOfResourceOutput) SetTags(v []*Tag) *ListTagsOfResourceOutput {
  9372. s.Tags = v
  9373. return s
  9374. }
  9375. // Represents the properties of a local secondary index.
  9376. type LocalSecondaryIndex struct {
  9377. _ struct{} `type:"structure"`
  9378. // The name of the local secondary index. The name must be unique among all
  9379. // other indexes on this table.
  9380. //
  9381. // IndexName is a required field
  9382. IndexName *string `min:"3" type:"string" required:"true"`
  9383. // The complete key schema for the local secondary index, consisting of one
  9384. // or more pairs of attribute names and key types:
  9385. //
  9386. // * HASH - partition key
  9387. //
  9388. // * RANGE - sort key
  9389. //
  9390. // The partition key of an item is also known as its hash attribute. The term
  9391. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  9392. // to evenly distribute data items across partitions, based on their partition
  9393. // key values.
  9394. //
  9395. // The sort key of an item is also known as its range attribute. The term "range
  9396. // attribute" derives from the way DynamoDB stores items with the same partition
  9397. // key physically close together, in sorted order by the sort key value.
  9398. //
  9399. // KeySchema is a required field
  9400. KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"`
  9401. // Represents attributes that are copied (projected) from the table into the
  9402. // local secondary index. These are in addition to the primary key attributes
  9403. // and index key attributes, which are automatically projected.
  9404. //
  9405. // Projection is a required field
  9406. Projection *Projection `type:"structure" required:"true"`
  9407. }
  9408. // String returns the string representation
  9409. func (s LocalSecondaryIndex) String() string {
  9410. return awsutil.Prettify(s)
  9411. }
  9412. // GoString returns the string representation
  9413. func (s LocalSecondaryIndex) GoString() string {
  9414. return s.String()
  9415. }
  9416. // Validate inspects the fields of the type to determine if they are valid.
  9417. func (s *LocalSecondaryIndex) Validate() error {
  9418. invalidParams := request.ErrInvalidParams{Context: "LocalSecondaryIndex"}
  9419. if s.IndexName == nil {
  9420. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  9421. }
  9422. if s.IndexName != nil && len(*s.IndexName) < 3 {
  9423. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  9424. }
  9425. if s.KeySchema == nil {
  9426. invalidParams.Add(request.NewErrParamRequired("KeySchema"))
  9427. }
  9428. if s.KeySchema != nil && len(s.KeySchema) < 1 {
  9429. invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1))
  9430. }
  9431. if s.Projection == nil {
  9432. invalidParams.Add(request.NewErrParamRequired("Projection"))
  9433. }
  9434. if s.KeySchema != nil {
  9435. for i, v := range s.KeySchema {
  9436. if v == nil {
  9437. continue
  9438. }
  9439. if err := v.Validate(); err != nil {
  9440. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeySchema", i), err.(request.ErrInvalidParams))
  9441. }
  9442. }
  9443. }
  9444. if s.Projection != nil {
  9445. if err := s.Projection.Validate(); err != nil {
  9446. invalidParams.AddNested("Projection", err.(request.ErrInvalidParams))
  9447. }
  9448. }
  9449. if invalidParams.Len() > 0 {
  9450. return invalidParams
  9451. }
  9452. return nil
  9453. }
  9454. // SetIndexName sets the IndexName field's value.
  9455. func (s *LocalSecondaryIndex) SetIndexName(v string) *LocalSecondaryIndex {
  9456. s.IndexName = &v
  9457. return s
  9458. }
  9459. // SetKeySchema sets the KeySchema field's value.
  9460. func (s *LocalSecondaryIndex) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndex {
  9461. s.KeySchema = v
  9462. return s
  9463. }
  9464. // SetProjection sets the Projection field's value.
  9465. func (s *LocalSecondaryIndex) SetProjection(v *Projection) *LocalSecondaryIndex {
  9466. s.Projection = v
  9467. return s
  9468. }
  9469. // Represents the properties of a local secondary index.
  9470. type LocalSecondaryIndexDescription struct {
  9471. _ struct{} `type:"structure"`
  9472. // The Amazon Resource Name (ARN) that uniquely identifies the index.
  9473. IndexArn *string `type:"string"`
  9474. // Represents the name of the local secondary index.
  9475. IndexName *string `min:"3" type:"string"`
  9476. // The total size of the specified index, in bytes. DynamoDB updates this value
  9477. // approximately every six hours. Recent changes might not be reflected in this
  9478. // value.
  9479. IndexSizeBytes *int64 `type:"long"`
  9480. // The number of items in the specified index. DynamoDB updates this value approximately
  9481. // every six hours. Recent changes might not be reflected in this value.
  9482. ItemCount *int64 `type:"long"`
  9483. // The complete key schema for the local secondary index, consisting of one
  9484. // or more pairs of attribute names and key types:
  9485. //
  9486. // * HASH - partition key
  9487. //
  9488. // * RANGE - sort key
  9489. //
  9490. // The partition key of an item is also known as its hash attribute. The term
  9491. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  9492. // to evenly distribute data items across partitions, based on their partition
  9493. // key values.
  9494. //
  9495. // The sort key of an item is also known as its range attribute. The term "range
  9496. // attribute" derives from the way DynamoDB stores items with the same partition
  9497. // key physically close together, in sorted order by the sort key value.
  9498. KeySchema []*KeySchemaElement `min:"1" type:"list"`
  9499. // Represents attributes that are copied (projected) from the table into the
  9500. // global secondary index. These are in addition to the primary key attributes
  9501. // and index key attributes, which are automatically projected.
  9502. Projection *Projection `type:"structure"`
  9503. }
  9504. // String returns the string representation
  9505. func (s LocalSecondaryIndexDescription) String() string {
  9506. return awsutil.Prettify(s)
  9507. }
  9508. // GoString returns the string representation
  9509. func (s LocalSecondaryIndexDescription) GoString() string {
  9510. return s.String()
  9511. }
  9512. // SetIndexArn sets the IndexArn field's value.
  9513. func (s *LocalSecondaryIndexDescription) SetIndexArn(v string) *LocalSecondaryIndexDescription {
  9514. s.IndexArn = &v
  9515. return s
  9516. }
  9517. // SetIndexName sets the IndexName field's value.
  9518. func (s *LocalSecondaryIndexDescription) SetIndexName(v string) *LocalSecondaryIndexDescription {
  9519. s.IndexName = &v
  9520. return s
  9521. }
  9522. // SetIndexSizeBytes sets the IndexSizeBytes field's value.
  9523. func (s *LocalSecondaryIndexDescription) SetIndexSizeBytes(v int64) *LocalSecondaryIndexDescription {
  9524. s.IndexSizeBytes = &v
  9525. return s
  9526. }
  9527. // SetItemCount sets the ItemCount field's value.
  9528. func (s *LocalSecondaryIndexDescription) SetItemCount(v int64) *LocalSecondaryIndexDescription {
  9529. s.ItemCount = &v
  9530. return s
  9531. }
  9532. // SetKeySchema sets the KeySchema field's value.
  9533. func (s *LocalSecondaryIndexDescription) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndexDescription {
  9534. s.KeySchema = v
  9535. return s
  9536. }
  9537. // SetProjection sets the Projection field's value.
  9538. func (s *LocalSecondaryIndexDescription) SetProjection(v *Projection) *LocalSecondaryIndexDescription {
  9539. s.Projection = v
  9540. return s
  9541. }
  9542. // Represents the properties of a local secondary index for the table when the
  9543. // backup was created.
  9544. type LocalSecondaryIndexInfo struct {
  9545. _ struct{} `type:"structure"`
  9546. // Represents the name of the local secondary index.
  9547. IndexName *string `min:"3" type:"string"`
  9548. // The complete key schema for a local secondary index, which consists of one
  9549. // or more pairs of attribute names and key types:
  9550. //
  9551. // * HASH - partition key
  9552. //
  9553. // * RANGE - sort key
  9554. //
  9555. // The partition key of an item is also known as its hash attribute. The term
  9556. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  9557. // to evenly distribute data items across partitions, based on their partition
  9558. // key values.
  9559. //
  9560. // The sort key of an item is also known as its range attribute. The term "range
  9561. // attribute" derives from the way DynamoDB stores items with the same partition
  9562. // key physically close together, in sorted order by the sort key value.
  9563. KeySchema []*KeySchemaElement `min:"1" type:"list"`
  9564. // Represents attributes that are copied (projected) from the table into the
  9565. // global secondary index. These are in addition to the primary key attributes
  9566. // and index key attributes, which are automatically projected.
  9567. Projection *Projection `type:"structure"`
  9568. }
  9569. // String returns the string representation
  9570. func (s LocalSecondaryIndexInfo) String() string {
  9571. return awsutil.Prettify(s)
  9572. }
  9573. // GoString returns the string representation
  9574. func (s LocalSecondaryIndexInfo) GoString() string {
  9575. return s.String()
  9576. }
  9577. // SetIndexName sets the IndexName field's value.
  9578. func (s *LocalSecondaryIndexInfo) SetIndexName(v string) *LocalSecondaryIndexInfo {
  9579. s.IndexName = &v
  9580. return s
  9581. }
  9582. // SetKeySchema sets the KeySchema field's value.
  9583. func (s *LocalSecondaryIndexInfo) SetKeySchema(v []*KeySchemaElement) *LocalSecondaryIndexInfo {
  9584. s.KeySchema = v
  9585. return s
  9586. }
  9587. // SetProjection sets the Projection field's value.
  9588. func (s *LocalSecondaryIndexInfo) SetProjection(v *Projection) *LocalSecondaryIndexInfo {
  9589. s.Projection = v
  9590. return s
  9591. }
  9592. // The description of the point in time settings applied to the table.
  9593. type PointInTimeRecoveryDescription struct {
  9594. _ struct{} `type:"structure"`
  9595. // Specifies the earliest point in time you can restore your table to. It You
  9596. // can restore your table to any point in time during the last 35 days.
  9597. EarliestRestorableDateTime *time.Time `type:"timestamp"`
  9598. // LatestRestorableDateTime is typically 5 minutes before the current time.
  9599. LatestRestorableDateTime *time.Time `type:"timestamp"`
  9600. // The current state of point in time recovery:
  9601. //
  9602. // * ENABLING - Point in time recovery is being enabled.
  9603. //
  9604. // * ENABLED - Point in time recovery is enabled.
  9605. //
  9606. // * DISABLED - Point in time recovery is disabled.
  9607. PointInTimeRecoveryStatus *string `type:"string" enum:"PointInTimeRecoveryStatus"`
  9608. }
  9609. // String returns the string representation
  9610. func (s PointInTimeRecoveryDescription) String() string {
  9611. return awsutil.Prettify(s)
  9612. }
  9613. // GoString returns the string representation
  9614. func (s PointInTimeRecoveryDescription) GoString() string {
  9615. return s.String()
  9616. }
  9617. // SetEarliestRestorableDateTime sets the EarliestRestorableDateTime field's value.
  9618. func (s *PointInTimeRecoveryDescription) SetEarliestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription {
  9619. s.EarliestRestorableDateTime = &v
  9620. return s
  9621. }
  9622. // SetLatestRestorableDateTime sets the LatestRestorableDateTime field's value.
  9623. func (s *PointInTimeRecoveryDescription) SetLatestRestorableDateTime(v time.Time) *PointInTimeRecoveryDescription {
  9624. s.LatestRestorableDateTime = &v
  9625. return s
  9626. }
  9627. // SetPointInTimeRecoveryStatus sets the PointInTimeRecoveryStatus field's value.
  9628. func (s *PointInTimeRecoveryDescription) SetPointInTimeRecoveryStatus(v string) *PointInTimeRecoveryDescription {
  9629. s.PointInTimeRecoveryStatus = &v
  9630. return s
  9631. }
  9632. // Represents the settings used to enable point in time recovery.
  9633. type PointInTimeRecoverySpecification struct {
  9634. _ struct{} `type:"structure"`
  9635. // Indicates whether point in time recovery is enabled (true) or disabled (false)
  9636. // on the table.
  9637. //
  9638. // PointInTimeRecoveryEnabled is a required field
  9639. PointInTimeRecoveryEnabled *bool `type:"boolean" required:"true"`
  9640. }
  9641. // String returns the string representation
  9642. func (s PointInTimeRecoverySpecification) String() string {
  9643. return awsutil.Prettify(s)
  9644. }
  9645. // GoString returns the string representation
  9646. func (s PointInTimeRecoverySpecification) GoString() string {
  9647. return s.String()
  9648. }
  9649. // Validate inspects the fields of the type to determine if they are valid.
  9650. func (s *PointInTimeRecoverySpecification) Validate() error {
  9651. invalidParams := request.ErrInvalidParams{Context: "PointInTimeRecoverySpecification"}
  9652. if s.PointInTimeRecoveryEnabled == nil {
  9653. invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoveryEnabled"))
  9654. }
  9655. if invalidParams.Len() > 0 {
  9656. return invalidParams
  9657. }
  9658. return nil
  9659. }
  9660. // SetPointInTimeRecoveryEnabled sets the PointInTimeRecoveryEnabled field's value.
  9661. func (s *PointInTimeRecoverySpecification) SetPointInTimeRecoveryEnabled(v bool) *PointInTimeRecoverySpecification {
  9662. s.PointInTimeRecoveryEnabled = &v
  9663. return s
  9664. }
  9665. // Represents attributes that are copied (projected) from the table into an
  9666. // index. These are in addition to the primary key attributes and index key
  9667. // attributes, which are automatically projected.
  9668. type Projection struct {
  9669. _ struct{} `type:"structure"`
  9670. // Represents the non-key attribute names which will be projected into the index.
  9671. //
  9672. // For local secondary indexes, the total count of NonKeyAttributes summed across
  9673. // all of the local secondary indexes, must not exceed 20. If you project the
  9674. // same attribute into two different indexes, this counts as two distinct attributes
  9675. // when determining the total.
  9676. NonKeyAttributes []*string `min:"1" type:"list"`
  9677. // The set of attributes that are projected into the index:
  9678. //
  9679. // * KEYS_ONLY - Only the index and primary keys are projected into the index.
  9680. //
  9681. // * INCLUDE - Only the specified table attributes are projected into the
  9682. // index. The list of projected attributes are in NonKeyAttributes.
  9683. //
  9684. // * ALL - All of the table attributes are projected into the index.
  9685. ProjectionType *string `type:"string" enum:"ProjectionType"`
  9686. }
  9687. // String returns the string representation
  9688. func (s Projection) String() string {
  9689. return awsutil.Prettify(s)
  9690. }
  9691. // GoString returns the string representation
  9692. func (s Projection) GoString() string {
  9693. return s.String()
  9694. }
  9695. // Validate inspects the fields of the type to determine if they are valid.
  9696. func (s *Projection) Validate() error {
  9697. invalidParams := request.ErrInvalidParams{Context: "Projection"}
  9698. if s.NonKeyAttributes != nil && len(s.NonKeyAttributes) < 1 {
  9699. invalidParams.Add(request.NewErrParamMinLen("NonKeyAttributes", 1))
  9700. }
  9701. if invalidParams.Len() > 0 {
  9702. return invalidParams
  9703. }
  9704. return nil
  9705. }
  9706. // SetNonKeyAttributes sets the NonKeyAttributes field's value.
  9707. func (s *Projection) SetNonKeyAttributes(v []*string) *Projection {
  9708. s.NonKeyAttributes = v
  9709. return s
  9710. }
  9711. // SetProjectionType sets the ProjectionType field's value.
  9712. func (s *Projection) SetProjectionType(v string) *Projection {
  9713. s.ProjectionType = &v
  9714. return s
  9715. }
  9716. // Represents the provisioned throughput settings for a specified table or index.
  9717. // The settings can be modified using the UpdateTable operation.
  9718. //
  9719. // For current minimum and maximum provisioned throughput values, see Limits
  9720. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  9721. // in the Amazon DynamoDB Developer Guide.
  9722. type ProvisionedThroughput struct {
  9723. _ struct{} `type:"structure"`
  9724. // The maximum number of strongly consistent reads consumed per second before
  9725. // DynamoDB returns a ThrottlingException. For more information, see Specifying
  9726. // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  9727. // in the Amazon DynamoDB Developer Guide.
  9728. //
  9729. // If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.
  9730. //
  9731. // ReadCapacityUnits is a required field
  9732. ReadCapacityUnits *int64 `min:"1" type:"long" required:"true"`
  9733. // The maximum number of writes consumed per second before DynamoDB returns
  9734. // a ThrottlingException. For more information, see Specifying Read and Write
  9735. // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  9736. // in the Amazon DynamoDB Developer Guide.
  9737. //
  9738. // If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.
  9739. //
  9740. // WriteCapacityUnits is a required field
  9741. WriteCapacityUnits *int64 `min:"1" type:"long" required:"true"`
  9742. }
  9743. // String returns the string representation
  9744. func (s ProvisionedThroughput) String() string {
  9745. return awsutil.Prettify(s)
  9746. }
  9747. // GoString returns the string representation
  9748. func (s ProvisionedThroughput) GoString() string {
  9749. return s.String()
  9750. }
  9751. // Validate inspects the fields of the type to determine if they are valid.
  9752. func (s *ProvisionedThroughput) Validate() error {
  9753. invalidParams := request.ErrInvalidParams{Context: "ProvisionedThroughput"}
  9754. if s.ReadCapacityUnits == nil {
  9755. invalidParams.Add(request.NewErrParamRequired("ReadCapacityUnits"))
  9756. }
  9757. if s.ReadCapacityUnits != nil && *s.ReadCapacityUnits < 1 {
  9758. invalidParams.Add(request.NewErrParamMinValue("ReadCapacityUnits", 1))
  9759. }
  9760. if s.WriteCapacityUnits == nil {
  9761. invalidParams.Add(request.NewErrParamRequired("WriteCapacityUnits"))
  9762. }
  9763. if s.WriteCapacityUnits != nil && *s.WriteCapacityUnits < 1 {
  9764. invalidParams.Add(request.NewErrParamMinValue("WriteCapacityUnits", 1))
  9765. }
  9766. if invalidParams.Len() > 0 {
  9767. return invalidParams
  9768. }
  9769. return nil
  9770. }
  9771. // SetReadCapacityUnits sets the ReadCapacityUnits field's value.
  9772. func (s *ProvisionedThroughput) SetReadCapacityUnits(v int64) *ProvisionedThroughput {
  9773. s.ReadCapacityUnits = &v
  9774. return s
  9775. }
  9776. // SetWriteCapacityUnits sets the WriteCapacityUnits field's value.
  9777. func (s *ProvisionedThroughput) SetWriteCapacityUnits(v int64) *ProvisionedThroughput {
  9778. s.WriteCapacityUnits = &v
  9779. return s
  9780. }
  9781. // Represents the provisioned throughput settings for the table, consisting
  9782. // of read and write capacity units, along with data about increases and decreases.
  9783. type ProvisionedThroughputDescription struct {
  9784. _ struct{} `type:"structure"`
  9785. // The date and time of the last provisioned throughput decrease for this table.
  9786. LastDecreaseDateTime *time.Time `type:"timestamp"`
  9787. // The date and time of the last provisioned throughput increase for this table.
  9788. LastIncreaseDateTime *time.Time `type:"timestamp"`
  9789. // The number of provisioned throughput decreases for this table during this
  9790. // UTC calendar day. For current maximums on provisioned throughput decreases,
  9791. // see Limits (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  9792. // in the Amazon DynamoDB Developer Guide.
  9793. NumberOfDecreasesToday *int64 `min:"1" type:"long"`
  9794. // The maximum number of strongly consistent reads consumed per second before
  9795. // DynamoDB returns a ThrottlingException. Eventually consistent reads require
  9796. // less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits
  9797. // per second provides 100 eventually consistent ReadCapacityUnits per second.
  9798. ReadCapacityUnits *int64 `type:"long"`
  9799. // The maximum number of writes consumed per second before DynamoDB returns
  9800. // a ThrottlingException.
  9801. WriteCapacityUnits *int64 `type:"long"`
  9802. }
  9803. // String returns the string representation
  9804. func (s ProvisionedThroughputDescription) String() string {
  9805. return awsutil.Prettify(s)
  9806. }
  9807. // GoString returns the string representation
  9808. func (s ProvisionedThroughputDescription) GoString() string {
  9809. return s.String()
  9810. }
  9811. // SetLastDecreaseDateTime sets the LastDecreaseDateTime field's value.
  9812. func (s *ProvisionedThroughputDescription) SetLastDecreaseDateTime(v time.Time) *ProvisionedThroughputDescription {
  9813. s.LastDecreaseDateTime = &v
  9814. return s
  9815. }
  9816. // SetLastIncreaseDateTime sets the LastIncreaseDateTime field's value.
  9817. func (s *ProvisionedThroughputDescription) SetLastIncreaseDateTime(v time.Time) *ProvisionedThroughputDescription {
  9818. s.LastIncreaseDateTime = &v
  9819. return s
  9820. }
  9821. // SetNumberOfDecreasesToday sets the NumberOfDecreasesToday field's value.
  9822. func (s *ProvisionedThroughputDescription) SetNumberOfDecreasesToday(v int64) *ProvisionedThroughputDescription {
  9823. s.NumberOfDecreasesToday = &v
  9824. return s
  9825. }
  9826. // SetReadCapacityUnits sets the ReadCapacityUnits field's value.
  9827. func (s *ProvisionedThroughputDescription) SetReadCapacityUnits(v int64) *ProvisionedThroughputDescription {
  9828. s.ReadCapacityUnits = &v
  9829. return s
  9830. }
  9831. // SetWriteCapacityUnits sets the WriteCapacityUnits field's value.
  9832. func (s *ProvisionedThroughputDescription) SetWriteCapacityUnits(v int64) *ProvisionedThroughputDescription {
  9833. s.WriteCapacityUnits = &v
  9834. return s
  9835. }
  9836. // Represents a request to perform a PutItem operation.
  9837. type Put struct {
  9838. _ struct{} `type:"structure"`
  9839. // A condition that must be satisfied in order for a conditional update to succeed.
  9840. ConditionExpression *string `type:"string"`
  9841. // One or more substitution tokens for attribute names in an expression.
  9842. ExpressionAttributeNames map[string]*string `type:"map"`
  9843. // One or more values that can be substituted in an expression.
  9844. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  9845. // A map of attribute name to attribute values, representing the primary key
  9846. // of the item to be written by PutItem. All of the table's primary key attributes
  9847. // must be specified, and their data types must match those of the table's key
  9848. // schema. If any attributes are present in the item that are part of an index
  9849. // key schema for the table, their types must match the index key schema.
  9850. //
  9851. // Item is a required field
  9852. Item map[string]*AttributeValue `type:"map" required:"true"`
  9853. // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the
  9854. // Put condition fails. For ReturnValuesOnConditionCheckFailure, the valid values
  9855. // are: NONE and ALL_OLD.
  9856. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"`
  9857. // Name of the table in which to write the item.
  9858. //
  9859. // TableName is a required field
  9860. TableName *string `min:"3" type:"string" required:"true"`
  9861. }
  9862. // String returns the string representation
  9863. func (s Put) String() string {
  9864. return awsutil.Prettify(s)
  9865. }
  9866. // GoString returns the string representation
  9867. func (s Put) GoString() string {
  9868. return s.String()
  9869. }
  9870. // Validate inspects the fields of the type to determine if they are valid.
  9871. func (s *Put) Validate() error {
  9872. invalidParams := request.ErrInvalidParams{Context: "Put"}
  9873. if s.Item == nil {
  9874. invalidParams.Add(request.NewErrParamRequired("Item"))
  9875. }
  9876. if s.TableName == nil {
  9877. invalidParams.Add(request.NewErrParamRequired("TableName"))
  9878. }
  9879. if s.TableName != nil && len(*s.TableName) < 3 {
  9880. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  9881. }
  9882. if invalidParams.Len() > 0 {
  9883. return invalidParams
  9884. }
  9885. return nil
  9886. }
  9887. // SetConditionExpression sets the ConditionExpression field's value.
  9888. func (s *Put) SetConditionExpression(v string) *Put {
  9889. s.ConditionExpression = &v
  9890. return s
  9891. }
  9892. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  9893. func (s *Put) SetExpressionAttributeNames(v map[string]*string) *Put {
  9894. s.ExpressionAttributeNames = v
  9895. return s
  9896. }
  9897. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  9898. func (s *Put) SetExpressionAttributeValues(v map[string]*AttributeValue) *Put {
  9899. s.ExpressionAttributeValues = v
  9900. return s
  9901. }
  9902. // SetItem sets the Item field's value.
  9903. func (s *Put) SetItem(v map[string]*AttributeValue) *Put {
  9904. s.Item = v
  9905. return s
  9906. }
  9907. // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value.
  9908. func (s *Put) SetReturnValuesOnConditionCheckFailure(v string) *Put {
  9909. s.ReturnValuesOnConditionCheckFailure = &v
  9910. return s
  9911. }
  9912. // SetTableName sets the TableName field's value.
  9913. func (s *Put) SetTableName(v string) *Put {
  9914. s.TableName = &v
  9915. return s
  9916. }
  9917. // Represents the input of a PutItem operation.
  9918. type PutItemInput struct {
  9919. _ struct{} `type:"structure"`
  9920. // A condition that must be satisfied in order for a conditional PutItem operation
  9921. // to succeed.
  9922. //
  9923. // An expression can contain any of the following:
  9924. //
  9925. // * Functions: attribute_exists | attribute_not_exists | attribute_type
  9926. // | contains | begins_with | size
  9927. //
  9928. // These function names are case-sensitive.
  9929. //
  9930. // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  9931. //
  9932. // * Logical operators: AND | OR | NOT
  9933. //
  9934. // For more information on condition expressions, see Specifying Conditions
  9935. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  9936. // in the Amazon DynamoDB Developer Guide.
  9937. ConditionExpression *string `type:"string"`
  9938. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  9939. // see ConditionalOperator (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
  9940. // in the Amazon DynamoDB Developer Guide.
  9941. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  9942. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  9943. // see Expected (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html)
  9944. // in the Amazon DynamoDB Developer Guide.
  9945. Expected map[string]*ExpectedAttributeValue `type:"map"`
  9946. // One or more substitution tokens for attribute names in an expression. The
  9947. // following are some use cases for using ExpressionAttributeNames:
  9948. //
  9949. // * To access an attribute whose name conflicts with a DynamoDB reserved
  9950. // word.
  9951. //
  9952. // * To create a placeholder for repeating occurrences of an attribute name
  9953. // in an expression.
  9954. //
  9955. // * To prevent special characters in an attribute name from being misinterpreted
  9956. // in an expression.
  9957. //
  9958. // Use the # character in an expression to dereference an attribute name. For
  9959. // example, consider the following attribute name:
  9960. //
  9961. // * Percentile
  9962. //
  9963. // The name of this attribute conflicts with a reserved word, so it cannot be
  9964. // used directly in an expression. (For the complete list of reserved words,
  9965. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  9966. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  9967. // the following for ExpressionAttributeNames:
  9968. //
  9969. // * {"#P":"Percentile"}
  9970. //
  9971. // You could then use this substitution in an expression, as in this example:
  9972. //
  9973. // * #P = :val
  9974. //
  9975. // Tokens that begin with the : character are expression attribute values, which
  9976. // are placeholders for the actual value at runtime.
  9977. //
  9978. // For more information on expression attribute names, see Accessing Item Attributes
  9979. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  9980. // in the Amazon DynamoDB Developer Guide.
  9981. ExpressionAttributeNames map[string]*string `type:"map"`
  9982. // One or more values that can be substituted in an expression.
  9983. //
  9984. // Use the : (colon) character in an expression to dereference an attribute
  9985. // value. For example, suppose that you wanted to check whether the value of
  9986. // the ProductStatus attribute was one of the following:
  9987. //
  9988. // Available | Backordered | Discontinued
  9989. //
  9990. // You would first need to specify ExpressionAttributeValues as follows:
  9991. //
  9992. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  9993. // }
  9994. //
  9995. // You could then use these values in an expression, such as this:
  9996. //
  9997. // ProductStatus IN (:avail, :back, :disc)
  9998. //
  9999. // For more information on expression attribute values, see Specifying Conditions
  10000. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  10001. // in the Amazon DynamoDB Developer Guide.
  10002. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  10003. // A map of attribute name/value pairs, one for each attribute. Only the primary
  10004. // key attributes are required; you can optionally provide other attribute name-value
  10005. // pairs for the item.
  10006. //
  10007. // You must provide all of the attributes for the primary key. For example,
  10008. // with a simple primary key, you only need to provide a value for the partition
  10009. // key. For a composite primary key, you must provide both values for both the
  10010. // partition key and the sort key.
  10011. //
  10012. // If you specify any attributes that are part of an index key, then the data
  10013. // types for those attributes must match those of the schema in the table's
  10014. // attribute definition.
  10015. //
  10016. // For more information about primary keys, see Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey)
  10017. // in the Amazon DynamoDB Developer Guide.
  10018. //
  10019. // Each element in the Item map is an AttributeValue object.
  10020. //
  10021. // Item is a required field
  10022. Item map[string]*AttributeValue `type:"map" required:"true"`
  10023. // Determines the level of detail about provisioned throughput consumption that
  10024. // is returned in the response:
  10025. //
  10026. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  10027. // operation, together with ConsumedCapacity for each table and secondary
  10028. // index that was accessed.
  10029. //
  10030. // Note that some operations, such as GetItem and BatchGetItem, do not access
  10031. // any indexes at all. In these cases, specifying INDEXES will only return
  10032. // ConsumedCapacity information for table(s).
  10033. //
  10034. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  10035. // the operation.
  10036. //
  10037. // * NONE - No ConsumedCapacity details are included in the response.
  10038. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  10039. // Determines whether item collection metrics are returned. If set to SIZE,
  10040. // the response includes statistics about item collections, if any, that were
  10041. // modified during the operation are returned in the response. If set to NONE
  10042. // (the default), no statistics are returned.
  10043. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  10044. // Use ReturnValues if you want to get the item attributes as they appeared
  10045. // before they were updated with the PutItem request. For PutItem, the valid
  10046. // values are:
  10047. //
  10048. // * NONE - If ReturnValues is not specified, or if its value is NONE, then
  10049. // nothing is returned. (This setting is the default for ReturnValues.)
  10050. //
  10051. // * ALL_OLD - If PutItem overwrote an attribute name-value pair, then the
  10052. // content of the old item is returned.
  10053. //
  10054. // The ReturnValues parameter is used by several DynamoDB operations; however,
  10055. // PutItem does not recognize any values other than NONE or ALL_OLD.
  10056. ReturnValues *string `type:"string" enum:"ReturnValue"`
  10057. // The name of the table to contain the item.
  10058. //
  10059. // TableName is a required field
  10060. TableName *string `min:"3" type:"string" required:"true"`
  10061. }
  10062. // String returns the string representation
  10063. func (s PutItemInput) String() string {
  10064. return awsutil.Prettify(s)
  10065. }
  10066. // GoString returns the string representation
  10067. func (s PutItemInput) GoString() string {
  10068. return s.String()
  10069. }
  10070. // Validate inspects the fields of the type to determine if they are valid.
  10071. func (s *PutItemInput) Validate() error {
  10072. invalidParams := request.ErrInvalidParams{Context: "PutItemInput"}
  10073. if s.Item == nil {
  10074. invalidParams.Add(request.NewErrParamRequired("Item"))
  10075. }
  10076. if s.TableName == nil {
  10077. invalidParams.Add(request.NewErrParamRequired("TableName"))
  10078. }
  10079. if s.TableName != nil && len(*s.TableName) < 3 {
  10080. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  10081. }
  10082. if invalidParams.Len() > 0 {
  10083. return invalidParams
  10084. }
  10085. return nil
  10086. }
  10087. // SetConditionExpression sets the ConditionExpression field's value.
  10088. func (s *PutItemInput) SetConditionExpression(v string) *PutItemInput {
  10089. s.ConditionExpression = &v
  10090. return s
  10091. }
  10092. // SetConditionalOperator sets the ConditionalOperator field's value.
  10093. func (s *PutItemInput) SetConditionalOperator(v string) *PutItemInput {
  10094. s.ConditionalOperator = &v
  10095. return s
  10096. }
  10097. // SetExpected sets the Expected field's value.
  10098. func (s *PutItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *PutItemInput {
  10099. s.Expected = v
  10100. return s
  10101. }
  10102. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  10103. func (s *PutItemInput) SetExpressionAttributeNames(v map[string]*string) *PutItemInput {
  10104. s.ExpressionAttributeNames = v
  10105. return s
  10106. }
  10107. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  10108. func (s *PutItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *PutItemInput {
  10109. s.ExpressionAttributeValues = v
  10110. return s
  10111. }
  10112. // SetItem sets the Item field's value.
  10113. func (s *PutItemInput) SetItem(v map[string]*AttributeValue) *PutItemInput {
  10114. s.Item = v
  10115. return s
  10116. }
  10117. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  10118. func (s *PutItemInput) SetReturnConsumedCapacity(v string) *PutItemInput {
  10119. s.ReturnConsumedCapacity = &v
  10120. return s
  10121. }
  10122. // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value.
  10123. func (s *PutItemInput) SetReturnItemCollectionMetrics(v string) *PutItemInput {
  10124. s.ReturnItemCollectionMetrics = &v
  10125. return s
  10126. }
  10127. // SetReturnValues sets the ReturnValues field's value.
  10128. func (s *PutItemInput) SetReturnValues(v string) *PutItemInput {
  10129. s.ReturnValues = &v
  10130. return s
  10131. }
  10132. // SetTableName sets the TableName field's value.
  10133. func (s *PutItemInput) SetTableName(v string) *PutItemInput {
  10134. s.TableName = &v
  10135. return s
  10136. }
  10137. // Represents the output of a PutItem operation.
  10138. type PutItemOutput struct {
  10139. _ struct{} `type:"structure"`
  10140. // The attribute values as they appeared before the PutItem operation, but only
  10141. // if ReturnValues is specified as ALL_OLD in the request. Each element consists
  10142. // of an attribute name and an attribute value.
  10143. Attributes map[string]*AttributeValue `type:"map"`
  10144. // The capacity units consumed by the PutItem operation. The data returned includes
  10145. // the total provisioned throughput consumed, along with statistics for the
  10146. // table and any indexes involved in the operation. ConsumedCapacity is only
  10147. // returned if the ReturnConsumedCapacity parameter was specified. For more
  10148. // information, see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  10149. // in the Amazon DynamoDB Developer Guide.
  10150. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  10151. // Information about item collections, if any, that were affected by the PutItem
  10152. // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics
  10153. // parameter was specified. If the table does not have any local secondary indexes,
  10154. // this information is not returned in the response.
  10155. //
  10156. // Each ItemCollectionMetrics element consists of:
  10157. //
  10158. // * ItemCollectionKey - The partition key value of the item collection.
  10159. // This is the same as the partition key value of the item itself.
  10160. //
  10161. // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes.
  10162. // This value is a two-element array containing a lower bound and an upper
  10163. // bound for the estimate. The estimate includes the size of all the items
  10164. // in the table, plus the size of all attributes projected into all of the
  10165. // local secondary indexes on that table. Use this estimate to measure whether
  10166. // a local secondary index is approaching its size limit.
  10167. //
  10168. // The estimate is subject to change over time; therefore, do not rely on the
  10169. // precision or accuracy of the estimate.
  10170. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  10171. }
  10172. // String returns the string representation
  10173. func (s PutItemOutput) String() string {
  10174. return awsutil.Prettify(s)
  10175. }
  10176. // GoString returns the string representation
  10177. func (s PutItemOutput) GoString() string {
  10178. return s.String()
  10179. }
  10180. // SetAttributes sets the Attributes field's value.
  10181. func (s *PutItemOutput) SetAttributes(v map[string]*AttributeValue) *PutItemOutput {
  10182. s.Attributes = v
  10183. return s
  10184. }
  10185. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  10186. func (s *PutItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *PutItemOutput {
  10187. s.ConsumedCapacity = v
  10188. return s
  10189. }
  10190. // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value.
  10191. func (s *PutItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *PutItemOutput {
  10192. s.ItemCollectionMetrics = v
  10193. return s
  10194. }
  10195. // Represents a request to perform a PutItem operation on an item.
  10196. type PutRequest struct {
  10197. _ struct{} `type:"structure"`
  10198. // A map of attribute name to attribute values, representing the primary key
  10199. // of an item to be processed by PutItem. All of the table's primary key attributes
  10200. // must be specified, and their data types must match those of the table's key
  10201. // schema. If any attributes are present in the item which are part of an index
  10202. // key schema for the table, their types must match the index key schema.
  10203. //
  10204. // Item is a required field
  10205. Item map[string]*AttributeValue `type:"map" required:"true"`
  10206. }
  10207. // String returns the string representation
  10208. func (s PutRequest) String() string {
  10209. return awsutil.Prettify(s)
  10210. }
  10211. // GoString returns the string representation
  10212. func (s PutRequest) GoString() string {
  10213. return s.String()
  10214. }
  10215. // SetItem sets the Item field's value.
  10216. func (s *PutRequest) SetItem(v map[string]*AttributeValue) *PutRequest {
  10217. s.Item = v
  10218. return s
  10219. }
  10220. // Represents the input of a Query operation.
  10221. type QueryInput struct {
  10222. _ struct{} `type:"structure"`
  10223. // This is a legacy parameter. Use ProjectionExpression instead. For more information,
  10224. // see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html)
  10225. // in the Amazon DynamoDB Developer Guide.
  10226. AttributesToGet []*string `min:"1" type:"list"`
  10227. // This is a legacy parameter. Use FilterExpression instead. For more information,
  10228. // see ConditionalOperator (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
  10229. // in the Amazon DynamoDB Developer Guide.
  10230. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  10231. // Determines the read consistency model: If set to true, then the operation
  10232. // uses strongly consistent reads; otherwise, the operation uses eventually
  10233. // consistent reads.
  10234. //
  10235. // Strongly consistent reads are not supported on global secondary indexes.
  10236. // If you query a global secondary index with ConsistentRead set to true, you
  10237. // will receive a ValidationException.
  10238. ConsistentRead *bool `type:"boolean"`
  10239. // The primary key of the first item that this operation will evaluate. Use
  10240. // the value that was returned for LastEvaluatedKey in the previous operation.
  10241. //
  10242. // The data type for ExclusiveStartKey must be String, Number or Binary. No
  10243. // set data types are allowed.
  10244. ExclusiveStartKey map[string]*AttributeValue `type:"map"`
  10245. // One or more substitution tokens for attribute names in an expression. The
  10246. // following are some use cases for using ExpressionAttributeNames:
  10247. //
  10248. // * To access an attribute whose name conflicts with a DynamoDB reserved
  10249. // word.
  10250. //
  10251. // * To create a placeholder for repeating occurrences of an attribute name
  10252. // in an expression.
  10253. //
  10254. // * To prevent special characters in an attribute name from being misinterpreted
  10255. // in an expression.
  10256. //
  10257. // Use the # character in an expression to dereference an attribute name. For
  10258. // example, consider the following attribute name:
  10259. //
  10260. // * Percentile
  10261. //
  10262. // The name of this attribute conflicts with a reserved word, so it cannot be
  10263. // used directly in an expression. (For the complete list of reserved words,
  10264. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  10265. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  10266. // the following for ExpressionAttributeNames:
  10267. //
  10268. // * {"#P":"Percentile"}
  10269. //
  10270. // You could then use this substitution in an expression, as in this example:
  10271. //
  10272. // * #P = :val
  10273. //
  10274. // Tokens that begin with the : character are expression attribute values, which
  10275. // are placeholders for the actual value at runtime.
  10276. //
  10277. // For more information on expression attribute names, see Accessing Item Attributes
  10278. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  10279. // in the Amazon DynamoDB Developer Guide.
  10280. ExpressionAttributeNames map[string]*string `type:"map"`
  10281. // One or more values that can be substituted in an expression.
  10282. //
  10283. // Use the : (colon) character in an expression to dereference an attribute
  10284. // value. For example, suppose that you wanted to check whether the value of
  10285. // the ProductStatus attribute was one of the following:
  10286. //
  10287. // Available | Backordered | Discontinued
  10288. //
  10289. // You would first need to specify ExpressionAttributeValues as follows:
  10290. //
  10291. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  10292. // }
  10293. //
  10294. // You could then use these values in an expression, such as this:
  10295. //
  10296. // ProductStatus IN (:avail, :back, :disc)
  10297. //
  10298. // For more information on expression attribute values, see Specifying Conditions
  10299. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  10300. // in the Amazon DynamoDB Developer Guide.
  10301. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  10302. // A string that contains conditions that DynamoDB applies after the Query operation,
  10303. // but before the data is returned to you. Items that do not satisfy the FilterExpression
  10304. // criteria are not returned.
  10305. //
  10306. // A FilterExpression does not allow key attributes. You cannot define a filter
  10307. // expression based on a partition key or a sort key.
  10308. //
  10309. // A FilterExpression is applied after the items have already been read; the
  10310. // process of filtering does not consume any additional read capacity units.
  10311. //
  10312. // For more information, see Filter Expressions (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults)
  10313. // in the Amazon DynamoDB Developer Guide.
  10314. FilterExpression *string `type:"string"`
  10315. // The name of an index to query. This index can be any local secondary index
  10316. // or global secondary index on the table. Note that if you use the IndexName
  10317. // parameter, you must also provide TableName.
  10318. IndexName *string `min:"3" type:"string"`
  10319. // The condition that specifies the key value(s) for items to be retrieved by
  10320. // the Query action.
  10321. //
  10322. // The condition must perform an equality test on a single partition key value.
  10323. //
  10324. // The condition can optionally perform one of several comparison tests on a
  10325. // single sort key value. This allows Query to retrieve one item with a given
  10326. // partition key value and sort key value, or several items that have the same
  10327. // partition key value but different sort key values.
  10328. //
  10329. // The partition key equality test is required, and must be specified in the
  10330. // following format:
  10331. //
  10332. // partitionKeyName=:partitionkeyval
  10333. //
  10334. // If you also want to provide a condition for the sort key, it must be combined
  10335. // using AND with the condition for the sort key. Following is an example, using
  10336. // the = comparison operator for the sort key:
  10337. //
  10338. // partitionKeyName=:partitionkeyvalANDsortKeyName=:sortkeyval
  10339. //
  10340. // Valid comparisons for the sort key condition are as follows:
  10341. //
  10342. // * sortKeyName=:sortkeyval - true if the sort key value is equal to :sortkeyval.
  10343. //
  10344. // * sortKeyName<:sortkeyval - true if the sort key value is less than :sortkeyval.
  10345. //
  10346. // * sortKeyName<=:sortkeyval - true if the sort key value is less than or
  10347. // equal to :sortkeyval.
  10348. //
  10349. // * sortKeyName>:sortkeyval - true if the sort key value is greater than
  10350. // :sortkeyval.
  10351. //
  10352. // * sortKeyName>= :sortkeyval - true if the sort key value is greater than
  10353. // or equal to :sortkeyval.
  10354. //
  10355. // * sortKeyNameBETWEEN:sortkeyval1AND:sortkeyval2 - true if the sort key
  10356. // value is greater than or equal to :sortkeyval1, and less than or equal
  10357. // to :sortkeyval2.
  10358. //
  10359. // * begins_with (sortKeyName, :sortkeyval) - true if the sort key value
  10360. // begins with a particular operand. (You cannot use this function with a
  10361. // sort key that is of type Number.) Note that the function name begins_with
  10362. // is case-sensitive.
  10363. //
  10364. // Use the ExpressionAttributeValues parameter to replace tokens such as :partitionval
  10365. // and :sortval with actual values at runtime.
  10366. //
  10367. // You can optionally use the ExpressionAttributeNames parameter to replace
  10368. // the names of the partition key and sort key with placeholder tokens. This
  10369. // option might be necessary if an attribute name conflicts with a DynamoDB
  10370. // reserved word. For example, the following KeyConditionExpression parameter
  10371. // causes an error because Size is a reserved word:
  10372. //
  10373. // * Size = :myval
  10374. //
  10375. // To work around this, define a placeholder (such a #S) to represent the attribute
  10376. // name Size. KeyConditionExpression then is as follows:
  10377. //
  10378. // * #S = :myval
  10379. //
  10380. // For a list of reserved words, see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  10381. // in the Amazon DynamoDB Developer Guide.
  10382. //
  10383. // For more information on ExpressionAttributeNames and ExpressionAttributeValues,
  10384. // see Using Placeholders for Attribute Names and Values (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html)
  10385. // in the Amazon DynamoDB Developer Guide.
  10386. KeyConditionExpression *string `type:"string"`
  10387. // This is a legacy parameter. Use KeyConditionExpression instead. For more
  10388. // information, see KeyConditions (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html)
  10389. // in the Amazon DynamoDB Developer Guide.
  10390. KeyConditions map[string]*Condition `type:"map"`
  10391. // The maximum number of items to evaluate (not necessarily the number of matching
  10392. // items). If DynamoDB processes the number of items up to the limit while processing
  10393. // the results, it stops the operation and returns the matching values up to
  10394. // that point, and a key in LastEvaluatedKey to apply in a subsequent operation,
  10395. // so that you can pick up where you left off. Also, if the processed data set
  10396. // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation
  10397. // and returns the matching values up to the limit, and a key in LastEvaluatedKey
  10398. // to apply in a subsequent operation to continue the operation. For more information,
  10399. // see Query and Scan (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html)
  10400. // in the Amazon DynamoDB Developer Guide.
  10401. Limit *int64 `min:"1" type:"integer"`
  10402. // A string that identifies one or more attributes to retrieve from the table.
  10403. // These attributes can include scalars, sets, or elements of a JSON document.
  10404. // The attributes in the expression must be separated by commas.
  10405. //
  10406. // If no attribute names are specified, then all attributes will be returned.
  10407. // If any of the requested attributes are not found, they will not appear in
  10408. // the result.
  10409. //
  10410. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  10411. // in the Amazon DynamoDB Developer Guide.
  10412. ProjectionExpression *string `type:"string"`
  10413. // This is a legacy parameter. Use FilterExpression instead. For more information,
  10414. // see QueryFilter (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.QueryFilter.html)
  10415. // in the Amazon DynamoDB Developer Guide.
  10416. QueryFilter map[string]*Condition `type:"map"`
  10417. // Determines the level of detail about provisioned throughput consumption that
  10418. // is returned in the response:
  10419. //
  10420. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  10421. // operation, together with ConsumedCapacity for each table and secondary
  10422. // index that was accessed.
  10423. //
  10424. // Note that some operations, such as GetItem and BatchGetItem, do not access
  10425. // any indexes at all. In these cases, specifying INDEXES will only return
  10426. // ConsumedCapacity information for table(s).
  10427. //
  10428. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  10429. // the operation.
  10430. //
  10431. // * NONE - No ConsumedCapacity details are included in the response.
  10432. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  10433. // Specifies the order for index traversal: If true (default), the traversal
  10434. // is performed in ascending order; if false, the traversal is performed in
  10435. // descending order.
  10436. //
  10437. // Items with the same partition key value are stored in sorted order by sort
  10438. // key. If the sort key data type is Number, the results are stored in numeric
  10439. // order. For type String, the results are stored in order of UTF-8 bytes. For
  10440. // type Binary, DynamoDB treats each byte of the binary data as unsigned.
  10441. //
  10442. // If ScanIndexForward is true, DynamoDB returns the results in the order in
  10443. // which they are stored (by sort key value). This is the default behavior.
  10444. // If ScanIndexForward is false, DynamoDB reads the results in reverse order
  10445. // by sort key value, and then returns the results to the client.
  10446. ScanIndexForward *bool `type:"boolean"`
  10447. // The attributes to be returned in the result. You can retrieve all item attributes,
  10448. // specific item attributes, the count of matching items, or in the case of
  10449. // an index, some or all of the attributes projected into the index.
  10450. //
  10451. // * ALL_ATTRIBUTES - Returns all of the item attributes from the specified
  10452. // table or index. If you query a local secondary index, then for each matching
  10453. // item in the index DynamoDB will fetch the entire item from the parent
  10454. // table. If the index is configured to project all item attributes, then
  10455. // all of the data can be obtained from the local secondary index, and no
  10456. // fetching is required.
  10457. //
  10458. // * ALL_PROJECTED_ATTRIBUTES - Allowed only when querying an index. Retrieves
  10459. // all attributes that have been projected into the index. If the index is
  10460. // configured to project all attributes, this return value is equivalent
  10461. // to specifying ALL_ATTRIBUTES.
  10462. //
  10463. // * COUNT - Returns the number of matching items, rather than the matching
  10464. // items themselves.
  10465. //
  10466. // * SPECIFIC_ATTRIBUTES - Returns only the attributes listed in AttributesToGet.
  10467. // This return value is equivalent to specifying AttributesToGet without
  10468. // specifying any value for Select.
  10469. //
  10470. // If you query or scan a local secondary index and request only attributes
  10471. // that are projected into that index, the operation will read only the index
  10472. // and not the table. If any of the requested attributes are not projected
  10473. // into the local secondary index, DynamoDB will fetch each of these attributes
  10474. // from the parent table. This extra fetching incurs additional throughput
  10475. // cost and latency.
  10476. //
  10477. // If you query or scan a global secondary index, you can only request attributes
  10478. // that are projected into the index. Global secondary index queries cannot
  10479. // fetch attributes from the parent table.
  10480. //
  10481. // If neither Select nor AttributesToGet are specified, DynamoDB defaults to
  10482. // ALL_ATTRIBUTES when accessing a table, and ALL_PROJECTED_ATTRIBUTES when
  10483. // accessing an index. You cannot use both Select and AttributesToGet together
  10484. // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES.
  10485. // (This usage is equivalent to specifying AttributesToGet without any value
  10486. // for Select.)
  10487. //
  10488. // If you use the ProjectionExpression parameter, then the value for Select
  10489. // can only be SPECIFIC_ATTRIBUTES. Any other value for Select will return an
  10490. // error.
  10491. Select *string `type:"string" enum:"Select"`
  10492. // The name of the table containing the requested items.
  10493. //
  10494. // TableName is a required field
  10495. TableName *string `min:"3" type:"string" required:"true"`
  10496. }
  10497. // String returns the string representation
  10498. func (s QueryInput) String() string {
  10499. return awsutil.Prettify(s)
  10500. }
  10501. // GoString returns the string representation
  10502. func (s QueryInput) GoString() string {
  10503. return s.String()
  10504. }
  10505. // Validate inspects the fields of the type to determine if they are valid.
  10506. func (s *QueryInput) Validate() error {
  10507. invalidParams := request.ErrInvalidParams{Context: "QueryInput"}
  10508. if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 {
  10509. invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1))
  10510. }
  10511. if s.IndexName != nil && len(*s.IndexName) < 3 {
  10512. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  10513. }
  10514. if s.Limit != nil && *s.Limit < 1 {
  10515. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  10516. }
  10517. if s.TableName == nil {
  10518. invalidParams.Add(request.NewErrParamRequired("TableName"))
  10519. }
  10520. if s.TableName != nil && len(*s.TableName) < 3 {
  10521. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  10522. }
  10523. if s.KeyConditions != nil {
  10524. for i, v := range s.KeyConditions {
  10525. if v == nil {
  10526. continue
  10527. }
  10528. if err := v.Validate(); err != nil {
  10529. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "KeyConditions", i), err.(request.ErrInvalidParams))
  10530. }
  10531. }
  10532. }
  10533. if s.QueryFilter != nil {
  10534. for i, v := range s.QueryFilter {
  10535. if v == nil {
  10536. continue
  10537. }
  10538. if err := v.Validate(); err != nil {
  10539. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueryFilter", i), err.(request.ErrInvalidParams))
  10540. }
  10541. }
  10542. }
  10543. if invalidParams.Len() > 0 {
  10544. return invalidParams
  10545. }
  10546. return nil
  10547. }
  10548. // SetAttributesToGet sets the AttributesToGet field's value.
  10549. func (s *QueryInput) SetAttributesToGet(v []*string) *QueryInput {
  10550. s.AttributesToGet = v
  10551. return s
  10552. }
  10553. // SetConditionalOperator sets the ConditionalOperator field's value.
  10554. func (s *QueryInput) SetConditionalOperator(v string) *QueryInput {
  10555. s.ConditionalOperator = &v
  10556. return s
  10557. }
  10558. // SetConsistentRead sets the ConsistentRead field's value.
  10559. func (s *QueryInput) SetConsistentRead(v bool) *QueryInput {
  10560. s.ConsistentRead = &v
  10561. return s
  10562. }
  10563. // SetExclusiveStartKey sets the ExclusiveStartKey field's value.
  10564. func (s *QueryInput) SetExclusiveStartKey(v map[string]*AttributeValue) *QueryInput {
  10565. s.ExclusiveStartKey = v
  10566. return s
  10567. }
  10568. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  10569. func (s *QueryInput) SetExpressionAttributeNames(v map[string]*string) *QueryInput {
  10570. s.ExpressionAttributeNames = v
  10571. return s
  10572. }
  10573. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  10574. func (s *QueryInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *QueryInput {
  10575. s.ExpressionAttributeValues = v
  10576. return s
  10577. }
  10578. // SetFilterExpression sets the FilterExpression field's value.
  10579. func (s *QueryInput) SetFilterExpression(v string) *QueryInput {
  10580. s.FilterExpression = &v
  10581. return s
  10582. }
  10583. // SetIndexName sets the IndexName field's value.
  10584. func (s *QueryInput) SetIndexName(v string) *QueryInput {
  10585. s.IndexName = &v
  10586. return s
  10587. }
  10588. // SetKeyConditionExpression sets the KeyConditionExpression field's value.
  10589. func (s *QueryInput) SetKeyConditionExpression(v string) *QueryInput {
  10590. s.KeyConditionExpression = &v
  10591. return s
  10592. }
  10593. // SetKeyConditions sets the KeyConditions field's value.
  10594. func (s *QueryInput) SetKeyConditions(v map[string]*Condition) *QueryInput {
  10595. s.KeyConditions = v
  10596. return s
  10597. }
  10598. // SetLimit sets the Limit field's value.
  10599. func (s *QueryInput) SetLimit(v int64) *QueryInput {
  10600. s.Limit = &v
  10601. return s
  10602. }
  10603. // SetProjectionExpression sets the ProjectionExpression field's value.
  10604. func (s *QueryInput) SetProjectionExpression(v string) *QueryInput {
  10605. s.ProjectionExpression = &v
  10606. return s
  10607. }
  10608. // SetQueryFilter sets the QueryFilter field's value.
  10609. func (s *QueryInput) SetQueryFilter(v map[string]*Condition) *QueryInput {
  10610. s.QueryFilter = v
  10611. return s
  10612. }
  10613. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  10614. func (s *QueryInput) SetReturnConsumedCapacity(v string) *QueryInput {
  10615. s.ReturnConsumedCapacity = &v
  10616. return s
  10617. }
  10618. // SetScanIndexForward sets the ScanIndexForward field's value.
  10619. func (s *QueryInput) SetScanIndexForward(v bool) *QueryInput {
  10620. s.ScanIndexForward = &v
  10621. return s
  10622. }
  10623. // SetSelect sets the Select field's value.
  10624. func (s *QueryInput) SetSelect(v string) *QueryInput {
  10625. s.Select = &v
  10626. return s
  10627. }
  10628. // SetTableName sets the TableName field's value.
  10629. func (s *QueryInput) SetTableName(v string) *QueryInput {
  10630. s.TableName = &v
  10631. return s
  10632. }
  10633. // Represents the output of a Query operation.
  10634. type QueryOutput struct {
  10635. _ struct{} `type:"structure"`
  10636. // The capacity units consumed by the Query operation. The data returned includes
  10637. // the total provisioned throughput consumed, along with statistics for the
  10638. // table and any indexes involved in the operation. ConsumedCapacity is only
  10639. // returned if the ReturnConsumedCapacity parameter was specified For more information,
  10640. // see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  10641. // in the Amazon DynamoDB Developer Guide.
  10642. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  10643. // The number of items in the response.
  10644. //
  10645. // If you used a QueryFilter in the request, then Count is the number of items
  10646. // returned after the filter was applied, and ScannedCount is the number of
  10647. // matching items before the filter was applied.
  10648. //
  10649. // If you did not use a filter in the request, then Count and ScannedCount are
  10650. // the same.
  10651. Count *int64 `type:"integer"`
  10652. // An array of item attributes that match the query criteria. Each element in
  10653. // this array consists of an attribute name and the value for that attribute.
  10654. Items []map[string]*AttributeValue `type:"list"`
  10655. // The primary key of the item where the operation stopped, inclusive of the
  10656. // previous result set. Use this value to start a new operation, excluding this
  10657. // value in the new request.
  10658. //
  10659. // If LastEvaluatedKey is empty, then the "last page" of results has been processed
  10660. // and there is no more data to be retrieved.
  10661. //
  10662. // If LastEvaluatedKey is not empty, it does not necessarily mean that there
  10663. // is more data in the result set. The only way to know when you have reached
  10664. // the end of the result set is when LastEvaluatedKey is empty.
  10665. LastEvaluatedKey map[string]*AttributeValue `type:"map"`
  10666. // The number of items evaluated, before any QueryFilter is applied. A high
  10667. // ScannedCount value with few, or no, Count results indicates an inefficient
  10668. // Query operation. For more information, see Count and ScannedCount (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count)
  10669. // in the Amazon DynamoDB Developer Guide.
  10670. //
  10671. // If you did not use a filter in the request, then ScannedCount is the same
  10672. // as Count.
  10673. ScannedCount *int64 `type:"integer"`
  10674. }
  10675. // String returns the string representation
  10676. func (s QueryOutput) String() string {
  10677. return awsutil.Prettify(s)
  10678. }
  10679. // GoString returns the string representation
  10680. func (s QueryOutput) GoString() string {
  10681. return s.String()
  10682. }
  10683. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  10684. func (s *QueryOutput) SetConsumedCapacity(v *ConsumedCapacity) *QueryOutput {
  10685. s.ConsumedCapacity = v
  10686. return s
  10687. }
  10688. // SetCount sets the Count field's value.
  10689. func (s *QueryOutput) SetCount(v int64) *QueryOutput {
  10690. s.Count = &v
  10691. return s
  10692. }
  10693. // SetItems sets the Items field's value.
  10694. func (s *QueryOutput) SetItems(v []map[string]*AttributeValue) *QueryOutput {
  10695. s.Items = v
  10696. return s
  10697. }
  10698. // SetLastEvaluatedKey sets the LastEvaluatedKey field's value.
  10699. func (s *QueryOutput) SetLastEvaluatedKey(v map[string]*AttributeValue) *QueryOutput {
  10700. s.LastEvaluatedKey = v
  10701. return s
  10702. }
  10703. // SetScannedCount sets the ScannedCount field's value.
  10704. func (s *QueryOutput) SetScannedCount(v int64) *QueryOutput {
  10705. s.ScannedCount = &v
  10706. return s
  10707. }
  10708. // Represents the properties of a replica.
  10709. type Replica struct {
  10710. _ struct{} `type:"structure"`
  10711. // The region where the replica needs to be created.
  10712. RegionName *string `type:"string"`
  10713. }
  10714. // String returns the string representation
  10715. func (s Replica) String() string {
  10716. return awsutil.Prettify(s)
  10717. }
  10718. // GoString returns the string representation
  10719. func (s Replica) GoString() string {
  10720. return s.String()
  10721. }
  10722. // SetRegionName sets the RegionName field's value.
  10723. func (s *Replica) SetRegionName(v string) *Replica {
  10724. s.RegionName = &v
  10725. return s
  10726. }
  10727. // Contains the details of the replica.
  10728. type ReplicaDescription struct {
  10729. _ struct{} `type:"structure"`
  10730. // The name of the region.
  10731. RegionName *string `type:"string"`
  10732. }
  10733. // String returns the string representation
  10734. func (s ReplicaDescription) String() string {
  10735. return awsutil.Prettify(s)
  10736. }
  10737. // GoString returns the string representation
  10738. func (s ReplicaDescription) GoString() string {
  10739. return s.String()
  10740. }
  10741. // SetRegionName sets the RegionName field's value.
  10742. func (s *ReplicaDescription) SetRegionName(v string) *ReplicaDescription {
  10743. s.RegionName = &v
  10744. return s
  10745. }
  10746. // Represents the properties of a global secondary index.
  10747. type ReplicaGlobalSecondaryIndexSettingsDescription struct {
  10748. _ struct{} `type:"structure"`
  10749. // The name of the global secondary index. The name must be unique among all
  10750. // other indexes on this table.
  10751. //
  10752. // IndexName is a required field
  10753. IndexName *string `min:"3" type:"string" required:"true"`
  10754. // The current status of the global secondary index:
  10755. //
  10756. // * CREATING - The global secondary index is being created.
  10757. //
  10758. // * UPDATING - The global secondary index is being updated.
  10759. //
  10760. // * DELETING - The global secondary index is being deleted.
  10761. //
  10762. // * ACTIVE - The global secondary index is ready for use.
  10763. IndexStatus *string `type:"string" enum:"IndexStatus"`
  10764. // Autoscaling settings for a global secondary index replica's read capacity
  10765. // units.
  10766. ProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
  10767. // The maximum number of strongly consistent reads consumed per second before
  10768. // DynamoDB returns a ThrottlingException.
  10769. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"`
  10770. // AutoScaling settings for a global secondary index replica's write capacity
  10771. // units.
  10772. ProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
  10773. // The maximum number of writes consumed per second before DynamoDB returns
  10774. // a ThrottlingException.
  10775. ProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"`
  10776. }
  10777. // String returns the string representation
  10778. func (s ReplicaGlobalSecondaryIndexSettingsDescription) String() string {
  10779. return awsutil.Prettify(s)
  10780. }
  10781. // GoString returns the string representation
  10782. func (s ReplicaGlobalSecondaryIndexSettingsDescription) GoString() string {
  10783. return s.String()
  10784. }
  10785. // SetIndexName sets the IndexName field's value.
  10786. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10787. s.IndexName = &v
  10788. return s
  10789. }
  10790. // SetIndexStatus sets the IndexStatus field's value.
  10791. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetIndexStatus(v string) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10792. s.IndexStatus = &v
  10793. return s
  10794. }
  10795. // SetProvisionedReadCapacityAutoScalingSettings sets the ProvisionedReadCapacityAutoScalingSettings field's value.
  10796. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10797. s.ProvisionedReadCapacityAutoScalingSettings = v
  10798. return s
  10799. }
  10800. // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value.
  10801. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10802. s.ProvisionedReadCapacityUnits = &v
  10803. return s
  10804. }
  10805. // SetProvisionedWriteCapacityAutoScalingSettings sets the ProvisionedWriteCapacityAutoScalingSettings field's value.
  10806. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10807. s.ProvisionedWriteCapacityAutoScalingSettings = v
  10808. return s
  10809. }
  10810. // SetProvisionedWriteCapacityUnits sets the ProvisionedWriteCapacityUnits field's value.
  10811. func (s *ReplicaGlobalSecondaryIndexSettingsDescription) SetProvisionedWriteCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsDescription {
  10812. s.ProvisionedWriteCapacityUnits = &v
  10813. return s
  10814. }
  10815. // Represents the settings of a global secondary index for a global table that
  10816. // will be modified.
  10817. type ReplicaGlobalSecondaryIndexSettingsUpdate struct {
  10818. _ struct{} `type:"structure"`
  10819. // The name of the global secondary index. The name must be unique among all
  10820. // other indexes on this table.
  10821. //
  10822. // IndexName is a required field
  10823. IndexName *string `min:"3" type:"string" required:"true"`
  10824. // Autoscaling settings for managing a global secondary index replica's read
  10825. // capacity units.
  10826. ProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
  10827. // The maximum number of strongly consistent reads consumed per second before
  10828. // DynamoDB returns a ThrottlingException.
  10829. ProvisionedReadCapacityUnits *int64 `min:"1" type:"long"`
  10830. }
  10831. // String returns the string representation
  10832. func (s ReplicaGlobalSecondaryIndexSettingsUpdate) String() string {
  10833. return awsutil.Prettify(s)
  10834. }
  10835. // GoString returns the string representation
  10836. func (s ReplicaGlobalSecondaryIndexSettingsUpdate) GoString() string {
  10837. return s.String()
  10838. }
  10839. // Validate inspects the fields of the type to determine if they are valid.
  10840. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) Validate() error {
  10841. invalidParams := request.ErrInvalidParams{Context: "ReplicaGlobalSecondaryIndexSettingsUpdate"}
  10842. if s.IndexName == nil {
  10843. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  10844. }
  10845. if s.IndexName != nil && len(*s.IndexName) < 3 {
  10846. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  10847. }
  10848. if s.ProvisionedReadCapacityUnits != nil && *s.ProvisionedReadCapacityUnits < 1 {
  10849. invalidParams.Add(request.NewErrParamMinValue("ProvisionedReadCapacityUnits", 1))
  10850. }
  10851. if s.ProvisionedReadCapacityAutoScalingSettingsUpdate != nil {
  10852. if err := s.ProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil {
  10853. invalidParams.AddNested("ProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams))
  10854. }
  10855. }
  10856. if invalidParams.Len() > 0 {
  10857. return invalidParams
  10858. }
  10859. return nil
  10860. }
  10861. // SetIndexName sets the IndexName field's value.
  10862. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetIndexName(v string) *ReplicaGlobalSecondaryIndexSettingsUpdate {
  10863. s.IndexName = &v
  10864. return s
  10865. }
  10866. // SetProvisionedReadCapacityAutoScalingSettingsUpdate sets the ProvisionedReadCapacityAutoScalingSettingsUpdate field's value.
  10867. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaGlobalSecondaryIndexSettingsUpdate {
  10868. s.ProvisionedReadCapacityAutoScalingSettingsUpdate = v
  10869. return s
  10870. }
  10871. // SetProvisionedReadCapacityUnits sets the ProvisionedReadCapacityUnits field's value.
  10872. func (s *ReplicaGlobalSecondaryIndexSettingsUpdate) SetProvisionedReadCapacityUnits(v int64) *ReplicaGlobalSecondaryIndexSettingsUpdate {
  10873. s.ProvisionedReadCapacityUnits = &v
  10874. return s
  10875. }
  10876. // Represents the properties of a replica.
  10877. type ReplicaSettingsDescription struct {
  10878. _ struct{} `type:"structure"`
  10879. // The region name of the replica.
  10880. //
  10881. // RegionName is a required field
  10882. RegionName *string `type:"string" required:"true"`
  10883. // The read/write capacity mode of the replica.
  10884. ReplicaBillingModeSummary *BillingModeSummary `type:"structure"`
  10885. // Replica global secondary index settings for the global table.
  10886. ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"`
  10887. // Autoscaling settings for a global table replica's read capacity units.
  10888. ReplicaProvisionedReadCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
  10889. // The maximum number of strongly consistent reads consumed per second before
  10890. // DynamoDB returns a ThrottlingException. For more information, see Specifying
  10891. // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  10892. // in the Amazon DynamoDB Developer Guide.
  10893. ReplicaProvisionedReadCapacityUnits *int64 `type:"long"`
  10894. // AutoScaling settings for a global table replica's write capacity units.
  10895. ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"`
  10896. // The maximum number of writes consumed per second before DynamoDB returns
  10897. // a ThrottlingException. For more information, see Specifying Read and Write
  10898. // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  10899. // in the Amazon DynamoDB Developer Guide.
  10900. ReplicaProvisionedWriteCapacityUnits *int64 `type:"long"`
  10901. // The current state of the region:
  10902. //
  10903. // * CREATING - The region is being created.
  10904. //
  10905. // * UPDATING - The region is being updated.
  10906. //
  10907. // * DELETING - The region is being deleted.
  10908. //
  10909. // * ACTIVE - The region is ready for use.
  10910. ReplicaStatus *string `type:"string" enum:"ReplicaStatus"`
  10911. }
  10912. // String returns the string representation
  10913. func (s ReplicaSettingsDescription) String() string {
  10914. return awsutil.Prettify(s)
  10915. }
  10916. // GoString returns the string representation
  10917. func (s ReplicaSettingsDescription) GoString() string {
  10918. return s.String()
  10919. }
  10920. // SetRegionName sets the RegionName field's value.
  10921. func (s *ReplicaSettingsDescription) SetRegionName(v string) *ReplicaSettingsDescription {
  10922. s.RegionName = &v
  10923. return s
  10924. }
  10925. // SetReplicaBillingModeSummary sets the ReplicaBillingModeSummary field's value.
  10926. func (s *ReplicaSettingsDescription) SetReplicaBillingModeSummary(v *BillingModeSummary) *ReplicaSettingsDescription {
  10927. s.ReplicaBillingModeSummary = v
  10928. return s
  10929. }
  10930. // SetReplicaGlobalSecondaryIndexSettings sets the ReplicaGlobalSecondaryIndexSettings field's value.
  10931. func (s *ReplicaSettingsDescription) SetReplicaGlobalSecondaryIndexSettings(v []*ReplicaGlobalSecondaryIndexSettingsDescription) *ReplicaSettingsDescription {
  10932. s.ReplicaGlobalSecondaryIndexSettings = v
  10933. return s
  10934. }
  10935. // SetReplicaProvisionedReadCapacityAutoScalingSettings sets the ReplicaProvisionedReadCapacityAutoScalingSettings field's value.
  10936. func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription {
  10937. s.ReplicaProvisionedReadCapacityAutoScalingSettings = v
  10938. return s
  10939. }
  10940. // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value.
  10941. func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription {
  10942. s.ReplicaProvisionedReadCapacityUnits = &v
  10943. return s
  10944. }
  10945. // SetReplicaProvisionedWriteCapacityAutoScalingSettings sets the ReplicaProvisionedWriteCapacityAutoScalingSettings field's value.
  10946. func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityAutoScalingSettings(v *AutoScalingSettingsDescription) *ReplicaSettingsDescription {
  10947. s.ReplicaProvisionedWriteCapacityAutoScalingSettings = v
  10948. return s
  10949. }
  10950. // SetReplicaProvisionedWriteCapacityUnits sets the ReplicaProvisionedWriteCapacityUnits field's value.
  10951. func (s *ReplicaSettingsDescription) SetReplicaProvisionedWriteCapacityUnits(v int64) *ReplicaSettingsDescription {
  10952. s.ReplicaProvisionedWriteCapacityUnits = &v
  10953. return s
  10954. }
  10955. // SetReplicaStatus sets the ReplicaStatus field's value.
  10956. func (s *ReplicaSettingsDescription) SetReplicaStatus(v string) *ReplicaSettingsDescription {
  10957. s.ReplicaStatus = &v
  10958. return s
  10959. }
  10960. // Represents the settings for a global table in a region that will be modified.
  10961. type ReplicaSettingsUpdate struct {
  10962. _ struct{} `type:"structure"`
  10963. // The region of the replica to be added.
  10964. //
  10965. // RegionName is a required field
  10966. RegionName *string `type:"string" required:"true"`
  10967. // Represents the settings of a global secondary index for a global table that
  10968. // will be modified.
  10969. ReplicaGlobalSecondaryIndexSettingsUpdate []*ReplicaGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"`
  10970. // Autoscaling settings for managing a global table replica's read capacity
  10971. // units.
  10972. ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
  10973. // The maximum number of strongly consistent reads consumed per second before
  10974. // DynamoDB returns a ThrottlingException. For more information, see Specifying
  10975. // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  10976. // in the Amazon DynamoDB Developer Guide.
  10977. ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"`
  10978. }
  10979. // String returns the string representation
  10980. func (s ReplicaSettingsUpdate) String() string {
  10981. return awsutil.Prettify(s)
  10982. }
  10983. // GoString returns the string representation
  10984. func (s ReplicaSettingsUpdate) GoString() string {
  10985. return s.String()
  10986. }
  10987. // Validate inspects the fields of the type to determine if they are valid.
  10988. func (s *ReplicaSettingsUpdate) Validate() error {
  10989. invalidParams := request.ErrInvalidParams{Context: "ReplicaSettingsUpdate"}
  10990. if s.RegionName == nil {
  10991. invalidParams.Add(request.NewErrParamRequired("RegionName"))
  10992. }
  10993. if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil && len(s.ReplicaGlobalSecondaryIndexSettingsUpdate) < 1 {
  10994. invalidParams.Add(request.NewErrParamMinLen("ReplicaGlobalSecondaryIndexSettingsUpdate", 1))
  10995. }
  10996. if s.ReplicaProvisionedReadCapacityUnits != nil && *s.ReplicaProvisionedReadCapacityUnits < 1 {
  10997. invalidParams.Add(request.NewErrParamMinValue("ReplicaProvisionedReadCapacityUnits", 1))
  10998. }
  10999. if s.ReplicaGlobalSecondaryIndexSettingsUpdate != nil {
  11000. for i, v := range s.ReplicaGlobalSecondaryIndexSettingsUpdate {
  11001. if v == nil {
  11002. continue
  11003. }
  11004. if err := v.Validate(); err != nil {
  11005. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams))
  11006. }
  11007. }
  11008. }
  11009. if s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate != nil {
  11010. if err := s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.Validate(); err != nil {
  11011. invalidParams.AddNested("ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams))
  11012. }
  11013. }
  11014. if invalidParams.Len() > 0 {
  11015. return invalidParams
  11016. }
  11017. return nil
  11018. }
  11019. // SetRegionName sets the RegionName field's value.
  11020. func (s *ReplicaSettingsUpdate) SetRegionName(v string) *ReplicaSettingsUpdate {
  11021. s.RegionName = &v
  11022. return s
  11023. }
  11024. // SetReplicaGlobalSecondaryIndexSettingsUpdate sets the ReplicaGlobalSecondaryIndexSettingsUpdate field's value.
  11025. func (s *ReplicaSettingsUpdate) SetReplicaGlobalSecondaryIndexSettingsUpdate(v []*ReplicaGlobalSecondaryIndexSettingsUpdate) *ReplicaSettingsUpdate {
  11026. s.ReplicaGlobalSecondaryIndexSettingsUpdate = v
  11027. return s
  11028. }
  11029. // SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate sets the ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate field's value.
  11030. func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *ReplicaSettingsUpdate {
  11031. s.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate = v
  11032. return s
  11033. }
  11034. // SetReplicaProvisionedReadCapacityUnits sets the ReplicaProvisionedReadCapacityUnits field's value.
  11035. func (s *ReplicaSettingsUpdate) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsUpdate {
  11036. s.ReplicaProvisionedReadCapacityUnits = &v
  11037. return s
  11038. }
  11039. // Represents one of the following:
  11040. //
  11041. // * A new replica to be added to an existing global table.
  11042. //
  11043. // * New parameters for an existing replica.
  11044. //
  11045. // * An existing replica to be removed from an existing global table.
  11046. type ReplicaUpdate struct {
  11047. _ struct{} `type:"structure"`
  11048. // The parameters required for creating a replica on an existing global table.
  11049. Create *CreateReplicaAction `type:"structure"`
  11050. // The name of the existing replica to be removed.
  11051. Delete *DeleteReplicaAction `type:"structure"`
  11052. }
  11053. // String returns the string representation
  11054. func (s ReplicaUpdate) String() string {
  11055. return awsutil.Prettify(s)
  11056. }
  11057. // GoString returns the string representation
  11058. func (s ReplicaUpdate) GoString() string {
  11059. return s.String()
  11060. }
  11061. // Validate inspects the fields of the type to determine if they are valid.
  11062. func (s *ReplicaUpdate) Validate() error {
  11063. invalidParams := request.ErrInvalidParams{Context: "ReplicaUpdate"}
  11064. if s.Create != nil {
  11065. if err := s.Create.Validate(); err != nil {
  11066. invalidParams.AddNested("Create", err.(request.ErrInvalidParams))
  11067. }
  11068. }
  11069. if s.Delete != nil {
  11070. if err := s.Delete.Validate(); err != nil {
  11071. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  11072. }
  11073. }
  11074. if invalidParams.Len() > 0 {
  11075. return invalidParams
  11076. }
  11077. return nil
  11078. }
  11079. // SetCreate sets the Create field's value.
  11080. func (s *ReplicaUpdate) SetCreate(v *CreateReplicaAction) *ReplicaUpdate {
  11081. s.Create = v
  11082. return s
  11083. }
  11084. // SetDelete sets the Delete field's value.
  11085. func (s *ReplicaUpdate) SetDelete(v *DeleteReplicaAction) *ReplicaUpdate {
  11086. s.Delete = v
  11087. return s
  11088. }
  11089. // Contains details for the restore.
  11090. type RestoreSummary struct {
  11091. _ struct{} `type:"structure"`
  11092. // Point in time or source backup time.
  11093. //
  11094. // RestoreDateTime is a required field
  11095. RestoreDateTime *time.Time `type:"timestamp" required:"true"`
  11096. // Indicates if a restore is in progress or not.
  11097. //
  11098. // RestoreInProgress is a required field
  11099. RestoreInProgress *bool `type:"boolean" required:"true"`
  11100. // ARN of the backup from which the table was restored.
  11101. SourceBackupArn *string `min:"37" type:"string"`
  11102. // ARN of the source table of the backup that is being restored.
  11103. SourceTableArn *string `type:"string"`
  11104. }
  11105. // String returns the string representation
  11106. func (s RestoreSummary) String() string {
  11107. return awsutil.Prettify(s)
  11108. }
  11109. // GoString returns the string representation
  11110. func (s RestoreSummary) GoString() string {
  11111. return s.String()
  11112. }
  11113. // SetRestoreDateTime sets the RestoreDateTime field's value.
  11114. func (s *RestoreSummary) SetRestoreDateTime(v time.Time) *RestoreSummary {
  11115. s.RestoreDateTime = &v
  11116. return s
  11117. }
  11118. // SetRestoreInProgress sets the RestoreInProgress field's value.
  11119. func (s *RestoreSummary) SetRestoreInProgress(v bool) *RestoreSummary {
  11120. s.RestoreInProgress = &v
  11121. return s
  11122. }
  11123. // SetSourceBackupArn sets the SourceBackupArn field's value.
  11124. func (s *RestoreSummary) SetSourceBackupArn(v string) *RestoreSummary {
  11125. s.SourceBackupArn = &v
  11126. return s
  11127. }
  11128. // SetSourceTableArn sets the SourceTableArn field's value.
  11129. func (s *RestoreSummary) SetSourceTableArn(v string) *RestoreSummary {
  11130. s.SourceTableArn = &v
  11131. return s
  11132. }
  11133. type RestoreTableFromBackupInput struct {
  11134. _ struct{} `type:"structure"`
  11135. // The ARN associated with the backup.
  11136. //
  11137. // BackupArn is a required field
  11138. BackupArn *string `min:"37" type:"string" required:"true"`
  11139. // The name of the new table to which the backup must be restored.
  11140. //
  11141. // TargetTableName is a required field
  11142. TargetTableName *string `min:"3" type:"string" required:"true"`
  11143. }
  11144. // String returns the string representation
  11145. func (s RestoreTableFromBackupInput) String() string {
  11146. return awsutil.Prettify(s)
  11147. }
  11148. // GoString returns the string representation
  11149. func (s RestoreTableFromBackupInput) GoString() string {
  11150. return s.String()
  11151. }
  11152. // Validate inspects the fields of the type to determine if they are valid.
  11153. func (s *RestoreTableFromBackupInput) Validate() error {
  11154. invalidParams := request.ErrInvalidParams{Context: "RestoreTableFromBackupInput"}
  11155. if s.BackupArn == nil {
  11156. invalidParams.Add(request.NewErrParamRequired("BackupArn"))
  11157. }
  11158. if s.BackupArn != nil && len(*s.BackupArn) < 37 {
  11159. invalidParams.Add(request.NewErrParamMinLen("BackupArn", 37))
  11160. }
  11161. if s.TargetTableName == nil {
  11162. invalidParams.Add(request.NewErrParamRequired("TargetTableName"))
  11163. }
  11164. if s.TargetTableName != nil && len(*s.TargetTableName) < 3 {
  11165. invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3))
  11166. }
  11167. if invalidParams.Len() > 0 {
  11168. return invalidParams
  11169. }
  11170. return nil
  11171. }
  11172. // SetBackupArn sets the BackupArn field's value.
  11173. func (s *RestoreTableFromBackupInput) SetBackupArn(v string) *RestoreTableFromBackupInput {
  11174. s.BackupArn = &v
  11175. return s
  11176. }
  11177. // SetTargetTableName sets the TargetTableName field's value.
  11178. func (s *RestoreTableFromBackupInput) SetTargetTableName(v string) *RestoreTableFromBackupInput {
  11179. s.TargetTableName = &v
  11180. return s
  11181. }
  11182. type RestoreTableFromBackupOutput struct {
  11183. _ struct{} `type:"structure"`
  11184. // The description of the table created from an existing backup.
  11185. TableDescription *TableDescription `type:"structure"`
  11186. }
  11187. // String returns the string representation
  11188. func (s RestoreTableFromBackupOutput) String() string {
  11189. return awsutil.Prettify(s)
  11190. }
  11191. // GoString returns the string representation
  11192. func (s RestoreTableFromBackupOutput) GoString() string {
  11193. return s.String()
  11194. }
  11195. // SetTableDescription sets the TableDescription field's value.
  11196. func (s *RestoreTableFromBackupOutput) SetTableDescription(v *TableDescription) *RestoreTableFromBackupOutput {
  11197. s.TableDescription = v
  11198. return s
  11199. }
  11200. type RestoreTableToPointInTimeInput struct {
  11201. _ struct{} `type:"structure"`
  11202. // Time in the past to restore the table to.
  11203. RestoreDateTime *time.Time `type:"timestamp"`
  11204. // Name of the source table that is being restored.
  11205. //
  11206. // SourceTableName is a required field
  11207. SourceTableName *string `min:"3" type:"string" required:"true"`
  11208. // The name of the new table to which it must be restored to.
  11209. //
  11210. // TargetTableName is a required field
  11211. TargetTableName *string `min:"3" type:"string" required:"true"`
  11212. // Restore the table to the latest possible time. LatestRestorableDateTime is
  11213. // typically 5 minutes before the current time.
  11214. UseLatestRestorableTime *bool `type:"boolean"`
  11215. }
  11216. // String returns the string representation
  11217. func (s RestoreTableToPointInTimeInput) String() string {
  11218. return awsutil.Prettify(s)
  11219. }
  11220. // GoString returns the string representation
  11221. func (s RestoreTableToPointInTimeInput) GoString() string {
  11222. return s.String()
  11223. }
  11224. // Validate inspects the fields of the type to determine if they are valid.
  11225. func (s *RestoreTableToPointInTimeInput) Validate() error {
  11226. invalidParams := request.ErrInvalidParams{Context: "RestoreTableToPointInTimeInput"}
  11227. if s.SourceTableName == nil {
  11228. invalidParams.Add(request.NewErrParamRequired("SourceTableName"))
  11229. }
  11230. if s.SourceTableName != nil && len(*s.SourceTableName) < 3 {
  11231. invalidParams.Add(request.NewErrParamMinLen("SourceTableName", 3))
  11232. }
  11233. if s.TargetTableName == nil {
  11234. invalidParams.Add(request.NewErrParamRequired("TargetTableName"))
  11235. }
  11236. if s.TargetTableName != nil && len(*s.TargetTableName) < 3 {
  11237. invalidParams.Add(request.NewErrParamMinLen("TargetTableName", 3))
  11238. }
  11239. if invalidParams.Len() > 0 {
  11240. return invalidParams
  11241. }
  11242. return nil
  11243. }
  11244. // SetRestoreDateTime sets the RestoreDateTime field's value.
  11245. func (s *RestoreTableToPointInTimeInput) SetRestoreDateTime(v time.Time) *RestoreTableToPointInTimeInput {
  11246. s.RestoreDateTime = &v
  11247. return s
  11248. }
  11249. // SetSourceTableName sets the SourceTableName field's value.
  11250. func (s *RestoreTableToPointInTimeInput) SetSourceTableName(v string) *RestoreTableToPointInTimeInput {
  11251. s.SourceTableName = &v
  11252. return s
  11253. }
  11254. // SetTargetTableName sets the TargetTableName field's value.
  11255. func (s *RestoreTableToPointInTimeInput) SetTargetTableName(v string) *RestoreTableToPointInTimeInput {
  11256. s.TargetTableName = &v
  11257. return s
  11258. }
  11259. // SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value.
  11260. func (s *RestoreTableToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreTableToPointInTimeInput {
  11261. s.UseLatestRestorableTime = &v
  11262. return s
  11263. }
  11264. type RestoreTableToPointInTimeOutput struct {
  11265. _ struct{} `type:"structure"`
  11266. // Represents the properties of a table.
  11267. TableDescription *TableDescription `type:"structure"`
  11268. }
  11269. // String returns the string representation
  11270. func (s RestoreTableToPointInTimeOutput) String() string {
  11271. return awsutil.Prettify(s)
  11272. }
  11273. // GoString returns the string representation
  11274. func (s RestoreTableToPointInTimeOutput) GoString() string {
  11275. return s.String()
  11276. }
  11277. // SetTableDescription sets the TableDescription field's value.
  11278. func (s *RestoreTableToPointInTimeOutput) SetTableDescription(v *TableDescription) *RestoreTableToPointInTimeOutput {
  11279. s.TableDescription = v
  11280. return s
  11281. }
  11282. // The description of the server-side encryption status on the specified table.
  11283. type SSEDescription struct {
  11284. _ struct{} `type:"structure"`
  11285. // The KMS master key ARN used for the KMS encryption.
  11286. KMSMasterKeyArn *string `type:"string"`
  11287. // Server-side encryption type:
  11288. //
  11289. // * AES256 - Server-side encryption which uses the AES256 algorithm (not
  11290. // applicable).
  11291. //
  11292. // * KMS - Server-side encryption which uses AWS Key Management Service.
  11293. // Key is stored in your account and is managed by AWS KMS (KMS charges apply).
  11294. SSEType *string `type:"string" enum:"SSEType"`
  11295. // The current state of server-side encryption:
  11296. //
  11297. // * ENABLING - Server-side encryption is being enabled.
  11298. //
  11299. // * ENABLED - Server-side encryption is enabled.
  11300. //
  11301. // * DISABLING - Server-side encryption is being disabled.
  11302. //
  11303. // * DISABLED - Server-side encryption is disabled.
  11304. //
  11305. // * UPDATING - Server-side encryption is being updated.
  11306. Status *string `type:"string" enum:"SSEStatus"`
  11307. }
  11308. // String returns the string representation
  11309. func (s SSEDescription) String() string {
  11310. return awsutil.Prettify(s)
  11311. }
  11312. // GoString returns the string representation
  11313. func (s SSEDescription) GoString() string {
  11314. return s.String()
  11315. }
  11316. // SetKMSMasterKeyArn sets the KMSMasterKeyArn field's value.
  11317. func (s *SSEDescription) SetKMSMasterKeyArn(v string) *SSEDescription {
  11318. s.KMSMasterKeyArn = &v
  11319. return s
  11320. }
  11321. // SetSSEType sets the SSEType field's value.
  11322. func (s *SSEDescription) SetSSEType(v string) *SSEDescription {
  11323. s.SSEType = &v
  11324. return s
  11325. }
  11326. // SetStatus sets the Status field's value.
  11327. func (s *SSEDescription) SetStatus(v string) *SSEDescription {
  11328. s.Status = &v
  11329. return s
  11330. }
  11331. // Represents the settings used to enable server-side encryption.
  11332. type SSESpecification struct {
  11333. _ struct{} `type:"structure"`
  11334. // Indicates whether server-side encryption is enabled (true) or disabled (false)
  11335. // on the table. If enabled (true), server-side encryption type is set to KMS.
  11336. // If disabled (false) or not specified, server-side encryption is set to AWS
  11337. // owned CMK.
  11338. Enabled *bool `type:"boolean"`
  11339. // The KMS Master Key (CMK) which should be used for the KMS encryption. To
  11340. // specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or
  11341. // alias ARN. Note that you should only provide this parameter if the key is
  11342. // different from the default DynamoDB KMS Master Key alias/aws/dynamodb.
  11343. KMSMasterKeyId *string `type:"string"`
  11344. // Server-side encryption type:
  11345. //
  11346. // * AES256 - Server-side encryption which uses the AES256 algorithm (not
  11347. // applicable).
  11348. //
  11349. // * KMS - Server-side encryption which uses AWS Key Management Service.
  11350. // Key is stored in your account and is managed by AWS KMS (KMS charges apply).
  11351. SSEType *string `type:"string" enum:"SSEType"`
  11352. }
  11353. // String returns the string representation
  11354. func (s SSESpecification) String() string {
  11355. return awsutil.Prettify(s)
  11356. }
  11357. // GoString returns the string representation
  11358. func (s SSESpecification) GoString() string {
  11359. return s.String()
  11360. }
  11361. // SetEnabled sets the Enabled field's value.
  11362. func (s *SSESpecification) SetEnabled(v bool) *SSESpecification {
  11363. s.Enabled = &v
  11364. return s
  11365. }
  11366. // SetKMSMasterKeyId sets the KMSMasterKeyId field's value.
  11367. func (s *SSESpecification) SetKMSMasterKeyId(v string) *SSESpecification {
  11368. s.KMSMasterKeyId = &v
  11369. return s
  11370. }
  11371. // SetSSEType sets the SSEType field's value.
  11372. func (s *SSESpecification) SetSSEType(v string) *SSESpecification {
  11373. s.SSEType = &v
  11374. return s
  11375. }
  11376. // Represents the input of a Scan operation.
  11377. type ScanInput struct {
  11378. _ struct{} `type:"structure"`
  11379. // This is a legacy parameter. Use ProjectionExpression instead. For more information,
  11380. // see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html)
  11381. // in the Amazon DynamoDB Developer Guide.
  11382. AttributesToGet []*string `min:"1" type:"list"`
  11383. // This is a legacy parameter. Use FilterExpression instead. For more information,
  11384. // see ConditionalOperator (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
  11385. // in the Amazon DynamoDB Developer Guide.
  11386. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  11387. // A Boolean value that determines the read consistency model during the scan:
  11388. //
  11389. // * If ConsistentRead is false, then the data returned from Scan might not
  11390. // contain the results from other recently completed write operations (PutItem,
  11391. // UpdateItem or DeleteItem).
  11392. //
  11393. // * If ConsistentRead is true, then all of the write operations that completed
  11394. // before the Scan began are guaranteed to be contained in the Scan response.
  11395. //
  11396. // The default setting for ConsistentRead is false.
  11397. //
  11398. // The ConsistentRead parameter is not supported on global secondary indexes.
  11399. // If you scan a global secondary index with ConsistentRead set to true, you
  11400. // will receive a ValidationException.
  11401. ConsistentRead *bool `type:"boolean"`
  11402. // The primary key of the first item that this operation will evaluate. Use
  11403. // the value that was returned for LastEvaluatedKey in the previous operation.
  11404. //
  11405. // The data type for ExclusiveStartKey must be String, Number or Binary. No
  11406. // set data types are allowed.
  11407. //
  11408. // In a parallel scan, a Scan request that includes ExclusiveStartKey must specify
  11409. // the same segment whose previous Scan returned the corresponding value of
  11410. // LastEvaluatedKey.
  11411. ExclusiveStartKey map[string]*AttributeValue `type:"map"`
  11412. // One or more substitution tokens for attribute names in an expression. The
  11413. // following are some use cases for using ExpressionAttributeNames:
  11414. //
  11415. // * To access an attribute whose name conflicts with a DynamoDB reserved
  11416. // word.
  11417. //
  11418. // * To create a placeholder for repeating occurrences of an attribute name
  11419. // in an expression.
  11420. //
  11421. // * To prevent special characters in an attribute name from being misinterpreted
  11422. // in an expression.
  11423. //
  11424. // Use the # character in an expression to dereference an attribute name. For
  11425. // example, consider the following attribute name:
  11426. //
  11427. // * Percentile
  11428. //
  11429. // The name of this attribute conflicts with a reserved word, so it cannot be
  11430. // used directly in an expression. (For the complete list of reserved words,
  11431. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  11432. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  11433. // the following for ExpressionAttributeNames:
  11434. //
  11435. // * {"#P":"Percentile"}
  11436. //
  11437. // You could then use this substitution in an expression, as in this example:
  11438. //
  11439. // * #P = :val
  11440. //
  11441. // Tokens that begin with the : character are expression attribute values, which
  11442. // are placeholders for the actual value at runtime.
  11443. //
  11444. // For more information on expression attribute names, see Accessing Item Attributes
  11445. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  11446. // in the Amazon DynamoDB Developer Guide.
  11447. ExpressionAttributeNames map[string]*string `type:"map"`
  11448. // One or more values that can be substituted in an expression.
  11449. //
  11450. // Use the : (colon) character in an expression to dereference an attribute
  11451. // value. For example, suppose that you wanted to check whether the value of
  11452. // the ProductStatus attribute was one of the following:
  11453. //
  11454. // Available | Backordered | Discontinued
  11455. //
  11456. // You would first need to specify ExpressionAttributeValues as follows:
  11457. //
  11458. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  11459. // }
  11460. //
  11461. // You could then use these values in an expression, such as this:
  11462. //
  11463. // ProductStatus IN (:avail, :back, :disc)
  11464. //
  11465. // For more information on expression attribute values, see Specifying Conditions
  11466. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  11467. // in the Amazon DynamoDB Developer Guide.
  11468. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  11469. // A string that contains conditions that DynamoDB applies after the Scan operation,
  11470. // but before the data is returned to you. Items that do not satisfy the FilterExpression
  11471. // criteria are not returned.
  11472. //
  11473. // A FilterExpression is applied after the items have already been read; the
  11474. // process of filtering does not consume any additional read capacity units.
  11475. //
  11476. // For more information, see Filter Expressions (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults)
  11477. // in the Amazon DynamoDB Developer Guide.
  11478. FilterExpression *string `type:"string"`
  11479. // The name of a secondary index to scan. This index can be any local secondary
  11480. // index or global secondary index. Note that if you use the IndexName parameter,
  11481. // you must also provide TableName.
  11482. IndexName *string `min:"3" type:"string"`
  11483. // The maximum number of items to evaluate (not necessarily the number of matching
  11484. // items). If DynamoDB processes the number of items up to the limit while processing
  11485. // the results, it stops the operation and returns the matching values up to
  11486. // that point, and a key in LastEvaluatedKey to apply in a subsequent operation,
  11487. // so that you can pick up where you left off. Also, if the processed data set
  11488. // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation
  11489. // and returns the matching values up to the limit, and a key in LastEvaluatedKey
  11490. // to apply in a subsequent operation to continue the operation. For more information,
  11491. // see Query and Scan (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html)
  11492. // in the Amazon DynamoDB Developer Guide.
  11493. Limit *int64 `min:"1" type:"integer"`
  11494. // A string that identifies one or more attributes to retrieve from the specified
  11495. // table or index. These attributes can include scalars, sets, or elements of
  11496. // a JSON document. The attributes in the expression must be separated by commas.
  11497. //
  11498. // If no attribute names are specified, then all attributes will be returned.
  11499. // If any of the requested attributes are not found, they will not appear in
  11500. // the result.
  11501. //
  11502. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  11503. // in the Amazon DynamoDB Developer Guide.
  11504. ProjectionExpression *string `type:"string"`
  11505. // Determines the level of detail about provisioned throughput consumption that
  11506. // is returned in the response:
  11507. //
  11508. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  11509. // operation, together with ConsumedCapacity for each table and secondary
  11510. // index that was accessed.
  11511. //
  11512. // Note that some operations, such as GetItem and BatchGetItem, do not access
  11513. // any indexes at all. In these cases, specifying INDEXES will only return
  11514. // ConsumedCapacity information for table(s).
  11515. //
  11516. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  11517. // the operation.
  11518. //
  11519. // * NONE - No ConsumedCapacity details are included in the response.
  11520. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  11521. // This is a legacy parameter. Use FilterExpression instead. For more information,
  11522. // see ScanFilter (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html)
  11523. // in the Amazon DynamoDB Developer Guide.
  11524. ScanFilter map[string]*Condition `type:"map"`
  11525. // For a parallel Scan request, Segment identifies an individual segment to
  11526. // be scanned by an application worker.
  11527. //
  11528. // Segment IDs are zero-based, so the first segment is always 0. For example,
  11529. // if you want to use four application threads to scan a table or an index,
  11530. // then the first thread specifies a Segment value of 0, the second thread specifies
  11531. // 1, and so on.
  11532. //
  11533. // The value of LastEvaluatedKey returned from a parallel Scan request must
  11534. // be used as ExclusiveStartKey with the same segment ID in a subsequent Scan
  11535. // operation.
  11536. //
  11537. // The value for Segment must be greater than or equal to 0, and less than the
  11538. // value provided for TotalSegments.
  11539. //
  11540. // If you provide Segment, you must also provide TotalSegments.
  11541. Segment *int64 `type:"integer"`
  11542. // The attributes to be returned in the result. You can retrieve all item attributes,
  11543. // specific item attributes, the count of matching items, or in the case of
  11544. // an index, some or all of the attributes projected into the index.
  11545. //
  11546. // * ALL_ATTRIBUTES - Returns all of the item attributes from the specified
  11547. // table or index. If you query a local secondary index, then for each matching
  11548. // item in the index DynamoDB will fetch the entire item from the parent
  11549. // table. If the index is configured to project all item attributes, then
  11550. // all of the data can be obtained from the local secondary index, and no
  11551. // fetching is required.
  11552. //
  11553. // * ALL_PROJECTED_ATTRIBUTES - Allowed only when querying an index. Retrieves
  11554. // all attributes that have been projected into the index. If the index is
  11555. // configured to project all attributes, this return value is equivalent
  11556. // to specifying ALL_ATTRIBUTES.
  11557. //
  11558. // * COUNT - Returns the number of matching items, rather than the matching
  11559. // items themselves.
  11560. //
  11561. // * SPECIFIC_ATTRIBUTES - Returns only the attributes listed in AttributesToGet.
  11562. // This return value is equivalent to specifying AttributesToGet without
  11563. // specifying any value for Select.
  11564. //
  11565. // If you query or scan a local secondary index and request only attributes
  11566. // that are projected into that index, the operation will read only the index
  11567. // and not the table. If any of the requested attributes are not projected
  11568. // into the local secondary index, DynamoDB will fetch each of these attributes
  11569. // from the parent table. This extra fetching incurs additional throughput
  11570. // cost and latency.
  11571. //
  11572. // If you query or scan a global secondary index, you can only request attributes
  11573. // that are projected into the index. Global secondary index queries cannot
  11574. // fetch attributes from the parent table.
  11575. //
  11576. // If neither Select nor AttributesToGet are specified, DynamoDB defaults to
  11577. // ALL_ATTRIBUTES when accessing a table, and ALL_PROJECTED_ATTRIBUTES when
  11578. // accessing an index. You cannot use both Select and AttributesToGet together
  11579. // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES.
  11580. // (This usage is equivalent to specifying AttributesToGet without any value
  11581. // for Select.)
  11582. //
  11583. // If you use the ProjectionExpression parameter, then the value for Select
  11584. // can only be SPECIFIC_ATTRIBUTES. Any other value for Select will return an
  11585. // error.
  11586. Select *string `type:"string" enum:"Select"`
  11587. // The name of the table containing the requested items; or, if you provide
  11588. // IndexName, the name of the table to which that index belongs.
  11589. //
  11590. // TableName is a required field
  11591. TableName *string `min:"3" type:"string" required:"true"`
  11592. // For a parallel Scan request, TotalSegments represents the total number of
  11593. // segments into which the Scan operation will be divided. The value of TotalSegments
  11594. // corresponds to the number of application workers that will perform the parallel
  11595. // scan. For example, if you want to use four application threads to scan a
  11596. // table or an index, specify a TotalSegments value of 4.
  11597. //
  11598. // The value for TotalSegments must be greater than or equal to 1, and less
  11599. // than or equal to 1000000. If you specify a TotalSegments value of 1, the
  11600. // Scan operation will be sequential rather than parallel.
  11601. //
  11602. // If you specify TotalSegments, you must also specify Segment.
  11603. TotalSegments *int64 `min:"1" type:"integer"`
  11604. }
  11605. // String returns the string representation
  11606. func (s ScanInput) String() string {
  11607. return awsutil.Prettify(s)
  11608. }
  11609. // GoString returns the string representation
  11610. func (s ScanInput) GoString() string {
  11611. return s.String()
  11612. }
  11613. // Validate inspects the fields of the type to determine if they are valid.
  11614. func (s *ScanInput) Validate() error {
  11615. invalidParams := request.ErrInvalidParams{Context: "ScanInput"}
  11616. if s.AttributesToGet != nil && len(s.AttributesToGet) < 1 {
  11617. invalidParams.Add(request.NewErrParamMinLen("AttributesToGet", 1))
  11618. }
  11619. if s.IndexName != nil && len(*s.IndexName) < 3 {
  11620. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  11621. }
  11622. if s.Limit != nil && *s.Limit < 1 {
  11623. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  11624. }
  11625. if s.TableName == nil {
  11626. invalidParams.Add(request.NewErrParamRequired("TableName"))
  11627. }
  11628. if s.TableName != nil && len(*s.TableName) < 3 {
  11629. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  11630. }
  11631. if s.TotalSegments != nil && *s.TotalSegments < 1 {
  11632. invalidParams.Add(request.NewErrParamMinValue("TotalSegments", 1))
  11633. }
  11634. if s.ScanFilter != nil {
  11635. for i, v := range s.ScanFilter {
  11636. if v == nil {
  11637. continue
  11638. }
  11639. if err := v.Validate(); err != nil {
  11640. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScanFilter", i), err.(request.ErrInvalidParams))
  11641. }
  11642. }
  11643. }
  11644. if invalidParams.Len() > 0 {
  11645. return invalidParams
  11646. }
  11647. return nil
  11648. }
  11649. // SetAttributesToGet sets the AttributesToGet field's value.
  11650. func (s *ScanInput) SetAttributesToGet(v []*string) *ScanInput {
  11651. s.AttributesToGet = v
  11652. return s
  11653. }
  11654. // SetConditionalOperator sets the ConditionalOperator field's value.
  11655. func (s *ScanInput) SetConditionalOperator(v string) *ScanInput {
  11656. s.ConditionalOperator = &v
  11657. return s
  11658. }
  11659. // SetConsistentRead sets the ConsistentRead field's value.
  11660. func (s *ScanInput) SetConsistentRead(v bool) *ScanInput {
  11661. s.ConsistentRead = &v
  11662. return s
  11663. }
  11664. // SetExclusiveStartKey sets the ExclusiveStartKey field's value.
  11665. func (s *ScanInput) SetExclusiveStartKey(v map[string]*AttributeValue) *ScanInput {
  11666. s.ExclusiveStartKey = v
  11667. return s
  11668. }
  11669. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  11670. func (s *ScanInput) SetExpressionAttributeNames(v map[string]*string) *ScanInput {
  11671. s.ExpressionAttributeNames = v
  11672. return s
  11673. }
  11674. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  11675. func (s *ScanInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *ScanInput {
  11676. s.ExpressionAttributeValues = v
  11677. return s
  11678. }
  11679. // SetFilterExpression sets the FilterExpression field's value.
  11680. func (s *ScanInput) SetFilterExpression(v string) *ScanInput {
  11681. s.FilterExpression = &v
  11682. return s
  11683. }
  11684. // SetIndexName sets the IndexName field's value.
  11685. func (s *ScanInput) SetIndexName(v string) *ScanInput {
  11686. s.IndexName = &v
  11687. return s
  11688. }
  11689. // SetLimit sets the Limit field's value.
  11690. func (s *ScanInput) SetLimit(v int64) *ScanInput {
  11691. s.Limit = &v
  11692. return s
  11693. }
  11694. // SetProjectionExpression sets the ProjectionExpression field's value.
  11695. func (s *ScanInput) SetProjectionExpression(v string) *ScanInput {
  11696. s.ProjectionExpression = &v
  11697. return s
  11698. }
  11699. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  11700. func (s *ScanInput) SetReturnConsumedCapacity(v string) *ScanInput {
  11701. s.ReturnConsumedCapacity = &v
  11702. return s
  11703. }
  11704. // SetScanFilter sets the ScanFilter field's value.
  11705. func (s *ScanInput) SetScanFilter(v map[string]*Condition) *ScanInput {
  11706. s.ScanFilter = v
  11707. return s
  11708. }
  11709. // SetSegment sets the Segment field's value.
  11710. func (s *ScanInput) SetSegment(v int64) *ScanInput {
  11711. s.Segment = &v
  11712. return s
  11713. }
  11714. // SetSelect sets the Select field's value.
  11715. func (s *ScanInput) SetSelect(v string) *ScanInput {
  11716. s.Select = &v
  11717. return s
  11718. }
  11719. // SetTableName sets the TableName field's value.
  11720. func (s *ScanInput) SetTableName(v string) *ScanInput {
  11721. s.TableName = &v
  11722. return s
  11723. }
  11724. // SetTotalSegments sets the TotalSegments field's value.
  11725. func (s *ScanInput) SetTotalSegments(v int64) *ScanInput {
  11726. s.TotalSegments = &v
  11727. return s
  11728. }
  11729. // Represents the output of a Scan operation.
  11730. type ScanOutput struct {
  11731. _ struct{} `type:"structure"`
  11732. // The capacity units consumed by the Scan operation. The data returned includes
  11733. // the total provisioned throughput consumed, along with statistics for the
  11734. // table and any indexes involved in the operation. ConsumedCapacity is only
  11735. // returned if the ReturnConsumedCapacity parameter was specified. For more
  11736. // information, see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  11737. // in the Amazon DynamoDB Developer Guide.
  11738. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  11739. // The number of items in the response.
  11740. //
  11741. // If you set ScanFilter in the request, then Count is the number of items returned
  11742. // after the filter was applied, and ScannedCount is the number of matching
  11743. // items before the filter was applied.
  11744. //
  11745. // If you did not use a filter in the request, then Count is the same as ScannedCount.
  11746. Count *int64 `type:"integer"`
  11747. // An array of item attributes that match the scan criteria. Each element in
  11748. // this array consists of an attribute name and the value for that attribute.
  11749. Items []map[string]*AttributeValue `type:"list"`
  11750. // The primary key of the item where the operation stopped, inclusive of the
  11751. // previous result set. Use this value to start a new operation, excluding this
  11752. // value in the new request.
  11753. //
  11754. // If LastEvaluatedKey is empty, then the "last page" of results has been processed
  11755. // and there is no more data to be retrieved.
  11756. //
  11757. // If LastEvaluatedKey is not empty, it does not necessarily mean that there
  11758. // is more data in the result set. The only way to know when you have reached
  11759. // the end of the result set is when LastEvaluatedKey is empty.
  11760. LastEvaluatedKey map[string]*AttributeValue `type:"map"`
  11761. // The number of items evaluated, before any ScanFilter is applied. A high ScannedCount
  11762. // value with few, or no, Count results indicates an inefficient Scan operation.
  11763. // For more information, see Count and ScannedCount (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count)
  11764. // in the Amazon DynamoDB Developer Guide.
  11765. //
  11766. // If you did not use a filter in the request, then ScannedCount is the same
  11767. // as Count.
  11768. ScannedCount *int64 `type:"integer"`
  11769. }
  11770. // String returns the string representation
  11771. func (s ScanOutput) String() string {
  11772. return awsutil.Prettify(s)
  11773. }
  11774. // GoString returns the string representation
  11775. func (s ScanOutput) GoString() string {
  11776. return s.String()
  11777. }
  11778. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  11779. func (s *ScanOutput) SetConsumedCapacity(v *ConsumedCapacity) *ScanOutput {
  11780. s.ConsumedCapacity = v
  11781. return s
  11782. }
  11783. // SetCount sets the Count field's value.
  11784. func (s *ScanOutput) SetCount(v int64) *ScanOutput {
  11785. s.Count = &v
  11786. return s
  11787. }
  11788. // SetItems sets the Items field's value.
  11789. func (s *ScanOutput) SetItems(v []map[string]*AttributeValue) *ScanOutput {
  11790. s.Items = v
  11791. return s
  11792. }
  11793. // SetLastEvaluatedKey sets the LastEvaluatedKey field's value.
  11794. func (s *ScanOutput) SetLastEvaluatedKey(v map[string]*AttributeValue) *ScanOutput {
  11795. s.LastEvaluatedKey = v
  11796. return s
  11797. }
  11798. // SetScannedCount sets the ScannedCount field's value.
  11799. func (s *ScanOutput) SetScannedCount(v int64) *ScanOutput {
  11800. s.ScannedCount = &v
  11801. return s
  11802. }
  11803. // Contains the details of the table when the backup was created.
  11804. type SourceTableDetails struct {
  11805. _ struct{} `type:"structure"`
  11806. // Controls how you are charged for read and write throughput and how you manage
  11807. // capacity. This setting can be changed later.
  11808. //
  11809. // * PROVISIONED - Sets the read/write capacity mode to PROVISIONED. We recommend
  11810. // using PROVISIONED for predictable workloads.
  11811. //
  11812. // * PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST.
  11813. // We recommend using PAY_PER_REQUEST for unpredictable workloads.
  11814. BillingMode *string `type:"string" enum:"BillingMode"`
  11815. // Number of items in the table. Please note this is an approximate value.
  11816. ItemCount *int64 `type:"long"`
  11817. // Schema of the table.
  11818. //
  11819. // KeySchema is a required field
  11820. KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"`
  11821. // Read IOPs and Write IOPS on the table when the backup was created.
  11822. //
  11823. // ProvisionedThroughput is a required field
  11824. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  11825. // ARN of the table for which backup was created.
  11826. TableArn *string `type:"string"`
  11827. // Time when the source table was created.
  11828. //
  11829. // TableCreationDateTime is a required field
  11830. TableCreationDateTime *time.Time `type:"timestamp" required:"true"`
  11831. // Unique identifier for the table for which the backup was created.
  11832. //
  11833. // TableId is a required field
  11834. TableId *string `type:"string" required:"true"`
  11835. // The name of the table for which the backup was created.
  11836. //
  11837. // TableName is a required field
  11838. TableName *string `min:"3" type:"string" required:"true"`
  11839. // Size of the table in bytes. Please note this is an approximate value.
  11840. TableSizeBytes *int64 `type:"long"`
  11841. }
  11842. // String returns the string representation
  11843. func (s SourceTableDetails) String() string {
  11844. return awsutil.Prettify(s)
  11845. }
  11846. // GoString returns the string representation
  11847. func (s SourceTableDetails) GoString() string {
  11848. return s.String()
  11849. }
  11850. // SetBillingMode sets the BillingMode field's value.
  11851. func (s *SourceTableDetails) SetBillingMode(v string) *SourceTableDetails {
  11852. s.BillingMode = &v
  11853. return s
  11854. }
  11855. // SetItemCount sets the ItemCount field's value.
  11856. func (s *SourceTableDetails) SetItemCount(v int64) *SourceTableDetails {
  11857. s.ItemCount = &v
  11858. return s
  11859. }
  11860. // SetKeySchema sets the KeySchema field's value.
  11861. func (s *SourceTableDetails) SetKeySchema(v []*KeySchemaElement) *SourceTableDetails {
  11862. s.KeySchema = v
  11863. return s
  11864. }
  11865. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  11866. func (s *SourceTableDetails) SetProvisionedThroughput(v *ProvisionedThroughput) *SourceTableDetails {
  11867. s.ProvisionedThroughput = v
  11868. return s
  11869. }
  11870. // SetTableArn sets the TableArn field's value.
  11871. func (s *SourceTableDetails) SetTableArn(v string) *SourceTableDetails {
  11872. s.TableArn = &v
  11873. return s
  11874. }
  11875. // SetTableCreationDateTime sets the TableCreationDateTime field's value.
  11876. func (s *SourceTableDetails) SetTableCreationDateTime(v time.Time) *SourceTableDetails {
  11877. s.TableCreationDateTime = &v
  11878. return s
  11879. }
  11880. // SetTableId sets the TableId field's value.
  11881. func (s *SourceTableDetails) SetTableId(v string) *SourceTableDetails {
  11882. s.TableId = &v
  11883. return s
  11884. }
  11885. // SetTableName sets the TableName field's value.
  11886. func (s *SourceTableDetails) SetTableName(v string) *SourceTableDetails {
  11887. s.TableName = &v
  11888. return s
  11889. }
  11890. // SetTableSizeBytes sets the TableSizeBytes field's value.
  11891. func (s *SourceTableDetails) SetTableSizeBytes(v int64) *SourceTableDetails {
  11892. s.TableSizeBytes = &v
  11893. return s
  11894. }
  11895. // Contains the details of the features enabled on the table when the backup
  11896. // was created. For example, LSIs, GSIs, streams, TTL.
  11897. type SourceTableFeatureDetails struct {
  11898. _ struct{} `type:"structure"`
  11899. // Represents the GSI properties for the table when the backup was created.
  11900. // It includes the IndexName, KeySchema, Projection and ProvisionedThroughput
  11901. // for the GSIs on the table at the time of backup.
  11902. GlobalSecondaryIndexes []*GlobalSecondaryIndexInfo `type:"list"`
  11903. // Represents the LSI properties for the table when the backup was created.
  11904. // It includes the IndexName, KeySchema and Projection for the LSIs on the table
  11905. // at the time of backup.
  11906. LocalSecondaryIndexes []*LocalSecondaryIndexInfo `type:"list"`
  11907. // The description of the server-side encryption status on the table when the
  11908. // backup was created.
  11909. SSEDescription *SSEDescription `type:"structure"`
  11910. // Stream settings on the table when the backup was created.
  11911. StreamDescription *StreamSpecification `type:"structure"`
  11912. // Time to Live settings on the table when the backup was created.
  11913. TimeToLiveDescription *TimeToLiveDescription `type:"structure"`
  11914. }
  11915. // String returns the string representation
  11916. func (s SourceTableFeatureDetails) String() string {
  11917. return awsutil.Prettify(s)
  11918. }
  11919. // GoString returns the string representation
  11920. func (s SourceTableFeatureDetails) GoString() string {
  11921. return s.String()
  11922. }
  11923. // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
  11924. func (s *SourceTableFeatureDetails) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndexInfo) *SourceTableFeatureDetails {
  11925. s.GlobalSecondaryIndexes = v
  11926. return s
  11927. }
  11928. // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value.
  11929. func (s *SourceTableFeatureDetails) SetLocalSecondaryIndexes(v []*LocalSecondaryIndexInfo) *SourceTableFeatureDetails {
  11930. s.LocalSecondaryIndexes = v
  11931. return s
  11932. }
  11933. // SetSSEDescription sets the SSEDescription field's value.
  11934. func (s *SourceTableFeatureDetails) SetSSEDescription(v *SSEDescription) *SourceTableFeatureDetails {
  11935. s.SSEDescription = v
  11936. return s
  11937. }
  11938. // SetStreamDescription sets the StreamDescription field's value.
  11939. func (s *SourceTableFeatureDetails) SetStreamDescription(v *StreamSpecification) *SourceTableFeatureDetails {
  11940. s.StreamDescription = v
  11941. return s
  11942. }
  11943. // SetTimeToLiveDescription sets the TimeToLiveDescription field's value.
  11944. func (s *SourceTableFeatureDetails) SetTimeToLiveDescription(v *TimeToLiveDescription) *SourceTableFeatureDetails {
  11945. s.TimeToLiveDescription = v
  11946. return s
  11947. }
  11948. // Represents the DynamoDB Streams configuration for a table in DynamoDB.
  11949. type StreamSpecification struct {
  11950. _ struct{} `type:"structure"`
  11951. // Indicates whether DynamoDB Streams is enabled (true) or disabled (false)
  11952. // on the table.
  11953. StreamEnabled *bool `type:"boolean"`
  11954. // When an item in the table is modified, StreamViewType determines what information
  11955. // is written to the stream for this table. Valid values for StreamViewType
  11956. // are:
  11957. //
  11958. // * KEYS_ONLY - Only the key attributes of the modified item are written
  11959. // to the stream.
  11960. //
  11961. // * NEW_IMAGE - The entire item, as it appears after it was modified, is
  11962. // written to the stream.
  11963. //
  11964. // * OLD_IMAGE - The entire item, as it appeared before it was modified,
  11965. // is written to the stream.
  11966. //
  11967. // * NEW_AND_OLD_IMAGES - Both the new and the old item images of the item
  11968. // are written to the stream.
  11969. StreamViewType *string `type:"string" enum:"StreamViewType"`
  11970. }
  11971. // String returns the string representation
  11972. func (s StreamSpecification) String() string {
  11973. return awsutil.Prettify(s)
  11974. }
  11975. // GoString returns the string representation
  11976. func (s StreamSpecification) GoString() string {
  11977. return s.String()
  11978. }
  11979. // SetStreamEnabled sets the StreamEnabled field's value.
  11980. func (s *StreamSpecification) SetStreamEnabled(v bool) *StreamSpecification {
  11981. s.StreamEnabled = &v
  11982. return s
  11983. }
  11984. // SetStreamViewType sets the StreamViewType field's value.
  11985. func (s *StreamSpecification) SetStreamViewType(v string) *StreamSpecification {
  11986. s.StreamViewType = &v
  11987. return s
  11988. }
  11989. // Represents the properties of a table.
  11990. type TableDescription struct {
  11991. _ struct{} `type:"structure"`
  11992. // An array of AttributeDefinition objects. Each of these objects describes
  11993. // one attribute in the table and index key schema.
  11994. //
  11995. // Each AttributeDefinition object in this array is composed of:
  11996. //
  11997. // * AttributeName - The name of the attribute.
  11998. //
  11999. // * AttributeType - The data type for the attribute.
  12000. AttributeDefinitions []*AttributeDefinition `type:"list"`
  12001. // Contains the details for the read/write capacity mode.
  12002. BillingModeSummary *BillingModeSummary `type:"structure"`
  12003. // The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/)
  12004. // format.
  12005. CreationDateTime *time.Time `type:"timestamp"`
  12006. // The global secondary indexes, if any, on the table. Each index is scoped
  12007. // to a given partition key value. Each element is composed of:
  12008. //
  12009. // * Backfilling - If true, then the index is currently in the backfilling
  12010. // phase. Backfilling occurs only when a new global secondary index is added
  12011. // to the table; it is the process by which DynamoDB populates the new index
  12012. // with data from the table. (This attribute does not appear for indexes
  12013. // that were created during a CreateTable operation.)
  12014. //
  12015. // * IndexName - The name of the global secondary index.
  12016. //
  12017. // * IndexSizeBytes - The total size of the global secondary index, in bytes.
  12018. // DynamoDB updates this value approximately every six hours. Recent changes
  12019. // might not be reflected in this value.
  12020. //
  12021. // * IndexStatus - The current status of the global secondary index:
  12022. //
  12023. // CREATING - The index is being created.
  12024. //
  12025. // UPDATING - The index is being updated.
  12026. //
  12027. // DELETING - The index is being deleted.
  12028. //
  12029. // ACTIVE - The index is ready for use.
  12030. //
  12031. // * ItemCount - The number of items in the global secondary index. DynamoDB
  12032. // updates this value approximately every six hours. Recent changes might
  12033. // not be reflected in this value.
  12034. //
  12035. // * KeySchema - Specifies the complete index key schema. The attribute names
  12036. // in the key schema must be between 1 and 255 characters (inclusive). The
  12037. // key schema must begin with the same partition key as the table.
  12038. //
  12039. // * Projection - Specifies attributes that are copied (projected) from the
  12040. // table into the index. These are in addition to the primary key attributes
  12041. // and index key attributes, which are automatically projected. Each attribute
  12042. // specification is composed of:
  12043. //
  12044. // ProjectionType - One of the following:
  12045. //
  12046. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  12047. //
  12048. // INCLUDE - Only the specified table attributes are projected into the index.
  12049. // The list of projected attributes are in NonKeyAttributes.
  12050. //
  12051. // ALL - All of the table attributes are projected into the index.
  12052. //
  12053. // NonKeyAttributes - A list of one or more non-key attribute names that are
  12054. // projected into the secondary index. The total count of attributes provided
  12055. // in NonKeyAttributes, summed across all of the secondary indexes, must
  12056. // not exceed 20. If you project the same attribute into two different indexes,
  12057. // this counts as two distinct attributes when determining the total.
  12058. //
  12059. // * ProvisionedThroughput - The provisioned throughput settings for the
  12060. // global secondary index, consisting of read and write capacity units, along
  12061. // with data about increases and decreases.
  12062. //
  12063. // If the table is in the DELETING state, no information about indexes will
  12064. // be returned.
  12065. GlobalSecondaryIndexes []*GlobalSecondaryIndexDescription `type:"list"`
  12066. // The number of items in the specified table. DynamoDB updates this value approximately
  12067. // every six hours. Recent changes might not be reflected in this value.
  12068. ItemCount *int64 `type:"long"`
  12069. // The primary key structure for the table. Each KeySchemaElement consists of:
  12070. //
  12071. // * AttributeName - The name of the attribute.
  12072. //
  12073. // * KeyType - The role of the attribute:
  12074. //
  12075. // HASH - partition key
  12076. //
  12077. // RANGE - sort key
  12078. //
  12079. // The partition key of an item is also known as its hash attribute. The term
  12080. // "hash attribute" derives from DynamoDB' usage of an internal hash function
  12081. // to evenly distribute data items across partitions, based on their partition
  12082. // key values.
  12083. //
  12084. // The sort key of an item is also known as its range attribute. The term "range
  12085. // attribute" derives from the way DynamoDB stores items with the same partition
  12086. // key physically close together, in sorted order by the sort key value.
  12087. //
  12088. // For more information about primary keys, see Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey)
  12089. // in the Amazon DynamoDB Developer Guide.
  12090. KeySchema []*KeySchemaElement `min:"1" type:"list"`
  12091. // The Amazon Resource Name (ARN) that uniquely identifies the latest stream
  12092. // for this table.
  12093. LatestStreamArn *string `min:"37" type:"string"`
  12094. // A timestamp, in ISO 8601 format, for this stream.
  12095. //
  12096. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  12097. // it is possible that a stream from another table might have the same timestamp.
  12098. // However, the combination of the following three elements is guaranteed to
  12099. // be unique:
  12100. //
  12101. // * the AWS customer ID.
  12102. //
  12103. // * the table name.
  12104. //
  12105. // * the StreamLabel.
  12106. LatestStreamLabel *string `type:"string"`
  12107. // Represents one or more local secondary indexes on the table. Each index is
  12108. // scoped to a given partition key value. Tables with one or more local secondary
  12109. // indexes are subject to an item collection size limit, where the amount of
  12110. // data within a given item collection cannot exceed 10 GB. Each element is
  12111. // composed of:
  12112. //
  12113. // * IndexName - The name of the local secondary index.
  12114. //
  12115. // * KeySchema - Specifies the complete index key schema. The attribute names
  12116. // in the key schema must be between 1 and 255 characters (inclusive). The
  12117. // key schema must begin with the same partition key as the table.
  12118. //
  12119. // * Projection - Specifies attributes that are copied (projected) from the
  12120. // table into the index. These are in addition to the primary key attributes
  12121. // and index key attributes, which are automatically projected. Each attribute
  12122. // specification is composed of:
  12123. //
  12124. // ProjectionType - One of the following:
  12125. //
  12126. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  12127. //
  12128. // INCLUDE - Only the specified table attributes are projected into the index.
  12129. // The list of projected attributes are in NonKeyAttributes.
  12130. //
  12131. // ALL - All of the table attributes are projected into the index.
  12132. //
  12133. // NonKeyAttributes - A list of one or more non-key attribute names that are
  12134. // projected into the secondary index. The total count of attributes provided
  12135. // in NonKeyAttributes, summed across all of the secondary indexes, must
  12136. // not exceed 20. If you project the same attribute into two different indexes,
  12137. // this counts as two distinct attributes when determining the total.
  12138. //
  12139. // * IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB
  12140. // updates this value approximately every six hours. Recent changes might
  12141. // not be reflected in this value.
  12142. //
  12143. // * ItemCount - Represents the number of items in the index. DynamoDB updates
  12144. // this value approximately every six hours. Recent changes might not be
  12145. // reflected in this value.
  12146. //
  12147. // If the table is in the DELETING state, no information about indexes will
  12148. // be returned.
  12149. LocalSecondaryIndexes []*LocalSecondaryIndexDescription `type:"list"`
  12150. // The provisioned throughput settings for the table, consisting of read and
  12151. // write capacity units, along with data about increases and decreases.
  12152. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"`
  12153. // Contains details for the restore.
  12154. RestoreSummary *RestoreSummary `type:"structure"`
  12155. // The description of the server-side encryption status on the specified table.
  12156. SSEDescription *SSEDescription `type:"structure"`
  12157. // The current DynamoDB Streams configuration for the table.
  12158. StreamSpecification *StreamSpecification `type:"structure"`
  12159. // The Amazon Resource Name (ARN) that uniquely identifies the table.
  12160. TableArn *string `type:"string"`
  12161. // Unique identifier for the table for which the backup was created.
  12162. TableId *string `type:"string"`
  12163. // The name of the table.
  12164. TableName *string `min:"3" type:"string"`
  12165. // The total size of the specified table, in bytes. DynamoDB updates this value
  12166. // approximately every six hours. Recent changes might not be reflected in this
  12167. // value.
  12168. TableSizeBytes *int64 `type:"long"`
  12169. // The current state of the table:
  12170. //
  12171. // * CREATING - The table is being created.
  12172. //
  12173. // * UPDATING - The table is being updated.
  12174. //
  12175. // * DELETING - The table is being deleted.
  12176. //
  12177. // * ACTIVE - The table is ready for use.
  12178. TableStatus *string `type:"string" enum:"TableStatus"`
  12179. }
  12180. // String returns the string representation
  12181. func (s TableDescription) String() string {
  12182. return awsutil.Prettify(s)
  12183. }
  12184. // GoString returns the string representation
  12185. func (s TableDescription) GoString() string {
  12186. return s.String()
  12187. }
  12188. // SetAttributeDefinitions sets the AttributeDefinitions field's value.
  12189. func (s *TableDescription) SetAttributeDefinitions(v []*AttributeDefinition) *TableDescription {
  12190. s.AttributeDefinitions = v
  12191. return s
  12192. }
  12193. // SetBillingModeSummary sets the BillingModeSummary field's value.
  12194. func (s *TableDescription) SetBillingModeSummary(v *BillingModeSummary) *TableDescription {
  12195. s.BillingModeSummary = v
  12196. return s
  12197. }
  12198. // SetCreationDateTime sets the CreationDateTime field's value.
  12199. func (s *TableDescription) SetCreationDateTime(v time.Time) *TableDescription {
  12200. s.CreationDateTime = &v
  12201. return s
  12202. }
  12203. // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value.
  12204. func (s *TableDescription) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndexDescription) *TableDescription {
  12205. s.GlobalSecondaryIndexes = v
  12206. return s
  12207. }
  12208. // SetItemCount sets the ItemCount field's value.
  12209. func (s *TableDescription) SetItemCount(v int64) *TableDescription {
  12210. s.ItemCount = &v
  12211. return s
  12212. }
  12213. // SetKeySchema sets the KeySchema field's value.
  12214. func (s *TableDescription) SetKeySchema(v []*KeySchemaElement) *TableDescription {
  12215. s.KeySchema = v
  12216. return s
  12217. }
  12218. // SetLatestStreamArn sets the LatestStreamArn field's value.
  12219. func (s *TableDescription) SetLatestStreamArn(v string) *TableDescription {
  12220. s.LatestStreamArn = &v
  12221. return s
  12222. }
  12223. // SetLatestStreamLabel sets the LatestStreamLabel field's value.
  12224. func (s *TableDescription) SetLatestStreamLabel(v string) *TableDescription {
  12225. s.LatestStreamLabel = &v
  12226. return s
  12227. }
  12228. // SetLocalSecondaryIndexes sets the LocalSecondaryIndexes field's value.
  12229. func (s *TableDescription) SetLocalSecondaryIndexes(v []*LocalSecondaryIndexDescription) *TableDescription {
  12230. s.LocalSecondaryIndexes = v
  12231. return s
  12232. }
  12233. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  12234. func (s *TableDescription) SetProvisionedThroughput(v *ProvisionedThroughputDescription) *TableDescription {
  12235. s.ProvisionedThroughput = v
  12236. return s
  12237. }
  12238. // SetRestoreSummary sets the RestoreSummary field's value.
  12239. func (s *TableDescription) SetRestoreSummary(v *RestoreSummary) *TableDescription {
  12240. s.RestoreSummary = v
  12241. return s
  12242. }
  12243. // SetSSEDescription sets the SSEDescription field's value.
  12244. func (s *TableDescription) SetSSEDescription(v *SSEDescription) *TableDescription {
  12245. s.SSEDescription = v
  12246. return s
  12247. }
  12248. // SetStreamSpecification sets the StreamSpecification field's value.
  12249. func (s *TableDescription) SetStreamSpecification(v *StreamSpecification) *TableDescription {
  12250. s.StreamSpecification = v
  12251. return s
  12252. }
  12253. // SetTableArn sets the TableArn field's value.
  12254. func (s *TableDescription) SetTableArn(v string) *TableDescription {
  12255. s.TableArn = &v
  12256. return s
  12257. }
  12258. // SetTableId sets the TableId field's value.
  12259. func (s *TableDescription) SetTableId(v string) *TableDescription {
  12260. s.TableId = &v
  12261. return s
  12262. }
  12263. // SetTableName sets the TableName field's value.
  12264. func (s *TableDescription) SetTableName(v string) *TableDescription {
  12265. s.TableName = &v
  12266. return s
  12267. }
  12268. // SetTableSizeBytes sets the TableSizeBytes field's value.
  12269. func (s *TableDescription) SetTableSizeBytes(v int64) *TableDescription {
  12270. s.TableSizeBytes = &v
  12271. return s
  12272. }
  12273. // SetTableStatus sets the TableStatus field's value.
  12274. func (s *TableDescription) SetTableStatus(v string) *TableDescription {
  12275. s.TableStatus = &v
  12276. return s
  12277. }
  12278. // Describes a tag. A tag is a key-value pair. You can add up to 50 tags to
  12279. // a single DynamoDB table.
  12280. //
  12281. // AWS-assigned tag names and values are automatically assigned the aws: prefix,
  12282. // which the user cannot assign. AWS-assigned tag names do not count towards
  12283. // the tag limit of 50. User-assigned tag names have the prefix user: in the
  12284. // Cost Allocation Report. You cannot backdate the application of a tag.
  12285. //
  12286. // For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html)
  12287. // in the Amazon DynamoDB Developer Guide.
  12288. type Tag struct {
  12289. _ struct{} `type:"structure"`
  12290. // The key of the tag.Tag keys are case sensitive. Each DynamoDB table can only
  12291. // have up to one tag with the same key. If you try to add an existing tag (same
  12292. // key), the existing tag value will be updated to the new value.
  12293. //
  12294. // Key is a required field
  12295. Key *string `min:"1" type:"string" required:"true"`
  12296. // The value of the tag. Tag values are case-sensitive and can be null.
  12297. //
  12298. // Value is a required field
  12299. Value *string `type:"string" required:"true"`
  12300. }
  12301. // String returns the string representation
  12302. func (s Tag) String() string {
  12303. return awsutil.Prettify(s)
  12304. }
  12305. // GoString returns the string representation
  12306. func (s Tag) GoString() string {
  12307. return s.String()
  12308. }
  12309. // Validate inspects the fields of the type to determine if they are valid.
  12310. func (s *Tag) Validate() error {
  12311. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  12312. if s.Key == nil {
  12313. invalidParams.Add(request.NewErrParamRequired("Key"))
  12314. }
  12315. if s.Key != nil && len(*s.Key) < 1 {
  12316. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12317. }
  12318. if s.Value == nil {
  12319. invalidParams.Add(request.NewErrParamRequired("Value"))
  12320. }
  12321. if invalidParams.Len() > 0 {
  12322. return invalidParams
  12323. }
  12324. return nil
  12325. }
  12326. // SetKey sets the Key field's value.
  12327. func (s *Tag) SetKey(v string) *Tag {
  12328. s.Key = &v
  12329. return s
  12330. }
  12331. // SetValue sets the Value field's value.
  12332. func (s *Tag) SetValue(v string) *Tag {
  12333. s.Value = &v
  12334. return s
  12335. }
  12336. type TagResourceInput struct {
  12337. _ struct{} `type:"structure"`
  12338. // Identifies the Amazon DynamoDB resource to which tags should be added. This
  12339. // value is an Amazon Resource Name (ARN).
  12340. //
  12341. // ResourceArn is a required field
  12342. ResourceArn *string `min:"1" type:"string" required:"true"`
  12343. // The tags to be assigned to the Amazon DynamoDB resource.
  12344. //
  12345. // Tags is a required field
  12346. Tags []*Tag `type:"list" required:"true"`
  12347. }
  12348. // String returns the string representation
  12349. func (s TagResourceInput) String() string {
  12350. return awsutil.Prettify(s)
  12351. }
  12352. // GoString returns the string representation
  12353. func (s TagResourceInput) GoString() string {
  12354. return s.String()
  12355. }
  12356. // Validate inspects the fields of the type to determine if they are valid.
  12357. func (s *TagResourceInput) Validate() error {
  12358. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  12359. if s.ResourceArn == nil {
  12360. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  12361. }
  12362. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  12363. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  12364. }
  12365. if s.Tags == nil {
  12366. invalidParams.Add(request.NewErrParamRequired("Tags"))
  12367. }
  12368. if s.Tags != nil {
  12369. for i, v := range s.Tags {
  12370. if v == nil {
  12371. continue
  12372. }
  12373. if err := v.Validate(); err != nil {
  12374. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  12375. }
  12376. }
  12377. }
  12378. if invalidParams.Len() > 0 {
  12379. return invalidParams
  12380. }
  12381. return nil
  12382. }
  12383. // SetResourceArn sets the ResourceArn field's value.
  12384. func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
  12385. s.ResourceArn = &v
  12386. return s
  12387. }
  12388. // SetTags sets the Tags field's value.
  12389. func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
  12390. s.Tags = v
  12391. return s
  12392. }
  12393. type TagResourceOutput struct {
  12394. _ struct{} `type:"structure"`
  12395. }
  12396. // String returns the string representation
  12397. func (s TagResourceOutput) String() string {
  12398. return awsutil.Prettify(s)
  12399. }
  12400. // GoString returns the string representation
  12401. func (s TagResourceOutput) GoString() string {
  12402. return s.String()
  12403. }
  12404. // The description of the Time to Live (TTL) status on the specified table.
  12405. type TimeToLiveDescription struct {
  12406. _ struct{} `type:"structure"`
  12407. // The name of the Time to Live attribute for items in the table.
  12408. AttributeName *string `min:"1" type:"string"`
  12409. // The Time to Live status for the table.
  12410. TimeToLiveStatus *string `type:"string" enum:"TimeToLiveStatus"`
  12411. }
  12412. // String returns the string representation
  12413. func (s TimeToLiveDescription) String() string {
  12414. return awsutil.Prettify(s)
  12415. }
  12416. // GoString returns the string representation
  12417. func (s TimeToLiveDescription) GoString() string {
  12418. return s.String()
  12419. }
  12420. // SetAttributeName sets the AttributeName field's value.
  12421. func (s *TimeToLiveDescription) SetAttributeName(v string) *TimeToLiveDescription {
  12422. s.AttributeName = &v
  12423. return s
  12424. }
  12425. // SetTimeToLiveStatus sets the TimeToLiveStatus field's value.
  12426. func (s *TimeToLiveDescription) SetTimeToLiveStatus(v string) *TimeToLiveDescription {
  12427. s.TimeToLiveStatus = &v
  12428. return s
  12429. }
  12430. // Represents the settings used to enable or disable Time to Live for the specified
  12431. // table.
  12432. type TimeToLiveSpecification struct {
  12433. _ struct{} `type:"structure"`
  12434. // The name of the Time to Live attribute used to store the expiration time
  12435. // for items in the table.
  12436. //
  12437. // AttributeName is a required field
  12438. AttributeName *string `min:"1" type:"string" required:"true"`
  12439. // Indicates whether Time To Live is to be enabled (true) or disabled (false)
  12440. // on the table.
  12441. //
  12442. // Enabled is a required field
  12443. Enabled *bool `type:"boolean" required:"true"`
  12444. }
  12445. // String returns the string representation
  12446. func (s TimeToLiveSpecification) String() string {
  12447. return awsutil.Prettify(s)
  12448. }
  12449. // GoString returns the string representation
  12450. func (s TimeToLiveSpecification) GoString() string {
  12451. return s.String()
  12452. }
  12453. // Validate inspects the fields of the type to determine if they are valid.
  12454. func (s *TimeToLiveSpecification) Validate() error {
  12455. invalidParams := request.ErrInvalidParams{Context: "TimeToLiveSpecification"}
  12456. if s.AttributeName == nil {
  12457. invalidParams.Add(request.NewErrParamRequired("AttributeName"))
  12458. }
  12459. if s.AttributeName != nil && len(*s.AttributeName) < 1 {
  12460. invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1))
  12461. }
  12462. if s.Enabled == nil {
  12463. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  12464. }
  12465. if invalidParams.Len() > 0 {
  12466. return invalidParams
  12467. }
  12468. return nil
  12469. }
  12470. // SetAttributeName sets the AttributeName field's value.
  12471. func (s *TimeToLiveSpecification) SetAttributeName(v string) *TimeToLiveSpecification {
  12472. s.AttributeName = &v
  12473. return s
  12474. }
  12475. // SetEnabled sets the Enabled field's value.
  12476. func (s *TimeToLiveSpecification) SetEnabled(v bool) *TimeToLiveSpecification {
  12477. s.Enabled = &v
  12478. return s
  12479. }
  12480. // Specifies an item to be retrieved as part of the transaction.
  12481. type TransactGetItem struct {
  12482. _ struct{} `type:"structure"`
  12483. // Contains the primary key that identifies the item to get, together with the
  12484. // name of the table that contains the item, and optionally the specific attributes
  12485. // of the item to retrieve.
  12486. //
  12487. // Get is a required field
  12488. Get *Get `type:"structure" required:"true"`
  12489. }
  12490. // String returns the string representation
  12491. func (s TransactGetItem) String() string {
  12492. return awsutil.Prettify(s)
  12493. }
  12494. // GoString returns the string representation
  12495. func (s TransactGetItem) GoString() string {
  12496. return s.String()
  12497. }
  12498. // Validate inspects the fields of the type to determine if they are valid.
  12499. func (s *TransactGetItem) Validate() error {
  12500. invalidParams := request.ErrInvalidParams{Context: "TransactGetItem"}
  12501. if s.Get == nil {
  12502. invalidParams.Add(request.NewErrParamRequired("Get"))
  12503. }
  12504. if s.Get != nil {
  12505. if err := s.Get.Validate(); err != nil {
  12506. invalidParams.AddNested("Get", err.(request.ErrInvalidParams))
  12507. }
  12508. }
  12509. if invalidParams.Len() > 0 {
  12510. return invalidParams
  12511. }
  12512. return nil
  12513. }
  12514. // SetGet sets the Get field's value.
  12515. func (s *TransactGetItem) SetGet(v *Get) *TransactGetItem {
  12516. s.Get = v
  12517. return s
  12518. }
  12519. type TransactGetItemsInput struct {
  12520. _ struct{} `type:"structure"`
  12521. // A value of TOTAL causes consumed capacity information to be returned, and
  12522. // a value of NONE prevents that information from being returned. No other value
  12523. // is valid.
  12524. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  12525. // An ordered array of up to 10 TransactGetItem objects, each of which contains
  12526. // a Get structure.
  12527. //
  12528. // TransactItems is a required field
  12529. TransactItems []*TransactGetItem `min:"1" type:"list" required:"true"`
  12530. }
  12531. // String returns the string representation
  12532. func (s TransactGetItemsInput) String() string {
  12533. return awsutil.Prettify(s)
  12534. }
  12535. // GoString returns the string representation
  12536. func (s TransactGetItemsInput) GoString() string {
  12537. return s.String()
  12538. }
  12539. // Validate inspects the fields of the type to determine if they are valid.
  12540. func (s *TransactGetItemsInput) Validate() error {
  12541. invalidParams := request.ErrInvalidParams{Context: "TransactGetItemsInput"}
  12542. if s.TransactItems == nil {
  12543. invalidParams.Add(request.NewErrParamRequired("TransactItems"))
  12544. }
  12545. if s.TransactItems != nil && len(s.TransactItems) < 1 {
  12546. invalidParams.Add(request.NewErrParamMinLen("TransactItems", 1))
  12547. }
  12548. if s.TransactItems != nil {
  12549. for i, v := range s.TransactItems {
  12550. if v == nil {
  12551. continue
  12552. }
  12553. if err := v.Validate(); err != nil {
  12554. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TransactItems", i), err.(request.ErrInvalidParams))
  12555. }
  12556. }
  12557. }
  12558. if invalidParams.Len() > 0 {
  12559. return invalidParams
  12560. }
  12561. return nil
  12562. }
  12563. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  12564. func (s *TransactGetItemsInput) SetReturnConsumedCapacity(v string) *TransactGetItemsInput {
  12565. s.ReturnConsumedCapacity = &v
  12566. return s
  12567. }
  12568. // SetTransactItems sets the TransactItems field's value.
  12569. func (s *TransactGetItemsInput) SetTransactItems(v []*TransactGetItem) *TransactGetItemsInput {
  12570. s.TransactItems = v
  12571. return s
  12572. }
  12573. type TransactGetItemsOutput struct {
  12574. _ struct{} `type:"structure"`
  12575. // If the ReturnConsumedCapacity value was TOTAL, this is an array of ConsumedCapacity
  12576. // objects, one for each table addressed by TransactGetItem objects in the TransactItems
  12577. // parameter. These ConsumedCapacity objects report the read-capacity units
  12578. // consumed by the TransactGetItems call in that table.
  12579. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  12580. // An ordered array of up to 10 ItemResponse objects, each of which corresponds
  12581. // to the TransactGetItem object in the same position in the TransactItems array.
  12582. // Each ItemResponse object contains a Map of the name-value pairs that are
  12583. // the projected attributes of the requested item.
  12584. //
  12585. // If a requested item could not be retrieved, the corresponding ItemResponse
  12586. // object is Null, or if the requested item has no projected attributes, the
  12587. // corresponding ItemResponse object is an empty Map.
  12588. Responses []*ItemResponse `min:"1" type:"list"`
  12589. }
  12590. // String returns the string representation
  12591. func (s TransactGetItemsOutput) String() string {
  12592. return awsutil.Prettify(s)
  12593. }
  12594. // GoString returns the string representation
  12595. func (s TransactGetItemsOutput) GoString() string {
  12596. return s.String()
  12597. }
  12598. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  12599. func (s *TransactGetItemsOutput) SetConsumedCapacity(v []*ConsumedCapacity) *TransactGetItemsOutput {
  12600. s.ConsumedCapacity = v
  12601. return s
  12602. }
  12603. // SetResponses sets the Responses field's value.
  12604. func (s *TransactGetItemsOutput) SetResponses(v []*ItemResponse) *TransactGetItemsOutput {
  12605. s.Responses = v
  12606. return s
  12607. }
  12608. // A list of requests that can perform update, put, delete, or check operations
  12609. // on multiple items in one or more tables atomically.
  12610. type TransactWriteItem struct {
  12611. _ struct{} `type:"structure"`
  12612. // A request to perform a check item operation.
  12613. ConditionCheck *ConditionCheck `type:"structure"`
  12614. // A request to perform a DeleteItem operation.
  12615. Delete *Delete `type:"structure"`
  12616. // A request to perform a PutItem operation.
  12617. Put *Put `type:"structure"`
  12618. // A request to perform an UpdateItem operation.
  12619. Update *Update `type:"structure"`
  12620. }
  12621. // String returns the string representation
  12622. func (s TransactWriteItem) String() string {
  12623. return awsutil.Prettify(s)
  12624. }
  12625. // GoString returns the string representation
  12626. func (s TransactWriteItem) GoString() string {
  12627. return s.String()
  12628. }
  12629. // Validate inspects the fields of the type to determine if they are valid.
  12630. func (s *TransactWriteItem) Validate() error {
  12631. invalidParams := request.ErrInvalidParams{Context: "TransactWriteItem"}
  12632. if s.ConditionCheck != nil {
  12633. if err := s.ConditionCheck.Validate(); err != nil {
  12634. invalidParams.AddNested("ConditionCheck", err.(request.ErrInvalidParams))
  12635. }
  12636. }
  12637. if s.Delete != nil {
  12638. if err := s.Delete.Validate(); err != nil {
  12639. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  12640. }
  12641. }
  12642. if s.Put != nil {
  12643. if err := s.Put.Validate(); err != nil {
  12644. invalidParams.AddNested("Put", err.(request.ErrInvalidParams))
  12645. }
  12646. }
  12647. if s.Update != nil {
  12648. if err := s.Update.Validate(); err != nil {
  12649. invalidParams.AddNested("Update", err.(request.ErrInvalidParams))
  12650. }
  12651. }
  12652. if invalidParams.Len() > 0 {
  12653. return invalidParams
  12654. }
  12655. return nil
  12656. }
  12657. // SetConditionCheck sets the ConditionCheck field's value.
  12658. func (s *TransactWriteItem) SetConditionCheck(v *ConditionCheck) *TransactWriteItem {
  12659. s.ConditionCheck = v
  12660. return s
  12661. }
  12662. // SetDelete sets the Delete field's value.
  12663. func (s *TransactWriteItem) SetDelete(v *Delete) *TransactWriteItem {
  12664. s.Delete = v
  12665. return s
  12666. }
  12667. // SetPut sets the Put field's value.
  12668. func (s *TransactWriteItem) SetPut(v *Put) *TransactWriteItem {
  12669. s.Put = v
  12670. return s
  12671. }
  12672. // SetUpdate sets the Update field's value.
  12673. func (s *TransactWriteItem) SetUpdate(v *Update) *TransactWriteItem {
  12674. s.Update = v
  12675. return s
  12676. }
  12677. type TransactWriteItemsInput struct {
  12678. _ struct{} `type:"structure"`
  12679. // Providing a ClientRequestToken makes the call to TransactWriteItems idempotent,
  12680. // meaning that multiple identical calls have the same effect as one single
  12681. // call.
  12682. //
  12683. // Although multiple identical calls using the same client request token produce
  12684. // the same result on the server (no side effects), the responses to the calls
  12685. // may not be the same. If the ReturnConsumedCapacity> parameter is set, then
  12686. // the initial TransactWriteItems call returns the amount of write capacity
  12687. // units consumed in making the changes, and subsequent TransactWriteItems calls
  12688. // with the same client token return the amount of read capacity units consumed
  12689. // in reading the item.
  12690. //
  12691. // A client request token is valid for 10 minutes after the first request that
  12692. // uses it completes. After 10 minutes, any request with the same client token
  12693. // is treated as a new request. Do not resubmit the same request with the same
  12694. // client token for more than 10 minutes or the result may not be idempotent.
  12695. //
  12696. // If you submit a request with the same client token but a change in other
  12697. // parameters within the 10 minute idempotency window, DynamoDB returns an IdempotentParameterMismatch
  12698. // exception.
  12699. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"`
  12700. // Determines the level of detail about provisioned throughput consumption that
  12701. // is returned in the response:
  12702. //
  12703. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  12704. // operation, together with ConsumedCapacity for each table and secondary
  12705. // index that was accessed.
  12706. //
  12707. // Note that some operations, such as GetItem and BatchGetItem, do not access
  12708. // any indexes at all. In these cases, specifying INDEXES will only return
  12709. // ConsumedCapacity information for table(s).
  12710. //
  12711. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  12712. // the operation.
  12713. //
  12714. // * NONE - No ConsumedCapacity details are included in the response.
  12715. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  12716. // Determines whether item collection metrics are returned. If set to SIZE,
  12717. // the response includes statistics about item collections (if any), that were
  12718. // modified during the operation and are returned in the response. If set to
  12719. // NONE (the default), no statistics are returned.
  12720. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  12721. // An ordered array of up to 10 TransactWriteItem objects, each of which contains
  12722. // a ConditionCheck, Put, Update, or Delete object. These can operate on items
  12723. // in different tables, but the tables must reside in the same AWS account and
  12724. // region, and no two of them can operate on the same item.
  12725. //
  12726. // TransactItems is a required field
  12727. TransactItems []*TransactWriteItem `min:"1" type:"list" required:"true"`
  12728. }
  12729. // String returns the string representation
  12730. func (s TransactWriteItemsInput) String() string {
  12731. return awsutil.Prettify(s)
  12732. }
  12733. // GoString returns the string representation
  12734. func (s TransactWriteItemsInput) GoString() string {
  12735. return s.String()
  12736. }
  12737. // Validate inspects the fields of the type to determine if they are valid.
  12738. func (s *TransactWriteItemsInput) Validate() error {
  12739. invalidParams := request.ErrInvalidParams{Context: "TransactWriteItemsInput"}
  12740. if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 {
  12741. invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1))
  12742. }
  12743. if s.TransactItems == nil {
  12744. invalidParams.Add(request.NewErrParamRequired("TransactItems"))
  12745. }
  12746. if s.TransactItems != nil && len(s.TransactItems) < 1 {
  12747. invalidParams.Add(request.NewErrParamMinLen("TransactItems", 1))
  12748. }
  12749. if s.TransactItems != nil {
  12750. for i, v := range s.TransactItems {
  12751. if v == nil {
  12752. continue
  12753. }
  12754. if err := v.Validate(); err != nil {
  12755. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TransactItems", i), err.(request.ErrInvalidParams))
  12756. }
  12757. }
  12758. }
  12759. if invalidParams.Len() > 0 {
  12760. return invalidParams
  12761. }
  12762. return nil
  12763. }
  12764. // SetClientRequestToken sets the ClientRequestToken field's value.
  12765. func (s *TransactWriteItemsInput) SetClientRequestToken(v string) *TransactWriteItemsInput {
  12766. s.ClientRequestToken = &v
  12767. return s
  12768. }
  12769. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  12770. func (s *TransactWriteItemsInput) SetReturnConsumedCapacity(v string) *TransactWriteItemsInput {
  12771. s.ReturnConsumedCapacity = &v
  12772. return s
  12773. }
  12774. // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value.
  12775. func (s *TransactWriteItemsInput) SetReturnItemCollectionMetrics(v string) *TransactWriteItemsInput {
  12776. s.ReturnItemCollectionMetrics = &v
  12777. return s
  12778. }
  12779. // SetTransactItems sets the TransactItems field's value.
  12780. func (s *TransactWriteItemsInput) SetTransactItems(v []*TransactWriteItem) *TransactWriteItemsInput {
  12781. s.TransactItems = v
  12782. return s
  12783. }
  12784. type TransactWriteItemsOutput struct {
  12785. _ struct{} `type:"structure"`
  12786. // The capacity units consumed by the entire TransactWriteItems operation. The
  12787. // values of the list are ordered according to the ordering of the TransactItems
  12788. // request parameter.
  12789. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  12790. // A list of tables that were processed by TransactWriteItems and, for each
  12791. // table, information about any item collections that were affected by individual
  12792. // UpdateItem, PutItem or DeleteItem operations.
  12793. ItemCollectionMetrics map[string][]*ItemCollectionMetrics `type:"map"`
  12794. }
  12795. // String returns the string representation
  12796. func (s TransactWriteItemsOutput) String() string {
  12797. return awsutil.Prettify(s)
  12798. }
  12799. // GoString returns the string representation
  12800. func (s TransactWriteItemsOutput) GoString() string {
  12801. return s.String()
  12802. }
  12803. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  12804. func (s *TransactWriteItemsOutput) SetConsumedCapacity(v []*ConsumedCapacity) *TransactWriteItemsOutput {
  12805. s.ConsumedCapacity = v
  12806. return s
  12807. }
  12808. // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value.
  12809. func (s *TransactWriteItemsOutput) SetItemCollectionMetrics(v map[string][]*ItemCollectionMetrics) *TransactWriteItemsOutput {
  12810. s.ItemCollectionMetrics = v
  12811. return s
  12812. }
  12813. type UntagResourceInput struct {
  12814. _ struct{} `type:"structure"`
  12815. // The Amazon DyanamoDB resource the tags will be removed from. This value is
  12816. // an Amazon Resource Name (ARN).
  12817. //
  12818. // ResourceArn is a required field
  12819. ResourceArn *string `min:"1" type:"string" required:"true"`
  12820. // A list of tag keys. Existing tags of the resource whose keys are members
  12821. // of this list will be removed from the Amazon DynamoDB resource.
  12822. //
  12823. // TagKeys is a required field
  12824. TagKeys []*string `type:"list" required:"true"`
  12825. }
  12826. // String returns the string representation
  12827. func (s UntagResourceInput) String() string {
  12828. return awsutil.Prettify(s)
  12829. }
  12830. // GoString returns the string representation
  12831. func (s UntagResourceInput) GoString() string {
  12832. return s.String()
  12833. }
  12834. // Validate inspects the fields of the type to determine if they are valid.
  12835. func (s *UntagResourceInput) Validate() error {
  12836. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  12837. if s.ResourceArn == nil {
  12838. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  12839. }
  12840. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  12841. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  12842. }
  12843. if s.TagKeys == nil {
  12844. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  12845. }
  12846. if invalidParams.Len() > 0 {
  12847. return invalidParams
  12848. }
  12849. return nil
  12850. }
  12851. // SetResourceArn sets the ResourceArn field's value.
  12852. func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
  12853. s.ResourceArn = &v
  12854. return s
  12855. }
  12856. // SetTagKeys sets the TagKeys field's value.
  12857. func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
  12858. s.TagKeys = v
  12859. return s
  12860. }
  12861. type UntagResourceOutput struct {
  12862. _ struct{} `type:"structure"`
  12863. }
  12864. // String returns the string representation
  12865. func (s UntagResourceOutput) String() string {
  12866. return awsutil.Prettify(s)
  12867. }
  12868. // GoString returns the string representation
  12869. func (s UntagResourceOutput) GoString() string {
  12870. return s.String()
  12871. }
  12872. // Represents a request to perform an UpdateItem operation.
  12873. type Update struct {
  12874. _ struct{} `type:"structure"`
  12875. // A condition that must be satisfied in order for a conditional update to succeed.
  12876. ConditionExpression *string `type:"string"`
  12877. // One or more substitution tokens for attribute names in an expression.
  12878. ExpressionAttributeNames map[string]*string `type:"map"`
  12879. // One or more values that can be substituted in an expression.
  12880. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  12881. // The primary key of the item to be updated. Each element consists of an attribute
  12882. // name and a value for that attribute.
  12883. //
  12884. // Key is a required field
  12885. Key map[string]*AttributeValue `type:"map" required:"true"`
  12886. // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the
  12887. // Update condition fails. For ReturnValuesOnConditionCheckFailure, the valid
  12888. // values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.
  12889. ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"`
  12890. // Name of the table for the UpdateItem request.
  12891. //
  12892. // TableName is a required field
  12893. TableName *string `min:"3" type:"string" required:"true"`
  12894. // An expression that defines one or more attributes to be updated, the action
  12895. // to be performed on them, and new value(s) for them.
  12896. //
  12897. // UpdateExpression is a required field
  12898. UpdateExpression *string `type:"string" required:"true"`
  12899. }
  12900. // String returns the string representation
  12901. func (s Update) String() string {
  12902. return awsutil.Prettify(s)
  12903. }
  12904. // GoString returns the string representation
  12905. func (s Update) GoString() string {
  12906. return s.String()
  12907. }
  12908. // Validate inspects the fields of the type to determine if they are valid.
  12909. func (s *Update) Validate() error {
  12910. invalidParams := request.ErrInvalidParams{Context: "Update"}
  12911. if s.Key == nil {
  12912. invalidParams.Add(request.NewErrParamRequired("Key"))
  12913. }
  12914. if s.TableName == nil {
  12915. invalidParams.Add(request.NewErrParamRequired("TableName"))
  12916. }
  12917. if s.TableName != nil && len(*s.TableName) < 3 {
  12918. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  12919. }
  12920. if s.UpdateExpression == nil {
  12921. invalidParams.Add(request.NewErrParamRequired("UpdateExpression"))
  12922. }
  12923. if invalidParams.Len() > 0 {
  12924. return invalidParams
  12925. }
  12926. return nil
  12927. }
  12928. // SetConditionExpression sets the ConditionExpression field's value.
  12929. func (s *Update) SetConditionExpression(v string) *Update {
  12930. s.ConditionExpression = &v
  12931. return s
  12932. }
  12933. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  12934. func (s *Update) SetExpressionAttributeNames(v map[string]*string) *Update {
  12935. s.ExpressionAttributeNames = v
  12936. return s
  12937. }
  12938. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  12939. func (s *Update) SetExpressionAttributeValues(v map[string]*AttributeValue) *Update {
  12940. s.ExpressionAttributeValues = v
  12941. return s
  12942. }
  12943. // SetKey sets the Key field's value.
  12944. func (s *Update) SetKey(v map[string]*AttributeValue) *Update {
  12945. s.Key = v
  12946. return s
  12947. }
  12948. // SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value.
  12949. func (s *Update) SetReturnValuesOnConditionCheckFailure(v string) *Update {
  12950. s.ReturnValuesOnConditionCheckFailure = &v
  12951. return s
  12952. }
  12953. // SetTableName sets the TableName field's value.
  12954. func (s *Update) SetTableName(v string) *Update {
  12955. s.TableName = &v
  12956. return s
  12957. }
  12958. // SetUpdateExpression sets the UpdateExpression field's value.
  12959. func (s *Update) SetUpdateExpression(v string) *Update {
  12960. s.UpdateExpression = &v
  12961. return s
  12962. }
  12963. type UpdateContinuousBackupsInput struct {
  12964. _ struct{} `type:"structure"`
  12965. // Represents the settings used to enable point in time recovery.
  12966. //
  12967. // PointInTimeRecoverySpecification is a required field
  12968. PointInTimeRecoverySpecification *PointInTimeRecoverySpecification `type:"structure" required:"true"`
  12969. // The name of the table.
  12970. //
  12971. // TableName is a required field
  12972. TableName *string `min:"3" type:"string" required:"true"`
  12973. }
  12974. // String returns the string representation
  12975. func (s UpdateContinuousBackupsInput) String() string {
  12976. return awsutil.Prettify(s)
  12977. }
  12978. // GoString returns the string representation
  12979. func (s UpdateContinuousBackupsInput) GoString() string {
  12980. return s.String()
  12981. }
  12982. // Validate inspects the fields of the type to determine if they are valid.
  12983. func (s *UpdateContinuousBackupsInput) Validate() error {
  12984. invalidParams := request.ErrInvalidParams{Context: "UpdateContinuousBackupsInput"}
  12985. if s.PointInTimeRecoverySpecification == nil {
  12986. invalidParams.Add(request.NewErrParamRequired("PointInTimeRecoverySpecification"))
  12987. }
  12988. if s.TableName == nil {
  12989. invalidParams.Add(request.NewErrParamRequired("TableName"))
  12990. }
  12991. if s.TableName != nil && len(*s.TableName) < 3 {
  12992. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  12993. }
  12994. if s.PointInTimeRecoverySpecification != nil {
  12995. if err := s.PointInTimeRecoverySpecification.Validate(); err != nil {
  12996. invalidParams.AddNested("PointInTimeRecoverySpecification", err.(request.ErrInvalidParams))
  12997. }
  12998. }
  12999. if invalidParams.Len() > 0 {
  13000. return invalidParams
  13001. }
  13002. return nil
  13003. }
  13004. // SetPointInTimeRecoverySpecification sets the PointInTimeRecoverySpecification field's value.
  13005. func (s *UpdateContinuousBackupsInput) SetPointInTimeRecoverySpecification(v *PointInTimeRecoverySpecification) *UpdateContinuousBackupsInput {
  13006. s.PointInTimeRecoverySpecification = v
  13007. return s
  13008. }
  13009. // SetTableName sets the TableName field's value.
  13010. func (s *UpdateContinuousBackupsInput) SetTableName(v string) *UpdateContinuousBackupsInput {
  13011. s.TableName = &v
  13012. return s
  13013. }
  13014. type UpdateContinuousBackupsOutput struct {
  13015. _ struct{} `type:"structure"`
  13016. // Represents the continuous backups and point in time recovery settings on
  13017. // the table.
  13018. ContinuousBackupsDescription *ContinuousBackupsDescription `type:"structure"`
  13019. }
  13020. // String returns the string representation
  13021. func (s UpdateContinuousBackupsOutput) String() string {
  13022. return awsutil.Prettify(s)
  13023. }
  13024. // GoString returns the string representation
  13025. func (s UpdateContinuousBackupsOutput) GoString() string {
  13026. return s.String()
  13027. }
  13028. // SetContinuousBackupsDescription sets the ContinuousBackupsDescription field's value.
  13029. func (s *UpdateContinuousBackupsOutput) SetContinuousBackupsDescription(v *ContinuousBackupsDescription) *UpdateContinuousBackupsOutput {
  13030. s.ContinuousBackupsDescription = v
  13031. return s
  13032. }
  13033. // Represents the new provisioned throughput settings to be applied to a global
  13034. // secondary index.
  13035. type UpdateGlobalSecondaryIndexAction struct {
  13036. _ struct{} `type:"structure"`
  13037. // The name of the global secondary index to be updated.
  13038. //
  13039. // IndexName is a required field
  13040. IndexName *string `min:"3" type:"string" required:"true"`
  13041. // Represents the provisioned throughput settings for the specified global secondary
  13042. // index.
  13043. //
  13044. // For current minimum and maximum provisioned throughput values, see Limits
  13045. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  13046. // in the Amazon DynamoDB Developer Guide.
  13047. //
  13048. // ProvisionedThroughput is a required field
  13049. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  13050. }
  13051. // String returns the string representation
  13052. func (s UpdateGlobalSecondaryIndexAction) String() string {
  13053. return awsutil.Prettify(s)
  13054. }
  13055. // GoString returns the string representation
  13056. func (s UpdateGlobalSecondaryIndexAction) GoString() string {
  13057. return s.String()
  13058. }
  13059. // Validate inspects the fields of the type to determine if they are valid.
  13060. func (s *UpdateGlobalSecondaryIndexAction) Validate() error {
  13061. invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalSecondaryIndexAction"}
  13062. if s.IndexName == nil {
  13063. invalidParams.Add(request.NewErrParamRequired("IndexName"))
  13064. }
  13065. if s.IndexName != nil && len(*s.IndexName) < 3 {
  13066. invalidParams.Add(request.NewErrParamMinLen("IndexName", 3))
  13067. }
  13068. if s.ProvisionedThroughput == nil {
  13069. invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput"))
  13070. }
  13071. if s.ProvisionedThroughput != nil {
  13072. if err := s.ProvisionedThroughput.Validate(); err != nil {
  13073. invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
  13074. }
  13075. }
  13076. if invalidParams.Len() > 0 {
  13077. return invalidParams
  13078. }
  13079. return nil
  13080. }
  13081. // SetIndexName sets the IndexName field's value.
  13082. func (s *UpdateGlobalSecondaryIndexAction) SetIndexName(v string) *UpdateGlobalSecondaryIndexAction {
  13083. s.IndexName = &v
  13084. return s
  13085. }
  13086. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  13087. func (s *UpdateGlobalSecondaryIndexAction) SetProvisionedThroughput(v *ProvisionedThroughput) *UpdateGlobalSecondaryIndexAction {
  13088. s.ProvisionedThroughput = v
  13089. return s
  13090. }
  13091. type UpdateGlobalTableInput struct {
  13092. _ struct{} `type:"structure"`
  13093. // The global table name.
  13094. //
  13095. // GlobalTableName is a required field
  13096. GlobalTableName *string `min:"3" type:"string" required:"true"`
  13097. // A list of regions that should be added or removed from the global table.
  13098. //
  13099. // ReplicaUpdates is a required field
  13100. ReplicaUpdates []*ReplicaUpdate `type:"list" required:"true"`
  13101. }
  13102. // String returns the string representation
  13103. func (s UpdateGlobalTableInput) String() string {
  13104. return awsutil.Prettify(s)
  13105. }
  13106. // GoString returns the string representation
  13107. func (s UpdateGlobalTableInput) GoString() string {
  13108. return s.String()
  13109. }
  13110. // Validate inspects the fields of the type to determine if they are valid.
  13111. func (s *UpdateGlobalTableInput) Validate() error {
  13112. invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableInput"}
  13113. if s.GlobalTableName == nil {
  13114. invalidParams.Add(request.NewErrParamRequired("GlobalTableName"))
  13115. }
  13116. if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 {
  13117. invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3))
  13118. }
  13119. if s.ReplicaUpdates == nil {
  13120. invalidParams.Add(request.NewErrParamRequired("ReplicaUpdates"))
  13121. }
  13122. if s.ReplicaUpdates != nil {
  13123. for i, v := range s.ReplicaUpdates {
  13124. if v == nil {
  13125. continue
  13126. }
  13127. if err := v.Validate(); err != nil {
  13128. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaUpdates", i), err.(request.ErrInvalidParams))
  13129. }
  13130. }
  13131. }
  13132. if invalidParams.Len() > 0 {
  13133. return invalidParams
  13134. }
  13135. return nil
  13136. }
  13137. // SetGlobalTableName sets the GlobalTableName field's value.
  13138. func (s *UpdateGlobalTableInput) SetGlobalTableName(v string) *UpdateGlobalTableInput {
  13139. s.GlobalTableName = &v
  13140. return s
  13141. }
  13142. // SetReplicaUpdates sets the ReplicaUpdates field's value.
  13143. func (s *UpdateGlobalTableInput) SetReplicaUpdates(v []*ReplicaUpdate) *UpdateGlobalTableInput {
  13144. s.ReplicaUpdates = v
  13145. return s
  13146. }
  13147. type UpdateGlobalTableOutput struct {
  13148. _ struct{} `type:"structure"`
  13149. // Contains the details of the global table.
  13150. GlobalTableDescription *GlobalTableDescription `type:"structure"`
  13151. }
  13152. // String returns the string representation
  13153. func (s UpdateGlobalTableOutput) String() string {
  13154. return awsutil.Prettify(s)
  13155. }
  13156. // GoString returns the string representation
  13157. func (s UpdateGlobalTableOutput) GoString() string {
  13158. return s.String()
  13159. }
  13160. // SetGlobalTableDescription sets the GlobalTableDescription field's value.
  13161. func (s *UpdateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescription) *UpdateGlobalTableOutput {
  13162. s.GlobalTableDescription = v
  13163. return s
  13164. }
  13165. type UpdateGlobalTableSettingsInput struct {
  13166. _ struct{} `type:"structure"`
  13167. // The billing mode of the global table. If GlobalTableBillingMode is not specified,
  13168. // the global table defaults to PROVISIONED capacity billing mode.
  13169. GlobalTableBillingMode *string `type:"string" enum:"BillingMode"`
  13170. // Represents the settings of a global secondary index for a global table that
  13171. // will be modified.
  13172. GlobalTableGlobalSecondaryIndexSettingsUpdate []*GlobalTableGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"`
  13173. // The name of the global table
  13174. //
  13175. // GlobalTableName is a required field
  13176. GlobalTableName *string `min:"3" type:"string" required:"true"`
  13177. // AutoScaling settings for managing provisioned write capacity for the global
  13178. // table.
  13179. GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate *AutoScalingSettingsUpdate `type:"structure"`
  13180. // The maximum number of writes consumed per second before DynamoDB returns
  13181. // a ThrottlingException.
  13182. GlobalTableProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"`
  13183. // Represents the settings for a global table in a region that will be modified.
  13184. ReplicaSettingsUpdate []*ReplicaSettingsUpdate `min:"1" type:"list"`
  13185. }
  13186. // String returns the string representation
  13187. func (s UpdateGlobalTableSettingsInput) String() string {
  13188. return awsutil.Prettify(s)
  13189. }
  13190. // GoString returns the string representation
  13191. func (s UpdateGlobalTableSettingsInput) GoString() string {
  13192. return s.String()
  13193. }
  13194. // Validate inspects the fields of the type to determine if they are valid.
  13195. func (s *UpdateGlobalTableSettingsInput) Validate() error {
  13196. invalidParams := request.ErrInvalidParams{Context: "UpdateGlobalTableSettingsInput"}
  13197. if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil && len(s.GlobalTableGlobalSecondaryIndexSettingsUpdate) < 1 {
  13198. invalidParams.Add(request.NewErrParamMinLen("GlobalTableGlobalSecondaryIndexSettingsUpdate", 1))
  13199. }
  13200. if s.GlobalTableName == nil {
  13201. invalidParams.Add(request.NewErrParamRequired("GlobalTableName"))
  13202. }
  13203. if s.GlobalTableName != nil && len(*s.GlobalTableName) < 3 {
  13204. invalidParams.Add(request.NewErrParamMinLen("GlobalTableName", 3))
  13205. }
  13206. if s.GlobalTableProvisionedWriteCapacityUnits != nil && *s.GlobalTableProvisionedWriteCapacityUnits < 1 {
  13207. invalidParams.Add(request.NewErrParamMinValue("GlobalTableProvisionedWriteCapacityUnits", 1))
  13208. }
  13209. if s.ReplicaSettingsUpdate != nil && len(s.ReplicaSettingsUpdate) < 1 {
  13210. invalidParams.Add(request.NewErrParamMinLen("ReplicaSettingsUpdate", 1))
  13211. }
  13212. if s.GlobalTableGlobalSecondaryIndexSettingsUpdate != nil {
  13213. for i, v := range s.GlobalTableGlobalSecondaryIndexSettingsUpdate {
  13214. if v == nil {
  13215. continue
  13216. }
  13217. if err := v.Validate(); err != nil {
  13218. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalTableGlobalSecondaryIndexSettingsUpdate", i), err.(request.ErrInvalidParams))
  13219. }
  13220. }
  13221. }
  13222. if s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate != nil {
  13223. if err := s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.Validate(); err != nil {
  13224. invalidParams.AddNested("GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate", err.(request.ErrInvalidParams))
  13225. }
  13226. }
  13227. if s.ReplicaSettingsUpdate != nil {
  13228. for i, v := range s.ReplicaSettingsUpdate {
  13229. if v == nil {
  13230. continue
  13231. }
  13232. if err := v.Validate(); err != nil {
  13233. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaSettingsUpdate", i), err.(request.ErrInvalidParams))
  13234. }
  13235. }
  13236. }
  13237. if invalidParams.Len() > 0 {
  13238. return invalidParams
  13239. }
  13240. return nil
  13241. }
  13242. // SetGlobalTableBillingMode sets the GlobalTableBillingMode field's value.
  13243. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableBillingMode(v string) *UpdateGlobalTableSettingsInput {
  13244. s.GlobalTableBillingMode = &v
  13245. return s
  13246. }
  13247. // SetGlobalTableGlobalSecondaryIndexSettingsUpdate sets the GlobalTableGlobalSecondaryIndexSettingsUpdate field's value.
  13248. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableGlobalSecondaryIndexSettingsUpdate(v []*GlobalTableGlobalSecondaryIndexSettingsUpdate) *UpdateGlobalTableSettingsInput {
  13249. s.GlobalTableGlobalSecondaryIndexSettingsUpdate = v
  13250. return s
  13251. }
  13252. // SetGlobalTableName sets the GlobalTableName field's value.
  13253. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsInput {
  13254. s.GlobalTableName = &v
  13255. return s
  13256. }
  13257. // SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate sets the GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate field's value.
  13258. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate(v *AutoScalingSettingsUpdate) *UpdateGlobalTableSettingsInput {
  13259. s.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = v
  13260. return s
  13261. }
  13262. // SetGlobalTableProvisionedWriteCapacityUnits sets the GlobalTableProvisionedWriteCapacityUnits field's value.
  13263. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableProvisionedWriteCapacityUnits(v int64) *UpdateGlobalTableSettingsInput {
  13264. s.GlobalTableProvisionedWriteCapacityUnits = &v
  13265. return s
  13266. }
  13267. // SetReplicaSettingsUpdate sets the ReplicaSettingsUpdate field's value.
  13268. func (s *UpdateGlobalTableSettingsInput) SetReplicaSettingsUpdate(v []*ReplicaSettingsUpdate) *UpdateGlobalTableSettingsInput {
  13269. s.ReplicaSettingsUpdate = v
  13270. return s
  13271. }
  13272. type UpdateGlobalTableSettingsOutput struct {
  13273. _ struct{} `type:"structure"`
  13274. // The name of the global table.
  13275. GlobalTableName *string `min:"3" type:"string"`
  13276. // The region specific settings for the global table.
  13277. ReplicaSettings []*ReplicaSettingsDescription `type:"list"`
  13278. }
  13279. // String returns the string representation
  13280. func (s UpdateGlobalTableSettingsOutput) String() string {
  13281. return awsutil.Prettify(s)
  13282. }
  13283. // GoString returns the string representation
  13284. func (s UpdateGlobalTableSettingsOutput) GoString() string {
  13285. return s.String()
  13286. }
  13287. // SetGlobalTableName sets the GlobalTableName field's value.
  13288. func (s *UpdateGlobalTableSettingsOutput) SetGlobalTableName(v string) *UpdateGlobalTableSettingsOutput {
  13289. s.GlobalTableName = &v
  13290. return s
  13291. }
  13292. // SetReplicaSettings sets the ReplicaSettings field's value.
  13293. func (s *UpdateGlobalTableSettingsOutput) SetReplicaSettings(v []*ReplicaSettingsDescription) *UpdateGlobalTableSettingsOutput {
  13294. s.ReplicaSettings = v
  13295. return s
  13296. }
  13297. // Represents the input of an UpdateItem operation.
  13298. type UpdateItemInput struct {
  13299. _ struct{} `type:"structure"`
  13300. // This is a legacy parameter. Use UpdateExpression instead. For more information,
  13301. // see AttributeUpdates (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributeUpdates.html)
  13302. // in the Amazon DynamoDB Developer Guide.
  13303. AttributeUpdates map[string]*AttributeValueUpdate `type:"map"`
  13304. // A condition that must be satisfied in order for a conditional update to succeed.
  13305. //
  13306. // An expression can contain any of the following:
  13307. //
  13308. // * Functions: attribute_exists | attribute_not_exists | attribute_type
  13309. // | contains | begins_with | size
  13310. //
  13311. // These function names are case-sensitive.
  13312. //
  13313. // * Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  13314. //
  13315. // * Logical operators: AND | OR | NOT
  13316. //
  13317. // For more information on condition expressions, see Specifying Conditions
  13318. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  13319. // in the Amazon DynamoDB Developer Guide.
  13320. ConditionExpression *string `type:"string"`
  13321. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  13322. // see ConditionalOperator (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
  13323. // in the Amazon DynamoDB Developer Guide.
  13324. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  13325. // This is a legacy parameter. Use ConditionExpression instead. For more information,
  13326. // see Expected (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html)
  13327. // in the Amazon DynamoDB Developer Guide.
  13328. Expected map[string]*ExpectedAttributeValue `type:"map"`
  13329. // One or more substitution tokens for attribute names in an expression. The
  13330. // following are some use cases for using ExpressionAttributeNames:
  13331. //
  13332. // * To access an attribute whose name conflicts with a DynamoDB reserved
  13333. // word.
  13334. //
  13335. // * To create a placeholder for repeating occurrences of an attribute name
  13336. // in an expression.
  13337. //
  13338. // * To prevent special characters in an attribute name from being misinterpreted
  13339. // in an expression.
  13340. //
  13341. // Use the # character in an expression to dereference an attribute name. For
  13342. // example, consider the following attribute name:
  13343. //
  13344. // * Percentile
  13345. //
  13346. // The name of this attribute conflicts with a reserved word, so it cannot be
  13347. // used directly in an expression. (For the complete list of reserved words,
  13348. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  13349. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  13350. // the following for ExpressionAttributeNames:
  13351. //
  13352. // * {"#P":"Percentile"}
  13353. //
  13354. // You could then use this substitution in an expression, as in this example:
  13355. //
  13356. // * #P = :val
  13357. //
  13358. // Tokens that begin with the : character are expression attribute values, which
  13359. // are placeholders for the actual value at runtime.
  13360. //
  13361. // For more information on expression attribute names, see Accessing Item Attributes
  13362. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  13363. // in the Amazon DynamoDB Developer Guide.
  13364. ExpressionAttributeNames map[string]*string `type:"map"`
  13365. // One or more values that can be substituted in an expression.
  13366. //
  13367. // Use the : (colon) character in an expression to dereference an attribute
  13368. // value. For example, suppose that you wanted to check whether the value of
  13369. // the ProductStatus attribute was one of the following:
  13370. //
  13371. // Available | Backordered | Discontinued
  13372. //
  13373. // You would first need to specify ExpressionAttributeValues as follows:
  13374. //
  13375. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  13376. // }
  13377. //
  13378. // You could then use these values in an expression, such as this:
  13379. //
  13380. // ProductStatus IN (:avail, :back, :disc)
  13381. //
  13382. // For more information on expression attribute values, see Specifying Conditions
  13383. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  13384. // in the Amazon DynamoDB Developer Guide.
  13385. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  13386. // The primary key of the item to be updated. Each element consists of an attribute
  13387. // name and a value for that attribute.
  13388. //
  13389. // For the primary key, you must provide all of the attributes. For example,
  13390. // with a simple primary key, you only need to provide a value for the partition
  13391. // key. For a composite primary key, you must provide values for both the partition
  13392. // key and the sort key.
  13393. //
  13394. // Key is a required field
  13395. Key map[string]*AttributeValue `type:"map" required:"true"`
  13396. // Determines the level of detail about provisioned throughput consumption that
  13397. // is returned in the response:
  13398. //
  13399. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  13400. // operation, together with ConsumedCapacity for each table and secondary
  13401. // index that was accessed.
  13402. //
  13403. // Note that some operations, such as GetItem and BatchGetItem, do not access
  13404. // any indexes at all. In these cases, specifying INDEXES will only return
  13405. // ConsumedCapacity information for table(s).
  13406. //
  13407. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  13408. // the operation.
  13409. //
  13410. // * NONE - No ConsumedCapacity details are included in the response.
  13411. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  13412. // Determines whether item collection metrics are returned. If set to SIZE,
  13413. // the response includes statistics about item collections, if any, that were
  13414. // modified during the operation are returned in the response. If set to NONE
  13415. // (the default), no statistics are returned.
  13416. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  13417. // Use ReturnValues if you want to get the item attributes as they appear before
  13418. // or after they are updated. For UpdateItem, the valid values are:
  13419. //
  13420. // * NONE - If ReturnValues is not specified, or if its value is NONE, then
  13421. // nothing is returned. (This setting is the default for ReturnValues.)
  13422. //
  13423. // * ALL_OLD - Returns all of the attributes of the item, as they appeared
  13424. // before the UpdateItem operation.
  13425. //
  13426. // * UPDATED_OLD - Returns only the updated attributes, as they appeared
  13427. // before the UpdateItem operation.
  13428. //
  13429. // * ALL_NEW - Returns all of the attributes of the item, as they appear
  13430. // after the UpdateItem operation.
  13431. //
  13432. // * UPDATED_NEW - Returns only the updated attributes, as they appear after
  13433. // the UpdateItem operation.
  13434. //
  13435. // There is no additional cost associated with requesting a return value aside
  13436. // from the small network and processing overhead of receiving a larger response.
  13437. // No read capacity units are consumed.
  13438. //
  13439. // The values returned are strongly consistent.
  13440. ReturnValues *string `type:"string" enum:"ReturnValue"`
  13441. // The name of the table containing the item to update.
  13442. //
  13443. // TableName is a required field
  13444. TableName *string `min:"3" type:"string" required:"true"`
  13445. // An expression that defines one or more attributes to be updated, the action
  13446. // to be performed on them, and new value(s) for them.
  13447. //
  13448. // The following action values are available for UpdateExpression.
  13449. //
  13450. // * SET - Adds one or more attributes and values to an item. If any of these
  13451. // attribute already exist, they are replaced by the new values. You can
  13452. // also use SET to add or subtract from an attribute that is of type Number.
  13453. // For example: SET myNum = myNum + :val
  13454. //
  13455. // SET supports the following functions:
  13456. //
  13457. // if_not_exists (path, operand) - if the item does not contain an attribute
  13458. // at the specified path, then if_not_exists evaluates to operand; otherwise,
  13459. // it evaluates to path. You can use this function to avoid overwriting an
  13460. // attribute that may already be present in the item.
  13461. //
  13462. // list_append (operand, operand) - evaluates to a list with a new element added
  13463. // to it. You can append the new element to the start or the end of the list
  13464. // by reversing the order of the operands.
  13465. //
  13466. // These function names are case-sensitive.
  13467. //
  13468. // * REMOVE - Removes one or more attributes from an item.
  13469. //
  13470. // * ADD - Adds the specified value to the item, if the attribute does not
  13471. // already exist. If the attribute does exist, then the behavior of ADD depends
  13472. // on the data type of the attribute:
  13473. //
  13474. // If the existing attribute is a number, and if Value is also a number, then
  13475. // Value is mathematically added to the existing attribute. If Value is a
  13476. // negative number, then it is subtracted from the existing attribute.
  13477. //
  13478. // If you use ADD to increment or decrement a number value for an item that
  13479. // doesn't exist before the update, DynamoDB uses 0 as the initial value.
  13480. //
  13481. // Similarly, if you use ADD for an existing item to increment or decrement
  13482. // an attribute value that doesn't exist before the update, DynamoDB uses
  13483. // 0 as the initial value. For example, suppose that the item you want to
  13484. // update doesn't have an attribute named itemcount, but you decide to ADD
  13485. // the number 3 to this attribute anyway. DynamoDB will create the itemcount
  13486. // attribute, set its initial value to 0, and finally add 3 to it. The result
  13487. // will be a new itemcount attribute in the item, with a value of 3.
  13488. //
  13489. // If the existing data type is a set and if Value is also a set, then Value
  13490. // is added to the existing set. For example, if the attribute value is the
  13491. // set [1,2], and the ADD action specified [3], then the final attribute
  13492. // value is [1,2,3]. An error occurs if an ADD action is specified for a
  13493. // set attribute and the attribute type specified does not match the existing
  13494. // set type.
  13495. //
  13496. // Both sets must have the same primitive data type. For example, if the existing
  13497. // data type is a set of strings, the Value must also be a set of strings.
  13498. //
  13499. // The ADD action only supports Number and set data types. In addition, ADD
  13500. // can only be used on top-level attributes, not nested attributes.
  13501. //
  13502. // * DELETE - Deletes an element from a set.
  13503. //
  13504. // If a set of values is specified, then those values are subtracted from the
  13505. // old set. For example, if the attribute value was the set [a,b,c] and the
  13506. // DELETE action specifies [a,c], then the final attribute value is [b].
  13507. // Specifying an empty set is an error.
  13508. //
  13509. // The DELETE action only supports set data types. In addition, DELETE can only
  13510. // be used on top-level attributes, not nested attributes.
  13511. //
  13512. // You can have many actions in a single expression, such as the following:
  13513. // SET a=:value1, b=:value2 DELETE :value3, :value4, :value5
  13514. //
  13515. // For more information on update expressions, see Modifying Items and Attributes
  13516. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html)
  13517. // in the Amazon DynamoDB Developer Guide.
  13518. UpdateExpression *string `type:"string"`
  13519. }
  13520. // String returns the string representation
  13521. func (s UpdateItemInput) String() string {
  13522. return awsutil.Prettify(s)
  13523. }
  13524. // GoString returns the string representation
  13525. func (s UpdateItemInput) GoString() string {
  13526. return s.String()
  13527. }
  13528. // Validate inspects the fields of the type to determine if they are valid.
  13529. func (s *UpdateItemInput) Validate() error {
  13530. invalidParams := request.ErrInvalidParams{Context: "UpdateItemInput"}
  13531. if s.Key == nil {
  13532. invalidParams.Add(request.NewErrParamRequired("Key"))
  13533. }
  13534. if s.TableName == nil {
  13535. invalidParams.Add(request.NewErrParamRequired("TableName"))
  13536. }
  13537. if s.TableName != nil && len(*s.TableName) < 3 {
  13538. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  13539. }
  13540. if invalidParams.Len() > 0 {
  13541. return invalidParams
  13542. }
  13543. return nil
  13544. }
  13545. // SetAttributeUpdates sets the AttributeUpdates field's value.
  13546. func (s *UpdateItemInput) SetAttributeUpdates(v map[string]*AttributeValueUpdate) *UpdateItemInput {
  13547. s.AttributeUpdates = v
  13548. return s
  13549. }
  13550. // SetConditionExpression sets the ConditionExpression field's value.
  13551. func (s *UpdateItemInput) SetConditionExpression(v string) *UpdateItemInput {
  13552. s.ConditionExpression = &v
  13553. return s
  13554. }
  13555. // SetConditionalOperator sets the ConditionalOperator field's value.
  13556. func (s *UpdateItemInput) SetConditionalOperator(v string) *UpdateItemInput {
  13557. s.ConditionalOperator = &v
  13558. return s
  13559. }
  13560. // SetExpected sets the Expected field's value.
  13561. func (s *UpdateItemInput) SetExpected(v map[string]*ExpectedAttributeValue) *UpdateItemInput {
  13562. s.Expected = v
  13563. return s
  13564. }
  13565. // SetExpressionAttributeNames sets the ExpressionAttributeNames field's value.
  13566. func (s *UpdateItemInput) SetExpressionAttributeNames(v map[string]*string) *UpdateItemInput {
  13567. s.ExpressionAttributeNames = v
  13568. return s
  13569. }
  13570. // SetExpressionAttributeValues sets the ExpressionAttributeValues field's value.
  13571. func (s *UpdateItemInput) SetExpressionAttributeValues(v map[string]*AttributeValue) *UpdateItemInput {
  13572. s.ExpressionAttributeValues = v
  13573. return s
  13574. }
  13575. // SetKey sets the Key field's value.
  13576. func (s *UpdateItemInput) SetKey(v map[string]*AttributeValue) *UpdateItemInput {
  13577. s.Key = v
  13578. return s
  13579. }
  13580. // SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value.
  13581. func (s *UpdateItemInput) SetReturnConsumedCapacity(v string) *UpdateItemInput {
  13582. s.ReturnConsumedCapacity = &v
  13583. return s
  13584. }
  13585. // SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value.
  13586. func (s *UpdateItemInput) SetReturnItemCollectionMetrics(v string) *UpdateItemInput {
  13587. s.ReturnItemCollectionMetrics = &v
  13588. return s
  13589. }
  13590. // SetReturnValues sets the ReturnValues field's value.
  13591. func (s *UpdateItemInput) SetReturnValues(v string) *UpdateItemInput {
  13592. s.ReturnValues = &v
  13593. return s
  13594. }
  13595. // SetTableName sets the TableName field's value.
  13596. func (s *UpdateItemInput) SetTableName(v string) *UpdateItemInput {
  13597. s.TableName = &v
  13598. return s
  13599. }
  13600. // SetUpdateExpression sets the UpdateExpression field's value.
  13601. func (s *UpdateItemInput) SetUpdateExpression(v string) *UpdateItemInput {
  13602. s.UpdateExpression = &v
  13603. return s
  13604. }
  13605. // Represents the output of an UpdateItem operation.
  13606. type UpdateItemOutput struct {
  13607. _ struct{} `type:"structure"`
  13608. // A map of attribute values as they appear before or after the UpdateItem operation,
  13609. // as determined by the ReturnValues parameter.
  13610. //
  13611. // The Attributes map is only present if ReturnValues was specified as something
  13612. // other than NONE in the request. Each element represents one attribute.
  13613. Attributes map[string]*AttributeValue `type:"map"`
  13614. // The capacity units consumed by the UpdateItem operation. The data returned
  13615. // includes the total provisioned throughput consumed, along with statistics
  13616. // for the table and any indexes involved in the operation. ConsumedCapacity
  13617. // is only returned if the ReturnConsumedCapacity parameter was specified. For
  13618. // more information, see Provisioned Throughput (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  13619. // in the Amazon DynamoDB Developer Guide.
  13620. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  13621. // Information about item collections, if any, that were affected by the UpdateItem
  13622. // operation. ItemCollectionMetrics is only returned if the ReturnItemCollectionMetrics
  13623. // parameter was specified. If the table does not have any local secondary indexes,
  13624. // this information is not returned in the response.
  13625. //
  13626. // Each ItemCollectionMetrics element consists of:
  13627. //
  13628. // * ItemCollectionKey - The partition key value of the item collection.
  13629. // This is the same as the partition key value of the item itself.
  13630. //
  13631. // * SizeEstimateRangeGB - An estimate of item collection size, in gigabytes.
  13632. // This value is a two-element array containing a lower bound and an upper
  13633. // bound for the estimate. The estimate includes the size of all the items
  13634. // in the table, plus the size of all attributes projected into all of the
  13635. // local secondary indexes on that table. Use this estimate to measure whether
  13636. // a local secondary index is approaching its size limit.
  13637. //
  13638. // The estimate is subject to change over time; therefore, do not rely on the
  13639. // precision or accuracy of the estimate.
  13640. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  13641. }
  13642. // String returns the string representation
  13643. func (s UpdateItemOutput) String() string {
  13644. return awsutil.Prettify(s)
  13645. }
  13646. // GoString returns the string representation
  13647. func (s UpdateItemOutput) GoString() string {
  13648. return s.String()
  13649. }
  13650. // SetAttributes sets the Attributes field's value.
  13651. func (s *UpdateItemOutput) SetAttributes(v map[string]*AttributeValue) *UpdateItemOutput {
  13652. s.Attributes = v
  13653. return s
  13654. }
  13655. // SetConsumedCapacity sets the ConsumedCapacity field's value.
  13656. func (s *UpdateItemOutput) SetConsumedCapacity(v *ConsumedCapacity) *UpdateItemOutput {
  13657. s.ConsumedCapacity = v
  13658. return s
  13659. }
  13660. // SetItemCollectionMetrics sets the ItemCollectionMetrics field's value.
  13661. func (s *UpdateItemOutput) SetItemCollectionMetrics(v *ItemCollectionMetrics) *UpdateItemOutput {
  13662. s.ItemCollectionMetrics = v
  13663. return s
  13664. }
  13665. // Represents the input of an UpdateTable operation.
  13666. type UpdateTableInput struct {
  13667. _ struct{} `type:"structure"`
  13668. // An array of attributes that describe the key schema for the table and indexes.
  13669. // If you are adding a new global secondary index to the table, AttributeDefinitions
  13670. // must include the key element(s) of the new index.
  13671. AttributeDefinitions []*AttributeDefinition `type:"list"`
  13672. // Controls how you are charged for read and write throughput and how you manage
  13673. // capacity. When switching from pay-per-request to provisioned capacity, initial
  13674. // provisioned capacity values must be set. The initial provisioned capacity
  13675. // values are estimated based on the consumed read and write capacity of your
  13676. // table and global secondary indexes over the past 30 minutes.
  13677. //
  13678. // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using
  13679. // PROVISIONED for predictable workloads.
  13680. //
  13681. // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend
  13682. // using PAY_PER_REQUEST for unpredictable workloads.
  13683. BillingMode *string `type:"string" enum:"BillingMode"`
  13684. // An array of one or more global secondary indexes for the table. For each
  13685. // index in the array, you can request one action:
  13686. //
  13687. // * Create - add a new global secondary index to the table.
  13688. //
  13689. // * Update - modify the provisioned throughput settings of an existing global
  13690. // secondary index.
  13691. //
  13692. // * Delete - remove a global secondary index from the table.
  13693. //
  13694. // For more information, see Managing Global Secondary Indexes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html)
  13695. // in the Amazon DynamoDB Developer Guide.
  13696. GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexUpdate `type:"list"`
  13697. // The new provisioned throughput settings for the specified table or index.
  13698. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  13699. // The new server-side encryption settings for the specified table.
  13700. SSESpecification *SSESpecification `type:"structure"`
  13701. // Represents the DynamoDB Streams configuration for the table.
  13702. //
  13703. // You will receive a ResourceInUseException if you attempt to enable a stream
  13704. // on a table that already has a stream, or if you attempt to disable a stream
  13705. // on a table which does not have a stream.
  13706. StreamSpecification *StreamSpecification `type:"structure"`
  13707. // The name of the table to be updated.
  13708. //
  13709. // TableName is a required field
  13710. TableName *string `min:"3" type:"string" required:"true"`
  13711. }
  13712. // String returns the string representation
  13713. func (s UpdateTableInput) String() string {
  13714. return awsutil.Prettify(s)
  13715. }
  13716. // GoString returns the string representation
  13717. func (s UpdateTableInput) GoString() string {
  13718. return s.String()
  13719. }
  13720. // Validate inspects the fields of the type to determine if they are valid.
  13721. func (s *UpdateTableInput) Validate() error {
  13722. invalidParams := request.ErrInvalidParams{Context: "UpdateTableInput"}
  13723. if s.TableName == nil {
  13724. invalidParams.Add(request.NewErrParamRequired("TableName"))
  13725. }
  13726. if s.TableName != nil && len(*s.TableName) < 3 {
  13727. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  13728. }
  13729. if s.AttributeDefinitions != nil {
  13730. for i, v := range s.AttributeDefinitions {
  13731. if v == nil {
  13732. continue
  13733. }
  13734. if err := v.Validate(); err != nil {
  13735. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AttributeDefinitions", i), err.(request.ErrInvalidParams))
  13736. }
  13737. }
  13738. }
  13739. if s.GlobalSecondaryIndexUpdates != nil {
  13740. for i, v := range s.GlobalSecondaryIndexUpdates {
  13741. if v == nil {
  13742. continue
  13743. }
  13744. if err := v.Validate(); err != nil {
  13745. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "GlobalSecondaryIndexUpdates", i), err.(request.ErrInvalidParams))
  13746. }
  13747. }
  13748. }
  13749. if s.ProvisionedThroughput != nil {
  13750. if err := s.ProvisionedThroughput.Validate(); err != nil {
  13751. invalidParams.AddNested("ProvisionedThroughput", err.(request.ErrInvalidParams))
  13752. }
  13753. }
  13754. if invalidParams.Len() > 0 {
  13755. return invalidParams
  13756. }
  13757. return nil
  13758. }
  13759. // SetAttributeDefinitions sets the AttributeDefinitions field's value.
  13760. func (s *UpdateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *UpdateTableInput {
  13761. s.AttributeDefinitions = v
  13762. return s
  13763. }
  13764. // SetBillingMode sets the BillingMode field's value.
  13765. func (s *UpdateTableInput) SetBillingMode(v string) *UpdateTableInput {
  13766. s.BillingMode = &v
  13767. return s
  13768. }
  13769. // SetGlobalSecondaryIndexUpdates sets the GlobalSecondaryIndexUpdates field's value.
  13770. func (s *UpdateTableInput) SetGlobalSecondaryIndexUpdates(v []*GlobalSecondaryIndexUpdate) *UpdateTableInput {
  13771. s.GlobalSecondaryIndexUpdates = v
  13772. return s
  13773. }
  13774. // SetProvisionedThroughput sets the ProvisionedThroughput field's value.
  13775. func (s *UpdateTableInput) SetProvisionedThroughput(v *ProvisionedThroughput) *UpdateTableInput {
  13776. s.ProvisionedThroughput = v
  13777. return s
  13778. }
  13779. // SetSSESpecification sets the SSESpecification field's value.
  13780. func (s *UpdateTableInput) SetSSESpecification(v *SSESpecification) *UpdateTableInput {
  13781. s.SSESpecification = v
  13782. return s
  13783. }
  13784. // SetStreamSpecification sets the StreamSpecification field's value.
  13785. func (s *UpdateTableInput) SetStreamSpecification(v *StreamSpecification) *UpdateTableInput {
  13786. s.StreamSpecification = v
  13787. return s
  13788. }
  13789. // SetTableName sets the TableName field's value.
  13790. func (s *UpdateTableInput) SetTableName(v string) *UpdateTableInput {
  13791. s.TableName = &v
  13792. return s
  13793. }
  13794. // Represents the output of an UpdateTable operation.
  13795. type UpdateTableOutput struct {
  13796. _ struct{} `type:"structure"`
  13797. // Represents the properties of the table.
  13798. TableDescription *TableDescription `type:"structure"`
  13799. }
  13800. // String returns the string representation
  13801. func (s UpdateTableOutput) String() string {
  13802. return awsutil.Prettify(s)
  13803. }
  13804. // GoString returns the string representation
  13805. func (s UpdateTableOutput) GoString() string {
  13806. return s.String()
  13807. }
  13808. // SetTableDescription sets the TableDescription field's value.
  13809. func (s *UpdateTableOutput) SetTableDescription(v *TableDescription) *UpdateTableOutput {
  13810. s.TableDescription = v
  13811. return s
  13812. }
  13813. // Represents the input of an UpdateTimeToLive operation.
  13814. type UpdateTimeToLiveInput struct {
  13815. _ struct{} `type:"structure"`
  13816. // The name of the table to be configured.
  13817. //
  13818. // TableName is a required field
  13819. TableName *string `min:"3" type:"string" required:"true"`
  13820. // Represents the settings used to enable or disable Time to Live for the specified
  13821. // table.
  13822. //
  13823. // TimeToLiveSpecification is a required field
  13824. TimeToLiveSpecification *TimeToLiveSpecification `type:"structure" required:"true"`
  13825. }
  13826. // String returns the string representation
  13827. func (s UpdateTimeToLiveInput) String() string {
  13828. return awsutil.Prettify(s)
  13829. }
  13830. // GoString returns the string representation
  13831. func (s UpdateTimeToLiveInput) GoString() string {
  13832. return s.String()
  13833. }
  13834. // Validate inspects the fields of the type to determine if they are valid.
  13835. func (s *UpdateTimeToLiveInput) Validate() error {
  13836. invalidParams := request.ErrInvalidParams{Context: "UpdateTimeToLiveInput"}
  13837. if s.TableName == nil {
  13838. invalidParams.Add(request.NewErrParamRequired("TableName"))
  13839. }
  13840. if s.TableName != nil && len(*s.TableName) < 3 {
  13841. invalidParams.Add(request.NewErrParamMinLen("TableName", 3))
  13842. }
  13843. if s.TimeToLiveSpecification == nil {
  13844. invalidParams.Add(request.NewErrParamRequired("TimeToLiveSpecification"))
  13845. }
  13846. if s.TimeToLiveSpecification != nil {
  13847. if err := s.TimeToLiveSpecification.Validate(); err != nil {
  13848. invalidParams.AddNested("TimeToLiveSpecification", err.(request.ErrInvalidParams))
  13849. }
  13850. }
  13851. if invalidParams.Len() > 0 {
  13852. return invalidParams
  13853. }
  13854. return nil
  13855. }
  13856. // SetTableName sets the TableName field's value.
  13857. func (s *UpdateTimeToLiveInput) SetTableName(v string) *UpdateTimeToLiveInput {
  13858. s.TableName = &v
  13859. return s
  13860. }
  13861. // SetTimeToLiveSpecification sets the TimeToLiveSpecification field's value.
  13862. func (s *UpdateTimeToLiveInput) SetTimeToLiveSpecification(v *TimeToLiveSpecification) *UpdateTimeToLiveInput {
  13863. s.TimeToLiveSpecification = v
  13864. return s
  13865. }
  13866. type UpdateTimeToLiveOutput struct {
  13867. _ struct{} `type:"structure"`
  13868. // Represents the output of an UpdateTimeToLive operation.
  13869. TimeToLiveSpecification *TimeToLiveSpecification `type:"structure"`
  13870. }
  13871. // String returns the string representation
  13872. func (s UpdateTimeToLiveOutput) String() string {
  13873. return awsutil.Prettify(s)
  13874. }
  13875. // GoString returns the string representation
  13876. func (s UpdateTimeToLiveOutput) GoString() string {
  13877. return s.String()
  13878. }
  13879. // SetTimeToLiveSpecification sets the TimeToLiveSpecification field's value.
  13880. func (s *UpdateTimeToLiveOutput) SetTimeToLiveSpecification(v *TimeToLiveSpecification) *UpdateTimeToLiveOutput {
  13881. s.TimeToLiveSpecification = v
  13882. return s
  13883. }
  13884. // Represents an operation to perform - either DeleteItem or PutItem. You can
  13885. // only request one of these operations, not both, in a single WriteRequest.
  13886. // If you do need to perform both of these operations, you will need to provide
  13887. // two separate WriteRequest objects.
  13888. type WriteRequest struct {
  13889. _ struct{} `type:"structure"`
  13890. // A request to perform a DeleteItem operation.
  13891. DeleteRequest *DeleteRequest `type:"structure"`
  13892. // A request to perform a PutItem operation.
  13893. PutRequest *PutRequest `type:"structure"`
  13894. }
  13895. // String returns the string representation
  13896. func (s WriteRequest) String() string {
  13897. return awsutil.Prettify(s)
  13898. }
  13899. // GoString returns the string representation
  13900. func (s WriteRequest) GoString() string {
  13901. return s.String()
  13902. }
  13903. // SetDeleteRequest sets the DeleteRequest field's value.
  13904. func (s *WriteRequest) SetDeleteRequest(v *DeleteRequest) *WriteRequest {
  13905. s.DeleteRequest = v
  13906. return s
  13907. }
  13908. // SetPutRequest sets the PutRequest field's value.
  13909. func (s *WriteRequest) SetPutRequest(v *PutRequest) *WriteRequest {
  13910. s.PutRequest = v
  13911. return s
  13912. }
  13913. const (
  13914. // AttributeActionAdd is a AttributeAction enum value
  13915. AttributeActionAdd = "ADD"
  13916. // AttributeActionPut is a AttributeAction enum value
  13917. AttributeActionPut = "PUT"
  13918. // AttributeActionDelete is a AttributeAction enum value
  13919. AttributeActionDelete = "DELETE"
  13920. )
  13921. const (
  13922. // BackupStatusCreating is a BackupStatus enum value
  13923. BackupStatusCreating = "CREATING"
  13924. // BackupStatusDeleted is a BackupStatus enum value
  13925. BackupStatusDeleted = "DELETED"
  13926. // BackupStatusAvailable is a BackupStatus enum value
  13927. BackupStatusAvailable = "AVAILABLE"
  13928. )
  13929. const (
  13930. // BackupTypeUser is a BackupType enum value
  13931. BackupTypeUser = "USER"
  13932. // BackupTypeSystem is a BackupType enum value
  13933. BackupTypeSystem = "SYSTEM"
  13934. // BackupTypeAwsBackup is a BackupType enum value
  13935. BackupTypeAwsBackup = "AWS_BACKUP"
  13936. )
  13937. const (
  13938. // BackupTypeFilterUser is a BackupTypeFilter enum value
  13939. BackupTypeFilterUser = "USER"
  13940. // BackupTypeFilterSystem is a BackupTypeFilter enum value
  13941. BackupTypeFilterSystem = "SYSTEM"
  13942. // BackupTypeFilterAwsBackup is a BackupTypeFilter enum value
  13943. BackupTypeFilterAwsBackup = "AWS_BACKUP"
  13944. // BackupTypeFilterAll is a BackupTypeFilter enum value
  13945. BackupTypeFilterAll = "ALL"
  13946. )
  13947. const (
  13948. // BillingModeProvisioned is a BillingMode enum value
  13949. BillingModeProvisioned = "PROVISIONED"
  13950. // BillingModePayPerRequest is a BillingMode enum value
  13951. BillingModePayPerRequest = "PAY_PER_REQUEST"
  13952. )
  13953. const (
  13954. // ComparisonOperatorEq is a ComparisonOperator enum value
  13955. ComparisonOperatorEq = "EQ"
  13956. // ComparisonOperatorNe is a ComparisonOperator enum value
  13957. ComparisonOperatorNe = "NE"
  13958. // ComparisonOperatorIn is a ComparisonOperator enum value
  13959. ComparisonOperatorIn = "IN"
  13960. // ComparisonOperatorLe is a ComparisonOperator enum value
  13961. ComparisonOperatorLe = "LE"
  13962. // ComparisonOperatorLt is a ComparisonOperator enum value
  13963. ComparisonOperatorLt = "LT"
  13964. // ComparisonOperatorGe is a ComparisonOperator enum value
  13965. ComparisonOperatorGe = "GE"
  13966. // ComparisonOperatorGt is a ComparisonOperator enum value
  13967. ComparisonOperatorGt = "GT"
  13968. // ComparisonOperatorBetween is a ComparisonOperator enum value
  13969. ComparisonOperatorBetween = "BETWEEN"
  13970. // ComparisonOperatorNotNull is a ComparisonOperator enum value
  13971. ComparisonOperatorNotNull = "NOT_NULL"
  13972. // ComparisonOperatorNull is a ComparisonOperator enum value
  13973. ComparisonOperatorNull = "NULL"
  13974. // ComparisonOperatorContains is a ComparisonOperator enum value
  13975. ComparisonOperatorContains = "CONTAINS"
  13976. // ComparisonOperatorNotContains is a ComparisonOperator enum value
  13977. ComparisonOperatorNotContains = "NOT_CONTAINS"
  13978. // ComparisonOperatorBeginsWith is a ComparisonOperator enum value
  13979. ComparisonOperatorBeginsWith = "BEGINS_WITH"
  13980. )
  13981. const (
  13982. // ConditionalOperatorAnd is a ConditionalOperator enum value
  13983. ConditionalOperatorAnd = "AND"
  13984. // ConditionalOperatorOr is a ConditionalOperator enum value
  13985. ConditionalOperatorOr = "OR"
  13986. )
  13987. const (
  13988. // ContinuousBackupsStatusEnabled is a ContinuousBackupsStatus enum value
  13989. ContinuousBackupsStatusEnabled = "ENABLED"
  13990. // ContinuousBackupsStatusDisabled is a ContinuousBackupsStatus enum value
  13991. ContinuousBackupsStatusDisabled = "DISABLED"
  13992. )
  13993. const (
  13994. // GlobalTableStatusCreating is a GlobalTableStatus enum value
  13995. GlobalTableStatusCreating = "CREATING"
  13996. // GlobalTableStatusActive is a GlobalTableStatus enum value
  13997. GlobalTableStatusActive = "ACTIVE"
  13998. // GlobalTableStatusDeleting is a GlobalTableStatus enum value
  13999. GlobalTableStatusDeleting = "DELETING"
  14000. // GlobalTableStatusUpdating is a GlobalTableStatus enum value
  14001. GlobalTableStatusUpdating = "UPDATING"
  14002. )
  14003. const (
  14004. // IndexStatusCreating is a IndexStatus enum value
  14005. IndexStatusCreating = "CREATING"
  14006. // IndexStatusUpdating is a IndexStatus enum value
  14007. IndexStatusUpdating = "UPDATING"
  14008. // IndexStatusDeleting is a IndexStatus enum value
  14009. IndexStatusDeleting = "DELETING"
  14010. // IndexStatusActive is a IndexStatus enum value
  14011. IndexStatusActive = "ACTIVE"
  14012. )
  14013. const (
  14014. // KeyTypeHash is a KeyType enum value
  14015. KeyTypeHash = "HASH"
  14016. // KeyTypeRange is a KeyType enum value
  14017. KeyTypeRange = "RANGE"
  14018. )
  14019. const (
  14020. // PointInTimeRecoveryStatusEnabled is a PointInTimeRecoveryStatus enum value
  14021. PointInTimeRecoveryStatusEnabled = "ENABLED"
  14022. // PointInTimeRecoveryStatusDisabled is a PointInTimeRecoveryStatus enum value
  14023. PointInTimeRecoveryStatusDisabled = "DISABLED"
  14024. )
  14025. const (
  14026. // ProjectionTypeAll is a ProjectionType enum value
  14027. ProjectionTypeAll = "ALL"
  14028. // ProjectionTypeKeysOnly is a ProjectionType enum value
  14029. ProjectionTypeKeysOnly = "KEYS_ONLY"
  14030. // ProjectionTypeInclude is a ProjectionType enum value
  14031. ProjectionTypeInclude = "INCLUDE"
  14032. )
  14033. const (
  14034. // ReplicaStatusCreating is a ReplicaStatus enum value
  14035. ReplicaStatusCreating = "CREATING"
  14036. // ReplicaStatusUpdating is a ReplicaStatus enum value
  14037. ReplicaStatusUpdating = "UPDATING"
  14038. // ReplicaStatusDeleting is a ReplicaStatus enum value
  14039. ReplicaStatusDeleting = "DELETING"
  14040. // ReplicaStatusActive is a ReplicaStatus enum value
  14041. ReplicaStatusActive = "ACTIVE"
  14042. )
  14043. // Determines the level of detail about provisioned throughput consumption that
  14044. // is returned in the response:
  14045. //
  14046. // * INDEXES - The response includes the aggregate ConsumedCapacity for the
  14047. // operation, together with ConsumedCapacity for each table and secondary
  14048. // index that was accessed.
  14049. //
  14050. // Note that some operations, such as GetItem and BatchGetItem, do not access
  14051. // any indexes at all. In these cases, specifying INDEXES will only return
  14052. // ConsumedCapacity information for table(s).
  14053. //
  14054. // * TOTAL - The response includes only the aggregate ConsumedCapacity for
  14055. // the operation.
  14056. //
  14057. // * NONE - No ConsumedCapacity details are included in the response.
  14058. const (
  14059. // ReturnConsumedCapacityIndexes is a ReturnConsumedCapacity enum value
  14060. ReturnConsumedCapacityIndexes = "INDEXES"
  14061. // ReturnConsumedCapacityTotal is a ReturnConsumedCapacity enum value
  14062. ReturnConsumedCapacityTotal = "TOTAL"
  14063. // ReturnConsumedCapacityNone is a ReturnConsumedCapacity enum value
  14064. ReturnConsumedCapacityNone = "NONE"
  14065. )
  14066. const (
  14067. // ReturnItemCollectionMetricsSize is a ReturnItemCollectionMetrics enum value
  14068. ReturnItemCollectionMetricsSize = "SIZE"
  14069. // ReturnItemCollectionMetricsNone is a ReturnItemCollectionMetrics enum value
  14070. ReturnItemCollectionMetricsNone = "NONE"
  14071. )
  14072. const (
  14073. // ReturnValueNone is a ReturnValue enum value
  14074. ReturnValueNone = "NONE"
  14075. // ReturnValueAllOld is a ReturnValue enum value
  14076. ReturnValueAllOld = "ALL_OLD"
  14077. // ReturnValueUpdatedOld is a ReturnValue enum value
  14078. ReturnValueUpdatedOld = "UPDATED_OLD"
  14079. // ReturnValueAllNew is a ReturnValue enum value
  14080. ReturnValueAllNew = "ALL_NEW"
  14081. // ReturnValueUpdatedNew is a ReturnValue enum value
  14082. ReturnValueUpdatedNew = "UPDATED_NEW"
  14083. )
  14084. const (
  14085. // ReturnValuesOnConditionCheckFailureAllOld is a ReturnValuesOnConditionCheckFailure enum value
  14086. ReturnValuesOnConditionCheckFailureAllOld = "ALL_OLD"
  14087. // ReturnValuesOnConditionCheckFailureNone is a ReturnValuesOnConditionCheckFailure enum value
  14088. ReturnValuesOnConditionCheckFailureNone = "NONE"
  14089. )
  14090. const (
  14091. // SSEStatusEnabling is a SSEStatus enum value
  14092. SSEStatusEnabling = "ENABLING"
  14093. // SSEStatusEnabled is a SSEStatus enum value
  14094. SSEStatusEnabled = "ENABLED"
  14095. // SSEStatusDisabling is a SSEStatus enum value
  14096. SSEStatusDisabling = "DISABLING"
  14097. // SSEStatusDisabled is a SSEStatus enum value
  14098. SSEStatusDisabled = "DISABLED"
  14099. // SSEStatusUpdating is a SSEStatus enum value
  14100. SSEStatusUpdating = "UPDATING"
  14101. )
  14102. const (
  14103. // SSETypeAes256 is a SSEType enum value
  14104. SSETypeAes256 = "AES256"
  14105. // SSETypeKms is a SSEType enum value
  14106. SSETypeKms = "KMS"
  14107. )
  14108. const (
  14109. // ScalarAttributeTypeS is a ScalarAttributeType enum value
  14110. ScalarAttributeTypeS = "S"
  14111. // ScalarAttributeTypeN is a ScalarAttributeType enum value
  14112. ScalarAttributeTypeN = "N"
  14113. // ScalarAttributeTypeB is a ScalarAttributeType enum value
  14114. ScalarAttributeTypeB = "B"
  14115. )
  14116. const (
  14117. // SelectAllAttributes is a Select enum value
  14118. SelectAllAttributes = "ALL_ATTRIBUTES"
  14119. // SelectAllProjectedAttributes is a Select enum value
  14120. SelectAllProjectedAttributes = "ALL_PROJECTED_ATTRIBUTES"
  14121. // SelectSpecificAttributes is a Select enum value
  14122. SelectSpecificAttributes = "SPECIFIC_ATTRIBUTES"
  14123. // SelectCount is a Select enum value
  14124. SelectCount = "COUNT"
  14125. )
  14126. const (
  14127. // StreamViewTypeNewImage is a StreamViewType enum value
  14128. StreamViewTypeNewImage = "NEW_IMAGE"
  14129. // StreamViewTypeOldImage is a StreamViewType enum value
  14130. StreamViewTypeOldImage = "OLD_IMAGE"
  14131. // StreamViewTypeNewAndOldImages is a StreamViewType enum value
  14132. StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES"
  14133. // StreamViewTypeKeysOnly is a StreamViewType enum value
  14134. StreamViewTypeKeysOnly = "KEYS_ONLY"
  14135. )
  14136. const (
  14137. // TableStatusCreating is a TableStatus enum value
  14138. TableStatusCreating = "CREATING"
  14139. // TableStatusUpdating is a TableStatus enum value
  14140. TableStatusUpdating = "UPDATING"
  14141. // TableStatusDeleting is a TableStatus enum value
  14142. TableStatusDeleting = "DELETING"
  14143. // TableStatusActive is a TableStatus enum value
  14144. TableStatusActive = "ACTIVE"
  14145. )
  14146. const (
  14147. // TimeToLiveStatusEnabling is a TimeToLiveStatus enum value
  14148. TimeToLiveStatusEnabling = "ENABLING"
  14149. // TimeToLiveStatusDisabling is a TimeToLiveStatus enum value
  14150. TimeToLiveStatusDisabling = "DISABLING"
  14151. // TimeToLiveStatusEnabled is a TimeToLiveStatus enum value
  14152. TimeToLiveStatusEnabled = "ENABLED"
  14153. // TimeToLiveStatusDisabled is a TimeToLiveStatus enum value
  14154. TimeToLiveStatusDisabled = "DISABLED"
  14155. )