api.go 233 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package dynamodb provides a client for Amazon DynamoDB.
  3. package dynamodb
  4. import (
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. )
  9. const opBatchGetItem = "BatchGetItem"
  10. // BatchGetItemRequest generates a request for the BatchGetItem operation.
  11. func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.Request, output *BatchGetItemOutput) {
  12. op := &request.Operation{
  13. Name: opBatchGetItem,
  14. HTTPMethod: "POST",
  15. HTTPPath: "/",
  16. Paginator: &request.Paginator{
  17. InputTokens: []string{"RequestItems"},
  18. OutputTokens: []string{"UnprocessedKeys"},
  19. LimitToken: "",
  20. TruncationToken: "",
  21. },
  22. }
  23. if input == nil {
  24. input = &BatchGetItemInput{}
  25. }
  26. req = c.newRequest(op, input, output)
  27. output = &BatchGetItemOutput{}
  28. req.Data = output
  29. return
  30. }
  31. // The BatchGetItem operation returns the attributes of one or more items from
  32. // one or more tables. You identify requested items by primary key.
  33. //
  34. // A single operation can retrieve up to 16 MB of data, which can contain as
  35. // many as 100 items. BatchGetItem will return a partial result if the response
  36. // size limit is exceeded, the table's provisioned throughput is exceeded, or
  37. // an internal processing failure occurs. If a partial result is returned, the
  38. // operation returns a value for UnprocessedKeys. You can use this value to
  39. // retry the operation starting with the next item to get.
  40. //
  41. // If you request more than 100 items BatchGetItem will return a ValidationException
  42. // with the message "Too many items requested for the BatchGetItem call".
  43. //
  44. // For example, if you ask to retrieve 100 items, but each individual item
  45. // is 300 KB in size, the system returns 52 items (so as not to exceed the 16
  46. // MB limit). It also returns an appropriate UnprocessedKeys value so you can
  47. // get the next page of results. If desired, your application can include its
  48. // own logic to assemble the pages of results into one data set.
  49. //
  50. // If none of the items can be processed due to insufficient provisioned throughput
  51. // on all of the tables in the request, then BatchGetItem will return a ProvisionedThroughputExceededException.
  52. // If at least one of the items is successfully processed, then BatchGetItem
  53. // completes successfully, while returning the keys of the unread items in UnprocessedKeys.
  54. //
  55. // If DynamoDB returns any unprocessed items, you should retry the batch operation
  56. // on those items. However, we strongly recommend that you use an exponential
  57. // backoff algorithm. If you retry the batch operation immediately, the underlying
  58. // read or write requests can still fail due to throttling on the individual
  59. // tables. If you delay the batch operation using exponential backoff, the individual
  60. // requests in the batch are much more likely to succeed.
  61. //
  62. // For more information, see Batch Operations and Error Handling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations)
  63. // in the Amazon DynamoDB Developer Guide.
  64. //
  65. // By default, BatchGetItem performs eventually consistent reads on every
  66. // table in the request. If you want strongly consistent reads instead, you
  67. // can set ConsistentRead to true for any or all tables.
  68. //
  69. // In order to minimize response latency, BatchGetItem retrieves items in parallel.
  70. //
  71. // When designing your application, keep in mind that DynamoDB does not return
  72. // attributes in any particular order. To help parse the response by item, include
  73. // the primary key values for the items in your request in the AttributesToGet
  74. // parameter.
  75. //
  76. // If a requested item does not exist, it is not returned in the result. Requests
  77. // for nonexistent items consume the minimum read capacity units according to
  78. // the type of read. For more information, see Capacity Units Calculations (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations)
  79. // in the Amazon DynamoDB Developer Guide.
  80. func (c *DynamoDB) BatchGetItem(input *BatchGetItemInput) (*BatchGetItemOutput, error) {
  81. req, out := c.BatchGetItemRequest(input)
  82. err := req.Send()
  83. return out, err
  84. }
  85. func (c *DynamoDB) BatchGetItemPages(input *BatchGetItemInput, fn func(p *BatchGetItemOutput, lastPage bool) (shouldContinue bool)) error {
  86. page, _ := c.BatchGetItemRequest(input)
  87. return page.EachPage(func(p interface{}, lastPage bool) bool {
  88. return fn(p.(*BatchGetItemOutput), lastPage)
  89. })
  90. }
  91. const opBatchWriteItem = "BatchWriteItem"
  92. // BatchWriteItemRequest generates a request for the BatchWriteItem operation.
  93. func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *request.Request, output *BatchWriteItemOutput) {
  94. op := &request.Operation{
  95. Name: opBatchWriteItem,
  96. HTTPMethod: "POST",
  97. HTTPPath: "/",
  98. }
  99. if input == nil {
  100. input = &BatchWriteItemInput{}
  101. }
  102. req = c.newRequest(op, input, output)
  103. output = &BatchWriteItemOutput{}
  104. req.Data = output
  105. return
  106. }
  107. // The BatchWriteItem operation puts or deletes multiple items in one or more
  108. // tables. A single call to BatchWriteItem can write up to 16 MB of data, which
  109. // can comprise as many as 25 put or delete requests. Individual items to be
  110. // written can be as large as 400 KB.
  111. //
  112. // BatchWriteItem cannot update items. To update items, use the UpdateItem
  113. // API.
  114. //
  115. // The individual PutItem and DeleteItem operations specified in BatchWriteItem
  116. // are atomic; however BatchWriteItem as a whole is not. If any requested operations
  117. // fail because the table's provisioned throughput is exceeded or an internal
  118. // processing failure occurs, the failed operations are returned in the UnprocessedItems
  119. // response parameter. You can investigate and optionally resend the requests.
  120. // Typically, you would call BatchWriteItem in a loop. Each iteration would
  121. // check for unprocessed items and submit a new BatchWriteItem request with
  122. // those unprocessed items until all items have been processed.
  123. //
  124. // Note that if none of the items can be processed due to insufficient provisioned
  125. // throughput on all of the tables in the request, then BatchWriteItem will
  126. // return a ProvisionedThroughputExceededException.
  127. //
  128. // If DynamoDB returns any unprocessed items, you should retry the batch operation
  129. // on those items. However, we strongly recommend that you use an exponential
  130. // backoff algorithm. If you retry the batch operation immediately, the underlying
  131. // read or write requests can still fail due to throttling on the individual
  132. // tables. If you delay the batch operation using exponential backoff, the individual
  133. // requests in the batch are much more likely to succeed.
  134. //
  135. // For more information, see Batch Operations and Error Handling (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations)
  136. // in the Amazon DynamoDB Developer Guide.
  137. //
  138. // With BatchWriteItem, you can efficiently write or delete large amounts
  139. // of data, such as from Amazon Elastic MapReduce (EMR), or copy data from another
  140. // database into DynamoDB. In order to improve performance with these large-scale
  141. // operations, BatchWriteItem does not behave in the same way as individual
  142. // PutItem and DeleteItem calls would. For example, you cannot specify conditions
  143. // on individual put and delete requests, and BatchWriteItem does not return
  144. // deleted items in the response.
  145. //
  146. // If you use a programming language that supports concurrency, you can use
  147. // threads to write items in parallel. Your application must include the necessary
  148. // logic to manage the threads. With languages that don't support threading,
  149. // you must update or delete the specified items one at a time. In both situations,
  150. // BatchWriteItem provides an alternative where the API performs the specified
  151. // put and delete operations in parallel, giving you the power of the thread
  152. // pool approach without having to introduce complexity into your application.
  153. //
  154. // Parallel processing reduces latency, but each specified put and delete request
  155. // consumes the same number of write capacity units whether it is processed
  156. // in parallel or not. Delete operations on nonexistent items consume one write
  157. // capacity unit.
  158. //
  159. // If one or more of the following is true, DynamoDB rejects the entire batch
  160. // write operation:
  161. //
  162. // One or more tables specified in the BatchWriteItem request does not exist.
  163. //
  164. // Primary key attributes specified on an item in the request do not match
  165. // those in the corresponding table's primary key schema.
  166. //
  167. // You try to perform multiple operations on the same item in the same BatchWriteItem
  168. // request. For example, you cannot put and delete the same item in the same
  169. // BatchWriteItem request.
  170. //
  171. // There are more than 25 requests in the batch.
  172. //
  173. // Any individual item in a batch exceeds 400 KB.
  174. //
  175. // The total request size exceeds 16 MB.
  176. func (c *DynamoDB) BatchWriteItem(input *BatchWriteItemInput) (*BatchWriteItemOutput, error) {
  177. req, out := c.BatchWriteItemRequest(input)
  178. err := req.Send()
  179. return out, err
  180. }
  181. const opCreateTable = "CreateTable"
  182. // CreateTableRequest generates a request for the CreateTable operation.
  183. func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput) {
  184. op := &request.Operation{
  185. Name: opCreateTable,
  186. HTTPMethod: "POST",
  187. HTTPPath: "/",
  188. }
  189. if input == nil {
  190. input = &CreateTableInput{}
  191. }
  192. req = c.newRequest(op, input, output)
  193. output = &CreateTableOutput{}
  194. req.Data = output
  195. return
  196. }
  197. // The CreateTable operation adds a new table to your account. In an AWS account,
  198. // table names must be unique within each region. That is, you can have two
  199. // tables with same name if you create the tables in different regions.
  200. //
  201. // CreateTable is an asynchronous operation. Upon receiving a CreateTable request,
  202. // DynamoDB immediately returns a response with a TableStatus of CREATING. After
  203. // the table is created, DynamoDB sets the TableStatus to ACTIVE. You can perform
  204. // read and write operations only on an ACTIVE table.
  205. //
  206. // You can optionally define secondary indexes on the new table, as part of
  207. // the CreateTable operation. If you want to create multiple tables with secondary
  208. // indexes on them, you must create the tables sequentially. Only one table
  209. // with secondary indexes can be in the CREATING state at any given time.
  210. //
  211. // You can use the DescribeTable API to check the table status.
  212. func (c *DynamoDB) CreateTable(input *CreateTableInput) (*CreateTableOutput, error) {
  213. req, out := c.CreateTableRequest(input)
  214. err := req.Send()
  215. return out, err
  216. }
  217. const opDeleteItem = "DeleteItem"
  218. // DeleteItemRequest generates a request for the DeleteItem operation.
  219. func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Request, output *DeleteItemOutput) {
  220. op := &request.Operation{
  221. Name: opDeleteItem,
  222. HTTPMethod: "POST",
  223. HTTPPath: "/",
  224. }
  225. if input == nil {
  226. input = &DeleteItemInput{}
  227. }
  228. req = c.newRequest(op, input, output)
  229. output = &DeleteItemOutput{}
  230. req.Data = output
  231. return
  232. }
  233. // Deletes a single item in a table by primary key. You can perform a conditional
  234. // delete operation that deletes the item if it exists, or if it has an expected
  235. // attribute value.
  236. //
  237. // In addition to deleting an item, you can also return the item's attribute
  238. // values in the same operation, using the ReturnValues parameter.
  239. //
  240. // Unless you specify conditions, the DeleteItem is an idempotent operation;
  241. // running it multiple times on the same item or attribute does not result in
  242. // an error response.
  243. //
  244. // Conditional deletes are useful for deleting items only if specific conditions
  245. // are met. If those conditions are met, DynamoDB performs the delete. Otherwise,
  246. // the item is not deleted.
  247. func (c *DynamoDB) DeleteItem(input *DeleteItemInput) (*DeleteItemOutput, error) {
  248. req, out := c.DeleteItemRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. const opDeleteTable = "DeleteTable"
  253. // DeleteTableRequest generates a request for the DeleteTable operation.
  254. func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput) {
  255. op := &request.Operation{
  256. Name: opDeleteTable,
  257. HTTPMethod: "POST",
  258. HTTPPath: "/",
  259. }
  260. if input == nil {
  261. input = &DeleteTableInput{}
  262. }
  263. req = c.newRequest(op, input, output)
  264. output = &DeleteTableOutput{}
  265. req.Data = output
  266. return
  267. }
  268. // The DeleteTable operation deletes a table and all of its items. After a DeleteTable
  269. // request, the specified table is in the DELETING state until DynamoDB completes
  270. // the deletion. If the table is in the ACTIVE state, you can delete it. If
  271. // a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException.
  272. // If the specified table does not exist, DynamoDB returns a ResourceNotFoundException.
  273. // If table is already in the DELETING state, no error is returned.
  274. //
  275. // DynamoDB might continue to accept data read and write operations, such
  276. // as GetItem and PutItem, on a table in the DELETING state until the table
  277. // deletion is complete.
  278. //
  279. // When you delete a table, any indexes on that table are also deleted.
  280. //
  281. // If you have DynamoDB Streams enabled on the table, then the corresponding
  282. // stream on that table goes into the DISABLED state, and the stream is automatically
  283. // deleted after 24 hours.
  284. //
  285. // Use the DescribeTable API to check the status of the table.
  286. func (c *DynamoDB) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error) {
  287. req, out := c.DeleteTableRequest(input)
  288. err := req.Send()
  289. return out, err
  290. }
  291. const opDescribeTable = "DescribeTable"
  292. // DescribeTableRequest generates a request for the DescribeTable operation.
  293. func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput) {
  294. op := &request.Operation{
  295. Name: opDescribeTable,
  296. HTTPMethod: "POST",
  297. HTTPPath: "/",
  298. }
  299. if input == nil {
  300. input = &DescribeTableInput{}
  301. }
  302. req = c.newRequest(op, input, output)
  303. output = &DescribeTableOutput{}
  304. req.Data = output
  305. return
  306. }
  307. // Returns information about the table, including the current status of the
  308. // table, when it was created, the primary key schema, and any indexes on the
  309. // table.
  310. //
  311. // If you issue a DescribeTable request immediately after a CreateTable request,
  312. // DynamoDB might return a ResourceNotFoundException. This is because DescribeTable
  313. // uses an eventually consistent query, and the metadata for your table might
  314. // not be available at that moment. Wait for a few seconds, and then try the
  315. // DescribeTable request again.
  316. func (c *DynamoDB) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error) {
  317. req, out := c.DescribeTableRequest(input)
  318. err := req.Send()
  319. return out, err
  320. }
  321. const opGetItem = "GetItem"
  322. // GetItemRequest generates a request for the GetItem operation.
  323. func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, output *GetItemOutput) {
  324. op := &request.Operation{
  325. Name: opGetItem,
  326. HTTPMethod: "POST",
  327. HTTPPath: "/",
  328. }
  329. if input == nil {
  330. input = &GetItemInput{}
  331. }
  332. req = c.newRequest(op, input, output)
  333. output = &GetItemOutput{}
  334. req.Data = output
  335. return
  336. }
  337. // The GetItem operation returns a set of attributes for the item with the given
  338. // primary key. If there is no matching item, GetItem does not return any data.
  339. //
  340. // GetItem provides an eventually consistent read by default. If your application
  341. // requires a strongly consistent read, set ConsistentRead to true. Although
  342. // a strongly consistent read might take more time than an eventually consistent
  343. // read, it always returns the last updated value.
  344. func (c *DynamoDB) GetItem(input *GetItemInput) (*GetItemOutput, error) {
  345. req, out := c.GetItemRequest(input)
  346. err := req.Send()
  347. return out, err
  348. }
  349. const opListTables = "ListTables"
  350. // ListTablesRequest generates a request for the ListTables operation.
  351. func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput) {
  352. op := &request.Operation{
  353. Name: opListTables,
  354. HTTPMethod: "POST",
  355. HTTPPath: "/",
  356. Paginator: &request.Paginator{
  357. InputTokens: []string{"ExclusiveStartTableName"},
  358. OutputTokens: []string{"LastEvaluatedTableName"},
  359. LimitToken: "Limit",
  360. TruncationToken: "",
  361. },
  362. }
  363. if input == nil {
  364. input = &ListTablesInput{}
  365. }
  366. req = c.newRequest(op, input, output)
  367. output = &ListTablesOutput{}
  368. req.Data = output
  369. return
  370. }
  371. // Returns an array of table names associated with the current account and endpoint.
  372. // The output from ListTables is paginated, with each page returning a maximum
  373. // of 100 table names.
  374. func (c *DynamoDB) ListTables(input *ListTablesInput) (*ListTablesOutput, error) {
  375. req, out := c.ListTablesRequest(input)
  376. err := req.Send()
  377. return out, err
  378. }
  379. func (c *DynamoDB) ListTablesPages(input *ListTablesInput, fn func(p *ListTablesOutput, lastPage bool) (shouldContinue bool)) error {
  380. page, _ := c.ListTablesRequest(input)
  381. return page.EachPage(func(p interface{}, lastPage bool) bool {
  382. return fn(p.(*ListTablesOutput), lastPage)
  383. })
  384. }
  385. const opPutItem = "PutItem"
  386. // PutItemRequest generates a request for the PutItem operation.
  387. func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, output *PutItemOutput) {
  388. op := &request.Operation{
  389. Name: opPutItem,
  390. HTTPMethod: "POST",
  391. HTTPPath: "/",
  392. }
  393. if input == nil {
  394. input = &PutItemInput{}
  395. }
  396. req = c.newRequest(op, input, output)
  397. output = &PutItemOutput{}
  398. req.Data = output
  399. return
  400. }
  401. // Creates a new item, or replaces an old item with a new item. If an item that
  402. // has the same primary key as the new item already exists in the specified
  403. // table, the new item completely replaces the existing item. You can perform
  404. // a conditional put operation (add a new item if one with the specified primary
  405. // key doesn't exist), or replace an existing item if it has certain attribute
  406. // values.
  407. //
  408. // In addition to putting an item, you can also return the item's attribute
  409. // values in the same operation, using the ReturnValues parameter.
  410. //
  411. // When you add an item, the primary key attribute(s) are the only required
  412. // attributes. Attribute values cannot be null. String and Binary type attributes
  413. // must have lengths greater than zero. Set type attributes cannot be empty.
  414. // Requests with empty values will be rejected with a ValidationException exception.
  415. //
  416. // You can request that PutItem return either a copy of the original item (before
  417. // the update) or a copy of the updated item (after the update). For more information,
  418. // see the ReturnValues description below.
  419. //
  420. // To prevent a new item from replacing an existing item, use a conditional
  421. // put operation with ComparisonOperator set to NULL for the primary key attribute,
  422. // or attributes.
  423. //
  424. // For more information about using this API, see Working with Items (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html)
  425. // in the Amazon DynamoDB Developer Guide.
  426. func (c *DynamoDB) PutItem(input *PutItemInput) (*PutItemOutput, error) {
  427. req, out := c.PutItemRequest(input)
  428. err := req.Send()
  429. return out, err
  430. }
  431. const opQuery = "Query"
  432. // QueryRequest generates a request for the Query operation.
  433. func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput) {
  434. op := &request.Operation{
  435. Name: opQuery,
  436. HTTPMethod: "POST",
  437. HTTPPath: "/",
  438. Paginator: &request.Paginator{
  439. InputTokens: []string{"ExclusiveStartKey"},
  440. OutputTokens: []string{"LastEvaluatedKey"},
  441. LimitToken: "Limit",
  442. TruncationToken: "",
  443. },
  444. }
  445. if input == nil {
  446. input = &QueryInput{}
  447. }
  448. req = c.newRequest(op, input, output)
  449. output = &QueryOutput{}
  450. req.Data = output
  451. return
  452. }
  453. // A Query operation uses the primary key of a table or a secondary index to
  454. // directly access items from that table or index.
  455. //
  456. // Use the KeyConditionExpression parameter to provide a specific hash key
  457. // value. The Query operation will return all of the items from the table or
  458. // index with that hash key value. You can optionally narrow the scope of the
  459. // Query operation by specifying a range key value and a comparison operator
  460. // in KeyConditionExpression. You can use the ScanIndexForward parameter to
  461. // get results in forward or reverse order, by range key or by index key.
  462. //
  463. // Queries that do not return results consume the minimum number of read capacity
  464. // units for that type of read operation.
  465. //
  466. // If the total number of items meeting the query criteria exceeds the result
  467. // set size limit of 1 MB, the query stops and results are returned to the user
  468. // with the LastEvaluatedKey element to continue the query in a subsequent operation.
  469. // Unlike a Scan operation, a Query operation never returns both an empty result
  470. // set and a LastEvaluatedKey value. LastEvaluatedKey is only provided if the
  471. // results exceed 1 MB, or if you have used the Limit parameter.
  472. //
  473. // You can query a table, a local secondary index, or a global secondary index.
  474. // For a query on a table or on a local secondary index, you can set the ConsistentRead
  475. // parameter to true and obtain a strongly consistent result. Global secondary
  476. // indexes support eventually consistent reads only, so do not specify ConsistentRead
  477. // when querying a global secondary index.
  478. func (c *DynamoDB) Query(input *QueryInput) (*QueryOutput, error) {
  479. req, out := c.QueryRequest(input)
  480. err := req.Send()
  481. return out, err
  482. }
  483. func (c *DynamoDB) QueryPages(input *QueryInput, fn func(p *QueryOutput, lastPage bool) (shouldContinue bool)) error {
  484. page, _ := c.QueryRequest(input)
  485. return page.EachPage(func(p interface{}, lastPage bool) bool {
  486. return fn(p.(*QueryOutput), lastPage)
  487. })
  488. }
  489. const opScan = "Scan"
  490. // ScanRequest generates a request for the Scan operation.
  491. func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *ScanOutput) {
  492. op := &request.Operation{
  493. Name: opScan,
  494. HTTPMethod: "POST",
  495. HTTPPath: "/",
  496. Paginator: &request.Paginator{
  497. InputTokens: []string{"ExclusiveStartKey"},
  498. OutputTokens: []string{"LastEvaluatedKey"},
  499. LimitToken: "Limit",
  500. TruncationToken: "",
  501. },
  502. }
  503. if input == nil {
  504. input = &ScanInput{}
  505. }
  506. req = c.newRequest(op, input, output)
  507. output = &ScanOutput{}
  508. req.Data = output
  509. return
  510. }
  511. // The Scan operation returns one or more items and item attributes by accessing
  512. // every item in a table or a secondary index. To have DynamoDB return fewer
  513. // items, you can provide a ScanFilter operation.
  514. //
  515. // If the total number of scanned items exceeds the maximum data set size limit
  516. // of 1 MB, the scan stops and results are returned to the user as a LastEvaluatedKey
  517. // value to continue the scan in a subsequent operation. The results also include
  518. // the number of items exceeding the limit. A scan can result in no table data
  519. // meeting the filter criteria.
  520. //
  521. // By default, Scan operations proceed sequentially; however, for faster performance
  522. // on a large table or secondary index, applications can request a parallel
  523. // Scan operation by providing the Segment and TotalSegments parameters. For
  524. // more information, see Parallel Scan (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#QueryAndScanParallelScan)
  525. // in the Amazon DynamoDB Developer Guide.
  526. //
  527. // By default, Scan uses eventually consistent reads when acessing the data
  528. // in the table or local secondary index. However, you can use strongly consistent
  529. // reads instead by setting the ConsistentRead parameter to true.
  530. func (c *DynamoDB) Scan(input *ScanInput) (*ScanOutput, error) {
  531. req, out := c.ScanRequest(input)
  532. err := req.Send()
  533. return out, err
  534. }
  535. func (c *DynamoDB) ScanPages(input *ScanInput, fn func(p *ScanOutput, lastPage bool) (shouldContinue bool)) error {
  536. page, _ := c.ScanRequest(input)
  537. return page.EachPage(func(p interface{}, lastPage bool) bool {
  538. return fn(p.(*ScanOutput), lastPage)
  539. })
  540. }
  541. const opUpdateItem = "UpdateItem"
  542. // UpdateItemRequest generates a request for the UpdateItem operation.
  543. func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Request, output *UpdateItemOutput) {
  544. op := &request.Operation{
  545. Name: opUpdateItem,
  546. HTTPMethod: "POST",
  547. HTTPPath: "/",
  548. }
  549. if input == nil {
  550. input = &UpdateItemInput{}
  551. }
  552. req = c.newRequest(op, input, output)
  553. output = &UpdateItemOutput{}
  554. req.Data = output
  555. return
  556. }
  557. // Edits an existing item's attributes, or adds a new item to the table if it
  558. // does not already exist. You can put, delete, or add attribute values. You
  559. // can also perform a conditional update on an existing item (insert a new attribute
  560. // name-value pair if it doesn't exist, or replace an existing name-value pair
  561. // if it has certain expected attribute values). If conditions are specified
  562. // and the item does not exist, then the operation fails and a new item is not
  563. // created.
  564. //
  565. // You can also return the item's attribute values in the same UpdateItem operation
  566. // using the ReturnValues parameter.
  567. func (c *DynamoDB) UpdateItem(input *UpdateItemInput) (*UpdateItemOutput, error) {
  568. req, out := c.UpdateItemRequest(input)
  569. err := req.Send()
  570. return out, err
  571. }
  572. const opUpdateTable = "UpdateTable"
  573. // UpdateTableRequest generates a request for the UpdateTable operation.
  574. func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput) {
  575. op := &request.Operation{
  576. Name: opUpdateTable,
  577. HTTPMethod: "POST",
  578. HTTPPath: "/",
  579. }
  580. if input == nil {
  581. input = &UpdateTableInput{}
  582. }
  583. req = c.newRequest(op, input, output)
  584. output = &UpdateTableOutput{}
  585. req.Data = output
  586. return
  587. }
  588. // Modifies the provisioned throughput settings, global secondary indexes, or
  589. // DynamoDB Streams settings for a given table.
  590. //
  591. // You can only perform one of the following operations at once:
  592. //
  593. // Modify the provisioned throughput settings of the table.
  594. //
  595. // Enable or disable Streams on the table.
  596. //
  597. // Remove a global secondary index from the table.
  598. //
  599. // Create a new global secondary index on the table. Once the index begins
  600. // backfilling, you can use UpdateTable to perform other operations.
  601. //
  602. // UpdateTable is an asynchronous operation; while it is executing, the table
  603. // status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot
  604. // issue another UpdateTable request. When the table returns to the ACTIVE state,
  605. // the UpdateTable operation is complete.
  606. func (c *DynamoDB) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error) {
  607. req, out := c.UpdateTableRequest(input)
  608. err := req.Send()
  609. return out, err
  610. }
  611. // Represents an attribute for describing the key schema for the table and indexes.
  612. type AttributeDefinition struct {
  613. // A name for the attribute.
  614. AttributeName *string `type:"string" required:"true"`
  615. // The data type for the attribute.
  616. AttributeType *string `type:"string" required:"true" enum:"ScalarAttributeType"`
  617. metadataAttributeDefinition `json:"-" xml:"-"`
  618. }
  619. type metadataAttributeDefinition struct {
  620. SDKShapeTraits bool `type:"structure"`
  621. }
  622. // String returns the string representation
  623. func (s AttributeDefinition) String() string {
  624. return awsutil.Prettify(s)
  625. }
  626. // GoString returns the string representation
  627. func (s AttributeDefinition) GoString() string {
  628. return s.String()
  629. }
  630. // Represents the data for an attribute. You can set one, and only one, of the
  631. // elements.
  632. //
  633. // Each attribute in an item is a name-value pair. An attribute can be single-valued
  634. // or multi-valued set. For example, a book item can have title and authors
  635. // attributes. Each book has one title but can have many authors. The multi-valued
  636. // attribute is a set; duplicate values are not allowed.
  637. type AttributeValue struct {
  638. // A Binary data type.
  639. B []byte `type:"blob"`
  640. // A Boolean data type.
  641. BOOL *bool `type:"boolean"`
  642. // A Binary Set data type.
  643. BS [][]byte `type:"list"`
  644. // A List of attribute values.
  645. L []*AttributeValue `type:"list"`
  646. // A Map of attribute values.
  647. M map[string]*AttributeValue `type:"map"`
  648. // A Number data type.
  649. N *string `type:"string"`
  650. // A Number Set data type.
  651. NS []*string `type:"list"`
  652. // A Null data type.
  653. NULL *bool `type:"boolean"`
  654. // A String data type.
  655. S *string `type:"string"`
  656. // A String Set data type.
  657. SS []*string `type:"list"`
  658. metadataAttributeValue `json:"-" xml:"-"`
  659. }
  660. type metadataAttributeValue struct {
  661. SDKShapeTraits bool `type:"structure"`
  662. }
  663. // String returns the string representation
  664. func (s AttributeValue) String() string {
  665. return awsutil.Prettify(s)
  666. }
  667. // GoString returns the string representation
  668. func (s AttributeValue) GoString() string {
  669. return s.String()
  670. }
  671. // For the UpdateItem operation, represents the attributes to be modified, the
  672. // action to perform on each, and the new value for each.
  673. //
  674. // You cannot use UpdateItem to update any primary key attributes. Instead,
  675. // you will need to delete the item, and then use PutItem to create a new item
  676. // with new attributes.
  677. //
  678. // Attribute values cannot be null; string and binary type attributes must
  679. // have lengths greater than zero; and set type attributes must not be empty.
  680. // Requests with empty values will be rejected with a ValidationException exception.
  681. type AttributeValueUpdate struct {
  682. // Specifies how to perform the update. Valid values are PUT (default), DELETE,
  683. // and ADD. The behavior depends on whether the specified primary key already
  684. // exists in the table.
  685. //
  686. // If an item with the specified Key is found in the table:
  687. //
  688. // PUT - Adds the specified attribute to the item. If the attribute already
  689. // exists, it is replaced by the new value.
  690. //
  691. // DELETE - If no value is specified, the attribute and its value are removed
  692. // from the item. The data type of the specified value must match the existing
  693. // value's data type.
  694. //
  695. // If a set of values is specified, then those values are subtracted from the
  696. // old set. For example, if the attribute value was the set [a,b,c] and the
  697. // DELETE action specified [a,c], then the final attribute value would be [b].
  698. // Specifying an empty set is an error.
  699. //
  700. // ADD - If the attribute does not already exist, then the attribute and
  701. // its values are added to the item. If the attribute does exist, then the behavior
  702. // of ADD depends on the data type of the attribute:
  703. //
  704. // If the existing attribute is a number, and if Value is also a number,
  705. // then the Value is mathematically added to the existing attribute. If Value
  706. // is a negative number, then it is subtracted from the existing attribute.
  707. //
  708. // If you use ADD to increment or decrement a number value for an item that
  709. // doesn't exist before the update, DynamoDB uses 0 as the initial value.
  710. //
  711. // In addition, if you use ADD to update an existing item, and intend to increment
  712. // or decrement an attribute value which does not yet exist, DynamoDB uses 0
  713. // as the initial value. For example, suppose that the item you want to update
  714. // does not yet have an attribute named itemcount, but you decide to ADD the
  715. // number 3 to this attribute anyway, even though it currently does not exist.
  716. // DynamoDB will create the itemcount attribute, set its initial value to 0,
  717. // and finally add 3 to it. The result will be a new itemcount attribute in
  718. // the item, with a value of 3.
  719. //
  720. // If the existing data type is a set, and if the Value is also a set, then
  721. // the Value is added to the existing set. (This is a set operation, not mathematical
  722. // addition.) For example, if the attribute value was the set [1,2], and the
  723. // ADD action specified [3], then the final attribute value would be [1,2,3].
  724. // An error occurs if an Add action is specified for a set attribute and the
  725. // attribute type specified does not match the existing set type.
  726. //
  727. // Both sets must have the same primitive data type. For example, if the existing
  728. // data type is a set of strings, the Value must also be a set of strings. The
  729. // same holds true for number sets and binary sets.
  730. //
  731. // This action is only valid for an existing attribute whose data type is
  732. // number or is a set. Do not use ADD for any other data types.
  733. //
  734. // If no item with the specified Key is found:
  735. //
  736. // PUT - DynamoDB creates a new item with the specified primary key, and
  737. // then adds the attribute.
  738. //
  739. // DELETE - Nothing happens; there is no attribute to delete.
  740. //
  741. // ADD - DynamoDB creates an item with the supplied primary key and number
  742. // (or set of numbers) for the attribute value. The only data types allowed
  743. // are number and number set; no other data types can be specified.
  744. Action *string `type:"string" enum:"AttributeAction"`
  745. // Represents the data for an attribute. You can set one, and only one, of the
  746. // elements.
  747. //
  748. // Each attribute in an item is a name-value pair. An attribute can be single-valued
  749. // or multi-valued set. For example, a book item can have title and authors
  750. // attributes. Each book has one title but can have many authors. The multi-valued
  751. // attribute is a set; duplicate values are not allowed.
  752. Value *AttributeValue `type:"structure"`
  753. metadataAttributeValueUpdate `json:"-" xml:"-"`
  754. }
  755. type metadataAttributeValueUpdate struct {
  756. SDKShapeTraits bool `type:"structure"`
  757. }
  758. // String returns the string representation
  759. func (s AttributeValueUpdate) String() string {
  760. return awsutil.Prettify(s)
  761. }
  762. // GoString returns the string representation
  763. func (s AttributeValueUpdate) GoString() string {
  764. return s.String()
  765. }
  766. // Represents the input of a BatchGetItem operation.
  767. type BatchGetItemInput struct {
  768. // A map of one or more table names and, for each table, a map that describes
  769. // one or more items to retrieve from that table. Each table name can be used
  770. // only once per BatchGetItem request.
  771. //
  772. // Each element in the map of items to retrieve consists of the following:
  773. //
  774. // ConsistentRead - If true, a strongly consistent read is used; if false
  775. // (the default), an eventually consistent read is used.
  776. //
  777. // ExpressionAttributeNames - One or more substitution tokens for attribute
  778. // names in the ProjectionExpression parameter. The following are some use cases
  779. // for using ExpressionAttributeNames:
  780. //
  781. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  782. //
  783. // To create a placeholder for repeating occurrences of an attribute name
  784. // in an expression.
  785. //
  786. // To prevent special characters in an attribute name from being misinterpreted
  787. // in an expression.
  788. //
  789. // Use the # character in an expression to dereference an attribute name.
  790. // For example, consider the following attribute name:
  791. //
  792. // Percentile
  793. //
  794. // The name of this attribute conflicts with a reserved word, so it cannot
  795. // be used directly in an expression. (For the complete list of reserved words,
  796. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  797. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  798. // the following for ExpressionAttributeNames:
  799. //
  800. // {"#P":"Percentile"}
  801. //
  802. // You could then use this substitution in an expression, as in this example:
  803. //
  804. // #P = :val
  805. //
  806. // Tokens that begin with the : character are expression attribute values,
  807. // which are placeholders for the actual value at runtime.
  808. //
  809. // For more information on expression attribute names, see Accessing Item Attributes
  810. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  811. // in the Amazon DynamoDB Developer Guide.
  812. //
  813. // Keys - An array of primary key attribute values that define specific items
  814. // in the table. For each primary key, you must provide all of the key attributes.
  815. // For example, with a hash type primary key, you only need to provide the hash
  816. // attribute. For a hash-and-range type primary key, you must provide both the
  817. // hash attribute and the range attribute.
  818. //
  819. // ProjectionExpression - A string that identifies one or more attributes
  820. // to retrieve from the table. These attributes can include scalars, sets, or
  821. // elements of a JSON document. The attributes in the expression must be separated
  822. // by commas.
  823. //
  824. // If no attribute names are specified, then all attributes will be returned.
  825. // If any of the requested attributes are not found, they will not appear in
  826. // the result.
  827. //
  828. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  829. // in the Amazon DynamoDB Developer Guide.
  830. //
  831. // AttributesToGet -
  832. //
  833. // This is a legacy parameter, for backward compatibility. New applications
  834. // should use ProjectionExpression instead. Do not combine legacy parameters
  835. // and expression parameters in a single API call; otherwise, DynamoDB will
  836. // return a ValidationException exception.
  837. //
  838. // This parameter allows you to retrieve attributes of type List or Map; however,
  839. // it cannot retrieve individual elements within a List or a Map.
  840. //
  841. // The names of one or more attributes to retrieve. If no attribute names are
  842. // provided, then all attributes will be returned. If any of the requested attributes
  843. // are not found, they will not appear in the result.
  844. //
  845. // Note that AttributesToGet has no effect on provisioned throughput consumption.
  846. // DynamoDB determines capacity units consumed based on item size, not on the
  847. // amount of data that is returned to an application.
  848. RequestItems map[string]*KeysAndAttributes `type:"map" required:"true"`
  849. // Determines the level of detail about provisioned throughput consumption that
  850. // is returned in the response:
  851. //
  852. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  853. // operation, together with ConsumedCapacity for each table and secondary index
  854. // that was accessed.
  855. //
  856. // Note that some operations, such as GetItem and BatchGetItem, do not access
  857. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  858. // information for table(s).
  859. //
  860. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  861. // operation.
  862. //
  863. // NONE - No ConsumedCapacity details are included in the response.
  864. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  865. metadataBatchGetItemInput `json:"-" xml:"-"`
  866. }
  867. type metadataBatchGetItemInput struct {
  868. SDKShapeTraits bool `type:"structure"`
  869. }
  870. // String returns the string representation
  871. func (s BatchGetItemInput) String() string {
  872. return awsutil.Prettify(s)
  873. }
  874. // GoString returns the string representation
  875. func (s BatchGetItemInput) GoString() string {
  876. return s.String()
  877. }
  878. // Represents the output of a BatchGetItem operation.
  879. type BatchGetItemOutput struct {
  880. // The read capacity units consumed by the operation.
  881. //
  882. // Each element consists of:
  883. //
  884. // TableName - The table that consumed the provisioned throughput.
  885. //
  886. // CapacityUnits - The total number of capacity units consumed.
  887. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  888. // A map of table name to a list of items. Each object in Responses consists
  889. // of a table name, along with a map of attribute data consisting of the data
  890. // type and attribute value.
  891. Responses map[string][]map[string]*AttributeValue `type:"map"`
  892. // A map of tables and their respective keys that were not processed with the
  893. // current response. The UnprocessedKeys value is in the same form as RequestItems,
  894. // so the value can be provided directly to a subsequent BatchGetItem operation.
  895. // For more information, see RequestItems in the Request Parameters section.
  896. //
  897. // Each element consists of:
  898. //
  899. // Keys - An array of primary key attribute values that define specific items
  900. // in the table.
  901. //
  902. // AttributesToGet - One or more attributes to be retrieved from the table
  903. // or index. By default, all attributes are returned. If a requested attribute
  904. // is not found, it does not appear in the result.
  905. //
  906. // ConsistentRead - The consistency of a read operation. If set to true,
  907. // then a strongly consistent read is used; otherwise, an eventually consistent
  908. // read is used.
  909. //
  910. // If there are no unprocessed keys remaining, the response contains an empty
  911. // UnprocessedKeys map.
  912. UnprocessedKeys map[string]*KeysAndAttributes `type:"map"`
  913. metadataBatchGetItemOutput `json:"-" xml:"-"`
  914. }
  915. type metadataBatchGetItemOutput struct {
  916. SDKShapeTraits bool `type:"structure"`
  917. }
  918. // String returns the string representation
  919. func (s BatchGetItemOutput) String() string {
  920. return awsutil.Prettify(s)
  921. }
  922. // GoString returns the string representation
  923. func (s BatchGetItemOutput) GoString() string {
  924. return s.String()
  925. }
  926. // Represents the input of a BatchWriteItem operation.
  927. type BatchWriteItemInput struct {
  928. // A map of one or more table names and, for each table, a list of operations
  929. // to be performed (DeleteRequest or PutRequest). Each element in the map consists
  930. // of the following:
  931. //
  932. // DeleteRequest - Perform a DeleteItem operation on the specified item.
  933. // The item to be deleted is identified by a Key subelement:
  934. //
  935. // Key - A map of primary key attribute values that uniquely identify the
  936. // ! item. Each entry in this map consists of an attribute name and an attribute
  937. // value. For each primary key, you must provide all of the key attributes.
  938. // For example, with a hash type primary key, you only need to provide the hash
  939. // attribute. For a hash-and-range type primary key, you must provide both the
  940. // hash attribute and the range attribute.
  941. //
  942. // PutRequest - Perform a PutItem operation on the specified item. The
  943. // item to be put is identified by an Item subelement:
  944. //
  945. // Item - A map of attributes and their values. Each entry in this map consists
  946. // of an attribute name and an attribute value. Attribute values must not be
  947. // null; string and binary type attributes must have lengths greater than zero;
  948. // and set type attributes must not be empty. Requests that contain empty values
  949. // will be rejected with a ValidationException exception.
  950. //
  951. // If you specify any attributes that are part of an index key, then the data
  952. // types for those attributes must match those of the schema in the table's
  953. // attribute definition.
  954. RequestItems map[string][]*WriteRequest `type:"map" required:"true"`
  955. // Determines the level of detail about provisioned throughput consumption that
  956. // is returned in the response:
  957. //
  958. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  959. // operation, together with ConsumedCapacity for each table and secondary index
  960. // that was accessed.
  961. //
  962. // Note that some operations, such as GetItem and BatchGetItem, do not access
  963. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  964. // information for table(s).
  965. //
  966. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  967. // operation.
  968. //
  969. // NONE - No ConsumedCapacity details are included in the response.
  970. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  971. // Determines whether item collection metrics are returned. If set to SIZE,
  972. // the response includes statistics about item collections, if any, that were
  973. // modified during the operation are returned in the response. If set to NONE
  974. // (the default), no statistics are returned.
  975. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  976. metadataBatchWriteItemInput `json:"-" xml:"-"`
  977. }
  978. type metadataBatchWriteItemInput struct {
  979. SDKShapeTraits bool `type:"structure"`
  980. }
  981. // String returns the string representation
  982. func (s BatchWriteItemInput) String() string {
  983. return awsutil.Prettify(s)
  984. }
  985. // GoString returns the string representation
  986. func (s BatchWriteItemInput) GoString() string {
  987. return s.String()
  988. }
  989. // Represents the output of a BatchWriteItem operation.
  990. type BatchWriteItemOutput struct {
  991. // The capacity units consumed by the operation.
  992. //
  993. // Each element consists of:
  994. //
  995. // TableName - The table that consumed the provisioned throughput.
  996. //
  997. // CapacityUnits - The total number of capacity units consumed.
  998. ConsumedCapacity []*ConsumedCapacity `type:"list"`
  999. // A list of tables that were processed by BatchWriteItem and, for each table,
  1000. // information about any item collections that were affected by individual DeleteItem
  1001. // or PutItem operations.
  1002. //
  1003. // Each entry consists of the following subelements:
  1004. //
  1005. // ItemCollectionKey - The hash key value of the item collection. This is
  1006. // the same as the hash key of the item.
  1007. //
  1008. // SizeEstimateRange - An estimate of item collection size, expressed in
  1009. // GB. This is a two-element array containing a lower bound and an upper bound
  1010. // for the estimate. The estimate includes the size of all the items in the
  1011. // table, plus the size of all attributes projected into all of the local secondary
  1012. // indexes on the table. Use this estimate to measure whether a local secondary
  1013. // index is approaching its size limit.
  1014. //
  1015. // The estimate is subject to change over time; therefore, do not rely on the
  1016. // precision or accuracy of the estimate.
  1017. ItemCollectionMetrics map[string][]*ItemCollectionMetrics `type:"map"`
  1018. // A map of tables and requests against those tables that were not processed.
  1019. // The UnprocessedItems value is in the same form as RequestItems, so you can
  1020. // provide this value directly to a subsequent BatchGetItem operation. For more
  1021. // information, see RequestItems in the Request Parameters section.
  1022. //
  1023. // Each UnprocessedItems entry consists of a table name and, for that table,
  1024. // a list of operations to perform (DeleteRequest or PutRequest).
  1025. //
  1026. // DeleteRequest - Perform a DeleteItem operation on the specified item.
  1027. // The item to be deleted is identified by a Key subelement:
  1028. //
  1029. // Key - A map of primary key attribute values that uniquely identify the
  1030. // item. Each entry in this map consists of an attribute name and an attribute
  1031. // value.
  1032. //
  1033. // PutRequest - Perform a PutItem operation on the specified item. The
  1034. // item to be put is identified by an Item subelement:
  1035. //
  1036. // Item - A map of attributes and their values. Each entry in this map consists
  1037. // of an attribute name and an attribute value. Attribute values must not be
  1038. // null; string and binary type attributes must have lengths greater than zero;
  1039. // and set type attributes must not be empty. Requests that contain empty values
  1040. // will be rejected with a ValidationException exception.
  1041. //
  1042. // If you specify any attributes that are part of an index key, then the data
  1043. // types for those attributes must match those of the schema in the table's
  1044. // attribute definition.
  1045. //
  1046. // If there are no unprocessed items remaining, the response contains an
  1047. // empty UnprocessedItems map.
  1048. UnprocessedItems map[string][]*WriteRequest `type:"map"`
  1049. metadataBatchWriteItemOutput `json:"-" xml:"-"`
  1050. }
  1051. type metadataBatchWriteItemOutput struct {
  1052. SDKShapeTraits bool `type:"structure"`
  1053. }
  1054. // String returns the string representation
  1055. func (s BatchWriteItemOutput) String() string {
  1056. return awsutil.Prettify(s)
  1057. }
  1058. // GoString returns the string representation
  1059. func (s BatchWriteItemOutput) GoString() string {
  1060. return s.String()
  1061. }
  1062. // Represents the amount of provisioned throughput capacity consumed on a table
  1063. // or an index.
  1064. type Capacity struct {
  1065. // The total number of capacity units consumed on a table or an index.
  1066. CapacityUnits *float64 `type:"double"`
  1067. metadataCapacity `json:"-" xml:"-"`
  1068. }
  1069. type metadataCapacity struct {
  1070. SDKShapeTraits bool `type:"structure"`
  1071. }
  1072. // String returns the string representation
  1073. func (s Capacity) String() string {
  1074. return awsutil.Prettify(s)
  1075. }
  1076. // GoString returns the string representation
  1077. func (s Capacity) GoString() string {
  1078. return s.String()
  1079. }
  1080. // Represents the selection criteria for a Query or Scan operation:
  1081. //
  1082. // For a Query operation, Condition is used for specifying the KeyConditions
  1083. // to use when querying a table or an index. For KeyConditions, only the following
  1084. // comparison operators are supported:
  1085. //
  1086. // EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN
  1087. //
  1088. // Condition is also used in a QueryFilter, which evaluates the query results
  1089. // and returns only the desired values.
  1090. //
  1091. // For a Scan operation, Condition is used in a ScanFilter, which evaluates
  1092. // the scan results and returns only the desired values.
  1093. type Condition struct {
  1094. // One or more values to evaluate against the supplied attribute. The number
  1095. // of values in the list depends on the ComparisonOperator being used.
  1096. //
  1097. // For type Number, value comparisons are numeric.
  1098. //
  1099. // String value comparisons for greater than, equals, or less than are based
  1100. // on ASCII character code values. For example, a is greater than A, and a is
  1101. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  1102. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  1103. //
  1104. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  1105. // it compares binary values.
  1106. AttributeValueList []*AttributeValue `type:"list"`
  1107. // A comparator for evaluating attributes. For example, equals, greater than,
  1108. // less than, etc.
  1109. //
  1110. // The following comparison operators are available:
  1111. //
  1112. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  1113. // | BEGINS_WITH | IN | BETWEEN
  1114. //
  1115. // The following are descriptions of each comparison operator.
  1116. //
  1117. // EQ : Equal. EQ is supported for all datatypes, including lists and maps.
  1118. //
  1119. // AttributeValueList can contain only one AttributeValue element of type String,
  1120. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  1121. // an AttributeValue element of a different type than the one provided in the
  1122. // request, the value does not match. For example, {"S":"6"} does not equal
  1123. // {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  1124. //
  1125. // NE : Not equal. NE is supported for all datatypes, including lists and
  1126. // maps.
  1127. //
  1128. // AttributeValueList can contain only one AttributeValue of type String, Number,
  1129. // Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue
  1130. // of a different type than the one provided in the request, the value does
  1131. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1132. // does not equal {"NS":["6", "2", "1"]}.
  1133. //
  1134. // LE : Less than or equal.
  1135. //
  1136. // AttributeValueList can contain only one AttributeValue element of type String,
  1137. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1138. // element of a different type than the one provided in the request, the value
  1139. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1140. // does not compare to {"NS":["6", "2", "1"]}.
  1141. //
  1142. // LT : Less than.
  1143. //
  1144. // AttributeValueList can contain only one AttributeValue of type String, Number,
  1145. // or Binary (not a set type). If an item contains an AttributeValue element
  1146. // of a different type than the one provided in the request, the value does
  1147. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1148. // does not compare to {"NS":["6", "2", "1"]}.
  1149. //
  1150. // GE : Greater than or equal.
  1151. //
  1152. // AttributeValueList can contain only one AttributeValue element of type String,
  1153. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1154. // element of a different type than the one provided in the request, the value
  1155. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1156. // does not compare to {"NS":["6", "2", "1"]}.
  1157. //
  1158. // GT : Greater than.
  1159. //
  1160. // AttributeValueList can contain only one AttributeValue element of type String,
  1161. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1162. // element of a different type than the one provided in the request, the value
  1163. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1164. // does not compare to {"NS":["6", "2", "1"]}.
  1165. //
  1166. // NOT_NULL : The attribute exists. NOT_NULL is supported for all datatypes,
  1167. // including lists and maps.
  1168. //
  1169. // This operator tests for the existence of an attribute, not its data type.
  1170. // If the data type of attribute "a" is null, and you evaluate it using NOT_NULL,
  1171. // the result is a Boolean true. This result is because the attribute "a" exists;
  1172. // its data type is not relevant to the NOT_NULL comparison operator.
  1173. //
  1174. // NULL : The attribute does not exist. NULL is supported for all datatypes,
  1175. // including lists and maps.
  1176. //
  1177. // This operator tests for the nonexistence of an attribute, not its data type.
  1178. // If the data type of attribute "a" is null, and you evaluate it using NULL,
  1179. // the result is a Boolean false. This is because the attribute "a" exists;
  1180. // its data type is not relevant to the NULL comparison operator.
  1181. //
  1182. // CONTAINS : Checks for a subsequence, or value in a set.
  1183. //
  1184. // AttributeValueList can contain only one AttributeValue element of type String,
  1185. // Number, or Binary (not a set type). If the target attribute of the comparison
  1186. // is of type String, then the operator checks for a substring match. If the
  1187. // target attribute of the comparison is of type Binary, then the operator looks
  1188. // for a subsequence of the target that matches the input. If the target attribute
  1189. // of the comparison is a set ("SS", "NS", or "BS"), then the operator evaluates
  1190. // to true if it finds an exact match with any member of the set.
  1191. //
  1192. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can
  1193. // be a list; however, "b" cannot be a set, a map, or a list.
  1194. //
  1195. // NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value
  1196. // in a set.
  1197. //
  1198. // AttributeValueList can contain only one AttributeValue element of type String,
  1199. // Number, or Binary (not a set type). If the target attribute of the comparison
  1200. // is a String, then the operator checks for the absence of a substring match.
  1201. // If the target attribute of the comparison is Binary, then the operator checks
  1202. // for the absence of a subsequence of the target that matches the input. If
  1203. // the target attribute of the comparison is a set ("SS", "NS", or "BS"), then
  1204. // the operator evaluates to true if it does not find an exact match with any
  1205. // member of the set.
  1206. //
  1207. // NOT_CONTAINS is supported for lists: When evaluating "a NOT CONTAINS b",
  1208. // "a" can be a list; however, "b" cannot be a set, a map, or a list.
  1209. //
  1210. // BEGINS_WITH : Checks for a prefix.
  1211. //
  1212. // AttributeValueList can contain only one AttributeValue of type String or
  1213. // Binary (not a Number or a set type). The target attribute of the comparison
  1214. // must be of type String or Binary (not a Number or a set type).
  1215. //
  1216. // IN : Checks for matching elements within two sets.
  1217. //
  1218. // AttributeValueList can contain one or more AttributeValue elements of type
  1219. // String, Number, or Binary (not a set type). These attributes are compared
  1220. // against an existing set type attribute of an item. If any elements of the
  1221. // input set are present in the item attribute, the expression evaluates to
  1222. // true.
  1223. //
  1224. // BETWEEN : Greater than or equal to the first value, and less than or equal
  1225. // to the second value.
  1226. //
  1227. // AttributeValueList must contain two AttributeValue elements of the same
  1228. // type, either String, Number, or Binary (not a set type). A target attribute
  1229. // matches if the target value is greater than, or equal to, the first element
  1230. // and less than, or equal to, the second element. If an item contains an AttributeValue
  1231. // element of a different type than the one provided in the request, the value
  1232. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  1233. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  1234. //
  1235. // For usage examples of AttributeValueList and ComparisonOperator, see Legacy
  1236. // Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  1237. // in the Amazon DynamoDB Developer Guide.
  1238. ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"`
  1239. metadataCondition `json:"-" xml:"-"`
  1240. }
  1241. type metadataCondition struct {
  1242. SDKShapeTraits bool `type:"structure"`
  1243. }
  1244. // String returns the string representation
  1245. func (s Condition) String() string {
  1246. return awsutil.Prettify(s)
  1247. }
  1248. // GoString returns the string representation
  1249. func (s Condition) GoString() string {
  1250. return s.String()
  1251. }
  1252. // The capacity units consumed by an operation. The data returned includes the
  1253. // total provisioned throughput consumed, along with statistics for the table
  1254. // and any indexes involved in the operation. ConsumedCapacity is only returned
  1255. // if the request asked for it. For more information, see Provisioned Throughput
  1256. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  1257. // in the Amazon DynamoDB Developer Guide.
  1258. type ConsumedCapacity struct {
  1259. // The total number of capacity units consumed by the operation.
  1260. CapacityUnits *float64 `type:"double"`
  1261. // The amount of throughput consumed on each global index affected by the operation.
  1262. GlobalSecondaryIndexes map[string]*Capacity `type:"map"`
  1263. // The amount of throughput consumed on each local index affected by the operation.
  1264. LocalSecondaryIndexes map[string]*Capacity `type:"map"`
  1265. // The amount of throughput consumed on the table affected by the operation.
  1266. Table *Capacity `type:"structure"`
  1267. // The name of the table that was affected by the operation.
  1268. TableName *string `type:"string"`
  1269. metadataConsumedCapacity `json:"-" xml:"-"`
  1270. }
  1271. type metadataConsumedCapacity struct {
  1272. SDKShapeTraits bool `type:"structure"`
  1273. }
  1274. // String returns the string representation
  1275. func (s ConsumedCapacity) String() string {
  1276. return awsutil.Prettify(s)
  1277. }
  1278. // GoString returns the string representation
  1279. func (s ConsumedCapacity) GoString() string {
  1280. return s.String()
  1281. }
  1282. // Represents a new global secondary index to be added to an existing table.
  1283. type CreateGlobalSecondaryIndexAction struct {
  1284. // The name of the global secondary index to be created.
  1285. IndexName *string `type:"string" required:"true"`
  1286. // The key schema for the global secondary index.
  1287. KeySchema []*KeySchemaElement `type:"list" required:"true"`
  1288. // Represents attributes that are copied (projected) from the table into an
  1289. // index. These are in addition to the primary key attributes and index key
  1290. // attributes, which are automatically projected.
  1291. Projection *Projection `type:"structure" required:"true"`
  1292. // Represents the provisioned throughput settings for a specified table or index.
  1293. // The settings can be modified using the UpdateTable operation.
  1294. //
  1295. // For current minimum and maximum provisioned throughput values, see Limits
  1296. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  1297. // in the Amazon DynamoDB Developer Guide.
  1298. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  1299. metadataCreateGlobalSecondaryIndexAction `json:"-" xml:"-"`
  1300. }
  1301. type metadataCreateGlobalSecondaryIndexAction struct {
  1302. SDKShapeTraits bool `type:"structure"`
  1303. }
  1304. // String returns the string representation
  1305. func (s CreateGlobalSecondaryIndexAction) String() string {
  1306. return awsutil.Prettify(s)
  1307. }
  1308. // GoString returns the string representation
  1309. func (s CreateGlobalSecondaryIndexAction) GoString() string {
  1310. return s.String()
  1311. }
  1312. // Represents the input of a CreateTable operation.
  1313. type CreateTableInput struct {
  1314. // An array of attributes that describe the key schema for the table and indexes.
  1315. AttributeDefinitions []*AttributeDefinition `type:"list" required:"true"`
  1316. // One or more global secondary indexes (the maximum is five) to be created
  1317. // on the table. Each global secondary index in the array includes the following:
  1318. //
  1319. // IndexName - The name of the global secondary index. Must be unique only
  1320. // for this table.
  1321. //
  1322. // KeySchema - Specifies the key schema for the global secondary index.
  1323. //
  1324. // Projection - Specifies attributes that are copied (projected) from the
  1325. // table into the index. These are in addition to the primary key attributes
  1326. // and index key attributes, which are automatically projected. Each attribute
  1327. // specification is composed of:
  1328. //
  1329. // ProjectionType - One of the following:
  1330. //
  1331. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  1332. //
  1333. // INCLUDE - Only the specified table attributes are projected into the index.
  1334. // The list of projected attributes are in NonKeyAttributes.
  1335. //
  1336. // ALL - All of the table attributes are projected into the index.
  1337. //
  1338. // NonKeyAttributes - A list of one or more non-key attribute names that
  1339. // are projected into the secondary index. The total count of attributes provided
  1340. // in NonKeyAttributes, summed across all of the secondary indexes, must not
  1341. // exceed 20. If you project the same attribute into two different indexes,
  1342. // this counts as two distinct attributes when determining the total.
  1343. //
  1344. // ProvisionedThroughput - The provisioned throughput settings for the
  1345. // global secondary index, consisting of read and write capacity units.
  1346. GlobalSecondaryIndexes []*GlobalSecondaryIndex `type:"list"`
  1347. // Specifies the attributes that make up the primary key for a table or an index.
  1348. // The attributes in KeySchema must also be defined in the AttributeDefinitions
  1349. // array. For more information, see Data Model (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)
  1350. // in the Amazon DynamoDB Developer Guide.
  1351. //
  1352. // Each KeySchemaElement in the array is composed of:
  1353. //
  1354. // AttributeName - The name of this key attribute.
  1355. //
  1356. // KeyType - Determines whether the key attribute is HASH or RANGE.
  1357. //
  1358. // For a primary key that consists of a hash attribute, you must provide
  1359. // exactly one element with a KeyType of HASH.
  1360. //
  1361. // For a primary key that consists of hash and range attributes, you must provide
  1362. // exactly two elements, in this order: The first element must have a KeyType
  1363. // of HASH, and the second element must have a KeyType of RANGE.
  1364. //
  1365. // For more information, see Specifying the Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key)
  1366. // in the Amazon DynamoDB Developer Guide.
  1367. KeySchema []*KeySchemaElement `type:"list" required:"true"`
  1368. // One or more local secondary indexes (the maximum is five) to be created on
  1369. // the table. Each index is scoped to a given hash key value. There is a 10
  1370. // GB size limit per hash key; otherwise, the size of a local secondary index
  1371. // is unconstrained.
  1372. //
  1373. // Each local secondary index in the array includes the following:
  1374. //
  1375. // IndexName - The name of the local secondary index. Must be unique only
  1376. // for this table.
  1377. //
  1378. // KeySchema - Specifies the key schema for the local secondary index. The
  1379. // key schema must begin with the same hash key attribute as the table.
  1380. //
  1381. // Projection - Specifies attributes that are copied (projected) from the
  1382. // table into the index. These are in addition to the primary key attributes
  1383. // and index key attributes, which are automatically projected. Each attribute
  1384. // specification is composed of:
  1385. //
  1386. // ProjectionType - One of the following:
  1387. //
  1388. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  1389. //
  1390. // INCLUDE - Only the specified table attributes are projected into the index.
  1391. // The list of projected attributes are in NonKeyAttributes.
  1392. //
  1393. // ALL - All of the table attributes are projected into the index.
  1394. //
  1395. // NonKeyAttributes - A list of one or more non-key attribute names that
  1396. // are projected into the secondary index. The total count of attributes provided
  1397. // in NonKeyAttributes, summed across all of the secondary indexes, must not
  1398. // exceed 20. If you project the same attribute into two different indexes,
  1399. // this counts as two distinct attributes when determining the total.
  1400. LocalSecondaryIndexes []*LocalSecondaryIndex `type:"list"`
  1401. // Represents the provisioned throughput settings for a specified table or index.
  1402. // The settings can be modified using the UpdateTable operation.
  1403. //
  1404. // For current minimum and maximum provisioned throughput values, see Limits
  1405. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  1406. // in the Amazon DynamoDB Developer Guide.
  1407. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  1408. // The settings for DynamoDB Streams on the table. These settings consist of:
  1409. //
  1410. // StreamEnabled - Indicates whether Streams is to be enabled (true) or disabled
  1411. // (false).
  1412. //
  1413. // StreamViewType - When an item in the table is modified, StreamViewType
  1414. // determines what information is written to the table's stream. Valid values
  1415. // for StreamViewType are:
  1416. //
  1417. // KEYS_ONLY - Only the key attributes of the modified item are written to
  1418. // the stream.
  1419. //
  1420. // NEW_IMAGE - The entire item, as it appears after it was modified, is written
  1421. // to the stream.
  1422. //
  1423. // OLD_IMAGE - The entire item, as it appeared before it was modified, is written
  1424. // to the stream.
  1425. //
  1426. // NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are
  1427. // written to the stream.
  1428. StreamSpecification *StreamSpecification `type:"structure"`
  1429. // The name of the table to create.
  1430. TableName *string `type:"string" required:"true"`
  1431. metadataCreateTableInput `json:"-" xml:"-"`
  1432. }
  1433. type metadataCreateTableInput struct {
  1434. SDKShapeTraits bool `type:"structure"`
  1435. }
  1436. // String returns the string representation
  1437. func (s CreateTableInput) String() string {
  1438. return awsutil.Prettify(s)
  1439. }
  1440. // GoString returns the string representation
  1441. func (s CreateTableInput) GoString() string {
  1442. return s.String()
  1443. }
  1444. // Represents the output of a CreateTable operation.
  1445. type CreateTableOutput struct {
  1446. // Represents the properties of a table.
  1447. TableDescription *TableDescription `type:"structure"`
  1448. metadataCreateTableOutput `json:"-" xml:"-"`
  1449. }
  1450. type metadataCreateTableOutput struct {
  1451. SDKShapeTraits bool `type:"structure"`
  1452. }
  1453. // String returns the string representation
  1454. func (s CreateTableOutput) String() string {
  1455. return awsutil.Prettify(s)
  1456. }
  1457. // GoString returns the string representation
  1458. func (s CreateTableOutput) GoString() string {
  1459. return s.String()
  1460. }
  1461. // Represents a global secondary index to be deleted from an existing table.
  1462. type DeleteGlobalSecondaryIndexAction struct {
  1463. // The name of the global secondary index to be deleted.
  1464. IndexName *string `type:"string" required:"true"`
  1465. metadataDeleteGlobalSecondaryIndexAction `json:"-" xml:"-"`
  1466. }
  1467. type metadataDeleteGlobalSecondaryIndexAction struct {
  1468. SDKShapeTraits bool `type:"structure"`
  1469. }
  1470. // String returns the string representation
  1471. func (s DeleteGlobalSecondaryIndexAction) String() string {
  1472. return awsutil.Prettify(s)
  1473. }
  1474. // GoString returns the string representation
  1475. func (s DeleteGlobalSecondaryIndexAction) GoString() string {
  1476. return s.String()
  1477. }
  1478. // Represents the input of a DeleteItem operation.
  1479. type DeleteItemInput struct {
  1480. // A condition that must be satisfied in order for a conditional DeleteItem
  1481. // to succeed.
  1482. //
  1483. // An expression can contain any of the following:
  1484. //
  1485. // Functions: attribute_exists | attribute_not_exists | attribute_type |
  1486. // contains | begins_with | size
  1487. //
  1488. // These function names are case-sensitive.
  1489. //
  1490. // Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  1491. //
  1492. // Logical operators: AND | OR | NOT
  1493. //
  1494. // For more information on condition expressions, see Specifying Conditions
  1495. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  1496. // in the Amazon DynamoDB Developer Guide.
  1497. //
  1498. // ConditionExpression replaces the legacy ConditionalOperator and Expected
  1499. // parameters.
  1500. ConditionExpression *string `type:"string"`
  1501. // This is a legacy parameter, for backward compatibility. New applications
  1502. // should use ConditionExpression instead. Do not combine legacy parameters
  1503. // and expression parameters in a single API call; otherwise, DynamoDB will
  1504. // return a ValidationException exception.
  1505. //
  1506. // A logical operator to apply to the conditions in the Expected map:
  1507. //
  1508. // AND - If all of the conditions evaluate to true, then the entire map evaluates
  1509. // to true.
  1510. //
  1511. // OR - If at least one of the conditions evaluate to true, then the entire
  1512. // map evaluates to true.
  1513. //
  1514. // If you omit ConditionalOperator, then AND is the default.
  1515. //
  1516. // The operation will succeed only if the entire map evaluates to true.
  1517. //
  1518. // This parameter does not support attributes of type List or Map.
  1519. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  1520. // This is a legacy parameter, for backward compatibility. New applications
  1521. // should use ConditionExpression instead. Do not combine legacy parameters
  1522. // and expression parameters in a single API call; otherwise, DynamoDB will
  1523. // return a ValidationException exception.
  1524. //
  1525. // A map of attribute/condition pairs. Expected provides a conditional block
  1526. // for the DeleteItem operation.
  1527. //
  1528. // Each element of Expected consists of an attribute name, a comparison operator,
  1529. // and one or more values. DynamoDB compares the attribute with the value(s)
  1530. // you supplied, using the comparison operator. For each Expected element, the
  1531. // result of the evaluation is either true or false.
  1532. //
  1533. // If you specify more than one element in the Expected map, then by default
  1534. // all of the conditions must evaluate to true. In other words, the conditions
  1535. // are ANDed together. (You can use the ConditionalOperator parameter to OR
  1536. // the conditions instead. If you do this, then at least one of the conditions
  1537. // must evaluate to true, rather than all of them.)
  1538. //
  1539. // If the Expected map evaluates to true, then the conditional operation succeeds;
  1540. // otherwise, it fails.
  1541. //
  1542. // Expected contains the following:
  1543. //
  1544. // AttributeValueList - One or more values to evaluate against the supplied
  1545. // attribute. The number of values in the list depends on the ComparisonOperator
  1546. // being used.
  1547. //
  1548. // For type Number, value comparisons are numeric.
  1549. //
  1550. // String value comparisons for greater than, equals, or less than are based
  1551. // on ASCII character code values. For example, a is greater than A, and a is
  1552. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
  1553. //
  1554. // For type Binary, DynamoDB treats each byte of the binary data as unsigned
  1555. // when it compares binary values.
  1556. //
  1557. // ComparisonOperator - A comparator for evaluating attributes in the AttributeValueList.
  1558. // When performing the comparison, DynamoDB uses strongly consistent reads.
  1559. //
  1560. // The following comparison operators are available:
  1561. //
  1562. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  1563. // | BEGINS_WITH | IN | BETWEEN
  1564. //
  1565. // The following are descriptions of each comparison operator.
  1566. //
  1567. // EQ : Equal. EQ is supported for all datatypes, including lists and maps.
  1568. //
  1569. // AttributeValueList can contain only one AttributeValue element of type String,
  1570. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  1571. // an AttributeValue element of a different type than the one provided in the
  1572. // request, the value does not match. For example, {"S":"6"} does not equal
  1573. // {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  1574. //
  1575. // NE : Not equal. NE is supported for all datatypes, including lists and
  1576. // maps.
  1577. //
  1578. // AttributeValueList can contain only one AttributeValue of type String, Number,
  1579. // Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue
  1580. // of a different type than the one provided in the request, the value does
  1581. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1582. // does not equal {"NS":["6", "2", "1"]}.
  1583. //
  1584. // LE : Less than or equal.
  1585. //
  1586. // AttributeValueList can contain only one AttributeValue element of type String,
  1587. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1588. // element of a different type than the one provided in the request, the value
  1589. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1590. // does not compare to {"NS":["6", "2", "1"]}.
  1591. //
  1592. // LT : Less than.
  1593. //
  1594. // AttributeValueList can contain only one AttributeValue of type String, Number,
  1595. // or Binary (not a set type). If an item contains an AttributeValue element
  1596. // of a different type than the one provided in the request, the value does
  1597. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1598. // does not compare to {"NS":["6", "2", "1"]}.
  1599. //
  1600. // GE : Greater than or equal.
  1601. //
  1602. // AttributeValueList can contain only one AttributeValue element of type String,
  1603. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1604. // element of a different type than the one provided in the request, the value
  1605. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1606. // does not compare to {"NS":["6", "2", "1"]}.
  1607. //
  1608. // GT : Greater than.
  1609. //
  1610. // AttributeValueList can contain only one AttributeValue element of type String,
  1611. // Number, or Binary (not a set type). If an item contains an AttributeValue
  1612. // element of a different type than the one provided in the request, the value
  1613. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  1614. // does not compare to {"NS":["6", "2", "1"]}.
  1615. //
  1616. // NOT_NULL : The attribute exists. NOT_NULL is supported for all datatypes,
  1617. // including lists and maps.
  1618. //
  1619. // This operator tests for the existence of an attribute, not its data type.
  1620. // If the data type of attribute "a" is null, and you evaluate it using NOT_NULL,
  1621. // the result is a Boolean true. This result is because the attribute "a" exists;
  1622. // its data type is not relevant to the NOT_NULL comparison operator.
  1623. //
  1624. // NULL : The attribute does not exist. NULL is supported for all datatypes,
  1625. // including lists and maps.
  1626. //
  1627. // This operator tests for the nonexistence of an attribute, not its data type.
  1628. // If the data type of attribute "a" is null, and you evaluate it using NULL,
  1629. // the result is a Boolean false. This is because the attribute "a" exists;
  1630. // its data type is not relevant to the NULL comparison operator.
  1631. //
  1632. // CONTAINS : Checks for a subsequence, or value in a set.
  1633. //
  1634. // AttributeValueList can contain only one AttributeValue element of type String,
  1635. // Number, or Binary (not a set type). If the target attribute of the comparison
  1636. // is of type String, then the operator checks for a substring match. If the
  1637. // target attribute of the comparison is of type Binary, then the operator looks
  1638. // for a subsequence of the target that matches the input. If the target attribute
  1639. // of the comparison is a set ("SS", "NS", or "BS"), then the operator evaluates
  1640. // to true if it finds an exact match with any member of the set.
  1641. //
  1642. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can
  1643. // be a list; however, "b" cannot be a set, a map, or a list.
  1644. //
  1645. // NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value
  1646. // in a set.
  1647. //
  1648. // AttributeValueList can contain only one AttributeValue element of type String,
  1649. // Number, or Binary (not a set type). If the target attribute of the comparison
  1650. // is a String, then the operator checks for the absence of a substring match.
  1651. // If the target attribute of the comparison is Binary, then the operator checks
  1652. // for the absence of a subsequence of the target that matches the input. If
  1653. // the target attribute of the comparison is a set ("SS", "NS", or "BS"), then
  1654. // the operator evaluates to true if it does not find an exact match with any
  1655. // member of the set.
  1656. //
  1657. // NOT_CONTAINS is supported for lists: When evaluating "a NOT CONTAINS b",
  1658. // "a" can be a list; however, "b" cannot be a set, a map, or a list.
  1659. //
  1660. // BEGINS_WITH : Checks for a prefix.
  1661. //
  1662. // AttributeValueList can contain only one AttributeValue of type String or
  1663. // Binary (not a Number or a set type). The target attribute of the comparison
  1664. // must be of type String or Binary (not a Number or a set type).
  1665. //
  1666. // IN : Checks for matching elements within two sets.
  1667. //
  1668. // AttributeValueList can contain one or more AttributeValue elements of type
  1669. // String, Number, or Binary (not a set type). These attributes are compared
  1670. // against an existing set type attribute of an item. If any elements of the
  1671. // input set are present in the item attribute, the expression evaluates to
  1672. // true.
  1673. //
  1674. // BETWEEN : Greater than or equal to the first value, and less than or equal
  1675. // to the second value.
  1676. //
  1677. // AttributeValueList must contain two AttributeValue elements of the same
  1678. // type, either String, Number, or Binary (not a set type). A target attribute
  1679. // matches if the target value is greater than, or equal to, the first element
  1680. // and less than, or equal to, the second element. If an item contains an AttributeValue
  1681. // element of a different type than the one provided in the request, the value
  1682. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  1683. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  1684. //
  1685. // For usage examples of AttributeValueList and ComparisonOperator, see
  1686. // Legacy Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  1687. // in the Amazon DynamoDB Developer Guide.
  1688. //
  1689. // For backward compatibility with previous DynamoDB releases, the following
  1690. // parameters can be used instead of AttributeValueList and ComparisonOperator:
  1691. //
  1692. // Value - A value for DynamoDB to compare with an attribute.
  1693. //
  1694. // Exists - A Boolean value that causes DynamoDB to evaluate the value before
  1695. // attempting the conditional operation:
  1696. //
  1697. // If Exists is true, DynamoDB will check to see if that attribute value
  1698. // already exists in the table. If it is found, then the condition evaluates
  1699. // to true; otherwise the condition evaluate to false.
  1700. //
  1701. // If Exists is false, DynamoDB assumes that the attribute value does not
  1702. // exist in the table. If in fact the value does not exist, then the assumption
  1703. // is valid and the condition evaluates to true. If the value is found, despite
  1704. // the assumption that it does not exist, the condition evaluates to false.
  1705. //
  1706. // Note that the default value for Exists is true.
  1707. //
  1708. // The Value and Exists parameters are incompatible with AttributeValueList
  1709. // and ComparisonOperator. Note that if you use both sets of parameters at once,
  1710. // DynamoDB will return a ValidationException exception.
  1711. //
  1712. // This parameter does not support attributes of type List or Map.
  1713. Expected map[string]*ExpectedAttributeValue `type:"map"`
  1714. // One or more substitution tokens for attribute names in an expression. The
  1715. // following are some use cases for using ExpressionAttributeNames:
  1716. //
  1717. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  1718. //
  1719. // To create a placeholder for repeating occurrences of an attribute name
  1720. // in an expression.
  1721. //
  1722. // To prevent special characters in an attribute name from being misinterpreted
  1723. // in an expression.
  1724. //
  1725. // Use the # character in an expression to dereference an attribute name.
  1726. // For example, consider the following attribute name:
  1727. //
  1728. // Percentile
  1729. //
  1730. // The name of this attribute conflicts with a reserved word, so it cannot
  1731. // be used directly in an expression. (For the complete list of reserved words,
  1732. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  1733. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  1734. // the following for ExpressionAttributeNames:
  1735. //
  1736. // {"#P":"Percentile"}
  1737. //
  1738. // You could then use this substitution in an expression, as in this example:
  1739. //
  1740. // #P = :val
  1741. //
  1742. // Tokens that begin with the : character are expression attribute values,
  1743. // which are placeholders for the actual value at runtime.
  1744. //
  1745. // For more information on expression attribute names, see Accessing Item Attributes
  1746. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  1747. // in the Amazon DynamoDB Developer Guide.
  1748. ExpressionAttributeNames map[string]*string `type:"map"`
  1749. // One or more values that can be substituted in an expression.
  1750. //
  1751. // Use the : (colon) character in an expression to dereference an attribute
  1752. // value. For example, suppose that you wanted to check whether the value of
  1753. // the ProductStatus attribute was one of the following:
  1754. //
  1755. // Available | Backordered | Discontinued
  1756. //
  1757. // You would first need to specify ExpressionAttributeValues as follows:
  1758. //
  1759. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  1760. // }
  1761. //
  1762. // You could then use these values in an expression, such as this:
  1763. //
  1764. // ProductStatus IN (:avail, :back, :disc)
  1765. //
  1766. // For more information on expression attribute values, see Specifying Conditions
  1767. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  1768. // in the Amazon DynamoDB Developer Guide.
  1769. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  1770. // A map of attribute names to AttributeValue objects, representing the primary
  1771. // key of the item to delete.
  1772. //
  1773. // For the primary key, you must provide all of the attributes. For example,
  1774. // with a hash type primary key, you only need to provide the hash attribute.
  1775. // For a hash-and-range type primary key, you must provide both the hash attribute
  1776. // and the range attribute.
  1777. Key map[string]*AttributeValue `type:"map" required:"true"`
  1778. // Determines the level of detail about provisioned throughput consumption that
  1779. // is returned in the response:
  1780. //
  1781. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  1782. // operation, together with ConsumedCapacity for each table and secondary index
  1783. // that was accessed.
  1784. //
  1785. // Note that some operations, such as GetItem and BatchGetItem, do not access
  1786. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  1787. // information for table(s).
  1788. //
  1789. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  1790. // operation.
  1791. //
  1792. // NONE - No ConsumedCapacity details are included in the response.
  1793. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  1794. // Determines whether item collection metrics are returned. If set to SIZE,
  1795. // the response includes statistics about item collections, if any, that were
  1796. // modified during the operation are returned in the response. If set to NONE
  1797. // (the default), no statistics are returned.
  1798. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  1799. // Use ReturnValues if you want to get the item attributes as they appeared
  1800. // before they were deleted. For DeleteItem, the valid values are:
  1801. //
  1802. // NONE - If ReturnValues is not specified, or if its value is NONE, then
  1803. // nothing is returned. (This setting is the default for ReturnValues.)
  1804. //
  1805. // ALL_OLD - The content of the old item is returned.
  1806. ReturnValues *string `type:"string" enum:"ReturnValue"`
  1807. // The name of the table from which to delete the item.
  1808. TableName *string `type:"string" required:"true"`
  1809. metadataDeleteItemInput `json:"-" xml:"-"`
  1810. }
  1811. type metadataDeleteItemInput struct {
  1812. SDKShapeTraits bool `type:"structure"`
  1813. }
  1814. // String returns the string representation
  1815. func (s DeleteItemInput) String() string {
  1816. return awsutil.Prettify(s)
  1817. }
  1818. // GoString returns the string representation
  1819. func (s DeleteItemInput) GoString() string {
  1820. return s.String()
  1821. }
  1822. // Represents the output of a DeleteItem operation.
  1823. type DeleteItemOutput struct {
  1824. // A map of attribute names to AttributeValue objects, representing the item
  1825. // as it appeared before the DeleteItem operation. This map appears in the response
  1826. // only if ReturnValues was specified as ALL_OLD in the request.
  1827. Attributes map[string]*AttributeValue `type:"map"`
  1828. // The capacity units consumed by an operation. The data returned includes the
  1829. // total provisioned throughput consumed, along with statistics for the table
  1830. // and any indexes involved in the operation. ConsumedCapacity is only returned
  1831. // if the request asked for it. For more information, see Provisioned Throughput
  1832. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  1833. // in the Amazon DynamoDB Developer Guide.
  1834. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  1835. // Information about item collections, if any, that were affected by the operation.
  1836. // ItemCollectionMetrics is only returned if the request asked for it. If the
  1837. // table does not have any local secondary indexes, this information is not
  1838. // returned in the response.
  1839. //
  1840. // Each ItemCollectionMetrics element consists of:
  1841. //
  1842. // ItemCollectionKey - The hash key value of the item collection. This is
  1843. // the same as the hash key of the item.
  1844. //
  1845. // SizeEstimateRange - An estimate of item collection size, in gigabytes. This
  1846. // value is a two-element array containing a lower bound and an upper bound
  1847. // for the estimate. The estimate includes the size of all the items in the
  1848. // table, plus the size of all attributes projected into all of the local secondary
  1849. // indexes on that table. Use this estimate to measure whether a local secondary
  1850. // index is approaching its size limit.
  1851. //
  1852. // The estimate is subject to change over time; therefore, do not rely on the
  1853. // precision or accuracy of the estimate.
  1854. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  1855. metadataDeleteItemOutput `json:"-" xml:"-"`
  1856. }
  1857. type metadataDeleteItemOutput struct {
  1858. SDKShapeTraits bool `type:"structure"`
  1859. }
  1860. // String returns the string representation
  1861. func (s DeleteItemOutput) String() string {
  1862. return awsutil.Prettify(s)
  1863. }
  1864. // GoString returns the string representation
  1865. func (s DeleteItemOutput) GoString() string {
  1866. return s.String()
  1867. }
  1868. // Represents a request to perform a DeleteItem operation on an item.
  1869. type DeleteRequest struct {
  1870. // A map of attribute name to attribute values, representing the primary key
  1871. // of the item to delete. All of the table's primary key attributes must be
  1872. // specified, and their data types must match those of the table's key schema.
  1873. Key map[string]*AttributeValue `type:"map" required:"true"`
  1874. metadataDeleteRequest `json:"-" xml:"-"`
  1875. }
  1876. type metadataDeleteRequest struct {
  1877. SDKShapeTraits bool `type:"structure"`
  1878. }
  1879. // String returns the string representation
  1880. func (s DeleteRequest) String() string {
  1881. return awsutil.Prettify(s)
  1882. }
  1883. // GoString returns the string representation
  1884. func (s DeleteRequest) GoString() string {
  1885. return s.String()
  1886. }
  1887. // Represents the input of a DeleteTable operation.
  1888. type DeleteTableInput struct {
  1889. // The name of the table to delete.
  1890. TableName *string `type:"string" required:"true"`
  1891. metadataDeleteTableInput `json:"-" xml:"-"`
  1892. }
  1893. type metadataDeleteTableInput struct {
  1894. SDKShapeTraits bool `type:"structure"`
  1895. }
  1896. // String returns the string representation
  1897. func (s DeleteTableInput) String() string {
  1898. return awsutil.Prettify(s)
  1899. }
  1900. // GoString returns the string representation
  1901. func (s DeleteTableInput) GoString() string {
  1902. return s.String()
  1903. }
  1904. // Represents the output of a DeleteTable operation.
  1905. type DeleteTableOutput struct {
  1906. // Represents the properties of a table.
  1907. TableDescription *TableDescription `type:"structure"`
  1908. metadataDeleteTableOutput `json:"-" xml:"-"`
  1909. }
  1910. type metadataDeleteTableOutput struct {
  1911. SDKShapeTraits bool `type:"structure"`
  1912. }
  1913. // String returns the string representation
  1914. func (s DeleteTableOutput) String() string {
  1915. return awsutil.Prettify(s)
  1916. }
  1917. // GoString returns the string representation
  1918. func (s DeleteTableOutput) GoString() string {
  1919. return s.String()
  1920. }
  1921. // Represents the input of a DescribeTable operation.
  1922. type DescribeTableInput struct {
  1923. // The name of the table to describe.
  1924. TableName *string `type:"string" required:"true"`
  1925. metadataDescribeTableInput `json:"-" xml:"-"`
  1926. }
  1927. type metadataDescribeTableInput struct {
  1928. SDKShapeTraits bool `type:"structure"`
  1929. }
  1930. // String returns the string representation
  1931. func (s DescribeTableInput) String() string {
  1932. return awsutil.Prettify(s)
  1933. }
  1934. // GoString returns the string representation
  1935. func (s DescribeTableInput) GoString() string {
  1936. return s.String()
  1937. }
  1938. // Represents the output of a DescribeTable operation.
  1939. type DescribeTableOutput struct {
  1940. // Represents the properties of a table.
  1941. Table *TableDescription `type:"structure"`
  1942. metadataDescribeTableOutput `json:"-" xml:"-"`
  1943. }
  1944. type metadataDescribeTableOutput struct {
  1945. SDKShapeTraits bool `type:"structure"`
  1946. }
  1947. // String returns the string representation
  1948. func (s DescribeTableOutput) String() string {
  1949. return awsutil.Prettify(s)
  1950. }
  1951. // GoString returns the string representation
  1952. func (s DescribeTableOutput) GoString() string {
  1953. return s.String()
  1954. }
  1955. // Represents a condition to be compared with an attribute value. This condition
  1956. // can be used with DeleteItem, PutItem or UpdateItem operations; if the comparison
  1957. // evaluates to true, the operation succeeds; if not, the operation fails. You
  1958. // can use ExpectedAttributeValue in one of two different ways:
  1959. //
  1960. // Use AttributeValueList to specify one or more values to compare against
  1961. // an attribute. Use ComparisonOperator to specify how you want to perform the
  1962. // comparison. If the comparison evaluates to true, then the conditional operation
  1963. // succeeds.
  1964. //
  1965. // Use Value to specify a value that DynamoDB will compare against an attribute.
  1966. // If the values match, then ExpectedAttributeValue evaluates to true and the
  1967. // conditional operation succeeds. Optionally, you can also set Exists to false,
  1968. // indicating that you do not expect to find the attribute value in the table.
  1969. // In this case, the conditional operation succeeds only if the comparison evaluates
  1970. // to false.
  1971. //
  1972. // Value and Exists are incompatible with AttributeValueList and ComparisonOperator.
  1973. // Note that if you use both sets of parameters at once, DynamoDB will return
  1974. // a ValidationException exception.
  1975. type ExpectedAttributeValue struct {
  1976. // One or more values to evaluate against the supplied attribute. The number
  1977. // of values in the list depends on the ComparisonOperator being used.
  1978. //
  1979. // For type Number, value comparisons are numeric.
  1980. //
  1981. // String value comparisons for greater than, equals, or less than are based
  1982. // on ASCII character code values. For example, a is greater than A, and a is
  1983. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  1984. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  1985. //
  1986. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  1987. // it compares binary values.
  1988. //
  1989. // For information on specifying data types in JSON, see JSON Data Format (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html)
  1990. // in the Amazon DynamoDB Developer Guide.
  1991. AttributeValueList []*AttributeValue `type:"list"`
  1992. // A comparator for evaluating attributes in the AttributeValueList. For example,
  1993. // equals, greater than, less than, etc.
  1994. //
  1995. // The following comparison operators are available:
  1996. //
  1997. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  1998. // | BEGINS_WITH | IN | BETWEEN
  1999. //
  2000. // The following are descriptions of each comparison operator.
  2001. //
  2002. // EQ : Equal. EQ is supported for all datatypes, including lists and maps.
  2003. //
  2004. // AttributeValueList can contain only one AttributeValue element of type String,
  2005. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  2006. // an AttributeValue element of a different type than the one provided in the
  2007. // request, the value does not match. For example, {"S":"6"} does not equal
  2008. // {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  2009. //
  2010. // NE : Not equal. NE is supported for all datatypes, including lists and
  2011. // maps.
  2012. //
  2013. // AttributeValueList can contain only one AttributeValue of type String, Number,
  2014. // Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue
  2015. // of a different type than the one provided in the request, the value does
  2016. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2017. // does not equal {"NS":["6", "2", "1"]}.
  2018. //
  2019. // LE : Less than or equal.
  2020. //
  2021. // AttributeValueList can contain only one AttributeValue element of type String,
  2022. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2023. // element of a different type than the one provided in the request, the value
  2024. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2025. // does not compare to {"NS":["6", "2", "1"]}.
  2026. //
  2027. // LT : Less than.
  2028. //
  2029. // AttributeValueList can contain only one AttributeValue of type String, Number,
  2030. // or Binary (not a set type). If an item contains an AttributeValue element
  2031. // of a different type than the one provided in the request, the value does
  2032. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2033. // does not compare to {"NS":["6", "2", "1"]}.
  2034. //
  2035. // GE : Greater than or equal.
  2036. //
  2037. // AttributeValueList can contain only one AttributeValue element of type String,
  2038. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2039. // element of a different type than the one provided in the request, the value
  2040. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2041. // does not compare to {"NS":["6", "2", "1"]}.
  2042. //
  2043. // GT : Greater than.
  2044. //
  2045. // AttributeValueList can contain only one AttributeValue element of type String,
  2046. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2047. // element of a different type than the one provided in the request, the value
  2048. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2049. // does not compare to {"NS":["6", "2", "1"]}.
  2050. //
  2051. // NOT_NULL : The attribute exists. NOT_NULL is supported for all datatypes,
  2052. // including lists and maps.
  2053. //
  2054. // This operator tests for the existence of an attribute, not its data type.
  2055. // If the data type of attribute "a" is null, and you evaluate it using NOT_NULL,
  2056. // the result is a Boolean true. This result is because the attribute "a" exists;
  2057. // its data type is not relevant to the NOT_NULL comparison operator.
  2058. //
  2059. // NULL : The attribute does not exist. NULL is supported for all datatypes,
  2060. // including lists and maps.
  2061. //
  2062. // This operator tests for the nonexistence of an attribute, not its data type.
  2063. // If the data type of attribute "a" is null, and you evaluate it using NULL,
  2064. // the result is a Boolean false. This is because the attribute "a" exists;
  2065. // its data type is not relevant to the NULL comparison operator.
  2066. //
  2067. // CONTAINS : Checks for a subsequence, or value in a set.
  2068. //
  2069. // AttributeValueList can contain only one AttributeValue element of type String,
  2070. // Number, or Binary (not a set type). If the target attribute of the comparison
  2071. // is of type String, then the operator checks for a substring match. If the
  2072. // target attribute of the comparison is of type Binary, then the operator looks
  2073. // for a subsequence of the target that matches the input. If the target attribute
  2074. // of the comparison is a set ("SS", "NS", or "BS"), then the operator evaluates
  2075. // to true if it finds an exact match with any member of the set.
  2076. //
  2077. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can
  2078. // be a list; however, "b" cannot be a set, a map, or a list.
  2079. //
  2080. // NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value
  2081. // in a set.
  2082. //
  2083. // AttributeValueList can contain only one AttributeValue element of type String,
  2084. // Number, or Binary (not a set type). If the target attribute of the comparison
  2085. // is a String, then the operator checks for the absence of a substring match.
  2086. // If the target attribute of the comparison is Binary, then the operator checks
  2087. // for the absence of a subsequence of the target that matches the input. If
  2088. // the target attribute of the comparison is a set ("SS", "NS", or "BS"), then
  2089. // the operator evaluates to true if it does not find an exact match with any
  2090. // member of the set.
  2091. //
  2092. // NOT_CONTAINS is supported for lists: When evaluating "a NOT CONTAINS b",
  2093. // "a" can be a list; however, "b" cannot be a set, a map, or a list.
  2094. //
  2095. // BEGINS_WITH : Checks for a prefix.
  2096. //
  2097. // AttributeValueList can contain only one AttributeValue of type String or
  2098. // Binary (not a Number or a set type). The target attribute of the comparison
  2099. // must be of type String or Binary (not a Number or a set type).
  2100. //
  2101. // IN : Checks for matching elements within two sets.
  2102. //
  2103. // AttributeValueList can contain one or more AttributeValue elements of type
  2104. // String, Number, or Binary (not a set type). These attributes are compared
  2105. // against an existing set type attribute of an item. If any elements of the
  2106. // input set are present in the item attribute, the expression evaluates to
  2107. // true.
  2108. //
  2109. // BETWEEN : Greater than or equal to the first value, and less than or equal
  2110. // to the second value.
  2111. //
  2112. // AttributeValueList must contain two AttributeValue elements of the same
  2113. // type, either String, Number, or Binary (not a set type). A target attribute
  2114. // matches if the target value is greater than, or equal to, the first element
  2115. // and less than, or equal to, the second element. If an item contains an AttributeValue
  2116. // element of a different type than the one provided in the request, the value
  2117. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  2118. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  2119. ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
  2120. // Causes DynamoDB to evaluate the value before attempting a conditional operation:
  2121. //
  2122. // If Exists is true, DynamoDB will check to see if that attribute value
  2123. // already exists in the table. If it is found, then the operation succeeds.
  2124. // If it is not found, the operation fails with a ConditionalCheckFailedException.
  2125. //
  2126. // If Exists is false, DynamoDB assumes that the attribute value does not
  2127. // exist in the table. If in fact the value does not exist, then the assumption
  2128. // is valid and the operation succeeds. If the value is found, despite the assumption
  2129. // that it does not exist, the operation fails with a ConditionalCheckFailedException.
  2130. //
  2131. // The default setting for Exists is true. If you supply a Value all by itself,
  2132. // DynamoDB assumes the attribute exists: You don't have to set Exists to true,
  2133. // because it is implied.
  2134. //
  2135. // DynamoDB returns a ValidationException if:
  2136. //
  2137. // Exists is true but there is no Value to check. (You expect a value to
  2138. // exist, but don't specify what that value is.)
  2139. //
  2140. // Exists is false but you also provide a Value. (You cannot expect an attribute
  2141. // to have a value, while also expecting it not to exist.)
  2142. Exists *bool `type:"boolean"`
  2143. // Represents the data for an attribute. You can set one, and only one, of the
  2144. // elements.
  2145. //
  2146. // Each attribute in an item is a name-value pair. An attribute can be single-valued
  2147. // or multi-valued set. For example, a book item can have title and authors
  2148. // attributes. Each book has one title but can have many authors. The multi-valued
  2149. // attribute is a set; duplicate values are not allowed.
  2150. Value *AttributeValue `type:"structure"`
  2151. metadataExpectedAttributeValue `json:"-" xml:"-"`
  2152. }
  2153. type metadataExpectedAttributeValue struct {
  2154. SDKShapeTraits bool `type:"structure"`
  2155. }
  2156. // String returns the string representation
  2157. func (s ExpectedAttributeValue) String() string {
  2158. return awsutil.Prettify(s)
  2159. }
  2160. // GoString returns the string representation
  2161. func (s ExpectedAttributeValue) GoString() string {
  2162. return s.String()
  2163. }
  2164. // Represents the input of a GetItem operation.
  2165. type GetItemInput struct {
  2166. // This is a legacy parameter, for backward compatibility. New applications
  2167. // should use ProjectionExpression instead. Do not combine legacy parameters
  2168. // and expression parameters in a single API call; otherwise, DynamoDB will
  2169. // return a ValidationException exception.
  2170. //
  2171. // This parameter allows you to retrieve attributes of type List or Map; however,
  2172. // it cannot retrieve individual elements within a List or a Map.
  2173. //
  2174. // The names of one or more attributes to retrieve. If no attribute names are
  2175. // provided, then all attributes will be returned. If any of the requested attributes
  2176. // are not found, they will not appear in the result.
  2177. //
  2178. // Note that AttributesToGet has no effect on provisioned throughput consumption.
  2179. // DynamoDB determines capacity units consumed based on item size, not on the
  2180. // amount of data that is returned to an application.
  2181. AttributesToGet []*string `type:"list"`
  2182. // Determines the read consistency model: If set to true, then the operation
  2183. // uses strongly consistent reads; otherwise, the operation uses eventually
  2184. // consistent reads.
  2185. ConsistentRead *bool `type:"boolean"`
  2186. // One or more substitution tokens for attribute names in an expression. The
  2187. // following are some use cases for using ExpressionAttributeNames:
  2188. //
  2189. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  2190. //
  2191. // To create a placeholder for repeating occurrences of an attribute name
  2192. // in an expression.
  2193. //
  2194. // To prevent special characters in an attribute name from being misinterpreted
  2195. // in an expression.
  2196. //
  2197. // Use the # character in an expression to dereference an attribute name.
  2198. // For example, consider the following attribute name:
  2199. //
  2200. // Percentile
  2201. //
  2202. // The name of this attribute conflicts with a reserved word, so it cannot
  2203. // be used directly in an expression. (For the complete list of reserved words,
  2204. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  2205. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  2206. // the following for ExpressionAttributeNames:
  2207. //
  2208. // {"#P":"Percentile"}
  2209. //
  2210. // You could then use this substitution in an expression, as in this example:
  2211. //
  2212. // #P = :val
  2213. //
  2214. // Tokens that begin with the : character are expression attribute values,
  2215. // which are placeholders for the actual value at runtime.
  2216. //
  2217. // For more information on expression attribute names, see Accessing Item Attributes
  2218. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  2219. // in the Amazon DynamoDB Developer Guide.
  2220. ExpressionAttributeNames map[string]*string `type:"map"`
  2221. // A map of attribute names to AttributeValue objects, representing the primary
  2222. // key of the item to retrieve.
  2223. //
  2224. // For the primary key, you must provide all of the attributes. For example,
  2225. // with a hash type primary key, you only need to provide the hash attribute.
  2226. // For a hash-and-range type primary key, you must provide both the hash attribute
  2227. // and the range attribute.
  2228. Key map[string]*AttributeValue `type:"map" required:"true"`
  2229. // A string that identifies one or more attributes to retrieve from the table.
  2230. // These attributes can include scalars, sets, or elements of a JSON document.
  2231. // The attributes in the expression must be separated by commas.
  2232. //
  2233. // If no attribute names are specified, then all attributes will be returned.
  2234. // If any of the requested attributes are not found, they will not appear in
  2235. // the result.
  2236. //
  2237. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  2238. // in the Amazon DynamoDB Developer Guide.
  2239. //
  2240. // ProjectionExpression replaces the legacy AttributesToGet parameter.
  2241. ProjectionExpression *string `type:"string"`
  2242. // Determines the level of detail about provisioned throughput consumption that
  2243. // is returned in the response:
  2244. //
  2245. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  2246. // operation, together with ConsumedCapacity for each table and secondary index
  2247. // that was accessed.
  2248. //
  2249. // Note that some operations, such as GetItem and BatchGetItem, do not access
  2250. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  2251. // information for table(s).
  2252. //
  2253. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  2254. // operation.
  2255. //
  2256. // NONE - No ConsumedCapacity details are included in the response.
  2257. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  2258. // The name of the table containing the requested item.
  2259. TableName *string `type:"string" required:"true"`
  2260. metadataGetItemInput `json:"-" xml:"-"`
  2261. }
  2262. type metadataGetItemInput struct {
  2263. SDKShapeTraits bool `type:"structure"`
  2264. }
  2265. // String returns the string representation
  2266. func (s GetItemInput) String() string {
  2267. return awsutil.Prettify(s)
  2268. }
  2269. // GoString returns the string representation
  2270. func (s GetItemInput) GoString() string {
  2271. return s.String()
  2272. }
  2273. // Represents the output of a GetItem operation.
  2274. type GetItemOutput struct {
  2275. // The capacity units consumed by an operation. The data returned includes the
  2276. // total provisioned throughput consumed, along with statistics for the table
  2277. // and any indexes involved in the operation. ConsumedCapacity is only returned
  2278. // if the request asked for it. For more information, see Provisioned Throughput
  2279. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  2280. // in the Amazon DynamoDB Developer Guide.
  2281. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  2282. // A map of attribute names to AttributeValue objects, as specified by AttributesToGet.
  2283. Item map[string]*AttributeValue `type:"map"`
  2284. metadataGetItemOutput `json:"-" xml:"-"`
  2285. }
  2286. type metadataGetItemOutput struct {
  2287. SDKShapeTraits bool `type:"structure"`
  2288. }
  2289. // String returns the string representation
  2290. func (s GetItemOutput) String() string {
  2291. return awsutil.Prettify(s)
  2292. }
  2293. // GoString returns the string representation
  2294. func (s GetItemOutput) GoString() string {
  2295. return s.String()
  2296. }
  2297. // Represents the properties of a global secondary index.
  2298. type GlobalSecondaryIndex struct {
  2299. // The name of the global secondary index. The name must be unique among all
  2300. // other indexes on this table.
  2301. IndexName *string `type:"string" required:"true"`
  2302. // The complete key schema for a global secondary index, which consists of one
  2303. // or more pairs of attribute names and key types (HASH or RANGE).
  2304. KeySchema []*KeySchemaElement `type:"list" required:"true"`
  2305. // Represents attributes that are copied (projected) from the table into an
  2306. // index. These are in addition to the primary key attributes and index key
  2307. // attributes, which are automatically projected.
  2308. Projection *Projection `type:"structure" required:"true"`
  2309. // Represents the provisioned throughput settings for a specified table or index.
  2310. // The settings can be modified using the UpdateTable operation.
  2311. //
  2312. // For current minimum and maximum provisioned throughput values, see Limits
  2313. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  2314. // in the Amazon DynamoDB Developer Guide.
  2315. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  2316. metadataGlobalSecondaryIndex `json:"-" xml:"-"`
  2317. }
  2318. type metadataGlobalSecondaryIndex struct {
  2319. SDKShapeTraits bool `type:"structure"`
  2320. }
  2321. // String returns the string representation
  2322. func (s GlobalSecondaryIndex) String() string {
  2323. return awsutil.Prettify(s)
  2324. }
  2325. // GoString returns the string representation
  2326. func (s GlobalSecondaryIndex) GoString() string {
  2327. return s.String()
  2328. }
  2329. // Represents the properties of a global secondary index.
  2330. type GlobalSecondaryIndexDescription struct {
  2331. // Indicates whether the index is currently backfilling. Backfilling is the
  2332. // process of reading items from the table and determining whether they can
  2333. // be added to the index. (Not all items will qualify: For example, a hash key
  2334. // attribute cannot have any duplicates.) If an item can be added to the index,
  2335. // DynamoDB will do so. After all items have been processed, the backfilling
  2336. // operation is complete and Backfilling is false.
  2337. //
  2338. // For indexes that were created during a CreateTable operation, the Backfilling
  2339. // attribute does not appear in the DescribeTable output.
  2340. Backfilling *bool `type:"boolean"`
  2341. // The Amazon Resource Name (ARN) that uniquely identifies the index.
  2342. IndexArn *string `type:"string"`
  2343. // The name of the global secondary index.
  2344. IndexName *string `type:"string"`
  2345. // The total size of the specified index, in bytes. DynamoDB updates this value
  2346. // approximately every six hours. Recent changes might not be reflected in this
  2347. // value.
  2348. IndexSizeBytes *int64 `type:"long"`
  2349. // The current state of the global secondary index:
  2350. //
  2351. // CREATING - The index is being created.
  2352. //
  2353. // UPDATING - The index is being updated.
  2354. //
  2355. // DELETING - The index is being deleted.
  2356. //
  2357. // ACTIVE - The index is ready for use.
  2358. IndexStatus *string `type:"string" enum:"IndexStatus"`
  2359. // The number of items in the specified index. DynamoDB updates this value approximately
  2360. // every six hours. Recent changes might not be reflected in this value.
  2361. ItemCount *int64 `type:"long"`
  2362. // The complete key schema for the global secondary index, consisting of one
  2363. // or more pairs of attribute names and key types (HASH or RANGE).
  2364. KeySchema []*KeySchemaElement `type:"list"`
  2365. // Represents attributes that are copied (projected) from the table into an
  2366. // index. These are in addition to the primary key attributes and index key
  2367. // attributes, which are automatically projected.
  2368. Projection *Projection `type:"structure"`
  2369. // Represents the provisioned throughput settings for the table, consisting
  2370. // of read and write capacity units, along with data about increases and decreases.
  2371. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"`
  2372. metadataGlobalSecondaryIndexDescription `json:"-" xml:"-"`
  2373. }
  2374. type metadataGlobalSecondaryIndexDescription struct {
  2375. SDKShapeTraits bool `type:"structure"`
  2376. }
  2377. // String returns the string representation
  2378. func (s GlobalSecondaryIndexDescription) String() string {
  2379. return awsutil.Prettify(s)
  2380. }
  2381. // GoString returns the string representation
  2382. func (s GlobalSecondaryIndexDescription) GoString() string {
  2383. return s.String()
  2384. }
  2385. // Represents one of the following:
  2386. //
  2387. // A new global secondary index to be added to an existing table.
  2388. //
  2389. // New provisioned throughput parameters for an existing global secondary index.
  2390. //
  2391. // An existing global secondary index to be removed from an existing table.
  2392. type GlobalSecondaryIndexUpdate struct {
  2393. // The parameters required for creating a global secondary index on an existing
  2394. // table:
  2395. //
  2396. // IndexName
  2397. //
  2398. // KeySchema
  2399. //
  2400. // AttributeDefinitions
  2401. //
  2402. // Projection
  2403. //
  2404. // ProvisionedThroughput
  2405. Create *CreateGlobalSecondaryIndexAction `type:"structure"`
  2406. // The name of an existing global secondary index to be removed.
  2407. Delete *DeleteGlobalSecondaryIndexAction `type:"structure"`
  2408. // The name of an existing global secondary index, along with new provisioned
  2409. // throughput settings to be applied to that index.
  2410. Update *UpdateGlobalSecondaryIndexAction `type:"structure"`
  2411. metadataGlobalSecondaryIndexUpdate `json:"-" xml:"-"`
  2412. }
  2413. type metadataGlobalSecondaryIndexUpdate struct {
  2414. SDKShapeTraits bool `type:"structure"`
  2415. }
  2416. // String returns the string representation
  2417. func (s GlobalSecondaryIndexUpdate) String() string {
  2418. return awsutil.Prettify(s)
  2419. }
  2420. // GoString returns the string representation
  2421. func (s GlobalSecondaryIndexUpdate) GoString() string {
  2422. return s.String()
  2423. }
  2424. // Information about item collections, if any, that were affected by the operation.
  2425. // ItemCollectionMetrics is only returned if the request asked for it. If the
  2426. // table does not have any local secondary indexes, this information is not
  2427. // returned in the response.
  2428. type ItemCollectionMetrics struct {
  2429. // The hash key value of the item collection. This value is the same as the
  2430. // hash key of the item.
  2431. ItemCollectionKey map[string]*AttributeValue `type:"map"`
  2432. // An estimate of item collection size, in gigabytes. This value is a two-element
  2433. // array containing a lower bound and an upper bound for the estimate. The estimate
  2434. // includes the size of all the items in the table, plus the size of all attributes
  2435. // projected into all of the local secondary indexes on that table. Use this
  2436. // estimate to measure whether a local secondary index is approaching its size
  2437. // limit.
  2438. //
  2439. // The estimate is subject to change over time; therefore, do not rely on the
  2440. // precision or accuracy of the estimate.
  2441. SizeEstimateRangeGB []*float64 `type:"list"`
  2442. metadataItemCollectionMetrics `json:"-" xml:"-"`
  2443. }
  2444. type metadataItemCollectionMetrics struct {
  2445. SDKShapeTraits bool `type:"structure"`
  2446. }
  2447. // String returns the string representation
  2448. func (s ItemCollectionMetrics) String() string {
  2449. return awsutil.Prettify(s)
  2450. }
  2451. // GoString returns the string representation
  2452. func (s ItemCollectionMetrics) GoString() string {
  2453. return s.String()
  2454. }
  2455. // Represents a single element of a key schema. A key schema specifies the attributes
  2456. // that make up the primary key of a table, or the key attributes of an index.
  2457. //
  2458. // A KeySchemaElement represents exactly one attribute of the primary key.
  2459. // For example, a hash type primary key would be represented by one KeySchemaElement.
  2460. // A hash-and-range type primary key would require one KeySchemaElement for
  2461. // the hash attribute, and another KeySchemaElement for the range attribute.
  2462. type KeySchemaElement struct {
  2463. // The name of a key attribute.
  2464. AttributeName *string `type:"string" required:"true"`
  2465. // The attribute data, consisting of the data type and the attribute value itself.
  2466. KeyType *string `type:"string" required:"true" enum:"KeyType"`
  2467. metadataKeySchemaElement `json:"-" xml:"-"`
  2468. }
  2469. type metadataKeySchemaElement struct {
  2470. SDKShapeTraits bool `type:"structure"`
  2471. }
  2472. // String returns the string representation
  2473. func (s KeySchemaElement) String() string {
  2474. return awsutil.Prettify(s)
  2475. }
  2476. // GoString returns the string representation
  2477. func (s KeySchemaElement) GoString() string {
  2478. return s.String()
  2479. }
  2480. // Represents a set of primary keys and, for each key, the attributes to retrieve
  2481. // from the table.
  2482. //
  2483. // For each primary key, you must provide all of the key attributes. For example,
  2484. // with a hash type primary key, you only need to provide the hash attribute.
  2485. // For a hash-and-range type primary key, you must provide both the hash attribute
  2486. // and the range attribute.
  2487. type KeysAndAttributes struct {
  2488. // One or more attributes to retrieve from the table or index. If no attribute
  2489. // names are specified then all attributes will be returned. If any of the specified
  2490. // attributes are not found, they will not appear in the result.
  2491. AttributesToGet []*string `type:"list"`
  2492. // The consistency of a read operation. If set to true, then a strongly consistent
  2493. // read is used; otherwise, an eventually consistent read is used.
  2494. ConsistentRead *bool `type:"boolean"`
  2495. // One or more substitution tokens for attribute names in an expression. The
  2496. // following are some use cases for using ExpressionAttributeNames:
  2497. //
  2498. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  2499. //
  2500. // To create a placeholder for repeating occurrences of an attribute name
  2501. // in an expression.
  2502. //
  2503. // To prevent special characters in an attribute name from being misinterpreted
  2504. // in an expression.
  2505. //
  2506. // Use the # character in an expression to dereference an attribute name.
  2507. // For example, consider the following attribute name:
  2508. //
  2509. // Percentile
  2510. //
  2511. // The name of this attribute conflicts with a reserved word, so it cannot
  2512. // be used directly in an expression. (For the complete list of reserved words,
  2513. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  2514. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  2515. // the following for ExpressionAttributeNames:
  2516. //
  2517. // {"#P":"Percentile"}
  2518. //
  2519. // You could then use this substitution in an expression, as in this example:
  2520. //
  2521. // #P = :val
  2522. //
  2523. // Tokens that begin with the : character are expression attribute values,
  2524. // which are placeholders for the actual value at runtime.
  2525. //
  2526. // For more information on expression attribute names, see Accessing Item Attributes
  2527. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  2528. // in the Amazon DynamoDB Developer Guide.
  2529. ExpressionAttributeNames map[string]*string `type:"map"`
  2530. // The primary key attribute values that define the items and the attributes
  2531. // associated with the items.
  2532. Keys []map[string]*AttributeValue `type:"list" required:"true"`
  2533. // A string that identifies one or more attributes to retrieve from the table.
  2534. // These attributes can include scalars, sets, or elements of a JSON document.
  2535. // The attributes in the ProjectionExpression must be separated by commas.
  2536. //
  2537. // If no attribute names are specified, then all attributes will be returned.
  2538. // If any of the requested attributes are not found, they will not appear in
  2539. // the result.
  2540. //
  2541. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  2542. // in the Amazon DynamoDB Developer Guide.
  2543. //
  2544. // ProjectionExpression replaces the legacy AttributesToGet parameter.
  2545. ProjectionExpression *string `type:"string"`
  2546. metadataKeysAndAttributes `json:"-" xml:"-"`
  2547. }
  2548. type metadataKeysAndAttributes struct {
  2549. SDKShapeTraits bool `type:"structure"`
  2550. }
  2551. // String returns the string representation
  2552. func (s KeysAndAttributes) String() string {
  2553. return awsutil.Prettify(s)
  2554. }
  2555. // GoString returns the string representation
  2556. func (s KeysAndAttributes) GoString() string {
  2557. return s.String()
  2558. }
  2559. // Represents the input of a ListTables operation.
  2560. type ListTablesInput struct {
  2561. // The first table name that this operation will evaluate. Use the value that
  2562. // was returned for LastEvaluatedTableName in a previous operation, so that
  2563. // you can obtain the next page of results.
  2564. ExclusiveStartTableName *string `type:"string"`
  2565. // A maximum number of table names to return. If this parameter is not specified,
  2566. // the limit is 100.
  2567. Limit *int64 `type:"integer"`
  2568. metadataListTablesInput `json:"-" xml:"-"`
  2569. }
  2570. type metadataListTablesInput struct {
  2571. SDKShapeTraits bool `type:"structure"`
  2572. }
  2573. // String returns the string representation
  2574. func (s ListTablesInput) String() string {
  2575. return awsutil.Prettify(s)
  2576. }
  2577. // GoString returns the string representation
  2578. func (s ListTablesInput) GoString() string {
  2579. return s.String()
  2580. }
  2581. // Represents the output of a ListTables operation.
  2582. type ListTablesOutput struct {
  2583. // The name of the last table in the current page of results. Use this value
  2584. // as the ExclusiveStartTableName in a new request to obtain the next page of
  2585. // results, until all the table names are returned.
  2586. //
  2587. // If you do not receive a LastEvaluatedTableName value in the response, this
  2588. // means that there are no more table names to be retrieved.
  2589. LastEvaluatedTableName *string `type:"string"`
  2590. // The names of the tables associated with the current account at the current
  2591. // endpoint. The maximum size of this array is 100.
  2592. //
  2593. // If LastEvaluatedTableName also appears in the output, you can use this value
  2594. // as the ExclusiveStartTableName parameter in a subsequent ListTables request
  2595. // and obtain the next page of results.
  2596. TableNames []*string `type:"list"`
  2597. metadataListTablesOutput `json:"-" xml:"-"`
  2598. }
  2599. type metadataListTablesOutput struct {
  2600. SDKShapeTraits bool `type:"structure"`
  2601. }
  2602. // String returns the string representation
  2603. func (s ListTablesOutput) String() string {
  2604. return awsutil.Prettify(s)
  2605. }
  2606. // GoString returns the string representation
  2607. func (s ListTablesOutput) GoString() string {
  2608. return s.String()
  2609. }
  2610. // Represents the properties of a local secondary index.
  2611. type LocalSecondaryIndex struct {
  2612. // The name of the local secondary index. The name must be unique among all
  2613. // other indexes on this table.
  2614. IndexName *string `type:"string" required:"true"`
  2615. // The complete key schema for the local secondary index, consisting of one
  2616. // or more pairs of attribute names and key types (HASH or RANGE).
  2617. KeySchema []*KeySchemaElement `type:"list" required:"true"`
  2618. // Represents attributes that are copied (projected) from the table into an
  2619. // index. These are in addition to the primary key attributes and index key
  2620. // attributes, which are automatically projected.
  2621. Projection *Projection `type:"structure" required:"true"`
  2622. metadataLocalSecondaryIndex `json:"-" xml:"-"`
  2623. }
  2624. type metadataLocalSecondaryIndex struct {
  2625. SDKShapeTraits bool `type:"structure"`
  2626. }
  2627. // String returns the string representation
  2628. func (s LocalSecondaryIndex) String() string {
  2629. return awsutil.Prettify(s)
  2630. }
  2631. // GoString returns the string representation
  2632. func (s LocalSecondaryIndex) GoString() string {
  2633. return s.String()
  2634. }
  2635. // Represents the properties of a local secondary index.
  2636. type LocalSecondaryIndexDescription struct {
  2637. // The Amazon Resource Name (ARN) that uniquely identifies the index.
  2638. IndexArn *string `type:"string"`
  2639. // Represents the name of the local secondary index.
  2640. IndexName *string `type:"string"`
  2641. // The total size of the specified index, in bytes. DynamoDB updates this value
  2642. // approximately every six hours. Recent changes might not be reflected in this
  2643. // value.
  2644. IndexSizeBytes *int64 `type:"long"`
  2645. // The number of items in the specified index. DynamoDB updates this value approximately
  2646. // every six hours. Recent changes might not be reflected in this value.
  2647. ItemCount *int64 `type:"long"`
  2648. // The complete index key schema, which consists of one or more pairs of attribute
  2649. // names and key types (HASH or RANGE).
  2650. KeySchema []*KeySchemaElement `type:"list"`
  2651. // Represents attributes that are copied (projected) from the table into an
  2652. // index. These are in addition to the primary key attributes and index key
  2653. // attributes, which are automatically projected.
  2654. Projection *Projection `type:"structure"`
  2655. metadataLocalSecondaryIndexDescription `json:"-" xml:"-"`
  2656. }
  2657. type metadataLocalSecondaryIndexDescription struct {
  2658. SDKShapeTraits bool `type:"structure"`
  2659. }
  2660. // String returns the string representation
  2661. func (s LocalSecondaryIndexDescription) String() string {
  2662. return awsutil.Prettify(s)
  2663. }
  2664. // GoString returns the string representation
  2665. func (s LocalSecondaryIndexDescription) GoString() string {
  2666. return s.String()
  2667. }
  2668. // Represents attributes that are copied (projected) from the table into an
  2669. // index. These are in addition to the primary key attributes and index key
  2670. // attributes, which are automatically projected.
  2671. type Projection struct {
  2672. // Represents the non-key attribute names which will be projected into the index.
  2673. //
  2674. // For local secondary indexes, the total count of NonKeyAttributes summed
  2675. // across all of the local secondary indexes, must not exceed 20. If you project
  2676. // the same attribute into two different indexes, this counts as two distinct
  2677. // attributes when determining the total.
  2678. NonKeyAttributes []*string `type:"list"`
  2679. // The set of attributes that are projected into the index:
  2680. //
  2681. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  2682. //
  2683. // INCLUDE - Only the specified table attributes are projected into the index.
  2684. // The list of projected attributes are in NonKeyAttributes.
  2685. //
  2686. // ALL - All of the table attributes are projected into the index.
  2687. ProjectionType *string `type:"string" enum:"ProjectionType"`
  2688. metadataProjection `json:"-" xml:"-"`
  2689. }
  2690. type metadataProjection struct {
  2691. SDKShapeTraits bool `type:"structure"`
  2692. }
  2693. // String returns the string representation
  2694. func (s Projection) String() string {
  2695. return awsutil.Prettify(s)
  2696. }
  2697. // GoString returns the string representation
  2698. func (s Projection) GoString() string {
  2699. return s.String()
  2700. }
  2701. // Represents the provisioned throughput settings for a specified table or index.
  2702. // The settings can be modified using the UpdateTable operation.
  2703. //
  2704. // For current minimum and maximum provisioned throughput values, see Limits
  2705. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  2706. // in the Amazon DynamoDB Developer Guide.
  2707. type ProvisionedThroughput struct {
  2708. // The maximum number of strongly consistent reads consumed per second before
  2709. // DynamoDB returns a ThrottlingException. For more information, see Specifying
  2710. // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  2711. // in the Amazon DynamoDB Developer Guide.
  2712. ReadCapacityUnits *int64 `type:"long" required:"true"`
  2713. // The maximum number of writes consumed per second before DynamoDB returns
  2714. // a ThrottlingException. For more information, see Specifying Read and Write
  2715. // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput)
  2716. // in the Amazon DynamoDB Developer Guide.
  2717. WriteCapacityUnits *int64 `type:"long" required:"true"`
  2718. metadataProvisionedThroughput `json:"-" xml:"-"`
  2719. }
  2720. type metadataProvisionedThroughput struct {
  2721. SDKShapeTraits bool `type:"structure"`
  2722. }
  2723. // String returns the string representation
  2724. func (s ProvisionedThroughput) String() string {
  2725. return awsutil.Prettify(s)
  2726. }
  2727. // GoString returns the string representation
  2728. func (s ProvisionedThroughput) GoString() string {
  2729. return s.String()
  2730. }
  2731. // Represents the provisioned throughput settings for the table, consisting
  2732. // of read and write capacity units, along with data about increases and decreases.
  2733. type ProvisionedThroughputDescription struct {
  2734. // The date and time of the last provisioned throughput decrease for this table.
  2735. LastDecreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2736. // The date and time of the last provisioned throughput increase for this table.
  2737. LastIncreaseDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2738. // The number of provisioned throughput decreases for this table during this
  2739. // UTC calendar day. For current maximums on provisioned throughput decreases,
  2740. // see Limits (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  2741. // in the Amazon DynamoDB Developer Guide.
  2742. NumberOfDecreasesToday *int64 `type:"long"`
  2743. // The maximum number of strongly consistent reads consumed per second before
  2744. // DynamoDB returns a ThrottlingException. Eventually consistent reads require
  2745. // less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits
  2746. // per second provides 100 eventually consistent ReadCapacityUnits per second.
  2747. ReadCapacityUnits *int64 `type:"long"`
  2748. // The maximum number of writes consumed per second before DynamoDB returns
  2749. // a ThrottlingException.
  2750. WriteCapacityUnits *int64 `type:"long"`
  2751. metadataProvisionedThroughputDescription `json:"-" xml:"-"`
  2752. }
  2753. type metadataProvisionedThroughputDescription struct {
  2754. SDKShapeTraits bool `type:"structure"`
  2755. }
  2756. // String returns the string representation
  2757. func (s ProvisionedThroughputDescription) String() string {
  2758. return awsutil.Prettify(s)
  2759. }
  2760. // GoString returns the string representation
  2761. func (s ProvisionedThroughputDescription) GoString() string {
  2762. return s.String()
  2763. }
  2764. // Represents the input of a PutItem operation.
  2765. type PutItemInput struct {
  2766. // A condition that must be satisfied in order for a conditional PutItem operation
  2767. // to succeed.
  2768. //
  2769. // An expression can contain any of the following:
  2770. //
  2771. // Functions: attribute_exists | attribute_not_exists | attribute_type |
  2772. // contains | begins_with | size
  2773. //
  2774. // These function names are case-sensitive.
  2775. //
  2776. // Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  2777. //
  2778. // Logical operators: AND | OR | NOT
  2779. //
  2780. // For more information on condition expressions, see Specifying Conditions
  2781. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  2782. // in the Amazon DynamoDB Developer Guide.
  2783. //
  2784. // ConditionExpression replaces the legacy ConditionalOperator and Expected
  2785. // parameters.
  2786. ConditionExpression *string `type:"string"`
  2787. // This is a legacy parameter, for backward compatibility. New applications
  2788. // should use ConditionExpression instead. Do not combine legacy parameters
  2789. // and expression parameters in a single API call; otherwise, DynamoDB will
  2790. // return a ValidationException exception.
  2791. //
  2792. // A logical operator to apply to the conditions in the Expected map:
  2793. //
  2794. // AND - If all of the conditions evaluate to true, then the entire map evaluates
  2795. // to true.
  2796. //
  2797. // OR - If at least one of the conditions evaluate to true, then the entire
  2798. // map evaluates to true.
  2799. //
  2800. // If you omit ConditionalOperator, then AND is the default.
  2801. //
  2802. // The operation will succeed only if the entire map evaluates to true.
  2803. //
  2804. // This parameter does not support attributes of type List or Map.
  2805. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  2806. // This is a legacy parameter, for backward compatibility. New applications
  2807. // should use ConditionExpression instead. Do not combine legacy parameters
  2808. // and expression parameters in a single API call; otherwise, DynamoDB will
  2809. // return a ValidationException exception.
  2810. //
  2811. // A map of attribute/condition pairs. Expected provides a conditional block
  2812. // for the PutItem operation.
  2813. //
  2814. // This parameter does not support attributes of type List or Map.
  2815. //
  2816. // Each element of Expected consists of an attribute name, a comparison operator,
  2817. // and one or more values. DynamoDB compares the attribute with the value(s)
  2818. // you supplied, using the comparison operator. For each Expected element, the
  2819. // result of the evaluation is either true or false.
  2820. //
  2821. // If you specify more than one element in the Expected map, then by default
  2822. // all of the conditions must evaluate to true. In other words, the conditions
  2823. // are ANDed together. (You can use the ConditionalOperator parameter to OR
  2824. // the conditions instead. If you do this, then at least one of the conditions
  2825. // must evaluate to true, rather than all of them.)
  2826. //
  2827. // If the Expected map evaluates to true, then the conditional operation succeeds;
  2828. // otherwise, it fails.
  2829. //
  2830. // Expected contains the following:
  2831. //
  2832. // AttributeValueList - One or more values to evaluate against the supplied
  2833. // attribute. The number of values in the list depends on the ComparisonOperator
  2834. // being used.
  2835. //
  2836. // For type Number, value comparisons are numeric.
  2837. //
  2838. // String value comparisons for greater than, equals, or less than are based
  2839. // on ASCII character code values. For example, a is greater than A, and a is
  2840. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
  2841. //
  2842. // For type Binary, DynamoDB treats each byte of the binary data as unsigned
  2843. // when it compares binary values.
  2844. //
  2845. // ComparisonOperator - A comparator for evaluating attributes in the AttributeValueList.
  2846. // When performing the comparison, DynamoDB uses strongly consistent reads.
  2847. //
  2848. // The following comparison operators are available:
  2849. //
  2850. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  2851. // | BEGINS_WITH | IN | BETWEEN
  2852. //
  2853. // The following are descriptions of each comparison operator.
  2854. //
  2855. // EQ : Equal. EQ is supported for all datatypes, including lists and maps.
  2856. //
  2857. // AttributeValueList can contain only one AttributeValue element of type String,
  2858. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  2859. // an AttributeValue element of a different type than the one provided in the
  2860. // request, the value does not match. For example, {"S":"6"} does not equal
  2861. // {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  2862. //
  2863. // NE : Not equal. NE is supported for all datatypes, including lists and
  2864. // maps.
  2865. //
  2866. // AttributeValueList can contain only one AttributeValue of type String, Number,
  2867. // Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue
  2868. // of a different type than the one provided in the request, the value does
  2869. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2870. // does not equal {"NS":["6", "2", "1"]}.
  2871. //
  2872. // LE : Less than or equal.
  2873. //
  2874. // AttributeValueList can contain only one AttributeValue element of type String,
  2875. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2876. // element of a different type than the one provided in the request, the value
  2877. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2878. // does not compare to {"NS":["6", "2", "1"]}.
  2879. //
  2880. // LT : Less than.
  2881. //
  2882. // AttributeValueList can contain only one AttributeValue of type String, Number,
  2883. // or Binary (not a set type). If an item contains an AttributeValue element
  2884. // of a different type than the one provided in the request, the value does
  2885. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2886. // does not compare to {"NS":["6", "2", "1"]}.
  2887. //
  2888. // GE : Greater than or equal.
  2889. //
  2890. // AttributeValueList can contain only one AttributeValue element of type String,
  2891. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2892. // element of a different type than the one provided in the request, the value
  2893. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2894. // does not compare to {"NS":["6", "2", "1"]}.
  2895. //
  2896. // GT : Greater than.
  2897. //
  2898. // AttributeValueList can contain only one AttributeValue element of type String,
  2899. // Number, or Binary (not a set type). If an item contains an AttributeValue
  2900. // element of a different type than the one provided in the request, the value
  2901. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  2902. // does not compare to {"NS":["6", "2", "1"]}.
  2903. //
  2904. // NOT_NULL : The attribute exists. NOT_NULL is supported for all datatypes,
  2905. // including lists and maps.
  2906. //
  2907. // This operator tests for the existence of an attribute, not its data type.
  2908. // If the data type of attribute "a" is null, and you evaluate it using NOT_NULL,
  2909. // the result is a Boolean true. This result is because the attribute "a" exists;
  2910. // its data type is not relevant to the NOT_NULL comparison operator.
  2911. //
  2912. // NULL : The attribute does not exist. NULL is supported for all datatypes,
  2913. // including lists and maps.
  2914. //
  2915. // This operator tests for the nonexistence of an attribute, not its data type.
  2916. // If the data type of attribute "a" is null, and you evaluate it using NULL,
  2917. // the result is a Boolean false. This is because the attribute "a" exists;
  2918. // its data type is not relevant to the NULL comparison operator.
  2919. //
  2920. // CONTAINS : Checks for a subsequence, or value in a set.
  2921. //
  2922. // AttributeValueList can contain only one AttributeValue element of type String,
  2923. // Number, or Binary (not a set type). If the target attribute of the comparison
  2924. // is of type String, then the operator checks for a substring match. If the
  2925. // target attribute of the comparison is of type Binary, then the operator looks
  2926. // for a subsequence of the target that matches the input. If the target attribute
  2927. // of the comparison is a set ("SS", "NS", or "BS"), then the operator evaluates
  2928. // to true if it finds an exact match with any member of the set.
  2929. //
  2930. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can
  2931. // be a list; however, "b" cannot be a set, a map, or a list.
  2932. //
  2933. // NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value
  2934. // in a set.
  2935. //
  2936. // AttributeValueList can contain only one AttributeValue element of type String,
  2937. // Number, or Binary (not a set type). If the target attribute of the comparison
  2938. // is a String, then the operator checks for the absence of a substring match.
  2939. // If the target attribute of the comparison is Binary, then the operator checks
  2940. // for the absence of a subsequence of the target that matches the input. If
  2941. // the target attribute of the comparison is a set ("SS", "NS", or "BS"), then
  2942. // the operator evaluates to true if it does not find an exact match with any
  2943. // member of the set.
  2944. //
  2945. // NOT_CONTAINS is supported for lists: When evaluating "a NOT CONTAINS b",
  2946. // "a" can be a list; however, "b" cannot be a set, a map, or a list.
  2947. //
  2948. // BEGINS_WITH : Checks for a prefix.
  2949. //
  2950. // AttributeValueList can contain only one AttributeValue of type String or
  2951. // Binary (not a Number or a set type). The target attribute of the comparison
  2952. // must be of type String or Binary (not a Number or a set type).
  2953. //
  2954. // IN : Checks for matching elements within two sets.
  2955. //
  2956. // AttributeValueList can contain one or more AttributeValue elements of type
  2957. // String, Number, or Binary (not a set type). These attributes are compared
  2958. // against an existing set type attribute of an item. If any elements of the
  2959. // input set are present in the item attribute, the expression evaluates to
  2960. // true.
  2961. //
  2962. // BETWEEN : Greater than or equal to the first value, and less than or equal
  2963. // to the second value.
  2964. //
  2965. // AttributeValueList must contain two AttributeValue elements of the same
  2966. // type, either String, Number, or Binary (not a set type). A target attribute
  2967. // matches if the target value is greater than, or equal to, the first element
  2968. // and less than, or equal to, the second element. If an item contains an AttributeValue
  2969. // element of a different type than the one provided in the request, the value
  2970. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  2971. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  2972. //
  2973. // For usage examples of AttributeValueList and ComparisonOperator, see
  2974. // Legacy Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  2975. // in the Amazon DynamoDB Developer Guide.
  2976. //
  2977. // For backward compatibility with previous DynamoDB releases, the following
  2978. // parameters can be used instead of AttributeValueList and ComparisonOperator:
  2979. //
  2980. // Value - A value for DynamoDB to compare with an attribute.
  2981. //
  2982. // Exists - A Boolean value that causes DynamoDB to evaluate the value before
  2983. // attempting the conditional operation:
  2984. //
  2985. // If Exists is true, DynamoDB will check to see if that attribute value
  2986. // already exists in the table. If it is found, then the condition evaluates
  2987. // to true; otherwise the condition evaluate to false.
  2988. //
  2989. // If Exists is false, DynamoDB assumes that the attribute value does not
  2990. // exist in the table. If in fact the value does not exist, then the assumption
  2991. // is valid and the condition evaluates to true. If the value is found, despite
  2992. // the assumption that it does not exist, the condition evaluates to false.
  2993. //
  2994. // Note that the default value for Exists is true.
  2995. //
  2996. // The Value and Exists parameters are incompatible with AttributeValueList
  2997. // and ComparisonOperator. Note that if you use both sets of parameters at once,
  2998. // DynamoDB will return a ValidationException exception.
  2999. Expected map[string]*ExpectedAttributeValue `type:"map"`
  3000. // One or more substitution tokens for attribute names in an expression. The
  3001. // following are some use cases for using ExpressionAttributeNames:
  3002. //
  3003. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  3004. //
  3005. // To create a placeholder for repeating occurrences of an attribute name
  3006. // in an expression.
  3007. //
  3008. // To prevent special characters in an attribute name from being misinterpreted
  3009. // in an expression.
  3010. //
  3011. // Use the # character in an expression to dereference an attribute name.
  3012. // For example, consider the following attribute name:
  3013. //
  3014. // Percentile
  3015. //
  3016. // The name of this attribute conflicts with a reserved word, so it cannot
  3017. // be used directly in an expression. (For the complete list of reserved words,
  3018. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  3019. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  3020. // the following for ExpressionAttributeNames:
  3021. //
  3022. // {"#P":"Percentile"}
  3023. //
  3024. // You could then use this substitution in an expression, as in this example:
  3025. //
  3026. // #P = :val
  3027. //
  3028. // Tokens that begin with the : character are expression attribute values,
  3029. // which are placeholders for the actual value at runtime.
  3030. //
  3031. // For more information on expression attribute names, see Accessing Item Attributes
  3032. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  3033. // in the Amazon DynamoDB Developer Guide.
  3034. ExpressionAttributeNames map[string]*string `type:"map"`
  3035. // One or more values that can be substituted in an expression.
  3036. //
  3037. // Use the : (colon) character in an expression to dereference an attribute
  3038. // value. For example, suppose that you wanted to check whether the value of
  3039. // the ProductStatus attribute was one of the following:
  3040. //
  3041. // Available | Backordered | Discontinued
  3042. //
  3043. // You would first need to specify ExpressionAttributeValues as follows:
  3044. //
  3045. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  3046. // }
  3047. //
  3048. // You could then use these values in an expression, such as this:
  3049. //
  3050. // ProductStatus IN (:avail, :back, :disc)
  3051. //
  3052. // For more information on expression attribute values, see Specifying Conditions
  3053. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  3054. // in the Amazon DynamoDB Developer Guide.
  3055. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  3056. // A map of attribute name/value pairs, one for each attribute. Only the primary
  3057. // key attributes are required; you can optionally provide other attribute name-value
  3058. // pairs for the item.
  3059. //
  3060. // You must provide all of the attributes for the primary key. For example,
  3061. // with a hash type primary key, you only need to provide the hash attribute.
  3062. // For a hash-and-range type primary key, you must provide both the hash attribute
  3063. // and the range attribute.
  3064. //
  3065. // If you specify any attributes that are part of an index key, then the data
  3066. // types for those attributes must match those of the schema in the table's
  3067. // attribute definition.
  3068. //
  3069. // For more information about primary keys, see Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey)
  3070. // in the Amazon DynamoDB Developer Guide.
  3071. //
  3072. // Each element in the Item map is an AttributeValue object.
  3073. Item map[string]*AttributeValue `type:"map" required:"true"`
  3074. // Determines the level of detail about provisioned throughput consumption that
  3075. // is returned in the response:
  3076. //
  3077. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  3078. // operation, together with ConsumedCapacity for each table and secondary index
  3079. // that was accessed.
  3080. //
  3081. // Note that some operations, such as GetItem and BatchGetItem, do not access
  3082. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  3083. // information for table(s).
  3084. //
  3085. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  3086. // operation.
  3087. //
  3088. // NONE - No ConsumedCapacity details are included in the response.
  3089. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  3090. // Determines whether item collection metrics are returned. If set to SIZE,
  3091. // the response includes statistics about item collections, if any, that were
  3092. // modified during the operation are returned in the response. If set to NONE
  3093. // (the default), no statistics are returned.
  3094. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  3095. // Use ReturnValues if you want to get the item attributes as they appeared
  3096. // before they were updated with the PutItem request. For PutItem, the valid
  3097. // values are:
  3098. //
  3099. // NONE - If ReturnValues is not specified, or if its value is NONE, then
  3100. // nothing is returned. (This setting is the default for ReturnValues.)
  3101. //
  3102. // ALL_OLD - If PutItem overwrote an attribute name-value pair, then the
  3103. // content of the old item is returned.
  3104. //
  3105. // Other "Valid Values" are not relevant to PutItem.
  3106. ReturnValues *string `type:"string" enum:"ReturnValue"`
  3107. // The name of the table to contain the item.
  3108. TableName *string `type:"string" required:"true"`
  3109. metadataPutItemInput `json:"-" xml:"-"`
  3110. }
  3111. type metadataPutItemInput struct {
  3112. SDKShapeTraits bool `type:"structure"`
  3113. }
  3114. // String returns the string representation
  3115. func (s PutItemInput) String() string {
  3116. return awsutil.Prettify(s)
  3117. }
  3118. // GoString returns the string representation
  3119. func (s PutItemInput) GoString() string {
  3120. return s.String()
  3121. }
  3122. // Represents the output of a PutItem operation.
  3123. type PutItemOutput struct {
  3124. // The attribute values as they appeared before the PutItem operation, but only
  3125. // if ReturnValues is specified as ALL_OLD in the request. Each element consists
  3126. // of an attribute name and an attribute value.
  3127. Attributes map[string]*AttributeValue `type:"map"`
  3128. // The capacity units consumed by an operation. The data returned includes the
  3129. // total provisioned throughput consumed, along with statistics for the table
  3130. // and any indexes involved in the operation. ConsumedCapacity is only returned
  3131. // if the request asked for it. For more information, see Provisioned Throughput
  3132. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  3133. // in the Amazon DynamoDB Developer Guide.
  3134. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  3135. // Information about item collections, if any, that were affected by the operation.
  3136. // ItemCollectionMetrics is only returned if the request asked for it. If the
  3137. // table does not have any local secondary indexes, this information is not
  3138. // returned in the response.
  3139. //
  3140. // Each ItemCollectionMetrics element consists of:
  3141. //
  3142. // ItemCollectionKey - The hash key value of the item collection. This is
  3143. // the same as the hash key of the item.
  3144. //
  3145. // SizeEstimateRange - An estimate of item collection size, in gigabytes. This
  3146. // value is a two-element array containing a lower bound and an upper bound
  3147. // for the estimate. The estimate includes the size of all the items in the
  3148. // table, plus the size of all attributes projected into all of the local secondary
  3149. // indexes on that table. Use this estimate to measure whether a local secondary
  3150. // index is approaching its size limit.
  3151. //
  3152. // The estimate is subject to change over time; therefore, do not rely on the
  3153. // precision or accuracy of the estimate.
  3154. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  3155. metadataPutItemOutput `json:"-" xml:"-"`
  3156. }
  3157. type metadataPutItemOutput struct {
  3158. SDKShapeTraits bool `type:"structure"`
  3159. }
  3160. // String returns the string representation
  3161. func (s PutItemOutput) String() string {
  3162. return awsutil.Prettify(s)
  3163. }
  3164. // GoString returns the string representation
  3165. func (s PutItemOutput) GoString() string {
  3166. return s.String()
  3167. }
  3168. // Represents a request to perform a PutItem operation on an item.
  3169. type PutRequest struct {
  3170. // A map of attribute name to attribute values, representing the primary key
  3171. // of an item to be processed by PutItem. All of the table's primary key attributes
  3172. // must be specified, and their data types must match those of the table's key
  3173. // schema. If any attributes are present in the item which are part of an index
  3174. // key schema for the table, their types must match the index key schema.
  3175. Item map[string]*AttributeValue `type:"map" required:"true"`
  3176. metadataPutRequest `json:"-" xml:"-"`
  3177. }
  3178. type metadataPutRequest struct {
  3179. SDKShapeTraits bool `type:"structure"`
  3180. }
  3181. // String returns the string representation
  3182. func (s PutRequest) String() string {
  3183. return awsutil.Prettify(s)
  3184. }
  3185. // GoString returns the string representation
  3186. func (s PutRequest) GoString() string {
  3187. return s.String()
  3188. }
  3189. // Represents the input of a Query operation.
  3190. type QueryInput struct {
  3191. // This is a legacy parameter, for backward compatibility. New applications
  3192. // should use ProjectionExpression instead. Do not combine legacy parameters
  3193. // and expression parameters in a single API call; otherwise, DynamoDB will
  3194. // return a ValidationException exception.
  3195. //
  3196. // This parameter allows you to retrieve attributes of type List or Map; however,
  3197. // it cannot retrieve individual elements within a List or a Map.
  3198. //
  3199. // The names of one or more attributes to retrieve. If no attribute names are
  3200. // provided, then all attributes will be returned. If any of the requested attributes
  3201. // are not found, they will not appear in the result.
  3202. //
  3203. // Note that AttributesToGet has no effect on provisioned throughput consumption.
  3204. // DynamoDB determines capacity units consumed based on item size, not on the
  3205. // amount of data that is returned to an application.
  3206. //
  3207. // You cannot use both AttributesToGet and Select together in a Query request,
  3208. // unless the value for Select is SPECIFIC_ATTRIBUTES. (This usage is equivalent
  3209. // to specifying AttributesToGet without any value for Select.)
  3210. //
  3211. // If you query a local secondary index and request only attributes that are
  3212. // projected into that index, the operation will read only the index and not
  3213. // the table. If any of the requested attributes are not projected into the
  3214. // local secondary index, DynamoDB will fetch each of these attributes from
  3215. // the parent table. This extra fetching incurs additional throughput cost and
  3216. // latency.
  3217. //
  3218. // If you query a global secondary index, you can only request attributes that
  3219. // are projected into the index. Global secondary index queries cannot fetch
  3220. // attributes from the parent table.
  3221. AttributesToGet []*string `type:"list"`
  3222. // This is a legacy parameter, for backward compatibility. New applications
  3223. // should use FilterExpression instead. Do not combine legacy parameters and
  3224. // expression parameters in a single API call; otherwise, DynamoDB will return
  3225. // a ValidationException exception.
  3226. //
  3227. // A logical operator to apply to the conditions in a QueryFilter map:
  3228. //
  3229. // AND - If all of the conditions evaluate to true, then the entire map evaluates
  3230. // to true.
  3231. //
  3232. // OR - If at least one of the conditions evaluate to true, then the entire
  3233. // map evaluates to true.
  3234. //
  3235. // If you omit ConditionalOperator, then AND is the default.
  3236. //
  3237. // The operation will succeed only if the entire map evaluates to true.
  3238. //
  3239. // This parameter does not support attributes of type List or Map.
  3240. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  3241. // Determines the read consistency model: If set to true, then the operation
  3242. // uses strongly consistent reads; otherwise, the operation uses eventually
  3243. // consistent reads.
  3244. //
  3245. // Strongly consistent reads are not supported on global secondary indexes.
  3246. // If you query a global secondary index with ConsistentRead set to true, you
  3247. // will receive a ValidationException.
  3248. ConsistentRead *bool `type:"boolean"`
  3249. // The primary key of the first item that this operation will evaluate. Use
  3250. // the value that was returned for LastEvaluatedKey in the previous operation.
  3251. //
  3252. // The data type for ExclusiveStartKey must be String, Number or Binary. No
  3253. // set data types are allowed.
  3254. ExclusiveStartKey map[string]*AttributeValue `type:"map"`
  3255. // One or more substitution tokens for attribute names in an expression. The
  3256. // following are some use cases for using ExpressionAttributeNames:
  3257. //
  3258. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  3259. //
  3260. // To create a placeholder for repeating occurrences of an attribute name
  3261. // in an expression.
  3262. //
  3263. // To prevent special characters in an attribute name from being misinterpreted
  3264. // in an expression.
  3265. //
  3266. // Use the # character in an expression to dereference an attribute name.
  3267. // For example, consider the following attribute name:
  3268. //
  3269. // Percentile
  3270. //
  3271. // The name of this attribute conflicts with a reserved word, so it cannot
  3272. // be used directly in an expression. (For the complete list of reserved words,
  3273. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  3274. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  3275. // the following for ExpressionAttributeNames:
  3276. //
  3277. // {"#P":"Percentile"}
  3278. //
  3279. // You could then use this substitution in an expression, as in this example:
  3280. //
  3281. // #P = :val
  3282. //
  3283. // Tokens that begin with the : character are expression attribute values,
  3284. // which are placeholders for the actual value at runtime.
  3285. //
  3286. // For more information on expression attribute names, see Accessing Item Attributes
  3287. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  3288. // in the Amazon DynamoDB Developer Guide.
  3289. ExpressionAttributeNames map[string]*string `type:"map"`
  3290. // One or more values that can be substituted in an expression.
  3291. //
  3292. // Use the : (colon) character in an expression to dereference an attribute
  3293. // value. For example, suppose that you wanted to check whether the value of
  3294. // the ProductStatus attribute was one of the following:
  3295. //
  3296. // Available | Backordered | Discontinued
  3297. //
  3298. // You would first need to specify ExpressionAttributeValues as follows:
  3299. //
  3300. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  3301. // }
  3302. //
  3303. // You could then use these values in an expression, such as this:
  3304. //
  3305. // ProductStatus IN (:avail, :back, :disc)
  3306. //
  3307. // For more information on expression attribute values, see Specifying Conditions
  3308. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  3309. // in the Amazon DynamoDB Developer Guide.
  3310. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  3311. // A string that contains conditions that DynamoDB applies after the Query operation,
  3312. // but before the data is returned to you. Items that do not satisfy the FilterExpression
  3313. // criteria are not returned.
  3314. //
  3315. // A FilterExpression is applied after the items have already been read; the
  3316. // process of filtering does not consume any additional read capacity units.
  3317. //
  3318. // For more information, see Filter Expressions (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults)
  3319. // in the Amazon DynamoDB Developer Guide.
  3320. //
  3321. // FilterExpression replaces the legacy QueryFilter and ConditionalOperator
  3322. // parameters.
  3323. FilterExpression *string `type:"string"`
  3324. // The name of an index to query. This index can be any local secondary index
  3325. // or global secondary index on the table. Note that if you use the IndexName
  3326. // parameter, you must also provide TableName.
  3327. IndexName *string `type:"string"`
  3328. // The condition that specifies the key value(s) for items to be retrieved by
  3329. // the Query action.
  3330. //
  3331. // The condition must perform an equality test on a single hash key value.
  3332. // The condition can also perform one of several comparison tests on a single
  3333. // range key value. Query can use KeyConditionExpression to retrieve one item
  3334. // with a given hash and range key value, or several items that have the same
  3335. // hash key value but different range key values.
  3336. //
  3337. // The hash key equality test is required, and must be specified in the following
  3338. // format:
  3339. //
  3340. // hashAttributeName = :hashval
  3341. //
  3342. // If you also want to provide a range key condition, it must be combined using
  3343. // AND with the hash key condition. Following is an example, using the = comparison
  3344. // operator for the range key:
  3345. //
  3346. // hashAttributeName = :hashval AND rangeAttributeName = :rangeval
  3347. //
  3348. // Valid comparisons for the range key condition are as follows:
  3349. //
  3350. // rangeAttributeName = :rangeval - true if the range key is equal to :rangeval.
  3351. //
  3352. // rangeAttributeName < :rangeval - true if the range key is less than :rangeval.
  3353. //
  3354. // rangeAttributeName <= :rangeval - true if the range key is less than or
  3355. // equal to :rangeval.
  3356. //
  3357. // rangeAttributeName > :rangeval - true if the range key is greater than
  3358. // :rangeval.
  3359. //
  3360. // rangeAttributeName >= :rangeval - true if the range key is greater than
  3361. // or equal to :rangeval.
  3362. //
  3363. // rangeAttributeName BETWEEN :rangeval1 AND :rangeval2 - true if the range
  3364. // key is greater than or equal to :rangeval1, and less than or equal to :rangeval2.
  3365. //
  3366. // begins_with (rangeAttributeName, :rangeval) - true if the range key begins
  3367. // with a particular operand. (You cannot use this function with a range key
  3368. // that is of type Number.) Note that the function name begins_with is case-sensitive.
  3369. //
  3370. // Use the ExpressionAttributeValues parameter to replace tokens such as
  3371. // :hashval and :rangeval with actual values at runtime.
  3372. //
  3373. // You can optionally use the ExpressionAttributeNames parameter to replace
  3374. // the names of the hash and range attributes with placeholder tokens. This
  3375. // option might be necessary if an attribute name conflicts with a DynamoDB
  3376. // reserved word. For example, the following KeyConditionExpression parameter
  3377. // causes an error because Size is a reserved word:
  3378. //
  3379. // Size = :myval To work around this, define a placeholder (such a #S)
  3380. // to represent the attribute name Size. KeyConditionExpression then is as follows:
  3381. //
  3382. // #S = :myval For a list of reserved words, see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  3383. // in the Amazon DynamoDB Developer Guide.
  3384. //
  3385. // For more information on ExpressionAttributeNames and ExpressionAttributeValues,
  3386. // see Using Placeholders for Attribute Names and Values (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ExpressionPlaceholders.html)
  3387. // in the Amazon DynamoDB Developer Guide.
  3388. //
  3389. // KeyConditionExpression replaces the legacy KeyConditions parameter.
  3390. KeyConditionExpression *string `type:"string"`
  3391. // This is a legacy parameter, for backward compatibility. New applications
  3392. // should use KeyConditionExpression instead. Do not combine legacy parameters
  3393. // and expression parameters in a single API call; otherwise, DynamoDB will
  3394. // return a ValidationException exception.
  3395. //
  3396. // The selection criteria for the query. For a query on a table, you can have
  3397. // conditions only on the table primary key attributes. You must provide the
  3398. // hash key attribute name and value as an EQ condition. You can optionally
  3399. // provide a second condition, referring to the range key attribute.
  3400. //
  3401. // If you don't provide a range key condition, all of the items that match
  3402. // the hash key will be retrieved. If a FilterExpression or QueryFilter is present,
  3403. // it will be applied after the items are retrieved.
  3404. //
  3405. // For a query on an index, you can have conditions only on the index key attributes.
  3406. // You must provide the index hash attribute name and value as an EQ condition.
  3407. // You can optionally provide a second condition, referring to the index key
  3408. // range attribute.
  3409. //
  3410. // Each KeyConditions element consists of an attribute name to compare, along
  3411. // with the following:
  3412. //
  3413. // AttributeValueList - One or more values to evaluate against the supplied
  3414. // attribute. The number of values in the list depends on the ComparisonOperator
  3415. // being used.
  3416. //
  3417. // For type Number, value comparisons are numeric.
  3418. //
  3419. // String value comparisons for greater than, equals, or less than are based
  3420. // on ASCII character code values. For example, a is greater than A, and a is
  3421. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  3422. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  3423. //
  3424. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  3425. // it compares binary values.
  3426. //
  3427. // ComparisonOperator - A comparator for evaluating attributes, for example,
  3428. // equals, greater than, less than, and so on.
  3429. //
  3430. // For KeyConditions, only the following comparison operators are supported:
  3431. //
  3432. // EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN
  3433. //
  3434. // The following are descriptions of these comparison operators.
  3435. //
  3436. // EQ : Equal.
  3437. //
  3438. // AttributeValueList can contain only one AttributeValue of type String, Number,
  3439. // or Binary (not a set type). If an item contains an AttributeValue element
  3440. // of a different type than the one specified in the request, the value does
  3441. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  3442. // does not equal {"NS":["6", "2", "1"]}.
  3443. //
  3444. // LE : Less than or equal.
  3445. //
  3446. // AttributeValueList can contain only one AttributeValue element of type String,
  3447. // Number, or Binary (not a set type). If an item contains an AttributeValue
  3448. // element of a different type than the one provided in the request, the value
  3449. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  3450. // does not compare to {"NS":["6", "2", "1"]}.
  3451. //
  3452. // LT : Less than.
  3453. //
  3454. // AttributeValueList can contain only one AttributeValue of type String, Number,
  3455. // or Binary (not a set type). If an item contains an AttributeValue element
  3456. // of a different type than the one provided in the request, the value does
  3457. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  3458. // does not compare to {"NS":["6", "2", "1"]}.
  3459. //
  3460. // GE : Greater than or equal.
  3461. //
  3462. // AttributeValueList can contain only one AttributeValue element of type String,
  3463. // Number, or Binary (not a set type). If an item contains an AttributeValue
  3464. // element of a different type than the one provided in the request, the value
  3465. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  3466. // does not compare to {"NS":["6", "2", "1"]}.
  3467. //
  3468. // GT : Greater than.
  3469. //
  3470. // AttributeValueList can contain only one AttributeValue element of type String,
  3471. // Number, or Binary (not a set type). If an item contains an AttributeValue
  3472. // element of a different type than the one provided in the request, the value
  3473. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  3474. // does not compare to {"NS":["6", "2", "1"]}.
  3475. //
  3476. // BEGINS_WITH : Checks for a prefix.
  3477. //
  3478. // AttributeValueList can contain only one AttributeValue of type String or
  3479. // Binary (not a Number or a set type). The target attribute of the comparison
  3480. // must be of type String or Binary (not a Number or a set type).
  3481. //
  3482. // BETWEEN : Greater than or equal to the first value, and less than or
  3483. // equal to the second value.
  3484. //
  3485. // AttributeValueList must contain two AttributeValue elements of the same
  3486. // type, either String, Number, or Binary (not a set type). A target attribute
  3487. // matches if the target value is greater than, or equal to, the first element
  3488. // and less than, or equal to, the second element. If an item contains an AttributeValue
  3489. // element of a different type than the one provided in the request, the value
  3490. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  3491. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  3492. //
  3493. // For usage examples of AttributeValueList and ComparisonOperator, see
  3494. // Legacy Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  3495. // in the Amazon DynamoDB Developer Guide.
  3496. KeyConditions map[string]*Condition `type:"map"`
  3497. // The maximum number of items to evaluate (not necessarily the number of matching
  3498. // items). If DynamoDB processes the number of items up to the limit while processing
  3499. // the results, it stops the operation and returns the matching values up to
  3500. // that point, and a key in LastEvaluatedKey to apply in a subsequent operation,
  3501. // so that you can pick up where you left off. Also, if the processed data set
  3502. // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation
  3503. // and returns the matching values up to the limit, and a key in LastEvaluatedKey
  3504. // to apply in a subsequent operation to continue the operation. For more information,
  3505. // see Query and Scan in the Amazon DynamoDB Developer Guide.
  3506. Limit *int64 `type:"integer"`
  3507. // A string that identifies one or more attributes to retrieve from the table.
  3508. // These attributes can include scalars, sets, or elements of a JSON document.
  3509. // The attributes in the expression must be separated by commas.
  3510. //
  3511. // If no attribute names are specified, then all attributes will be returned.
  3512. // If any of the requested attributes are not found, they will not appear in
  3513. // the result.
  3514. //
  3515. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  3516. // in the Amazon DynamoDB Developer Guide.
  3517. //
  3518. // ProjectionExpression replaces the legacy AttributesToGet parameter.
  3519. ProjectionExpression *string `type:"string"`
  3520. // This is a legacy parameter, for backward compatibility. New applications
  3521. // should use FilterExpression instead. Do not combine legacy parameters and
  3522. // expression parameters in a single API call; otherwise, DynamoDB will return
  3523. // a ValidationException exception.
  3524. //
  3525. // A condition that evaluates the query results after the items are read and
  3526. // returns only the desired values.
  3527. //
  3528. // This parameter does not support attributes of type List or Map.
  3529. //
  3530. // A QueryFilter is applied after the items have already been read; the process
  3531. // of filtering does not consume any additional read capacity units.
  3532. //
  3533. // If you provide more than one condition in the QueryFilter map, then by default
  3534. // all of the conditions must evaluate to true. In other words, the conditions
  3535. // are ANDed together. (You can use the ConditionalOperator parameter to OR
  3536. // the conditions instead. If you do this, then at least one of the conditions
  3537. // must evaluate to true, rather than all of them.)
  3538. //
  3539. // Note that QueryFilter does not allow key attributes. You cannot define a
  3540. // filter condition on a hash key or range key.
  3541. //
  3542. // Each QueryFilter element consists of an attribute name to compare, along
  3543. // with the following:
  3544. //
  3545. // AttributeValueList - One or more values to evaluate against the supplied
  3546. // attribute. The number of values in the list depends on the operator specified
  3547. // in ComparisonOperator.
  3548. //
  3549. // For type Number, value comparisons are numeric.
  3550. //
  3551. // String value comparisons for greater than, equals, or less than are based
  3552. // on ASCII character code values. For example, a is greater than A, and a is
  3553. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  3554. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  3555. //
  3556. // For type Binary, DynamoDB treats each byte of the binary data as unsigned
  3557. // when it compares binary values.
  3558. //
  3559. // For information on specifying data types in JSON, see JSON Data Format (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html)
  3560. // in the Amazon DynamoDB Developer Guide.
  3561. //
  3562. // ComparisonOperator - A comparator for evaluating attributes. For example,
  3563. // equals, greater than, less than, etc.
  3564. //
  3565. // The following comparison operators are available:
  3566. //
  3567. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  3568. // | BEGINS_WITH | IN | BETWEEN
  3569. //
  3570. // For complete descriptions of all comparison operators, see the Condition
  3571. // (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html)
  3572. // data type.
  3573. QueryFilter map[string]*Condition `type:"map"`
  3574. // Determines the level of detail about provisioned throughput consumption that
  3575. // is returned in the response:
  3576. //
  3577. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  3578. // operation, together with ConsumedCapacity for each table and secondary index
  3579. // that was accessed.
  3580. //
  3581. // Note that some operations, such as GetItem and BatchGetItem, do not access
  3582. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  3583. // information for table(s).
  3584. //
  3585. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  3586. // operation.
  3587. //
  3588. // NONE - No ConsumedCapacity details are included in the response.
  3589. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  3590. // Specifies the order in which to return the query results - either ascending
  3591. // (true) or descending (false).
  3592. //
  3593. // Items with the same hash key are stored in sorted order by range key .If
  3594. // the range key data type is Number, the results are stored in numeric order.
  3595. // For type String, the results are returned in order of ASCII character code
  3596. // values. For type Binary, DynamoDB treats each byte of the binary data as
  3597. // unsigned.
  3598. //
  3599. // If ScanIndexForward is true, DynamoDB returns the results in order, by range
  3600. // key. This is the default behavior.
  3601. //
  3602. // If ScanIndexForward is false, DynamoDB sorts the results in descending order
  3603. // by range key, and then returns the results to the client.
  3604. ScanIndexForward *bool `type:"boolean"`
  3605. // The attributes to be returned in the result. You can retrieve all item attributes,
  3606. // specific item attributes, the count of matching items, or in the case of
  3607. // an index, some or all of the attributes projected into the index.
  3608. //
  3609. // ALL_ATTRIBUTES - Returns all of the item attributes from the specified
  3610. // table or index. If you query a local secondary index, then for each matching
  3611. // item in the index DynamoDB will fetch the entire item from the parent table.
  3612. // If the index is configured to project all item attributes, then all of the
  3613. // data can be obtained from the local secondary index, and no fetching is required.
  3614. //
  3615. // ALL_PROJECTED_ATTRIBUTES - Allowed only when querying an index. Retrieves
  3616. // all attributes that have been projected into the index. If the index is configured
  3617. // to project all attributes, this return value is equivalent to specifying
  3618. // ALL_ATTRIBUTES.
  3619. //
  3620. // COUNT - Returns the number of matching items, rather than the matching
  3621. // items themselves.
  3622. //
  3623. // SPECIFIC_ATTRIBUTES - Returns only the attributes listed in AttributesToGet.
  3624. // This return value is equivalent to specifying AttributesToGet without specifying
  3625. // any value for Select.
  3626. //
  3627. // If you query a local secondary index and request only attributes that are
  3628. // projected into that index, the operation will read only the index and not
  3629. // the table. If any of the requested attributes are not projected into the
  3630. // local secondary index, DynamoDB will fetch each of these attributes from
  3631. // the parent table. This extra fetching incurs additional throughput cost and
  3632. // latency.
  3633. //
  3634. // If you query a global secondary index, you can only request attributes that
  3635. // are projected into the index. Global secondary index queries cannot fetch
  3636. // attributes from the parent table.
  3637. //
  3638. // If neither Select nor AttributesToGet are specified, DynamoDB defaults
  3639. // to ALL_ATTRIBUTES when accessing a table, and ALL_PROJECTED_ATTRIBUTES when
  3640. // accessing an index. You cannot use both Select and AttributesToGet together
  3641. // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES.
  3642. // (This usage is equivalent to specifying AttributesToGet without any value
  3643. // for Select.)
  3644. //
  3645. // If you use the ProjectionExpression parameter, then the value for Select
  3646. // can only be SPECIFIC_ATTRIBUTES. Any other value for Select will return an
  3647. // error.
  3648. Select *string `type:"string" enum:"Select"`
  3649. // The name of the table containing the requested items.
  3650. TableName *string `type:"string" required:"true"`
  3651. metadataQueryInput `json:"-" xml:"-"`
  3652. }
  3653. type metadataQueryInput struct {
  3654. SDKShapeTraits bool `type:"structure"`
  3655. }
  3656. // String returns the string representation
  3657. func (s QueryInput) String() string {
  3658. return awsutil.Prettify(s)
  3659. }
  3660. // GoString returns the string representation
  3661. func (s QueryInput) GoString() string {
  3662. return s.String()
  3663. }
  3664. // Represents the output of a Query operation.
  3665. type QueryOutput struct {
  3666. // The capacity units consumed by an operation. The data returned includes the
  3667. // total provisioned throughput consumed, along with statistics for the table
  3668. // and any indexes involved in the operation. ConsumedCapacity is only returned
  3669. // if the request asked for it. For more information, see Provisioned Throughput
  3670. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  3671. // in the Amazon DynamoDB Developer Guide.
  3672. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  3673. // The number of items in the response.
  3674. //
  3675. // If you used a QueryFilter in the request, then Count is the number of items
  3676. // returned after the filter was applied, and ScannedCount is the number of
  3677. // matching items before> the filter was applied.
  3678. //
  3679. // If you did not use a filter in the request, then Count and ScannedCount
  3680. // are the same.
  3681. Count *int64 `type:"integer"`
  3682. // An array of item attributes that match the query criteria. Each element in
  3683. // this array consists of an attribute name and the value for that attribute.
  3684. Items []map[string]*AttributeValue `type:"list"`
  3685. // The primary key of the item where the operation stopped, inclusive of the
  3686. // previous result set. Use this value to start a new operation, excluding this
  3687. // value in the new request.
  3688. //
  3689. // If LastEvaluatedKey is empty, then the "last page" of results has been processed
  3690. // and there is no more data to be retrieved.
  3691. //
  3692. // If LastEvaluatedKey is not empty, it does not necessarily mean that there
  3693. // is more data in the result set. The only way to know when you have reached
  3694. // the end of the result set is when LastEvaluatedKey is empty.
  3695. LastEvaluatedKey map[string]*AttributeValue `type:"map"`
  3696. // The number of items evaluated, before any QueryFilter is applied. A high
  3697. // ScannedCount value with few, or no, Count results indicates an inefficient
  3698. // Query operation. For more information, see Count and ScannedCount (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count)
  3699. // in the Amazon DynamoDB Developer Guide.
  3700. //
  3701. // If you did not use a filter in the request, then ScannedCount is the same
  3702. // as Count.
  3703. ScannedCount *int64 `type:"integer"`
  3704. metadataQueryOutput `json:"-" xml:"-"`
  3705. }
  3706. type metadataQueryOutput struct {
  3707. SDKShapeTraits bool `type:"structure"`
  3708. }
  3709. // String returns the string representation
  3710. func (s QueryOutput) String() string {
  3711. return awsutil.Prettify(s)
  3712. }
  3713. // GoString returns the string representation
  3714. func (s QueryOutput) GoString() string {
  3715. return s.String()
  3716. }
  3717. // Represents the input of a Scan operation.
  3718. type ScanInput struct {
  3719. // This is a legacy parameter, for backward compatibility. New applications
  3720. // should use ProjectionExpression instead. Do not combine legacy parameters
  3721. // and expression parameters in a single API call; otherwise, DynamoDB will
  3722. // return a ValidationException exception.
  3723. //
  3724. // This parameter allows you to retrieve attributes of type List or Map; however,
  3725. // it cannot retrieve individual elements within a List or a Map.
  3726. //
  3727. // The names of one or more attributes to retrieve. If no attribute names are
  3728. // provided, then all attributes will be returned. If any of the requested attributes
  3729. // are not found, they will not appear in the result.
  3730. //
  3731. // Note that AttributesToGet has no effect on provisioned throughput consumption.
  3732. // DynamoDB determines capacity units consumed based on item size, not on the
  3733. // amount of data that is returned to an application.
  3734. AttributesToGet []*string `type:"list"`
  3735. // This is a legacy parameter, for backward compatibility. New applications
  3736. // should use FilterExpression instead. Do not combine legacy parameters and
  3737. // expression parameters in a single API call; otherwise, DynamoDB will return
  3738. // a ValidationException exception.
  3739. //
  3740. // A logical operator to apply to the conditions in a ScanFilter map:
  3741. //
  3742. // AND - If all of the conditions evaluate to true, then the entire map evaluates
  3743. // to true.
  3744. //
  3745. // OR - If at least one of the conditions evaluate to true, then the entire
  3746. // map evaluates to true.
  3747. //
  3748. // If you omit ConditionalOperator, then AND is the default.
  3749. //
  3750. // The operation will succeed only if the entire map evaluates to true.
  3751. //
  3752. // This parameter does not support attributes of type List or Map.
  3753. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  3754. // A Boolean value that determines the read consistency model during the scan:
  3755. //
  3756. // If ConsistentRead is false, then Scan will use eventually consistent reads.
  3757. // The data returned from Scan might not contain the results of other recently
  3758. // completed write operations (PutItem, UpdateItem or DeleteItem). The Scan
  3759. // response might include some stale data.
  3760. //
  3761. // If ConsistentRead is true, then Scan will use strongly consistent reads.
  3762. // All of the write operations that completed before the Scan began are guaranteed
  3763. // to be contained in the Scan response.
  3764. //
  3765. // The default setting for ConsistentRead is false, meaning that eventually
  3766. // consistent reads will be used.
  3767. //
  3768. // Strongly consistent reads are not supported on global secondary indexes.
  3769. // If you scan a global secondary index with ConsistentRead set to true, you
  3770. // will receive a ValidationException.
  3771. ConsistentRead *bool `type:"boolean"`
  3772. // The primary key of the first item that this operation will evaluate. Use
  3773. // the value that was returned for LastEvaluatedKey in the previous operation.
  3774. //
  3775. // The data type for ExclusiveStartKey must be String, Number or Binary. No
  3776. // set data types are allowed.
  3777. //
  3778. // In a parallel scan, a Scan request that includes ExclusiveStartKey must
  3779. // specify the same segment whose previous Scan returned the corresponding value
  3780. // of LastEvaluatedKey.
  3781. ExclusiveStartKey map[string]*AttributeValue `type:"map"`
  3782. // One or more substitution tokens for attribute names in an expression. The
  3783. // following are some use cases for using ExpressionAttributeNames:
  3784. //
  3785. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  3786. //
  3787. // To create a placeholder for repeating occurrences of an attribute name
  3788. // in an expression.
  3789. //
  3790. // To prevent special characters in an attribute name from being misinterpreted
  3791. // in an expression.
  3792. //
  3793. // Use the # character in an expression to dereference an attribute name.
  3794. // For example, consider the following attribute name:
  3795. //
  3796. // Percentile
  3797. //
  3798. // The name of this attribute conflicts with a reserved word, so it cannot
  3799. // be used directly in an expression. (For the complete list of reserved words,
  3800. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  3801. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  3802. // the following for ExpressionAttributeNames:
  3803. //
  3804. // {"#P":"Percentile"}
  3805. //
  3806. // You could then use this substitution in an expression, as in this example:
  3807. //
  3808. // #P = :val
  3809. //
  3810. // Tokens that begin with the : character are expression attribute values,
  3811. // which are placeholders for the actual value at runtime.
  3812. //
  3813. // For more information on expression attribute names, see Accessing Item Attributes
  3814. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  3815. // in the Amazon DynamoDB Developer Guide.
  3816. ExpressionAttributeNames map[string]*string `type:"map"`
  3817. // One or more values that can be substituted in an expression.
  3818. //
  3819. // Use the : (colon) character in an expression to dereference an attribute
  3820. // value. For example, suppose that you wanted to check whether the value of
  3821. // the ProductStatus attribute was one of the following:
  3822. //
  3823. // Available | Backordered | Discontinued
  3824. //
  3825. // You would first need to specify ExpressionAttributeValues as follows:
  3826. //
  3827. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  3828. // }
  3829. //
  3830. // You could then use these values in an expression, such as this:
  3831. //
  3832. // ProductStatus IN (:avail, :back, :disc)
  3833. //
  3834. // For more information on expression attribute values, see Specifying Conditions
  3835. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  3836. // in the Amazon DynamoDB Developer Guide.
  3837. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  3838. // A string that contains conditions that DynamoDB applies after the Scan operation,
  3839. // but before the data is returned to you. Items that do not satisfy the FilterExpression
  3840. // criteria are not returned.
  3841. //
  3842. // A FilterExpression is applied after the items have already been read; the
  3843. // process of filtering does not consume any additional read capacity units.
  3844. //
  3845. // For more information, see Filter Expressions (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults)
  3846. // in the Amazon DynamoDB Developer Guide.
  3847. //
  3848. // FilterExpression replaces the legacy ScanFilter and ConditionalOperator
  3849. // parameters.
  3850. FilterExpression *string `type:"string"`
  3851. // The name of a secondary index to scan. This index can be any local secondary
  3852. // index or global secondary index. Note that if you use the IndexName parameter,
  3853. // you must also provide TableName.
  3854. IndexName *string `type:"string"`
  3855. // The maximum number of items to evaluate (not necessarily the number of matching
  3856. // items). If DynamoDB processes the number of items up to the limit while processing
  3857. // the results, it stops the operation and returns the matching values up to
  3858. // that point, and a key in LastEvaluatedKey to apply in a subsequent operation,
  3859. // so that you can pick up where you left off. Also, if the processed data set
  3860. // size exceeds 1 MB before DynamoDB reaches this limit, it stops the operation
  3861. // and returns the matching values up to the limit, and a key in LastEvaluatedKey
  3862. // to apply in a subsequent operation to continue the operation. For more information,
  3863. // see Query and Scan in the Amazon DynamoDB Developer Guide.
  3864. Limit *int64 `type:"integer"`
  3865. // A string that identifies one or more attributes to retrieve from the specified
  3866. // table or index. These attributes can include scalars, sets, or elements of
  3867. // a JSON document. The attributes in the expression must be separated by commas.
  3868. //
  3869. // If no attribute names are specified, then all attributes will be returned.
  3870. // If any of the requested attributes are not found, they will not appear in
  3871. // the result.
  3872. //
  3873. // For more information, see Accessing Item Attributes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  3874. // in the Amazon DynamoDB Developer Guide.
  3875. //
  3876. // ProjectionExpression replaces the legacy AttributesToGet parameter.
  3877. ProjectionExpression *string `type:"string"`
  3878. // Determines the level of detail about provisioned throughput consumption that
  3879. // is returned in the response:
  3880. //
  3881. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  3882. // operation, together with ConsumedCapacity for each table and secondary index
  3883. // that was accessed.
  3884. //
  3885. // Note that some operations, such as GetItem and BatchGetItem, do not access
  3886. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  3887. // information for table(s).
  3888. //
  3889. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  3890. // operation.
  3891. //
  3892. // NONE - No ConsumedCapacity details are included in the response.
  3893. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  3894. // This is a legacy parameter, for backward compatibility. New applications
  3895. // should use FilterExpression instead. Do not combine legacy parameters and
  3896. // expression parameters in a single API call; otherwise, DynamoDB will return
  3897. // a ValidationException exception.
  3898. //
  3899. // A condition that evaluates the scan results and returns only the desired
  3900. // values.
  3901. //
  3902. // This parameter does not support attributes of type List or Map.
  3903. //
  3904. // If you specify more than one condition in the ScanFilter map, then by default
  3905. // all of the conditions must evaluate to true. In other words, the conditions
  3906. // are ANDed together. (You can use the ConditionalOperator parameter to OR
  3907. // the conditions instead. If you do this, then at least one of the conditions
  3908. // must evaluate to true, rather than all of them.)
  3909. //
  3910. // Each ScanFilter element consists of an attribute name to compare, along
  3911. // with the following:
  3912. //
  3913. // AttributeValueList - One or more values to evaluate against the supplied
  3914. // attribute. The number of values in the list depends on the operator specified
  3915. // in ComparisonOperator .
  3916. //
  3917. // For type Number, value comparisons are numeric.
  3918. //
  3919. // String value comparisons for greater than, equals, or less than are based
  3920. // on ASCII character code values. For example, a is greater than A, and a is
  3921. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters
  3922. // (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).
  3923. //
  3924. // For Binary, DynamoDB treats each byte of the binary data as unsigned when
  3925. // it compares binary values.
  3926. //
  3927. // For information on specifying data types in JSON, see JSON Data Format (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataFormat.html)
  3928. // in the Amazon DynamoDB Developer Guide.
  3929. //
  3930. // ComparisonOperator - A comparator for evaluating attributes. For example,
  3931. // equals, greater than, less than, etc.
  3932. //
  3933. // The following comparison operators are available:
  3934. //
  3935. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  3936. // | BEGINS_WITH | IN | BETWEEN
  3937. //
  3938. // For complete descriptions of all comparison operators, see Condition (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html).
  3939. ScanFilter map[string]*Condition `type:"map"`
  3940. // For a parallel Scan request, Segment identifies an individual segment to
  3941. // be scanned by an application worker.
  3942. //
  3943. // Segment IDs are zero-based, so the first segment is always 0. For example,
  3944. // if you want to use four application threads to scan a table or an index,
  3945. // then the first thread specifies a Segment value of 0, the second thread specifies
  3946. // 1, and so on.
  3947. //
  3948. // The value of LastEvaluatedKey returned from a parallel Scan request must
  3949. // be used as ExclusiveStartKey with the same segment ID in a subsequent Scan
  3950. // operation.
  3951. //
  3952. // The value for Segment must be greater than or equal to 0, and less than
  3953. // the value provided for TotalSegments.
  3954. //
  3955. // If you provide Segment, you must also provide TotalSegments.
  3956. Segment *int64 `type:"integer"`
  3957. // The attributes to be returned in the result. You can retrieve all item attributes,
  3958. // specific item attributes, or the count of matching items.
  3959. //
  3960. // ALL_ATTRIBUTES - Returns all of the item attributes.
  3961. //
  3962. // COUNT - Returns the number of matching items, rather than the matching
  3963. // items themselves.
  3964. //
  3965. // SPECIFIC_ATTRIBUTES - Returns only the attributes listed in AttributesToGet.
  3966. // This return value is equivalent to specifying AttributesToGet without specifying
  3967. // any value for Select.
  3968. //
  3969. // If neither Select nor AttributesToGet are specified, DynamoDB defaults
  3970. // to ALL_ATTRIBUTES. You cannot use both AttributesToGet and Select together
  3971. // in a single request, unless the value for Select is SPECIFIC_ATTRIBUTES.
  3972. // (This usage is equivalent to specifying AttributesToGet without any value
  3973. // for Select.)
  3974. Select *string `type:"string" enum:"Select"`
  3975. // The name of the table containing the requested items; or, if you provide
  3976. // IndexName, the name of the table to which that index belongs.
  3977. TableName *string `type:"string" required:"true"`
  3978. // For a parallel Scan request, TotalSegments represents the total number of
  3979. // segments into which the Scan operation will be divided. The value of TotalSegments
  3980. // corresponds to the number of application workers that will perform the parallel
  3981. // scan. For example, if you want to use four application threads to scan a
  3982. // table or an index, specify a TotalSegments value of 4.
  3983. //
  3984. // The value for TotalSegments must be greater than or equal to 1, and less
  3985. // than or equal to 1000000. If you specify a TotalSegments value of 1, the
  3986. // Scan operation will be sequential rather than parallel.
  3987. //
  3988. // If you specify TotalSegments, you must also specify Segment.
  3989. TotalSegments *int64 `type:"integer"`
  3990. metadataScanInput `json:"-" xml:"-"`
  3991. }
  3992. type metadataScanInput struct {
  3993. SDKShapeTraits bool `type:"structure"`
  3994. }
  3995. // String returns the string representation
  3996. func (s ScanInput) String() string {
  3997. return awsutil.Prettify(s)
  3998. }
  3999. // GoString returns the string representation
  4000. func (s ScanInput) GoString() string {
  4001. return s.String()
  4002. }
  4003. // Represents the output of a Scan operation.
  4004. type ScanOutput struct {
  4005. // The capacity units consumed by an operation. The data returned includes the
  4006. // total provisioned throughput consumed, along with statistics for the table
  4007. // and any indexes involved in the operation. ConsumedCapacity is only returned
  4008. // if the request asked for it. For more information, see Provisioned Throughput
  4009. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  4010. // in the Amazon DynamoDB Developer Guide.
  4011. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  4012. // The number of items in the response.
  4013. //
  4014. // If you set ScanFilter in the request, then Count is the number of items
  4015. // returned after the filter was applied, and ScannedCount is the number of
  4016. // matching items before the filter was applied.
  4017. //
  4018. // If you did not use a filter in the request, then Count is the same as ScannedCount.
  4019. Count *int64 `type:"integer"`
  4020. // An array of item attributes that match the scan criteria. Each element in
  4021. // this array consists of an attribute name and the value for that attribute.
  4022. Items []map[string]*AttributeValue `type:"list"`
  4023. // The primary key of the item where the operation stopped, inclusive of the
  4024. // previous result set. Use this value to start a new operation, excluding this
  4025. // value in the new request.
  4026. //
  4027. // If LastEvaluatedKey is empty, then the "last page" of results has been processed
  4028. // and there is no more data to be retrieved.
  4029. //
  4030. // If LastEvaluatedKey is not empty, it does not necessarily mean that there
  4031. // is more data in the result set. The only way to know when you have reached
  4032. // the end of the result set is when LastEvaluatedKey is empty.
  4033. LastEvaluatedKey map[string]*AttributeValue `type:"map"`
  4034. // The number of items evaluated, before any ScanFilter is applied. A high ScannedCount
  4035. // value with few, or no, Count results indicates an inefficient Scan operation.
  4036. // For more information, see Count and ScannedCount (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#Count)
  4037. // in the Amazon DynamoDB Developer Guide.
  4038. //
  4039. // If you did not use a filter in the request, then ScannedCount is the same
  4040. // as Count.
  4041. ScannedCount *int64 `type:"integer"`
  4042. metadataScanOutput `json:"-" xml:"-"`
  4043. }
  4044. type metadataScanOutput struct {
  4045. SDKShapeTraits bool `type:"structure"`
  4046. }
  4047. // String returns the string representation
  4048. func (s ScanOutput) String() string {
  4049. return awsutil.Prettify(s)
  4050. }
  4051. // GoString returns the string representation
  4052. func (s ScanOutput) GoString() string {
  4053. return s.String()
  4054. }
  4055. // Represents the DynamoDB Streams configuration for a table in DynamoDB.
  4056. type StreamSpecification struct {
  4057. // Indicates whether DynamoDB Streams is enabled (true) or disabled (false)
  4058. // on the table.
  4059. StreamEnabled *bool `type:"boolean"`
  4060. // The DynamoDB Streams settings for the table. These settings consist of:
  4061. //
  4062. // StreamEnabled - Indicates whether DynamoDB Streams is enabled (true) or
  4063. // disabled (false) on the table.
  4064. //
  4065. // StreamViewType - When an item in the table is modified, StreamViewType
  4066. // determines what information is written to the stream for this table. Valid
  4067. // values for StreamViewType are:
  4068. //
  4069. // KEYS_ONLY - Only the key attributes of the modified item are written to
  4070. // the stream.
  4071. //
  4072. // NEW_IMAGE - The entire item, as it appears after it was modified, is written
  4073. // to the stream.
  4074. //
  4075. // OLD_IMAGE - The entire item, as it appeared before it was modified, is written
  4076. // to the stream.
  4077. //
  4078. // NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are
  4079. // written to the stream.
  4080. StreamViewType *string `type:"string" enum:"StreamViewType"`
  4081. metadataStreamSpecification `json:"-" xml:"-"`
  4082. }
  4083. type metadataStreamSpecification struct {
  4084. SDKShapeTraits bool `type:"structure"`
  4085. }
  4086. // String returns the string representation
  4087. func (s StreamSpecification) String() string {
  4088. return awsutil.Prettify(s)
  4089. }
  4090. // GoString returns the string representation
  4091. func (s StreamSpecification) GoString() string {
  4092. return s.String()
  4093. }
  4094. // Represents the properties of a table.
  4095. type TableDescription struct {
  4096. // An array of AttributeDefinition objects. Each of these objects describes
  4097. // one attribute in the table and index key schema.
  4098. //
  4099. // Each AttributeDefinition object in this array is composed of:
  4100. //
  4101. // AttributeName - The name of the attribute.
  4102. //
  4103. // AttributeType - The data type for the attribute.
  4104. AttributeDefinitions []*AttributeDefinition `type:"list"`
  4105. // The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/)
  4106. // format.
  4107. CreationDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  4108. // The global secondary indexes, if any, on the table. Each index is scoped
  4109. // to a given hash key value. Each element is composed of:
  4110. //
  4111. // Backfilling - If true, then the index is currently in the backfilling
  4112. // phase. Backfilling occurs only when a new global secondary index is added
  4113. // to the table; it is the process by which DynamoDB populates the new index
  4114. // with data from the table. (This attribute does not appear for indexes that
  4115. // were created during a CreateTable operation.)
  4116. //
  4117. // IndexName - The name of the global secondary index.
  4118. //
  4119. // IndexSizeBytes - The total size of the global secondary index, in bytes.
  4120. // DynamoDB updates this value approximately every six hours. Recent changes
  4121. // might not be reflected in this value.
  4122. //
  4123. // IndexStatus - The current status of the global secondary index:
  4124. //
  4125. // CREATING - The index is being created.
  4126. //
  4127. // UPDATING - The index is being updated.
  4128. //
  4129. // DELETING - The index is being deleted.
  4130. //
  4131. // ACTIVE - The index is ready for use.
  4132. //
  4133. // ItemCount - The number of items in the global secondary index. DynamoDB
  4134. // updates this value approximately every six hours. Recent changes might not
  4135. // be reflected in this value.
  4136. //
  4137. // KeySchema - Specifies the complete index key schema. The attribute names
  4138. // in the key schema must be between 1 and 255 characters (inclusive). The key
  4139. // schema must begin with the same hash key attribute as the table.
  4140. //
  4141. // Projection - Specifies attributes that are copied (projected) from the
  4142. // table into the index. These are in addition to the primary key attributes
  4143. // and index key attributes, which are automatically projected. Each attribute
  4144. // specification is composed of:
  4145. //
  4146. // ProjectionType - One of the following:
  4147. //
  4148. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  4149. //
  4150. // INCLUDE - Only the specified table attributes are projected into the index.
  4151. // The list of projected attributes are in NonKeyAttributes.
  4152. //
  4153. // ALL - All of the table attributes are projected into the index.
  4154. //
  4155. // NonKeyAttributes - A list of one or more non-key attribute names that
  4156. // are projected into the secondary index. The total count of attributes provided
  4157. // in NonKeyAttributes, summed across all of the secondary indexes, must not
  4158. // exceed 20. If you project the same attribute into two different indexes,
  4159. // this counts as two distinct attributes when determining the total.
  4160. //
  4161. // ProvisionedThroughput - The provisioned throughput settings for the
  4162. // global secondary index, consisting of read and write capacity units, along
  4163. // with data about increases and decreases.
  4164. //
  4165. // If the table is in the DELETING state, no information about indexes will
  4166. // be returned.
  4167. GlobalSecondaryIndexes []*GlobalSecondaryIndexDescription `type:"list"`
  4168. // The number of items in the specified table. DynamoDB updates this value approximately
  4169. // every six hours. Recent changes might not be reflected in this value.
  4170. ItemCount *int64 `type:"long"`
  4171. // The primary key structure for the table. Each KeySchemaElement consists of:
  4172. //
  4173. // AttributeName - The name of the attribute.
  4174. //
  4175. // KeyType - The key type for the attribute. Can be either HASH or RANGE.
  4176. //
  4177. // For more information about primary keys, see Primary Key (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModelPrimaryKey)
  4178. // in the Amazon DynamoDB Developer Guide.
  4179. KeySchema []*KeySchemaElement `type:"list"`
  4180. // The Amazon Resource Name (ARN) that uniquely identifies the latest stream
  4181. // for this table.
  4182. LatestStreamArn *string `type:"string"`
  4183. // A timestamp, in ISO 8601 format, for this stream.
  4184. //
  4185. // Note that LatestStreamLabel is not a unique identifier for the stream, because
  4186. // it is possible that a stream from another table might have the same timestamp.
  4187. // However, the combination of the following three elements is guaranteed to
  4188. // be unique:
  4189. //
  4190. // the AWS customer ID.
  4191. //
  4192. // the table name.
  4193. //
  4194. // the StreamLabel.
  4195. LatestStreamLabel *string `type:"string"`
  4196. // Represents one or more local secondary indexes on the table. Each index is
  4197. // scoped to a given hash key value. Tables with one or more local secondary
  4198. // indexes are subject to an item collection size limit, where the amount of
  4199. // data within a given item collection cannot exceed 10 GB. Each element is
  4200. // composed of:
  4201. //
  4202. // IndexName - The name of the local secondary index.
  4203. //
  4204. // KeySchema - Specifies the complete index key schema. The attribute names
  4205. // in the key schema must be between 1 and 255 characters (inclusive). The key
  4206. // schema must begin with the same hash key attribute as the table.
  4207. //
  4208. // Projection - Specifies attributes that are copied (projected) from the
  4209. // table into the index. These are in addition to the primary key attributes
  4210. // and index key attributes, which are automatically projected. Each attribute
  4211. // specification is composed of:
  4212. //
  4213. // ProjectionType - One of the following:
  4214. //
  4215. // KEYS_ONLY - Only the index and primary keys are projected into the index.
  4216. //
  4217. // INCLUDE - Only the specified table attributes are projected into the index.
  4218. // The list of projected attributes are in NonKeyAttributes.
  4219. //
  4220. // ALL - All of the table attributes are projected into the index.
  4221. //
  4222. // NonKeyAttributes - A list of one or more non-key attribute names that
  4223. // are projected into the secondary index. The total count of attributes provided
  4224. // in NonKeyAttributes, summed across all of the secondary indexes, must not
  4225. // exceed 20. If you project the same attribute into two different indexes,
  4226. // this counts as two distinct attributes when determining the total.
  4227. //
  4228. // IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB
  4229. // updates this value approximately every six hours. Recent changes might not
  4230. // be reflected in this value.
  4231. //
  4232. // ItemCount - Represents the number of items in the index. DynamoDB updates
  4233. // this value approximately every six hours. Recent changes might not be reflected
  4234. // in this value.
  4235. //
  4236. // If the table is in the DELETING state, no information about indexes will
  4237. // be returned.
  4238. LocalSecondaryIndexes []*LocalSecondaryIndexDescription `type:"list"`
  4239. // The provisioned throughput settings for the table, consisting of read and
  4240. // write capacity units, along with data about increases and decreases.
  4241. ProvisionedThroughput *ProvisionedThroughputDescription `type:"structure"`
  4242. // The current DynamoDB Streams configuration for the table.
  4243. StreamSpecification *StreamSpecification `type:"structure"`
  4244. // The Amazon Resource Name (ARN) that uniquely identifies the table.
  4245. TableArn *string `type:"string"`
  4246. // The name of the table.
  4247. TableName *string `type:"string"`
  4248. // The total size of the specified table, in bytes. DynamoDB updates this value
  4249. // approximately every six hours. Recent changes might not be reflected in this
  4250. // value.
  4251. TableSizeBytes *int64 `type:"long"`
  4252. // The current state of the table:
  4253. //
  4254. // CREATING - The table is being created.
  4255. //
  4256. // UPDATING - The table is being updated.
  4257. //
  4258. // DELETING - The table is being deleted.
  4259. //
  4260. // ACTIVE - The table is ready for use.
  4261. TableStatus *string `type:"string" enum:"TableStatus"`
  4262. metadataTableDescription `json:"-" xml:"-"`
  4263. }
  4264. type metadataTableDescription struct {
  4265. SDKShapeTraits bool `type:"structure"`
  4266. }
  4267. // String returns the string representation
  4268. func (s TableDescription) String() string {
  4269. return awsutil.Prettify(s)
  4270. }
  4271. // GoString returns the string representation
  4272. func (s TableDescription) GoString() string {
  4273. return s.String()
  4274. }
  4275. // Represents the new provisioned throughput settings to be applied to a global
  4276. // secondary index.
  4277. type UpdateGlobalSecondaryIndexAction struct {
  4278. // The name of the global secondary index to be updated.
  4279. IndexName *string `type:"string" required:"true"`
  4280. // Represents the provisioned throughput settings for a specified table or index.
  4281. // The settings can be modified using the UpdateTable operation.
  4282. //
  4283. // For current minimum and maximum provisioned throughput values, see Limits
  4284. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  4285. // in the Amazon DynamoDB Developer Guide.
  4286. ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"`
  4287. metadataUpdateGlobalSecondaryIndexAction `json:"-" xml:"-"`
  4288. }
  4289. type metadataUpdateGlobalSecondaryIndexAction struct {
  4290. SDKShapeTraits bool `type:"structure"`
  4291. }
  4292. // String returns the string representation
  4293. func (s UpdateGlobalSecondaryIndexAction) String() string {
  4294. return awsutil.Prettify(s)
  4295. }
  4296. // GoString returns the string representation
  4297. func (s UpdateGlobalSecondaryIndexAction) GoString() string {
  4298. return s.String()
  4299. }
  4300. // Represents the input of an UpdateItem operation.
  4301. type UpdateItemInput struct {
  4302. // This is a legacy parameter, for backward compatibility. New applications
  4303. // should use UpdateExpression instead. Do not combine legacy parameters and
  4304. // expression parameters in a single API call; otherwise, DynamoDB will return
  4305. // a ValidationException exception.
  4306. //
  4307. // This parameter can be used for modifying top-level attributes; however,
  4308. // it does not support individual list or map elements.
  4309. //
  4310. // The names of attributes to be modified, the action to perform on each,
  4311. // and the new value for each. If you are updating an attribute that is an index
  4312. // key attribute for any indexes on that table, the attribute type must match
  4313. // the index key type defined in the AttributesDefinition of the table description.
  4314. // You can use UpdateItem to update any nonkey attributes.
  4315. //
  4316. // Attribute values cannot be null. String and Binary type attributes must
  4317. // have lengths greater than zero. Set type attributes must not be empty. Requests
  4318. // with empty values will be rejected with a ValidationException exception.
  4319. //
  4320. // Each AttributeUpdates element consists of an attribute name to modify, along
  4321. // with the following:
  4322. //
  4323. // Value - The new value, if applicable, for this attribute.
  4324. //
  4325. // Action - A value that specifies how to perform the update. This action
  4326. // is only valid for an existing attribute whose data type is Number or is a
  4327. // set; do not use ADD for other data types.
  4328. //
  4329. // If an item with the specified primary key is found in the table, the following
  4330. // values perform the following actions:
  4331. //
  4332. // PUT - Adds the specified attribute to the item. If the attribute already
  4333. // exists, it is replaced by the new value.
  4334. //
  4335. // DELETE - Removes the attribute and its value, if no value is specified
  4336. // for DELETE. The data type of the specified value must match the existing
  4337. // value's data type.
  4338. //
  4339. // If a set of values is specified, then those values are subtracted from the
  4340. // old set. For example, if the attribute value was the set [a,b,c] and the
  4341. // DELETE action specifies [a,c], then the final attribute value is [b]. Specifying
  4342. // an empty set is an error.
  4343. //
  4344. // ADD - Adds the specified value to the item, if the attribute does not
  4345. // already exist. If the attribute does exist, then the behavior of ADD depends
  4346. // on the data type of the attribute:
  4347. //
  4348. // If the existing attribute is a number, and if Value is also a number,
  4349. // then Value is mathematically added to the existing attribute. If Value is
  4350. // a negative number, then it is subtracted from the existing attribute.
  4351. //
  4352. // If you use ADD to increment or decrement a number value for an item that
  4353. // doesn't exist before the update, DynamoDB uses 0 as the initial value.
  4354. //
  4355. // Similarly, if you use ADD for an existing item to increment or decrement
  4356. // an attribute value that doesn't exist before the update, DynamoDB uses 0
  4357. // as the initial value. For example, suppose that the item you want to update
  4358. // doesn't have an attribute named itemcount, but you decide to ADD the number
  4359. // 3 to this attribute anyway. DynamoDB will create the itemcount attribute,
  4360. // set its initial value to 0, and finally add 3 to it. The result will be a
  4361. // new itemcount attribute, with a value of 3.
  4362. //
  4363. // If the existing data type is a set, and if Value is also a set, then
  4364. // Value is appended to the existing set. For example, if the attribute value
  4365. // is the set [1,2], and the ADD action specified [3], then the final attribute
  4366. // value is [1,2,3]. An error occurs if an ADD action is specified for a set
  4367. // attribute and the attribute type specified does not match the existing set
  4368. // type.
  4369. //
  4370. // Both sets must have the same primitive data type. For example, if the existing
  4371. // data type is a set of strings, Value must also be a set of strings.
  4372. //
  4373. // If no item with the specified key is found in the table, the following
  4374. // values perform the following actions:
  4375. //
  4376. // PUT - Causes DynamoDB to create a new item with the specified primary
  4377. // key, and then adds the attribute.
  4378. //
  4379. // DELETE - Nothing happens, because attributes cannot be deleted from a
  4380. // nonexistent item. The operation succeeds, but DynamoDB does not create a
  4381. // new item.
  4382. //
  4383. // ADD - Causes DynamoDB to create an item with the supplied primary key
  4384. // and number (or set of numbers) for the attribute value. The only data types
  4385. // allowed are Number and Number Set.
  4386. //
  4387. // If you provide any attributes that are part of an index key, then the
  4388. // data types for those attributes must match those of the schema in the table's
  4389. // attribute definition.
  4390. AttributeUpdates map[string]*AttributeValueUpdate `type:"map"`
  4391. // A condition that must be satisfied in order for a conditional update to succeed.
  4392. //
  4393. // An expression can contain any of the following:
  4394. //
  4395. // Functions: attribute_exists | attribute_not_exists | attribute_type |
  4396. // contains | begins_with | size
  4397. //
  4398. // These function names are case-sensitive.
  4399. //
  4400. // Comparison operators: = | <> | < | > | <= | >= | BETWEEN | IN
  4401. //
  4402. // Logical operators: AND | OR | NOT
  4403. //
  4404. // For more information on condition expressions, see Specifying Conditions
  4405. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  4406. // in the Amazon DynamoDB Developer Guide.
  4407. //
  4408. // ConditionExpression replaces the legacy ConditionalOperator and Expected
  4409. // parameters.
  4410. ConditionExpression *string `type:"string"`
  4411. // This is a legacy parameter, for backward compatibility. New applications
  4412. // should use ConditionExpression instead. Do not combine legacy parameters
  4413. // and expression parameters in a single API call; otherwise, DynamoDB will
  4414. // return a ValidationException exception.
  4415. //
  4416. // A logical operator to apply to the conditions in the Expected map:
  4417. //
  4418. // AND - If all of the conditions evaluate to true, then the entire map evaluates
  4419. // to true.
  4420. //
  4421. // OR - If at least one of the conditions evaluate to true, then the entire
  4422. // map evaluates to true.
  4423. //
  4424. // If you omit ConditionalOperator, then AND is the default.
  4425. //
  4426. // The operation will succeed only if the entire map evaluates to true.
  4427. //
  4428. // This parameter does not support attributes of type List or Map.
  4429. ConditionalOperator *string `type:"string" enum:"ConditionalOperator"`
  4430. // This is a legacy parameter, for backward compatibility. New applications
  4431. // should use ConditionExpression instead. Do not combine legacy parameters
  4432. // and expression parameters in a single API call; otherwise, DynamoDB will
  4433. // return a ValidationException exception.
  4434. //
  4435. // A map of attribute/condition pairs. Expected provides a conditional block
  4436. // for the UpdateItem operation.
  4437. //
  4438. // Each element of Expected consists of an attribute name, a comparison operator,
  4439. // and one or more values. DynamoDB compares the attribute with the value(s)
  4440. // you supplied, using the comparison operator. For each Expected element, the
  4441. // result of the evaluation is either true or false.
  4442. //
  4443. // If you specify more than one element in the Expected map, then by default
  4444. // all of the conditions must evaluate to true. In other words, the conditions
  4445. // are ANDed together. (You can use the ConditionalOperator parameter to OR
  4446. // the conditions instead. If you do this, then at least one of the conditions
  4447. // must evaluate to true, rather than all of them.)
  4448. //
  4449. // If the Expected map evaluates to true, then the conditional operation succeeds;
  4450. // otherwise, it fails.
  4451. //
  4452. // Expected contains the following:
  4453. //
  4454. // AttributeValueList - One or more values to evaluate against the supplied
  4455. // attribute. The number of values in the list depends on the ComparisonOperator
  4456. // being used.
  4457. //
  4458. // For type Number, value comparisons are numeric.
  4459. //
  4460. // String value comparisons for greater than, equals, or less than are based
  4461. // on ASCII character code values. For example, a is greater than A, and a is
  4462. // greater than B. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
  4463. //
  4464. // For type Binary, DynamoDB treats each byte of the binary data as unsigned
  4465. // when it compares binary values.
  4466. //
  4467. // ComparisonOperator - A comparator for evaluating attributes in the AttributeValueList.
  4468. // When performing the comparison, DynamoDB uses strongly consistent reads.
  4469. //
  4470. // The following comparison operators are available:
  4471. //
  4472. // EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS
  4473. // | BEGINS_WITH | IN | BETWEEN
  4474. //
  4475. // The following are descriptions of each comparison operator.
  4476. //
  4477. // EQ : Equal. EQ is supported for all datatypes, including lists and maps.
  4478. //
  4479. // AttributeValueList can contain only one AttributeValue element of type String,
  4480. // Number, Binary, String Set, Number Set, or Binary Set. If an item contains
  4481. // an AttributeValue element of a different type than the one provided in the
  4482. // request, the value does not match. For example, {"S":"6"} does not equal
  4483. // {"N":"6"}. Also, {"N":"6"} does not equal {"NS":["6", "2", "1"]}.
  4484. //
  4485. // NE : Not equal. NE is supported for all datatypes, including lists and
  4486. // maps.
  4487. //
  4488. // AttributeValueList can contain only one AttributeValue of type String, Number,
  4489. // Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue
  4490. // of a different type than the one provided in the request, the value does
  4491. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  4492. // does not equal {"NS":["6", "2", "1"]}.
  4493. //
  4494. // LE : Less than or equal.
  4495. //
  4496. // AttributeValueList can contain only one AttributeValue element of type String,
  4497. // Number, or Binary (not a set type). If an item contains an AttributeValue
  4498. // element of a different type than the one provided in the request, the value
  4499. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  4500. // does not compare to {"NS":["6", "2", "1"]}.
  4501. //
  4502. // LT : Less than.
  4503. //
  4504. // AttributeValueList can contain only one AttributeValue of type String, Number,
  4505. // or Binary (not a set type). If an item contains an AttributeValue element
  4506. // of a different type than the one provided in the request, the value does
  4507. // not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  4508. // does not compare to {"NS":["6", "2", "1"]}.
  4509. //
  4510. // GE : Greater than or equal.
  4511. //
  4512. // AttributeValueList can contain only one AttributeValue element of type String,
  4513. // Number, or Binary (not a set type). If an item contains an AttributeValue
  4514. // element of a different type than the one provided in the request, the value
  4515. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  4516. // does not compare to {"NS":["6", "2", "1"]}.
  4517. //
  4518. // GT : Greater than.
  4519. //
  4520. // AttributeValueList can contain only one AttributeValue element of type String,
  4521. // Number, or Binary (not a set type). If an item contains an AttributeValue
  4522. // element of a different type than the one provided in the request, the value
  4523. // does not match. For example, {"S":"6"} does not equal {"N":"6"}. Also, {"N":"6"}
  4524. // does not compare to {"NS":["6", "2", "1"]}.
  4525. //
  4526. // NOT_NULL : The attribute exists. NOT_NULL is supported for all datatypes,
  4527. // including lists and maps.
  4528. //
  4529. // This operator tests for the existence of an attribute, not its data type.
  4530. // If the data type of attribute "a" is null, and you evaluate it using NOT_NULL,
  4531. // the result is a Boolean true. This result is because the attribute "a" exists;
  4532. // its data type is not relevant to the NOT_NULL comparison operator.
  4533. //
  4534. // NULL : The attribute does not exist. NULL is supported for all datatypes,
  4535. // including lists and maps.
  4536. //
  4537. // This operator tests for the nonexistence of an attribute, not its data type.
  4538. // If the data type of attribute "a" is null, and you evaluate it using NULL,
  4539. // the result is a Boolean false. This is because the attribute "a" exists;
  4540. // its data type is not relevant to the NULL comparison operator.
  4541. //
  4542. // CONTAINS : Checks for a subsequence, or value in a set.
  4543. //
  4544. // AttributeValueList can contain only one AttributeValue element of type String,
  4545. // Number, or Binary (not a set type). If the target attribute of the comparison
  4546. // is of type String, then the operator checks for a substring match. If the
  4547. // target attribute of the comparison is of type Binary, then the operator looks
  4548. // for a subsequence of the target that matches the input. If the target attribute
  4549. // of the comparison is a set ("SS", "NS", or "BS"), then the operator evaluates
  4550. // to true if it finds an exact match with any member of the set.
  4551. //
  4552. // CONTAINS is supported for lists: When evaluating "a CONTAINS b", "a" can
  4553. // be a list; however, "b" cannot be a set, a map, or a list.
  4554. //
  4555. // NOT_CONTAINS : Checks for absence of a subsequence, or absence of a value
  4556. // in a set.
  4557. //
  4558. // AttributeValueList can contain only one AttributeValue element of type String,
  4559. // Number, or Binary (not a set type). If the target attribute of the comparison
  4560. // is a String, then the operator checks for the absence of a substring match.
  4561. // If the target attribute of the comparison is Binary, then the operator checks
  4562. // for the absence of a subsequence of the target that matches the input. If
  4563. // the target attribute of the comparison is a set ("SS", "NS", or "BS"), then
  4564. // the operator evaluates to true if it does not find an exact match with any
  4565. // member of the set.
  4566. //
  4567. // NOT_CONTAINS is supported for lists: When evaluating "a NOT CONTAINS b",
  4568. // "a" can be a list; however, "b" cannot be a set, a map, or a list.
  4569. //
  4570. // BEGINS_WITH : Checks for a prefix.
  4571. //
  4572. // AttributeValueList can contain only one AttributeValue of type String or
  4573. // Binary (not a Number or a set type). The target attribute of the comparison
  4574. // must be of type String or Binary (not a Number or a set type).
  4575. //
  4576. // IN : Checks for matching elements within two sets.
  4577. //
  4578. // AttributeValueList can contain one or more AttributeValue elements of type
  4579. // String, Number, or Binary (not a set type). These attributes are compared
  4580. // against an existing set type attribute of an item. If any elements of the
  4581. // input set are present in the item attribute, the expression evaluates to
  4582. // true.
  4583. //
  4584. // BETWEEN : Greater than or equal to the first value, and less than or equal
  4585. // to the second value.
  4586. //
  4587. // AttributeValueList must contain two AttributeValue elements of the same
  4588. // type, either String, Number, or Binary (not a set type). A target attribute
  4589. // matches if the target value is greater than, or equal to, the first element
  4590. // and less than, or equal to, the second element. If an item contains an AttributeValue
  4591. // element of a different type than the one provided in the request, the value
  4592. // does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also,
  4593. // {"N":"6"} does not compare to {"NS":["6", "2", "1"]}
  4594. //
  4595. // For usage examples of AttributeValueList and ComparisonOperator, see
  4596. // Legacy Conditional Parameters (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html)
  4597. // in the Amazon DynamoDB Developer Guide.
  4598. //
  4599. // For backward compatibility with previous DynamoDB releases, the following
  4600. // parameters can be used instead of AttributeValueList and ComparisonOperator:
  4601. //
  4602. // Value - A value for DynamoDB to compare with an attribute.
  4603. //
  4604. // Exists - A Boolean value that causes DynamoDB to evaluate the value before
  4605. // attempting the conditional operation:
  4606. //
  4607. // If Exists is true, DynamoDB will check to see if that attribute value
  4608. // already exists in the table. If it is found, then the condition evaluates
  4609. // to true; otherwise the condition evaluate to false.
  4610. //
  4611. // If Exists is false, DynamoDB assumes that the attribute value does not
  4612. // exist in the table. If in fact the value does not exist, then the assumption
  4613. // is valid and the condition evaluates to true. If the value is found, despite
  4614. // the assumption that it does not exist, the condition evaluates to false.
  4615. //
  4616. // Note that the default value for Exists is true.
  4617. //
  4618. // The Value and Exists parameters are incompatible with AttributeValueList
  4619. // and ComparisonOperator. Note that if you use both sets of parameters at once,
  4620. // DynamoDB will return a ValidationException exception.
  4621. //
  4622. // This parameter does not support attributes of type List or Map.
  4623. Expected map[string]*ExpectedAttributeValue `type:"map"`
  4624. // One or more substitution tokens for attribute names in an expression. The
  4625. // following are some use cases for using ExpressionAttributeNames:
  4626. //
  4627. // To access an attribute whose name conflicts with a DynamoDB reserved word.
  4628. //
  4629. // To create a placeholder for repeating occurrences of an attribute name
  4630. // in an expression.
  4631. //
  4632. // To prevent special characters in an attribute name from being misinterpreted
  4633. // in an expression.
  4634. //
  4635. // Use the # character in an expression to dereference an attribute name.
  4636. // For example, consider the following attribute name:
  4637. //
  4638. // Percentile
  4639. //
  4640. // The name of this attribute conflicts with a reserved word, so it cannot
  4641. // be used directly in an expression. (For the complete list of reserved words,
  4642. // see Reserved Words (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
  4643. // in the Amazon DynamoDB Developer Guide). To work around this, you could specify
  4644. // the following for ExpressionAttributeNames:
  4645. //
  4646. // {"#P":"Percentile"}
  4647. //
  4648. // You could then use this substitution in an expression, as in this example:
  4649. //
  4650. // #P = :val
  4651. //
  4652. // Tokens that begin with the : character are expression attribute values,
  4653. // which are placeholders for the actual value at runtime.
  4654. //
  4655. // For more information on expression attribute names, see Accessing Item Attributes
  4656. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
  4657. // in the Amazon DynamoDB Developer Guide.
  4658. ExpressionAttributeNames map[string]*string `type:"map"`
  4659. // One or more values that can be substituted in an expression.
  4660. //
  4661. // Use the : (colon) character in an expression to dereference an attribute
  4662. // value. For example, suppose that you wanted to check whether the value of
  4663. // the ProductStatus attribute was one of the following:
  4664. //
  4665. // Available | Backordered | Discontinued
  4666. //
  4667. // You would first need to specify ExpressionAttributeValues as follows:
  4668. //
  4669. // { ":avail":{"S":"Available"}, ":back":{"S":"Backordered"}, ":disc":{"S":"Discontinued"}
  4670. // }
  4671. //
  4672. // You could then use these values in an expression, such as this:
  4673. //
  4674. // ProductStatus IN (:avail, :back, :disc)
  4675. //
  4676. // For more information on expression attribute values, see Specifying Conditions
  4677. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
  4678. // in the Amazon DynamoDB Developer Guide.
  4679. ExpressionAttributeValues map[string]*AttributeValue `type:"map"`
  4680. // The primary key of the item to be updated. Each element consists of an attribute
  4681. // name and a value for that attribute.
  4682. //
  4683. // For the primary key, you must provide all of the attributes. For example,
  4684. // with a hash type primary key, you only need to provide the hash attribute.
  4685. // For a hash-and-range type primary key, you must provide both the hash attribute
  4686. // and the range attribute.
  4687. Key map[string]*AttributeValue `type:"map" required:"true"`
  4688. // Determines the level of detail about provisioned throughput consumption that
  4689. // is returned in the response:
  4690. //
  4691. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  4692. // operation, together with ConsumedCapacity for each table and secondary index
  4693. // that was accessed.
  4694. //
  4695. // Note that some operations, such as GetItem and BatchGetItem, do not access
  4696. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  4697. // information for table(s).
  4698. //
  4699. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  4700. // operation.
  4701. //
  4702. // NONE - No ConsumedCapacity details are included in the response.
  4703. ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"`
  4704. // Determines whether item collection metrics are returned. If set to SIZE,
  4705. // the response includes statistics about item collections, if any, that were
  4706. // modified during the operation are returned in the response. If set to NONE
  4707. // (the default), no statistics are returned.
  4708. ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"`
  4709. // Use ReturnValues if you want to get the item attributes as they appeared
  4710. // either before or after they were updated. For UpdateItem, the valid values
  4711. // are:
  4712. //
  4713. // NONE - If ReturnValues is not specified, or if its value is NONE, then
  4714. // nothing is returned. (This setting is the default for ReturnValues.)
  4715. //
  4716. // ALL_OLD - If UpdateItem overwrote an attribute name-value pair, then the
  4717. // content of the old item is returned.
  4718. //
  4719. // UPDATED_OLD - The old versions of only the updated attributes are returned.
  4720. //
  4721. // ALL_NEW - All of the attributes of the new version of the item are returned.
  4722. //
  4723. // UPDATED_NEW - The new versions of only the updated attributes are returned.
  4724. ReturnValues *string `type:"string" enum:"ReturnValue"`
  4725. // The name of the table containing the item to update.
  4726. TableName *string `type:"string" required:"true"`
  4727. // An expression that defines one or more attributes to be updated, the action
  4728. // to be performed on them, and new value(s) for them.
  4729. //
  4730. // The following action values are available for UpdateExpression.
  4731. //
  4732. // SET - Adds one or more attributes and values to an item. If any of these
  4733. // attribute already exist, they are replaced by the new values. You can also
  4734. // use SET to add or subtract from an attribute that is of type Number. For
  4735. // example: SET myNum = myNum + :val
  4736. //
  4737. // SET supports the following functions:
  4738. //
  4739. // if_not_exists (path, operand) - if the item does not contain an attribute
  4740. // at the specified path, then if_not_exists evaluates to operand; otherwise,
  4741. // it evaluates to path. You can use this function to avoid overwriting an attribute
  4742. // that may already be present in the item.
  4743. //
  4744. // list_append (operand, operand) - evaluates to a list with a new element
  4745. // added to it. You can append the new element to the start or the end of the
  4746. // list by reversing the order of the operands.
  4747. //
  4748. // These function names are case-sensitive.
  4749. //
  4750. // REMOVE - Removes one or more attributes from an item.
  4751. //
  4752. // ADD - Adds the specified value to the item, if the attribute does not
  4753. // already exist. If the attribute does exist, then the behavior of ADD depends
  4754. // on the data type of the attribute:
  4755. //
  4756. // If the existing attribute is a number, and if Value is also a number,
  4757. // then Value is mathematically added to the existing attribute. If Value is
  4758. // a negative number, then it is subtracted from the existing attribute.
  4759. //
  4760. // If you use ADD to increment or decrement a number value for an item that
  4761. // doesn't exist before the update, DynamoDB uses 0 as the initial value.
  4762. //
  4763. // Similarly, if you use ADD for an existing item to increment or decrement
  4764. // an attribute value that doesn't exist before the update, DynamoDB uses 0
  4765. // as the initial value. For example, suppose that the item you want to update
  4766. // doesn't have an attribute named itemcount, but you decide to ADD the number
  4767. // 3 to this attribute anyway. DynamoDB will create the itemcount attribute,
  4768. // set its initial value to 0, and finally add 3 to it. The result will be a
  4769. // new itemcount attribute in the item, with a value of 3.
  4770. //
  4771. // If the existing data type is a set and if Value is also a set, then Value
  4772. // is added to the existing set. For example, if the attribute value is the
  4773. // set [1,2], and the ADD action specified [3], then the final attribute value
  4774. // is [1,2,3]. An error occurs if an ADD action is specified for a set attribute
  4775. // and the attribute type specified does not match the existing set type.
  4776. //
  4777. // Both sets must have the same primitive data type. For example, if the existing
  4778. // data type is a set of strings, the Value must also be a set of strings.
  4779. //
  4780. // The ADD action only supports Number and set data types. In addition, ADD
  4781. // can only be used on top-level attributes, not nested attributes.
  4782. //
  4783. // DELETE - Deletes an element from a set.
  4784. //
  4785. // If a set of values is specified, then those values are subtracted from the
  4786. // old set. For example, if the attribute value was the set [a,b,c] and the
  4787. // DELETE action specifies [a,c], then the final attribute value is [b]. Specifying
  4788. // an empty set is an error.
  4789. //
  4790. // The DELETE action only supports set data types. In addition, DELETE can
  4791. // only be used on top-level attributes, not nested attributes.
  4792. //
  4793. // You can have many actions in a single expression, such as the following:
  4794. // SET a=:value1, b=:value2 DELETE :value3, :value4, :value5
  4795. //
  4796. // For more information on update expressions, see Modifying Items and Attributes
  4797. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html)
  4798. // in the Amazon DynamoDB Developer Guide.
  4799. //
  4800. // UpdateExpression replaces the legacy AttributeUpdates parameter.
  4801. UpdateExpression *string `type:"string"`
  4802. metadataUpdateItemInput `json:"-" xml:"-"`
  4803. }
  4804. type metadataUpdateItemInput struct {
  4805. SDKShapeTraits bool `type:"structure"`
  4806. }
  4807. // String returns the string representation
  4808. func (s UpdateItemInput) String() string {
  4809. return awsutil.Prettify(s)
  4810. }
  4811. // GoString returns the string representation
  4812. func (s UpdateItemInput) GoString() string {
  4813. return s.String()
  4814. }
  4815. // Represents the output of an UpdateItem operation.
  4816. type UpdateItemOutput struct {
  4817. // A map of attribute values as they appeared before the UpdateItem operation.
  4818. // This map only appears if ReturnValues was specified as something other than
  4819. // NONE in the request. Each element represents one attribute.
  4820. Attributes map[string]*AttributeValue `type:"map"`
  4821. // The capacity units consumed by an operation. The data returned includes the
  4822. // total provisioned throughput consumed, along with statistics for the table
  4823. // and any indexes involved in the operation. ConsumedCapacity is only returned
  4824. // if the request asked for it. For more information, see Provisioned Throughput
  4825. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughputIntro.html)
  4826. // in the Amazon DynamoDB Developer Guide.
  4827. ConsumedCapacity *ConsumedCapacity `type:"structure"`
  4828. // Information about item collections, if any, that were affected by the operation.
  4829. // ItemCollectionMetrics is only returned if the request asked for it. If the
  4830. // table does not have any local secondary indexes, this information is not
  4831. // returned in the response.
  4832. ItemCollectionMetrics *ItemCollectionMetrics `type:"structure"`
  4833. metadataUpdateItemOutput `json:"-" xml:"-"`
  4834. }
  4835. type metadataUpdateItemOutput struct {
  4836. SDKShapeTraits bool `type:"structure"`
  4837. }
  4838. // String returns the string representation
  4839. func (s UpdateItemOutput) String() string {
  4840. return awsutil.Prettify(s)
  4841. }
  4842. // GoString returns the string representation
  4843. func (s UpdateItemOutput) GoString() string {
  4844. return s.String()
  4845. }
  4846. // Represents the input of an UpdateTable operation.
  4847. type UpdateTableInput struct {
  4848. // An array of attributes that describe the key schema for the table and indexes.
  4849. // If you are adding a new global secondary index to the table, AttributeDefinitions
  4850. // must include the key element(s) of the new index.
  4851. AttributeDefinitions []*AttributeDefinition `type:"list"`
  4852. // An array of one or more global secondary indexes for the table. For each
  4853. // index in the array, you can request one action:
  4854. //
  4855. // Create - add a new global secondary index to the table.
  4856. //
  4857. // Update - modify the provisioned throughput settings of an existing global
  4858. // secondary index.
  4859. //
  4860. // Delete - remove a global secondary index from the table.
  4861. //
  4862. // For more information, see Managing Global Secondary Indexes (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html)
  4863. // in the Amazon DynamoDB Developer Guide.
  4864. GlobalSecondaryIndexUpdates []*GlobalSecondaryIndexUpdate `type:"list"`
  4865. // Represents the provisioned throughput settings for a specified table or index.
  4866. // The settings can be modified using the UpdateTable operation.
  4867. //
  4868. // For current minimum and maximum provisioned throughput values, see Limits
  4869. // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
  4870. // in the Amazon DynamoDB Developer Guide.
  4871. ProvisionedThroughput *ProvisionedThroughput `type:"structure"`
  4872. // Represents the DynamoDB Streams configuration for the table.
  4873. //
  4874. // You will receive a ResourceInUseException if you attempt to enable a stream
  4875. // on a table that already has a stream, or if you attempt to disable a stream
  4876. // on a table which does not have a stream.
  4877. StreamSpecification *StreamSpecification `type:"structure"`
  4878. // The name of the table to be updated.
  4879. TableName *string `type:"string" required:"true"`
  4880. metadataUpdateTableInput `json:"-" xml:"-"`
  4881. }
  4882. type metadataUpdateTableInput struct {
  4883. SDKShapeTraits bool `type:"structure"`
  4884. }
  4885. // String returns the string representation
  4886. func (s UpdateTableInput) String() string {
  4887. return awsutil.Prettify(s)
  4888. }
  4889. // GoString returns the string representation
  4890. func (s UpdateTableInput) GoString() string {
  4891. return s.String()
  4892. }
  4893. // Represents the output of an UpdateTable operation.
  4894. type UpdateTableOutput struct {
  4895. // Represents the properties of a table.
  4896. TableDescription *TableDescription `type:"structure"`
  4897. metadataUpdateTableOutput `json:"-" xml:"-"`
  4898. }
  4899. type metadataUpdateTableOutput struct {
  4900. SDKShapeTraits bool `type:"structure"`
  4901. }
  4902. // String returns the string representation
  4903. func (s UpdateTableOutput) String() string {
  4904. return awsutil.Prettify(s)
  4905. }
  4906. // GoString returns the string representation
  4907. func (s UpdateTableOutput) GoString() string {
  4908. return s.String()
  4909. }
  4910. // Represents an operation to perform - either DeleteItem or PutItem. You can
  4911. // only request one of these operations, not both, in a single WriteRequest.
  4912. // If you do need to perform both of these operations, you will need to provide
  4913. // two separate WriteRequest objects.
  4914. type WriteRequest struct {
  4915. // A request to perform a DeleteItem operation.
  4916. DeleteRequest *DeleteRequest `type:"structure"`
  4917. // A request to perform a PutItem operation.
  4918. PutRequest *PutRequest `type:"structure"`
  4919. metadataWriteRequest `json:"-" xml:"-"`
  4920. }
  4921. type metadataWriteRequest struct {
  4922. SDKShapeTraits bool `type:"structure"`
  4923. }
  4924. // String returns the string representation
  4925. func (s WriteRequest) String() string {
  4926. return awsutil.Prettify(s)
  4927. }
  4928. // GoString returns the string representation
  4929. func (s WriteRequest) GoString() string {
  4930. return s.String()
  4931. }
  4932. const (
  4933. // @enum AttributeAction
  4934. AttributeActionAdd = "ADD"
  4935. // @enum AttributeAction
  4936. AttributeActionPut = "PUT"
  4937. // @enum AttributeAction
  4938. AttributeActionDelete = "DELETE"
  4939. )
  4940. const (
  4941. // @enum ComparisonOperator
  4942. ComparisonOperatorEq = "EQ"
  4943. // @enum ComparisonOperator
  4944. ComparisonOperatorNe = "NE"
  4945. // @enum ComparisonOperator
  4946. ComparisonOperatorIn = "IN"
  4947. // @enum ComparisonOperator
  4948. ComparisonOperatorLe = "LE"
  4949. // @enum ComparisonOperator
  4950. ComparisonOperatorLt = "LT"
  4951. // @enum ComparisonOperator
  4952. ComparisonOperatorGe = "GE"
  4953. // @enum ComparisonOperator
  4954. ComparisonOperatorGt = "GT"
  4955. // @enum ComparisonOperator
  4956. ComparisonOperatorBetween = "BETWEEN"
  4957. // @enum ComparisonOperator
  4958. ComparisonOperatorNotNull = "NOT_NULL"
  4959. // @enum ComparisonOperator
  4960. ComparisonOperatorNull = "NULL"
  4961. // @enum ComparisonOperator
  4962. ComparisonOperatorContains = "CONTAINS"
  4963. // @enum ComparisonOperator
  4964. ComparisonOperatorNotContains = "NOT_CONTAINS"
  4965. // @enum ComparisonOperator
  4966. ComparisonOperatorBeginsWith = "BEGINS_WITH"
  4967. )
  4968. const (
  4969. // @enum ConditionalOperator
  4970. ConditionalOperatorAnd = "AND"
  4971. // @enum ConditionalOperator
  4972. ConditionalOperatorOr = "OR"
  4973. )
  4974. const (
  4975. // @enum IndexStatus
  4976. IndexStatusCreating = "CREATING"
  4977. // @enum IndexStatus
  4978. IndexStatusUpdating = "UPDATING"
  4979. // @enum IndexStatus
  4980. IndexStatusDeleting = "DELETING"
  4981. // @enum IndexStatus
  4982. IndexStatusActive = "ACTIVE"
  4983. )
  4984. const (
  4985. // @enum KeyType
  4986. KeyTypeHash = "HASH"
  4987. // @enum KeyType
  4988. KeyTypeRange = "RANGE"
  4989. )
  4990. const (
  4991. // @enum ProjectionType
  4992. ProjectionTypeAll = "ALL"
  4993. // @enum ProjectionType
  4994. ProjectionTypeKeysOnly = "KEYS_ONLY"
  4995. // @enum ProjectionType
  4996. ProjectionTypeInclude = "INCLUDE"
  4997. )
  4998. // Determines the level of detail about provisioned throughput consumption that
  4999. // is returned in the response:
  5000. //
  5001. // INDEXES - The response includes the aggregate ConsumedCapacity for the
  5002. // operation, together with ConsumedCapacity for each table and secondary index
  5003. // that was accessed.
  5004. //
  5005. // Note that some operations, such as GetItem and BatchGetItem, do not access
  5006. // any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity
  5007. // information for table(s).
  5008. //
  5009. // TOTAL - The response includes only the aggregate ConsumedCapacity for the
  5010. // operation.
  5011. //
  5012. // NONE - No ConsumedCapacity details are included in the response.
  5013. const (
  5014. // @enum ReturnConsumedCapacity
  5015. ReturnConsumedCapacityIndexes = "INDEXES"
  5016. // @enum ReturnConsumedCapacity
  5017. ReturnConsumedCapacityTotal = "TOTAL"
  5018. // @enum ReturnConsumedCapacity
  5019. ReturnConsumedCapacityNone = "NONE"
  5020. )
  5021. const (
  5022. // @enum ReturnItemCollectionMetrics
  5023. ReturnItemCollectionMetricsSize = "SIZE"
  5024. // @enum ReturnItemCollectionMetrics
  5025. ReturnItemCollectionMetricsNone = "NONE"
  5026. )
  5027. const (
  5028. // @enum ReturnValue
  5029. ReturnValueNone = "NONE"
  5030. // @enum ReturnValue
  5031. ReturnValueAllOld = "ALL_OLD"
  5032. // @enum ReturnValue
  5033. ReturnValueUpdatedOld = "UPDATED_OLD"
  5034. // @enum ReturnValue
  5035. ReturnValueAllNew = "ALL_NEW"
  5036. // @enum ReturnValue
  5037. ReturnValueUpdatedNew = "UPDATED_NEW"
  5038. )
  5039. const (
  5040. // @enum ScalarAttributeType
  5041. ScalarAttributeTypeS = "S"
  5042. // @enum ScalarAttributeType
  5043. ScalarAttributeTypeN = "N"
  5044. // @enum ScalarAttributeType
  5045. ScalarAttributeTypeB = "B"
  5046. )
  5047. const (
  5048. // @enum Select
  5049. SelectAllAttributes = "ALL_ATTRIBUTES"
  5050. // @enum Select
  5051. SelectAllProjectedAttributes = "ALL_PROJECTED_ATTRIBUTES"
  5052. // @enum Select
  5053. SelectSpecificAttributes = "SPECIFIC_ATTRIBUTES"
  5054. // @enum Select
  5055. SelectCount = "COUNT"
  5056. )
  5057. const (
  5058. // @enum StreamViewType
  5059. StreamViewTypeNewImage = "NEW_IMAGE"
  5060. // @enum StreamViewType
  5061. StreamViewTypeOldImage = "OLD_IMAGE"
  5062. // @enum StreamViewType
  5063. StreamViewTypeNewAndOldImages = "NEW_AND_OLD_IMAGES"
  5064. // @enum StreamViewType
  5065. StreamViewTypeKeysOnly = "KEYS_ONLY"
  5066. )
  5067. const (
  5068. // @enum TableStatus
  5069. TableStatusCreating = "CREATING"
  5070. // @enum TableStatus
  5071. TableStatusUpdating = "UPDATING"
  5072. // @enum TableStatus
  5073. TableStatusDeleting = "DELETING"
  5074. // @enum TableStatus
  5075. TableStatusActive = "ACTIVE"
  5076. )