api.go 100 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cognitosync provides a client for Amazon Cognito Sync.
  3. package cognitosync
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/restjson"
  11. )
  12. const opBulkPublish = "BulkPublish"
  13. // BulkPublishRequest generates a "aws/request.Request" representing the
  14. // client's request for the BulkPublish operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // See BulkPublish for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the BulkPublish method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the BulkPublishRequest method.
  30. // req, resp := client.BulkPublishRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *CognitoSync) BulkPublishRequest(input *BulkPublishInput) (req *request.Request, output *BulkPublishOutput) {
  38. op := &request.Operation{
  39. Name: opBulkPublish,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/identitypools/{IdentityPoolId}/bulkpublish",
  42. }
  43. if input == nil {
  44. input = &BulkPublishInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. output = &BulkPublishOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // BulkPublish API operation for Amazon Cognito Sync.
  52. //
  53. // Initiates a bulk publish of all existing datasets for an Identity Pool to
  54. // the configured stream. Customers are limited to one successful bulk publish
  55. // per 24 hours. Bulk publish is an asynchronous request, customers can see
  56. // the status of the request via the GetBulkPublishDetails operation.
  57. //
  58. // This API can only be called with developer credentials. You cannot call this
  59. // API with the temporary user credentials provided by Cognito Identity.
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for Amazon Cognito Sync's
  66. // API operation BulkPublish for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * NotAuthorizedException
  70. // Thrown when a user is not authorized to access the requested resource.
  71. //
  72. // * InvalidParameterException
  73. // Thrown when a request parameter does not comply with the associated constraints.
  74. //
  75. // * ResourceNotFoundException
  76. // Thrown if the resource doesn't exist.
  77. //
  78. // * InternalErrorException
  79. // Indicates an internal service error.
  80. //
  81. // * DuplicateRequestException
  82. // An exception thrown when there is an IN_PROGRESS bulk publish operation for
  83. // the given identity pool.
  84. //
  85. // * AlreadyStreamedException
  86. // An exception thrown when a bulk publish operation is requested less than
  87. // 24 hours after a previous bulk publish operation completed successfully.
  88. //
  89. func (c *CognitoSync) BulkPublish(input *BulkPublishInput) (*BulkPublishOutput, error) {
  90. req, out := c.BulkPublishRequest(input)
  91. err := req.Send()
  92. return out, err
  93. }
  94. const opDeleteDataset = "DeleteDataset"
  95. // DeleteDatasetRequest generates a "aws/request.Request" representing the
  96. // client's request for the DeleteDataset operation. The "output" return
  97. // value can be used to capture response data after the request's "Send" method
  98. // is called.
  99. //
  100. // See DeleteDataset for usage and error information.
  101. //
  102. // Creating a request object using this method should be used when you want to inject
  103. // custom logic into the request's lifecycle using a custom handler, or if you want to
  104. // access properties on the request object before or after sending the request. If
  105. // you just want the service response, call the DeleteDataset method directly
  106. // instead.
  107. //
  108. // Note: You must call the "Send" method on the returned request object in order
  109. // to execute the request.
  110. //
  111. // // Example sending a request using the DeleteDatasetRequest method.
  112. // req, resp := client.DeleteDatasetRequest(params)
  113. //
  114. // err := req.Send()
  115. // if err == nil { // resp is now filled
  116. // fmt.Println(resp)
  117. // }
  118. //
  119. func (c *CognitoSync) DeleteDatasetRequest(input *DeleteDatasetInput) (req *request.Request, output *DeleteDatasetOutput) {
  120. op := &request.Operation{
  121. Name: opDeleteDataset,
  122. HTTPMethod: "DELETE",
  123. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  124. }
  125. if input == nil {
  126. input = &DeleteDatasetInput{}
  127. }
  128. req = c.newRequest(op, input, output)
  129. output = &DeleteDatasetOutput{}
  130. req.Data = output
  131. return
  132. }
  133. // DeleteDataset API operation for Amazon Cognito Sync.
  134. //
  135. // Deletes the specific dataset. The dataset will be deleted permanently, and
  136. // the action can't be undone. Datasets that this dataset was merged with will
  137. // no longer report the merge. Any subsequent operation on this dataset will
  138. // result in a ResourceNotFoundException.
  139. //
  140. // This API can be called with temporary user credentials provided by Cognito
  141. // Identity or with developer credentials.
  142. //
  143. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  144. // with awserr.Error's Code and Message methods to get detailed information about
  145. // the error.
  146. //
  147. // See the AWS API reference guide for Amazon Cognito Sync's
  148. // API operation DeleteDataset for usage and error information.
  149. //
  150. // Returned Error Codes:
  151. // * NotAuthorizedException
  152. // Thrown when a user is not authorized to access the requested resource.
  153. //
  154. // * InvalidParameterException
  155. // Thrown when a request parameter does not comply with the associated constraints.
  156. //
  157. // * ResourceNotFoundException
  158. // Thrown if the resource doesn't exist.
  159. //
  160. // * InternalErrorException
  161. // Indicates an internal service error.
  162. //
  163. // * TooManyRequestsException
  164. // Thrown if the request is throttled.
  165. //
  166. // * ResourceConflictException
  167. // Thrown if an update can't be applied because the resource was changed by
  168. // another call and this would result in a conflict.
  169. //
  170. func (c *CognitoSync) DeleteDataset(input *DeleteDatasetInput) (*DeleteDatasetOutput, error) {
  171. req, out := c.DeleteDatasetRequest(input)
  172. err := req.Send()
  173. return out, err
  174. }
  175. const opDescribeDataset = "DescribeDataset"
  176. // DescribeDatasetRequest generates a "aws/request.Request" representing the
  177. // client's request for the DescribeDataset operation. The "output" return
  178. // value can be used to capture response data after the request's "Send" method
  179. // is called.
  180. //
  181. // See DescribeDataset for usage and error information.
  182. //
  183. // Creating a request object using this method should be used when you want to inject
  184. // custom logic into the request's lifecycle using a custom handler, or if you want to
  185. // access properties on the request object before or after sending the request. If
  186. // you just want the service response, call the DescribeDataset method directly
  187. // instead.
  188. //
  189. // Note: You must call the "Send" method on the returned request object in order
  190. // to execute the request.
  191. //
  192. // // Example sending a request using the DescribeDatasetRequest method.
  193. // req, resp := client.DescribeDatasetRequest(params)
  194. //
  195. // err := req.Send()
  196. // if err == nil { // resp is now filled
  197. // fmt.Println(resp)
  198. // }
  199. //
  200. func (c *CognitoSync) DescribeDatasetRequest(input *DescribeDatasetInput) (req *request.Request, output *DescribeDatasetOutput) {
  201. op := &request.Operation{
  202. Name: opDescribeDataset,
  203. HTTPMethod: "GET",
  204. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  205. }
  206. if input == nil {
  207. input = &DescribeDatasetInput{}
  208. }
  209. req = c.newRequest(op, input, output)
  210. output = &DescribeDatasetOutput{}
  211. req.Data = output
  212. return
  213. }
  214. // DescribeDataset API operation for Amazon Cognito Sync.
  215. //
  216. // Gets meta data about a dataset by identity and dataset name. With Amazon
  217. // Cognito Sync, each identity has access only to its own data. Thus, the credentials
  218. // used to make this API call need to have access to the identity data.
  219. //
  220. // This API can be called with temporary user credentials provided by Cognito
  221. // Identity or with developer credentials. You should use Cognito Identity credentials
  222. // to make this API call.
  223. //
  224. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  225. // with awserr.Error's Code and Message methods to get detailed information about
  226. // the error.
  227. //
  228. // See the AWS API reference guide for Amazon Cognito Sync's
  229. // API operation DescribeDataset for usage and error information.
  230. //
  231. // Returned Error Codes:
  232. // * NotAuthorizedException
  233. // Thrown when a user is not authorized to access the requested resource.
  234. //
  235. // * InvalidParameterException
  236. // Thrown when a request parameter does not comply with the associated constraints.
  237. //
  238. // * ResourceNotFoundException
  239. // Thrown if the resource doesn't exist.
  240. //
  241. // * InternalErrorException
  242. // Indicates an internal service error.
  243. //
  244. // * TooManyRequestsException
  245. // Thrown if the request is throttled.
  246. //
  247. func (c *CognitoSync) DescribeDataset(input *DescribeDatasetInput) (*DescribeDatasetOutput, error) {
  248. req, out := c.DescribeDatasetRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. const opDescribeIdentityPoolUsage = "DescribeIdentityPoolUsage"
  253. // DescribeIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  254. // client's request for the DescribeIdentityPoolUsage operation. The "output" return
  255. // value can be used to capture response data after the request's "Send" method
  256. // is called.
  257. //
  258. // See DescribeIdentityPoolUsage for usage and error information.
  259. //
  260. // Creating a request object using this method should be used when you want to inject
  261. // custom logic into the request's lifecycle using a custom handler, or if you want to
  262. // access properties on the request object before or after sending the request. If
  263. // you just want the service response, call the DescribeIdentityPoolUsage method directly
  264. // instead.
  265. //
  266. // Note: You must call the "Send" method on the returned request object in order
  267. // to execute the request.
  268. //
  269. // // Example sending a request using the DescribeIdentityPoolUsageRequest method.
  270. // req, resp := client.DescribeIdentityPoolUsageRequest(params)
  271. //
  272. // err := req.Send()
  273. // if err == nil { // resp is now filled
  274. // fmt.Println(resp)
  275. // }
  276. //
  277. func (c *CognitoSync) DescribeIdentityPoolUsageRequest(input *DescribeIdentityPoolUsageInput) (req *request.Request, output *DescribeIdentityPoolUsageOutput) {
  278. op := &request.Operation{
  279. Name: opDescribeIdentityPoolUsage,
  280. HTTPMethod: "GET",
  281. HTTPPath: "/identitypools/{IdentityPoolId}",
  282. }
  283. if input == nil {
  284. input = &DescribeIdentityPoolUsageInput{}
  285. }
  286. req = c.newRequest(op, input, output)
  287. output = &DescribeIdentityPoolUsageOutput{}
  288. req.Data = output
  289. return
  290. }
  291. // DescribeIdentityPoolUsage API operation for Amazon Cognito Sync.
  292. //
  293. // Gets usage details (for example, data storage) about a particular identity
  294. // pool.
  295. //
  296. // This API can only be called with developer credentials. You cannot call this
  297. // API with the temporary user credentials provided by Cognito Identity.
  298. //
  299. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  300. // with awserr.Error's Code and Message methods to get detailed information about
  301. // the error.
  302. //
  303. // See the AWS API reference guide for Amazon Cognito Sync's
  304. // API operation DescribeIdentityPoolUsage for usage and error information.
  305. //
  306. // Returned Error Codes:
  307. // * NotAuthorizedException
  308. // Thrown when a user is not authorized to access the requested resource.
  309. //
  310. // * InvalidParameterException
  311. // Thrown when a request parameter does not comply with the associated constraints.
  312. //
  313. // * ResourceNotFoundException
  314. // Thrown if the resource doesn't exist.
  315. //
  316. // * InternalErrorException
  317. // Indicates an internal service error.
  318. //
  319. // * TooManyRequestsException
  320. // Thrown if the request is throttled.
  321. //
  322. func (c *CognitoSync) DescribeIdentityPoolUsage(input *DescribeIdentityPoolUsageInput) (*DescribeIdentityPoolUsageOutput, error) {
  323. req, out := c.DescribeIdentityPoolUsageRequest(input)
  324. err := req.Send()
  325. return out, err
  326. }
  327. const opDescribeIdentityUsage = "DescribeIdentityUsage"
  328. // DescribeIdentityUsageRequest generates a "aws/request.Request" representing the
  329. // client's request for the DescribeIdentityUsage operation. The "output" return
  330. // value can be used to capture response data after the request's "Send" method
  331. // is called.
  332. //
  333. // See DescribeIdentityUsage for usage and error information.
  334. //
  335. // Creating a request object using this method should be used when you want to inject
  336. // custom logic into the request's lifecycle using a custom handler, or if you want to
  337. // access properties on the request object before or after sending the request. If
  338. // you just want the service response, call the DescribeIdentityUsage method directly
  339. // instead.
  340. //
  341. // Note: You must call the "Send" method on the returned request object in order
  342. // to execute the request.
  343. //
  344. // // Example sending a request using the DescribeIdentityUsageRequest method.
  345. // req, resp := client.DescribeIdentityUsageRequest(params)
  346. //
  347. // err := req.Send()
  348. // if err == nil { // resp is now filled
  349. // fmt.Println(resp)
  350. // }
  351. //
  352. func (c *CognitoSync) DescribeIdentityUsageRequest(input *DescribeIdentityUsageInput) (req *request.Request, output *DescribeIdentityUsageOutput) {
  353. op := &request.Operation{
  354. Name: opDescribeIdentityUsage,
  355. HTTPMethod: "GET",
  356. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}",
  357. }
  358. if input == nil {
  359. input = &DescribeIdentityUsageInput{}
  360. }
  361. req = c.newRequest(op, input, output)
  362. output = &DescribeIdentityUsageOutput{}
  363. req.Data = output
  364. return
  365. }
  366. // DescribeIdentityUsage API operation for Amazon Cognito Sync.
  367. //
  368. // Gets usage information for an identity, including number of datasets and
  369. // data usage.
  370. //
  371. // This API can be called with temporary user credentials provided by Cognito
  372. // Identity or with developer credentials.
  373. //
  374. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  375. // with awserr.Error's Code and Message methods to get detailed information about
  376. // the error.
  377. //
  378. // See the AWS API reference guide for Amazon Cognito Sync's
  379. // API operation DescribeIdentityUsage for usage and error information.
  380. //
  381. // Returned Error Codes:
  382. // * NotAuthorizedException
  383. // Thrown when a user is not authorized to access the requested resource.
  384. //
  385. // * InvalidParameterException
  386. // Thrown when a request parameter does not comply with the associated constraints.
  387. //
  388. // * ResourceNotFoundException
  389. // Thrown if the resource doesn't exist.
  390. //
  391. // * InternalErrorException
  392. // Indicates an internal service error.
  393. //
  394. // * TooManyRequestsException
  395. // Thrown if the request is throttled.
  396. //
  397. func (c *CognitoSync) DescribeIdentityUsage(input *DescribeIdentityUsageInput) (*DescribeIdentityUsageOutput, error) {
  398. req, out := c.DescribeIdentityUsageRequest(input)
  399. err := req.Send()
  400. return out, err
  401. }
  402. const opGetBulkPublishDetails = "GetBulkPublishDetails"
  403. // GetBulkPublishDetailsRequest generates a "aws/request.Request" representing the
  404. // client's request for the GetBulkPublishDetails operation. The "output" return
  405. // value can be used to capture response data after the request's "Send" method
  406. // is called.
  407. //
  408. // See GetBulkPublishDetails for usage and error information.
  409. //
  410. // Creating a request object using this method should be used when you want to inject
  411. // custom logic into the request's lifecycle using a custom handler, or if you want to
  412. // access properties on the request object before or after sending the request. If
  413. // you just want the service response, call the GetBulkPublishDetails method directly
  414. // instead.
  415. //
  416. // Note: You must call the "Send" method on the returned request object in order
  417. // to execute the request.
  418. //
  419. // // Example sending a request using the GetBulkPublishDetailsRequest method.
  420. // req, resp := client.GetBulkPublishDetailsRequest(params)
  421. //
  422. // err := req.Send()
  423. // if err == nil { // resp is now filled
  424. // fmt.Println(resp)
  425. // }
  426. //
  427. func (c *CognitoSync) GetBulkPublishDetailsRequest(input *GetBulkPublishDetailsInput) (req *request.Request, output *GetBulkPublishDetailsOutput) {
  428. op := &request.Operation{
  429. Name: opGetBulkPublishDetails,
  430. HTTPMethod: "POST",
  431. HTTPPath: "/identitypools/{IdentityPoolId}/getBulkPublishDetails",
  432. }
  433. if input == nil {
  434. input = &GetBulkPublishDetailsInput{}
  435. }
  436. req = c.newRequest(op, input, output)
  437. output = &GetBulkPublishDetailsOutput{}
  438. req.Data = output
  439. return
  440. }
  441. // GetBulkPublishDetails API operation for Amazon Cognito Sync.
  442. //
  443. // Get the status of the last BulkPublish operation for an identity pool.
  444. //
  445. // This API can only be called with developer credentials. You cannot call this
  446. // API with the temporary user credentials provided by Cognito Identity.
  447. //
  448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  449. // with awserr.Error's Code and Message methods to get detailed information about
  450. // the error.
  451. //
  452. // See the AWS API reference guide for Amazon Cognito Sync's
  453. // API operation GetBulkPublishDetails for usage and error information.
  454. //
  455. // Returned Error Codes:
  456. // * NotAuthorizedException
  457. // Thrown when a user is not authorized to access the requested resource.
  458. //
  459. // * InvalidParameterException
  460. // Thrown when a request parameter does not comply with the associated constraints.
  461. //
  462. // * ResourceNotFoundException
  463. // Thrown if the resource doesn't exist.
  464. //
  465. // * InternalErrorException
  466. // Indicates an internal service error.
  467. //
  468. func (c *CognitoSync) GetBulkPublishDetails(input *GetBulkPublishDetailsInput) (*GetBulkPublishDetailsOutput, error) {
  469. req, out := c.GetBulkPublishDetailsRequest(input)
  470. err := req.Send()
  471. return out, err
  472. }
  473. const opGetCognitoEvents = "GetCognitoEvents"
  474. // GetCognitoEventsRequest generates a "aws/request.Request" representing the
  475. // client's request for the GetCognitoEvents operation. The "output" return
  476. // value can be used to capture response data after the request's "Send" method
  477. // is called.
  478. //
  479. // See GetCognitoEvents for usage and error information.
  480. //
  481. // Creating a request object using this method should be used when you want to inject
  482. // custom logic into the request's lifecycle using a custom handler, or if you want to
  483. // access properties on the request object before or after sending the request. If
  484. // you just want the service response, call the GetCognitoEvents method directly
  485. // instead.
  486. //
  487. // Note: You must call the "Send" method on the returned request object in order
  488. // to execute the request.
  489. //
  490. // // Example sending a request using the GetCognitoEventsRequest method.
  491. // req, resp := client.GetCognitoEventsRequest(params)
  492. //
  493. // err := req.Send()
  494. // if err == nil { // resp is now filled
  495. // fmt.Println(resp)
  496. // }
  497. //
  498. func (c *CognitoSync) GetCognitoEventsRequest(input *GetCognitoEventsInput) (req *request.Request, output *GetCognitoEventsOutput) {
  499. op := &request.Operation{
  500. Name: opGetCognitoEvents,
  501. HTTPMethod: "GET",
  502. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  503. }
  504. if input == nil {
  505. input = &GetCognitoEventsInput{}
  506. }
  507. req = c.newRequest(op, input, output)
  508. output = &GetCognitoEventsOutput{}
  509. req.Data = output
  510. return
  511. }
  512. // GetCognitoEvents API operation for Amazon Cognito Sync.
  513. //
  514. // Gets the events and the corresponding Lambda functions associated with an
  515. // identity pool.
  516. //
  517. // This API can only be called with developer credentials. You cannot call this
  518. // API with the temporary user credentials provided by Cognito Identity.
  519. //
  520. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  521. // with awserr.Error's Code and Message methods to get detailed information about
  522. // the error.
  523. //
  524. // See the AWS API reference guide for Amazon Cognito Sync's
  525. // API operation GetCognitoEvents for usage and error information.
  526. //
  527. // Returned Error Codes:
  528. // * InvalidParameterException
  529. // Thrown when a request parameter does not comply with the associated constraints.
  530. //
  531. // * ResourceNotFoundException
  532. // Thrown if the resource doesn't exist.
  533. //
  534. // * NotAuthorizedException
  535. // Thrown when a user is not authorized to access the requested resource.
  536. //
  537. // * InternalErrorException
  538. // Indicates an internal service error.
  539. //
  540. // * TooManyRequestsException
  541. // Thrown if the request is throttled.
  542. //
  543. func (c *CognitoSync) GetCognitoEvents(input *GetCognitoEventsInput) (*GetCognitoEventsOutput, error) {
  544. req, out := c.GetCognitoEventsRequest(input)
  545. err := req.Send()
  546. return out, err
  547. }
  548. const opGetIdentityPoolConfiguration = "GetIdentityPoolConfiguration"
  549. // GetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  550. // client's request for the GetIdentityPoolConfiguration operation. The "output" return
  551. // value can be used to capture response data after the request's "Send" method
  552. // is called.
  553. //
  554. // See GetIdentityPoolConfiguration for usage and error information.
  555. //
  556. // Creating a request object using this method should be used when you want to inject
  557. // custom logic into the request's lifecycle using a custom handler, or if you want to
  558. // access properties on the request object before or after sending the request. If
  559. // you just want the service response, call the GetIdentityPoolConfiguration method directly
  560. // instead.
  561. //
  562. // Note: You must call the "Send" method on the returned request object in order
  563. // to execute the request.
  564. //
  565. // // Example sending a request using the GetIdentityPoolConfigurationRequest method.
  566. // req, resp := client.GetIdentityPoolConfigurationRequest(params)
  567. //
  568. // err := req.Send()
  569. // if err == nil { // resp is now filled
  570. // fmt.Println(resp)
  571. // }
  572. //
  573. func (c *CognitoSync) GetIdentityPoolConfigurationRequest(input *GetIdentityPoolConfigurationInput) (req *request.Request, output *GetIdentityPoolConfigurationOutput) {
  574. op := &request.Operation{
  575. Name: opGetIdentityPoolConfiguration,
  576. HTTPMethod: "GET",
  577. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  578. }
  579. if input == nil {
  580. input = &GetIdentityPoolConfigurationInput{}
  581. }
  582. req = c.newRequest(op, input, output)
  583. output = &GetIdentityPoolConfigurationOutput{}
  584. req.Data = output
  585. return
  586. }
  587. // GetIdentityPoolConfiguration API operation for Amazon Cognito Sync.
  588. //
  589. // Gets the configuration settings of an identity pool.
  590. //
  591. // This API can only be called with developer credentials. You cannot call this
  592. // API with the temporary user credentials provided by Cognito Identity.
  593. //
  594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  595. // with awserr.Error's Code and Message methods to get detailed information about
  596. // the error.
  597. //
  598. // See the AWS API reference guide for Amazon Cognito Sync's
  599. // API operation GetIdentityPoolConfiguration for usage and error information.
  600. //
  601. // Returned Error Codes:
  602. // * NotAuthorizedException
  603. // Thrown when a user is not authorized to access the requested resource.
  604. //
  605. // * InvalidParameterException
  606. // Thrown when a request parameter does not comply with the associated constraints.
  607. //
  608. // * ResourceNotFoundException
  609. // Thrown if the resource doesn't exist.
  610. //
  611. // * InternalErrorException
  612. // Indicates an internal service error.
  613. //
  614. // * TooManyRequestsException
  615. // Thrown if the request is throttled.
  616. //
  617. func (c *CognitoSync) GetIdentityPoolConfiguration(input *GetIdentityPoolConfigurationInput) (*GetIdentityPoolConfigurationOutput, error) {
  618. req, out := c.GetIdentityPoolConfigurationRequest(input)
  619. err := req.Send()
  620. return out, err
  621. }
  622. const opListDatasets = "ListDatasets"
  623. // ListDatasetsRequest generates a "aws/request.Request" representing the
  624. // client's request for the ListDatasets operation. The "output" return
  625. // value can be used to capture response data after the request's "Send" method
  626. // is called.
  627. //
  628. // See ListDatasets for usage and error information.
  629. //
  630. // Creating a request object using this method should be used when you want to inject
  631. // custom logic into the request's lifecycle using a custom handler, or if you want to
  632. // access properties on the request object before or after sending the request. If
  633. // you just want the service response, call the ListDatasets method directly
  634. // instead.
  635. //
  636. // Note: You must call the "Send" method on the returned request object in order
  637. // to execute the request.
  638. //
  639. // // Example sending a request using the ListDatasetsRequest method.
  640. // req, resp := client.ListDatasetsRequest(params)
  641. //
  642. // err := req.Send()
  643. // if err == nil { // resp is now filled
  644. // fmt.Println(resp)
  645. // }
  646. //
  647. func (c *CognitoSync) ListDatasetsRequest(input *ListDatasetsInput) (req *request.Request, output *ListDatasetsOutput) {
  648. op := &request.Operation{
  649. Name: opListDatasets,
  650. HTTPMethod: "GET",
  651. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets",
  652. }
  653. if input == nil {
  654. input = &ListDatasetsInput{}
  655. }
  656. req = c.newRequest(op, input, output)
  657. output = &ListDatasetsOutput{}
  658. req.Data = output
  659. return
  660. }
  661. // ListDatasets API operation for Amazon Cognito Sync.
  662. //
  663. // Lists datasets for an identity. With Amazon Cognito Sync, each identity has
  664. // access only to its own data. Thus, the credentials used to make this API
  665. // call need to have access to the identity data.
  666. //
  667. // ListDatasets can be called with temporary user credentials provided by Cognito
  668. // Identity or with developer credentials. You should use the Cognito Identity
  669. // credentials to make this API call.
  670. //
  671. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  672. // with awserr.Error's Code and Message methods to get detailed information about
  673. // the error.
  674. //
  675. // See the AWS API reference guide for Amazon Cognito Sync's
  676. // API operation ListDatasets for usage and error information.
  677. //
  678. // Returned Error Codes:
  679. // * NotAuthorizedException
  680. // Thrown when a user is not authorized to access the requested resource.
  681. //
  682. // * InvalidParameterException
  683. // Thrown when a request parameter does not comply with the associated constraints.
  684. //
  685. // * InternalErrorException
  686. // Indicates an internal service error.
  687. //
  688. // * TooManyRequestsException
  689. // Thrown if the request is throttled.
  690. //
  691. func (c *CognitoSync) ListDatasets(input *ListDatasetsInput) (*ListDatasetsOutput, error) {
  692. req, out := c.ListDatasetsRequest(input)
  693. err := req.Send()
  694. return out, err
  695. }
  696. const opListIdentityPoolUsage = "ListIdentityPoolUsage"
  697. // ListIdentityPoolUsageRequest generates a "aws/request.Request" representing the
  698. // client's request for the ListIdentityPoolUsage operation. The "output" return
  699. // value can be used to capture response data after the request's "Send" method
  700. // is called.
  701. //
  702. // See ListIdentityPoolUsage for usage and error information.
  703. //
  704. // Creating a request object using this method should be used when you want to inject
  705. // custom logic into the request's lifecycle using a custom handler, or if you want to
  706. // access properties on the request object before or after sending the request. If
  707. // you just want the service response, call the ListIdentityPoolUsage method directly
  708. // instead.
  709. //
  710. // Note: You must call the "Send" method on the returned request object in order
  711. // to execute the request.
  712. //
  713. // // Example sending a request using the ListIdentityPoolUsageRequest method.
  714. // req, resp := client.ListIdentityPoolUsageRequest(params)
  715. //
  716. // err := req.Send()
  717. // if err == nil { // resp is now filled
  718. // fmt.Println(resp)
  719. // }
  720. //
  721. func (c *CognitoSync) ListIdentityPoolUsageRequest(input *ListIdentityPoolUsageInput) (req *request.Request, output *ListIdentityPoolUsageOutput) {
  722. op := &request.Operation{
  723. Name: opListIdentityPoolUsage,
  724. HTTPMethod: "GET",
  725. HTTPPath: "/identitypools",
  726. }
  727. if input == nil {
  728. input = &ListIdentityPoolUsageInput{}
  729. }
  730. req = c.newRequest(op, input, output)
  731. output = &ListIdentityPoolUsageOutput{}
  732. req.Data = output
  733. return
  734. }
  735. // ListIdentityPoolUsage API operation for Amazon Cognito Sync.
  736. //
  737. // Gets a list of identity pools registered with Cognito.
  738. //
  739. // ListIdentityPoolUsage can only be called with developer credentials. You
  740. // cannot make this API call with the temporary user credentials provided by
  741. // Cognito Identity.
  742. //
  743. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  744. // with awserr.Error's Code and Message methods to get detailed information about
  745. // the error.
  746. //
  747. // See the AWS API reference guide for Amazon Cognito Sync's
  748. // API operation ListIdentityPoolUsage for usage and error information.
  749. //
  750. // Returned Error Codes:
  751. // * NotAuthorizedException
  752. // Thrown when a user is not authorized to access the requested resource.
  753. //
  754. // * InvalidParameterException
  755. // Thrown when a request parameter does not comply with the associated constraints.
  756. //
  757. // * InternalErrorException
  758. // Indicates an internal service error.
  759. //
  760. // * TooManyRequestsException
  761. // Thrown if the request is throttled.
  762. //
  763. func (c *CognitoSync) ListIdentityPoolUsage(input *ListIdentityPoolUsageInput) (*ListIdentityPoolUsageOutput, error) {
  764. req, out := c.ListIdentityPoolUsageRequest(input)
  765. err := req.Send()
  766. return out, err
  767. }
  768. const opListRecords = "ListRecords"
  769. // ListRecordsRequest generates a "aws/request.Request" representing the
  770. // client's request for the ListRecords operation. The "output" return
  771. // value can be used to capture response data after the request's "Send" method
  772. // is called.
  773. //
  774. // See ListRecords for usage and error information.
  775. //
  776. // Creating a request object using this method should be used when you want to inject
  777. // custom logic into the request's lifecycle using a custom handler, or if you want to
  778. // access properties on the request object before or after sending the request. If
  779. // you just want the service response, call the ListRecords method directly
  780. // instead.
  781. //
  782. // Note: You must call the "Send" method on the returned request object in order
  783. // to execute the request.
  784. //
  785. // // Example sending a request using the ListRecordsRequest method.
  786. // req, resp := client.ListRecordsRequest(params)
  787. //
  788. // err := req.Send()
  789. // if err == nil { // resp is now filled
  790. // fmt.Println(resp)
  791. // }
  792. //
  793. func (c *CognitoSync) ListRecordsRequest(input *ListRecordsInput) (req *request.Request, output *ListRecordsOutput) {
  794. op := &request.Operation{
  795. Name: opListRecords,
  796. HTTPMethod: "GET",
  797. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records",
  798. }
  799. if input == nil {
  800. input = &ListRecordsInput{}
  801. }
  802. req = c.newRequest(op, input, output)
  803. output = &ListRecordsOutput{}
  804. req.Data = output
  805. return
  806. }
  807. // ListRecords API operation for Amazon Cognito Sync.
  808. //
  809. // Gets paginated records, optionally changed after a particular sync count
  810. // for a dataset and identity. With Amazon Cognito Sync, each identity has access
  811. // only to its own data. Thus, the credentials used to make this API call need
  812. // to have access to the identity data.
  813. //
  814. // ListRecords can be called with temporary user credentials provided by Cognito
  815. // Identity or with developer credentials. You should use Cognito Identity credentials
  816. // to make this API call.
  817. //
  818. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  819. // with awserr.Error's Code and Message methods to get detailed information about
  820. // the error.
  821. //
  822. // See the AWS API reference guide for Amazon Cognito Sync's
  823. // API operation ListRecords for usage and error information.
  824. //
  825. // Returned Error Codes:
  826. // * InvalidParameterException
  827. // Thrown when a request parameter does not comply with the associated constraints.
  828. //
  829. // * NotAuthorizedException
  830. // Thrown when a user is not authorized to access the requested resource.
  831. //
  832. // * TooManyRequestsException
  833. // Thrown if the request is throttled.
  834. //
  835. // * InternalErrorException
  836. // Indicates an internal service error.
  837. //
  838. func (c *CognitoSync) ListRecords(input *ListRecordsInput) (*ListRecordsOutput, error) {
  839. req, out := c.ListRecordsRequest(input)
  840. err := req.Send()
  841. return out, err
  842. }
  843. const opRegisterDevice = "RegisterDevice"
  844. // RegisterDeviceRequest generates a "aws/request.Request" representing the
  845. // client's request for the RegisterDevice operation. The "output" return
  846. // value can be used to capture response data after the request's "Send" method
  847. // is called.
  848. //
  849. // See RegisterDevice for usage and error information.
  850. //
  851. // Creating a request object using this method should be used when you want to inject
  852. // custom logic into the request's lifecycle using a custom handler, or if you want to
  853. // access properties on the request object before or after sending the request. If
  854. // you just want the service response, call the RegisterDevice method directly
  855. // instead.
  856. //
  857. // Note: You must call the "Send" method on the returned request object in order
  858. // to execute the request.
  859. //
  860. // // Example sending a request using the RegisterDeviceRequest method.
  861. // req, resp := client.RegisterDeviceRequest(params)
  862. //
  863. // err := req.Send()
  864. // if err == nil { // resp is now filled
  865. // fmt.Println(resp)
  866. // }
  867. //
  868. func (c *CognitoSync) RegisterDeviceRequest(input *RegisterDeviceInput) (req *request.Request, output *RegisterDeviceOutput) {
  869. op := &request.Operation{
  870. Name: opRegisterDevice,
  871. HTTPMethod: "POST",
  872. HTTPPath: "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device",
  873. }
  874. if input == nil {
  875. input = &RegisterDeviceInput{}
  876. }
  877. req = c.newRequest(op, input, output)
  878. output = &RegisterDeviceOutput{}
  879. req.Data = output
  880. return
  881. }
  882. // RegisterDevice API operation for Amazon Cognito Sync.
  883. //
  884. // Registers a device to receive push sync notifications.
  885. //
  886. // This API can only be called with temporary credentials provided by Cognito
  887. // Identity. You cannot call this API with developer credentials.
  888. //
  889. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  890. // with awserr.Error's Code and Message methods to get detailed information about
  891. // the error.
  892. //
  893. // See the AWS API reference guide for Amazon Cognito Sync's
  894. // API operation RegisterDevice for usage and error information.
  895. //
  896. // Returned Error Codes:
  897. // * NotAuthorizedException
  898. // Thrown when a user is not authorized to access the requested resource.
  899. //
  900. // * InvalidParameterException
  901. // Thrown when a request parameter does not comply with the associated constraints.
  902. //
  903. // * ResourceNotFoundException
  904. // Thrown if the resource doesn't exist.
  905. //
  906. // * InternalErrorException
  907. // Indicates an internal service error.
  908. //
  909. // * InvalidConfigurationException
  910. //
  911. // * TooManyRequestsException
  912. // Thrown if the request is throttled.
  913. //
  914. func (c *CognitoSync) RegisterDevice(input *RegisterDeviceInput) (*RegisterDeviceOutput, error) {
  915. req, out := c.RegisterDeviceRequest(input)
  916. err := req.Send()
  917. return out, err
  918. }
  919. const opSetCognitoEvents = "SetCognitoEvents"
  920. // SetCognitoEventsRequest generates a "aws/request.Request" representing the
  921. // client's request for the SetCognitoEvents operation. The "output" return
  922. // value can be used to capture response data after the request's "Send" method
  923. // is called.
  924. //
  925. // See SetCognitoEvents for usage and error information.
  926. //
  927. // Creating a request object using this method should be used when you want to inject
  928. // custom logic into the request's lifecycle using a custom handler, or if you want to
  929. // access properties on the request object before or after sending the request. If
  930. // you just want the service response, call the SetCognitoEvents method directly
  931. // instead.
  932. //
  933. // Note: You must call the "Send" method on the returned request object in order
  934. // to execute the request.
  935. //
  936. // // Example sending a request using the SetCognitoEventsRequest method.
  937. // req, resp := client.SetCognitoEventsRequest(params)
  938. //
  939. // err := req.Send()
  940. // if err == nil { // resp is now filled
  941. // fmt.Println(resp)
  942. // }
  943. //
  944. func (c *CognitoSync) SetCognitoEventsRequest(input *SetCognitoEventsInput) (req *request.Request, output *SetCognitoEventsOutput) {
  945. op := &request.Operation{
  946. Name: opSetCognitoEvents,
  947. HTTPMethod: "POST",
  948. HTTPPath: "/identitypools/{IdentityPoolId}/events",
  949. }
  950. if input == nil {
  951. input = &SetCognitoEventsInput{}
  952. }
  953. req = c.newRequest(op, input, output)
  954. req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
  955. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  956. output = &SetCognitoEventsOutput{}
  957. req.Data = output
  958. return
  959. }
  960. // SetCognitoEvents API operation for Amazon Cognito Sync.
  961. //
  962. // Sets the AWS Lambda function for a given event type for an identity pool.
  963. // This request only updates the key/value pair specified. Other key/values
  964. // pairs are not updated. To remove a key value pair, pass a empty value for
  965. // the particular key.
  966. //
  967. // This API can only be called with developer credentials. You cannot call this
  968. // API with the temporary user credentials provided by Cognito Identity.
  969. //
  970. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  971. // with awserr.Error's Code and Message methods to get detailed information about
  972. // the error.
  973. //
  974. // See the AWS API reference guide for Amazon Cognito Sync's
  975. // API operation SetCognitoEvents for usage and error information.
  976. //
  977. // Returned Error Codes:
  978. // * InvalidParameterException
  979. // Thrown when a request parameter does not comply with the associated constraints.
  980. //
  981. // * ResourceNotFoundException
  982. // Thrown if the resource doesn't exist.
  983. //
  984. // * NotAuthorizedException
  985. // Thrown when a user is not authorized to access the requested resource.
  986. //
  987. // * InternalErrorException
  988. // Indicates an internal service error.
  989. //
  990. // * TooManyRequestsException
  991. // Thrown if the request is throttled.
  992. //
  993. func (c *CognitoSync) SetCognitoEvents(input *SetCognitoEventsInput) (*SetCognitoEventsOutput, error) {
  994. req, out := c.SetCognitoEventsRequest(input)
  995. err := req.Send()
  996. return out, err
  997. }
  998. const opSetIdentityPoolConfiguration = "SetIdentityPoolConfiguration"
  999. // SetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the
  1000. // client's request for the SetIdentityPoolConfiguration operation. The "output" return
  1001. // value can be used to capture response data after the request's "Send" method
  1002. // is called.
  1003. //
  1004. // See SetIdentityPoolConfiguration for usage and error information.
  1005. //
  1006. // Creating a request object using this method should be used when you want to inject
  1007. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1008. // access properties on the request object before or after sending the request. If
  1009. // you just want the service response, call the SetIdentityPoolConfiguration method directly
  1010. // instead.
  1011. //
  1012. // Note: You must call the "Send" method on the returned request object in order
  1013. // to execute the request.
  1014. //
  1015. // // Example sending a request using the SetIdentityPoolConfigurationRequest method.
  1016. // req, resp := client.SetIdentityPoolConfigurationRequest(params)
  1017. //
  1018. // err := req.Send()
  1019. // if err == nil { // resp is now filled
  1020. // fmt.Println(resp)
  1021. // }
  1022. //
  1023. func (c *CognitoSync) SetIdentityPoolConfigurationRequest(input *SetIdentityPoolConfigurationInput) (req *request.Request, output *SetIdentityPoolConfigurationOutput) {
  1024. op := &request.Operation{
  1025. Name: opSetIdentityPoolConfiguration,
  1026. HTTPMethod: "POST",
  1027. HTTPPath: "/identitypools/{IdentityPoolId}/configuration",
  1028. }
  1029. if input == nil {
  1030. input = &SetIdentityPoolConfigurationInput{}
  1031. }
  1032. req = c.newRequest(op, input, output)
  1033. output = &SetIdentityPoolConfigurationOutput{}
  1034. req.Data = output
  1035. return
  1036. }
  1037. // SetIdentityPoolConfiguration API operation for Amazon Cognito Sync.
  1038. //
  1039. // Sets the necessary configuration for push sync.
  1040. //
  1041. // This API can only be called with developer credentials. You cannot call this
  1042. // API with the temporary user credentials provided by Cognito Identity.
  1043. //
  1044. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1045. // with awserr.Error's Code and Message methods to get detailed information about
  1046. // the error.
  1047. //
  1048. // See the AWS API reference guide for Amazon Cognito Sync's
  1049. // API operation SetIdentityPoolConfiguration for usage and error information.
  1050. //
  1051. // Returned Error Codes:
  1052. // * NotAuthorizedException
  1053. // Thrown when a user is not authorized to access the requested resource.
  1054. //
  1055. // * InvalidParameterException
  1056. // Thrown when a request parameter does not comply with the associated constraints.
  1057. //
  1058. // * ResourceNotFoundException
  1059. // Thrown if the resource doesn't exist.
  1060. //
  1061. // * InternalErrorException
  1062. // Indicates an internal service error.
  1063. //
  1064. // * TooManyRequestsException
  1065. // Thrown if the request is throttled.
  1066. //
  1067. // * ConcurrentModificationException
  1068. // Thrown if there are parallel requests to modify a resource.
  1069. //
  1070. func (c *CognitoSync) SetIdentityPoolConfiguration(input *SetIdentityPoolConfigurationInput) (*SetIdentityPoolConfigurationOutput, error) {
  1071. req, out := c.SetIdentityPoolConfigurationRequest(input)
  1072. err := req.Send()
  1073. return out, err
  1074. }
  1075. const opSubscribeToDataset = "SubscribeToDataset"
  1076. // SubscribeToDatasetRequest generates a "aws/request.Request" representing the
  1077. // client's request for the SubscribeToDataset operation. The "output" return
  1078. // value can be used to capture response data after the request's "Send" method
  1079. // is called.
  1080. //
  1081. // See SubscribeToDataset for usage and error information.
  1082. //
  1083. // Creating a request object using this method should be used when you want to inject
  1084. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1085. // access properties on the request object before or after sending the request. If
  1086. // you just want the service response, call the SubscribeToDataset method directly
  1087. // instead.
  1088. //
  1089. // Note: You must call the "Send" method on the returned request object in order
  1090. // to execute the request.
  1091. //
  1092. // // Example sending a request using the SubscribeToDatasetRequest method.
  1093. // req, resp := client.SubscribeToDatasetRequest(params)
  1094. //
  1095. // err := req.Send()
  1096. // if err == nil { // resp is now filled
  1097. // fmt.Println(resp)
  1098. // }
  1099. //
  1100. func (c *CognitoSync) SubscribeToDatasetRequest(input *SubscribeToDatasetInput) (req *request.Request, output *SubscribeToDatasetOutput) {
  1101. op := &request.Operation{
  1102. Name: opSubscribeToDataset,
  1103. HTTPMethod: "POST",
  1104. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  1105. }
  1106. if input == nil {
  1107. input = &SubscribeToDatasetInput{}
  1108. }
  1109. req = c.newRequest(op, input, output)
  1110. output = &SubscribeToDatasetOutput{}
  1111. req.Data = output
  1112. return
  1113. }
  1114. // SubscribeToDataset API operation for Amazon Cognito Sync.
  1115. //
  1116. // Subscribes to receive notifications when a dataset is modified by another
  1117. // device.
  1118. //
  1119. // This API can only be called with temporary credentials provided by Cognito
  1120. // Identity. You cannot call this API with developer credentials.
  1121. //
  1122. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1123. // with awserr.Error's Code and Message methods to get detailed information about
  1124. // the error.
  1125. //
  1126. // See the AWS API reference guide for Amazon Cognito Sync's
  1127. // API operation SubscribeToDataset for usage and error information.
  1128. //
  1129. // Returned Error Codes:
  1130. // * NotAuthorizedException
  1131. // Thrown when a user is not authorized to access the requested resource.
  1132. //
  1133. // * InvalidParameterException
  1134. // Thrown when a request parameter does not comply with the associated constraints.
  1135. //
  1136. // * ResourceNotFoundException
  1137. // Thrown if the resource doesn't exist.
  1138. //
  1139. // * InternalErrorException
  1140. // Indicates an internal service error.
  1141. //
  1142. // * InvalidConfigurationException
  1143. //
  1144. // * TooManyRequestsException
  1145. // Thrown if the request is throttled.
  1146. //
  1147. func (c *CognitoSync) SubscribeToDataset(input *SubscribeToDatasetInput) (*SubscribeToDatasetOutput, error) {
  1148. req, out := c.SubscribeToDatasetRequest(input)
  1149. err := req.Send()
  1150. return out, err
  1151. }
  1152. const opUnsubscribeFromDataset = "UnsubscribeFromDataset"
  1153. // UnsubscribeFromDatasetRequest generates a "aws/request.Request" representing the
  1154. // client's request for the UnsubscribeFromDataset operation. The "output" return
  1155. // value can be used to capture response data after the request's "Send" method
  1156. // is called.
  1157. //
  1158. // See UnsubscribeFromDataset for usage and error information.
  1159. //
  1160. // Creating a request object using this method should be used when you want to inject
  1161. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1162. // access properties on the request object before or after sending the request. If
  1163. // you just want the service response, call the UnsubscribeFromDataset method directly
  1164. // instead.
  1165. //
  1166. // Note: You must call the "Send" method on the returned request object in order
  1167. // to execute the request.
  1168. //
  1169. // // Example sending a request using the UnsubscribeFromDatasetRequest method.
  1170. // req, resp := client.UnsubscribeFromDatasetRequest(params)
  1171. //
  1172. // err := req.Send()
  1173. // if err == nil { // resp is now filled
  1174. // fmt.Println(resp)
  1175. // }
  1176. //
  1177. func (c *CognitoSync) UnsubscribeFromDatasetRequest(input *UnsubscribeFromDatasetInput) (req *request.Request, output *UnsubscribeFromDatasetOutput) {
  1178. op := &request.Operation{
  1179. Name: opUnsubscribeFromDataset,
  1180. HTTPMethod: "DELETE",
  1181. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}",
  1182. }
  1183. if input == nil {
  1184. input = &UnsubscribeFromDatasetInput{}
  1185. }
  1186. req = c.newRequest(op, input, output)
  1187. output = &UnsubscribeFromDatasetOutput{}
  1188. req.Data = output
  1189. return
  1190. }
  1191. // UnsubscribeFromDataset API operation for Amazon Cognito Sync.
  1192. //
  1193. // Unsubscribes from receiving notifications when a dataset is modified by another
  1194. // device.
  1195. //
  1196. // This API can only be called with temporary credentials provided by Cognito
  1197. // Identity. You cannot call this API with developer credentials.
  1198. //
  1199. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1200. // with awserr.Error's Code and Message methods to get detailed information about
  1201. // the error.
  1202. //
  1203. // See the AWS API reference guide for Amazon Cognito Sync's
  1204. // API operation UnsubscribeFromDataset for usage and error information.
  1205. //
  1206. // Returned Error Codes:
  1207. // * NotAuthorizedException
  1208. // Thrown when a user is not authorized to access the requested resource.
  1209. //
  1210. // * InvalidParameterException
  1211. // Thrown when a request parameter does not comply with the associated constraints.
  1212. //
  1213. // * ResourceNotFoundException
  1214. // Thrown if the resource doesn't exist.
  1215. //
  1216. // * InternalErrorException
  1217. // Indicates an internal service error.
  1218. //
  1219. // * InvalidConfigurationException
  1220. //
  1221. // * TooManyRequestsException
  1222. // Thrown if the request is throttled.
  1223. //
  1224. func (c *CognitoSync) UnsubscribeFromDataset(input *UnsubscribeFromDatasetInput) (*UnsubscribeFromDatasetOutput, error) {
  1225. req, out := c.UnsubscribeFromDatasetRequest(input)
  1226. err := req.Send()
  1227. return out, err
  1228. }
  1229. const opUpdateRecords = "UpdateRecords"
  1230. // UpdateRecordsRequest generates a "aws/request.Request" representing the
  1231. // client's request for the UpdateRecords operation. The "output" return
  1232. // value can be used to capture response data after the request's "Send" method
  1233. // is called.
  1234. //
  1235. // See UpdateRecords for usage and error information.
  1236. //
  1237. // Creating a request object using this method should be used when you want to inject
  1238. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1239. // access properties on the request object before or after sending the request. If
  1240. // you just want the service response, call the UpdateRecords method directly
  1241. // instead.
  1242. //
  1243. // Note: You must call the "Send" method on the returned request object in order
  1244. // to execute the request.
  1245. //
  1246. // // Example sending a request using the UpdateRecordsRequest method.
  1247. // req, resp := client.UpdateRecordsRequest(params)
  1248. //
  1249. // err := req.Send()
  1250. // if err == nil { // resp is now filled
  1251. // fmt.Println(resp)
  1252. // }
  1253. //
  1254. func (c *CognitoSync) UpdateRecordsRequest(input *UpdateRecordsInput) (req *request.Request, output *UpdateRecordsOutput) {
  1255. op := &request.Operation{
  1256. Name: opUpdateRecords,
  1257. HTTPMethod: "POST",
  1258. HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}",
  1259. }
  1260. if input == nil {
  1261. input = &UpdateRecordsInput{}
  1262. }
  1263. req = c.newRequest(op, input, output)
  1264. output = &UpdateRecordsOutput{}
  1265. req.Data = output
  1266. return
  1267. }
  1268. // UpdateRecords API operation for Amazon Cognito Sync.
  1269. //
  1270. // Posts updates to records and adds and deletes records for a dataset and user.
  1271. //
  1272. // The sync count in the record patch is your last known sync count for that
  1273. // record. The server will reject an UpdateRecords request with a ResourceConflictException
  1274. // if you try to patch a record with a new value but a stale sync count.
  1275. //
  1276. // For example, if the sync count on the server is 5 for a key called highScore
  1277. // and you try and submit a new highScore with sync count of 4, the request
  1278. // will be rejected. To obtain the current sync count for a record, call ListRecords.
  1279. // On a successful update of the record, the response returns the new sync count
  1280. // for that record. You should present that sync count the next time you try
  1281. // to update that same record. When the record does not exist, specify the sync
  1282. // count as 0.
  1283. //
  1284. // This API can be called with temporary user credentials provided by Cognito
  1285. // Identity or with developer credentials.
  1286. //
  1287. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1288. // with awserr.Error's Code and Message methods to get detailed information about
  1289. // the error.
  1290. //
  1291. // See the AWS API reference guide for Amazon Cognito Sync's
  1292. // API operation UpdateRecords for usage and error information.
  1293. //
  1294. // Returned Error Codes:
  1295. // * InvalidParameterException
  1296. // Thrown when a request parameter does not comply with the associated constraints.
  1297. //
  1298. // * LimitExceededException
  1299. // Thrown when the limit on the number of objects or operations has been exceeded.
  1300. //
  1301. // * NotAuthorizedException
  1302. // Thrown when a user is not authorized to access the requested resource.
  1303. //
  1304. // * ResourceNotFoundException
  1305. // Thrown if the resource doesn't exist.
  1306. //
  1307. // * ResourceConflictException
  1308. // Thrown if an update can't be applied because the resource was changed by
  1309. // another call and this would result in a conflict.
  1310. //
  1311. // * InvalidLambdaFunctionOutputException
  1312. // The AWS Lambda function returned invalid output or an exception.
  1313. //
  1314. // * LambdaThrottledException
  1315. // AWS Lambda throttled your account, please contact AWS Support
  1316. //
  1317. // * TooManyRequestsException
  1318. // Thrown if the request is throttled.
  1319. //
  1320. // * InternalErrorException
  1321. // Indicates an internal service error.
  1322. //
  1323. func (c *CognitoSync) UpdateRecords(input *UpdateRecordsInput) (*UpdateRecordsOutput, error) {
  1324. req, out := c.UpdateRecordsRequest(input)
  1325. err := req.Send()
  1326. return out, err
  1327. }
  1328. // The input for the BulkPublish operation.
  1329. type BulkPublishInput struct {
  1330. _ struct{} `type:"structure"`
  1331. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1332. // created by Amazon Cognito. GUID generation is unique within a region.
  1333. //
  1334. // IdentityPoolId is a required field
  1335. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1336. }
  1337. // String returns the string representation
  1338. func (s BulkPublishInput) String() string {
  1339. return awsutil.Prettify(s)
  1340. }
  1341. // GoString returns the string representation
  1342. func (s BulkPublishInput) GoString() string {
  1343. return s.String()
  1344. }
  1345. // Validate inspects the fields of the type to determine if they are valid.
  1346. func (s *BulkPublishInput) Validate() error {
  1347. invalidParams := request.ErrInvalidParams{Context: "BulkPublishInput"}
  1348. if s.IdentityPoolId == nil {
  1349. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1350. }
  1351. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1352. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1353. }
  1354. if invalidParams.Len() > 0 {
  1355. return invalidParams
  1356. }
  1357. return nil
  1358. }
  1359. // The output for the BulkPublish operation.
  1360. type BulkPublishOutput struct {
  1361. _ struct{} `type:"structure"`
  1362. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1363. // created by Amazon Cognito. GUID generation is unique within a region.
  1364. IdentityPoolId *string `min:"1" type:"string"`
  1365. }
  1366. // String returns the string representation
  1367. func (s BulkPublishOutput) String() string {
  1368. return awsutil.Prettify(s)
  1369. }
  1370. // GoString returns the string representation
  1371. func (s BulkPublishOutput) GoString() string {
  1372. return s.String()
  1373. }
  1374. // Configuration options for configure Cognito streams.
  1375. type CognitoStreams struct {
  1376. _ struct{} `type:"structure"`
  1377. // The ARN of the role Amazon Cognito can assume in order to publish to the
  1378. // stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke
  1379. // PutRecord on your Cognito stream.
  1380. RoleArn *string `min:"20" type:"string"`
  1381. // The name of the Cognito stream to receive updates. This stream must be in
  1382. // the developers account and in the same region as the identity pool.
  1383. StreamName *string `min:"1" type:"string"`
  1384. // Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates
  1385. // to identity pool is enabled.
  1386. //
  1387. // DISABLED - Streaming of updates to identity pool is disabled. Bulk publish
  1388. // will also fail if StreamingStatus is DISABLED.
  1389. StreamingStatus *string `type:"string" enum:"StreamingStatus"`
  1390. }
  1391. // String returns the string representation
  1392. func (s CognitoStreams) String() string {
  1393. return awsutil.Prettify(s)
  1394. }
  1395. // GoString returns the string representation
  1396. func (s CognitoStreams) GoString() string {
  1397. return s.String()
  1398. }
  1399. // Validate inspects the fields of the type to determine if they are valid.
  1400. func (s *CognitoStreams) Validate() error {
  1401. invalidParams := request.ErrInvalidParams{Context: "CognitoStreams"}
  1402. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  1403. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  1404. }
  1405. if s.StreamName != nil && len(*s.StreamName) < 1 {
  1406. invalidParams.Add(request.NewErrParamMinLen("StreamName", 1))
  1407. }
  1408. if invalidParams.Len() > 0 {
  1409. return invalidParams
  1410. }
  1411. return nil
  1412. }
  1413. // A collection of data for an identity pool. An identity pool can have multiple
  1414. // datasets. A dataset is per identity and can be general or associated with
  1415. // a particular entity in an application (like a saved game). Datasets are automatically
  1416. // created if they don't exist. Data is synced by dataset, and a dataset can
  1417. // hold up to 1MB of key-value pairs.
  1418. type Dataset struct {
  1419. _ struct{} `type:"structure"`
  1420. // Date on which the dataset was created.
  1421. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1422. // Total size in bytes of the records in this dataset.
  1423. DataStorage *int64 `type:"long"`
  1424. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1425. // (underscore), '-' (dash), and '.' (dot).
  1426. DatasetName *string `min:"1" type:"string"`
  1427. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1428. // created by Amazon Cognito. GUID generation is unique within a region.
  1429. IdentityId *string `min:"1" type:"string"`
  1430. // The device that made the last change to this dataset.
  1431. LastModifiedBy *string `type:"string"`
  1432. // Date when the dataset was last modified.
  1433. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1434. // Number of records in this dataset.
  1435. NumRecords *int64 `type:"long"`
  1436. }
  1437. // String returns the string representation
  1438. func (s Dataset) String() string {
  1439. return awsutil.Prettify(s)
  1440. }
  1441. // GoString returns the string representation
  1442. func (s Dataset) GoString() string {
  1443. return s.String()
  1444. }
  1445. // A request to delete the specific dataset.
  1446. type DeleteDatasetInput struct {
  1447. _ struct{} `type:"structure"`
  1448. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1449. // (underscore), '-' (dash), and '.' (dot).
  1450. //
  1451. // DatasetName is a required field
  1452. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1453. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1454. // created by Amazon Cognito. GUID generation is unique within a region.
  1455. //
  1456. // IdentityId is a required field
  1457. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1458. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1459. // created by Amazon Cognito. GUID generation is unique within a region.
  1460. //
  1461. // IdentityPoolId is a required field
  1462. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1463. }
  1464. // String returns the string representation
  1465. func (s DeleteDatasetInput) String() string {
  1466. return awsutil.Prettify(s)
  1467. }
  1468. // GoString returns the string representation
  1469. func (s DeleteDatasetInput) GoString() string {
  1470. return s.String()
  1471. }
  1472. // Validate inspects the fields of the type to determine if they are valid.
  1473. func (s *DeleteDatasetInput) Validate() error {
  1474. invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"}
  1475. if s.DatasetName == nil {
  1476. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1477. }
  1478. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1479. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1480. }
  1481. if s.IdentityId == nil {
  1482. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1483. }
  1484. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1485. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1486. }
  1487. if s.IdentityPoolId == nil {
  1488. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1489. }
  1490. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1491. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1492. }
  1493. if invalidParams.Len() > 0 {
  1494. return invalidParams
  1495. }
  1496. return nil
  1497. }
  1498. // Response to a successful DeleteDataset request.
  1499. type DeleteDatasetOutput struct {
  1500. _ struct{} `type:"structure"`
  1501. // A collection of data for an identity pool. An identity pool can have multiple
  1502. // datasets. A dataset is per identity and can be general or associated with
  1503. // a particular entity in an application (like a saved game). Datasets are automatically
  1504. // created if they don't exist. Data is synced by dataset, and a dataset can
  1505. // hold up to 1MB of key-value pairs.
  1506. Dataset *Dataset `type:"structure"`
  1507. }
  1508. // String returns the string representation
  1509. func (s DeleteDatasetOutput) String() string {
  1510. return awsutil.Prettify(s)
  1511. }
  1512. // GoString returns the string representation
  1513. func (s DeleteDatasetOutput) GoString() string {
  1514. return s.String()
  1515. }
  1516. // A request for meta data about a dataset (creation date, number of records,
  1517. // size) by owner and dataset name.
  1518. type DescribeDatasetInput struct {
  1519. _ struct{} `type:"structure"`
  1520. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1521. // (underscore), '-' (dash), and '.' (dot).
  1522. //
  1523. // DatasetName is a required field
  1524. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  1525. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1526. // created by Amazon Cognito. GUID generation is unique within a region.
  1527. //
  1528. // IdentityId is a required field
  1529. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1530. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1531. // created by Amazon Cognito. GUID generation is unique within a region.
  1532. //
  1533. // IdentityPoolId is a required field
  1534. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1535. }
  1536. // String returns the string representation
  1537. func (s DescribeDatasetInput) String() string {
  1538. return awsutil.Prettify(s)
  1539. }
  1540. // GoString returns the string representation
  1541. func (s DescribeDatasetInput) GoString() string {
  1542. return s.String()
  1543. }
  1544. // Validate inspects the fields of the type to determine if they are valid.
  1545. func (s *DescribeDatasetInput) Validate() error {
  1546. invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"}
  1547. if s.DatasetName == nil {
  1548. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  1549. }
  1550. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  1551. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  1552. }
  1553. if s.IdentityId == nil {
  1554. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1555. }
  1556. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1557. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1558. }
  1559. if s.IdentityPoolId == nil {
  1560. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1561. }
  1562. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1563. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1564. }
  1565. if invalidParams.Len() > 0 {
  1566. return invalidParams
  1567. }
  1568. return nil
  1569. }
  1570. // Response to a successful DescribeDataset request.
  1571. type DescribeDatasetOutput struct {
  1572. _ struct{} `type:"structure"`
  1573. // Meta data for a collection of data for an identity. An identity can have
  1574. // multiple datasets. A dataset can be general or associated with a particular
  1575. // entity in an application (like a saved game). Datasets are automatically
  1576. // created if they don't exist. Data is synced by dataset, and a dataset can
  1577. // hold up to 1MB of key-value pairs.
  1578. Dataset *Dataset `type:"structure"`
  1579. }
  1580. // String returns the string representation
  1581. func (s DescribeDatasetOutput) String() string {
  1582. return awsutil.Prettify(s)
  1583. }
  1584. // GoString returns the string representation
  1585. func (s DescribeDatasetOutput) GoString() string {
  1586. return s.String()
  1587. }
  1588. // A request for usage information about the identity pool.
  1589. type DescribeIdentityPoolUsageInput struct {
  1590. _ struct{} `type:"structure"`
  1591. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1592. // created by Amazon Cognito. GUID generation is unique within a region.
  1593. //
  1594. // IdentityPoolId is a required field
  1595. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1596. }
  1597. // String returns the string representation
  1598. func (s DescribeIdentityPoolUsageInput) String() string {
  1599. return awsutil.Prettify(s)
  1600. }
  1601. // GoString returns the string representation
  1602. func (s DescribeIdentityPoolUsageInput) GoString() string {
  1603. return s.String()
  1604. }
  1605. // Validate inspects the fields of the type to determine if they are valid.
  1606. func (s *DescribeIdentityPoolUsageInput) Validate() error {
  1607. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolUsageInput"}
  1608. if s.IdentityPoolId == nil {
  1609. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1610. }
  1611. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1612. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1613. }
  1614. if invalidParams.Len() > 0 {
  1615. return invalidParams
  1616. }
  1617. return nil
  1618. }
  1619. // Response to a successful DescribeIdentityPoolUsage request.
  1620. type DescribeIdentityPoolUsageOutput struct {
  1621. _ struct{} `type:"structure"`
  1622. // Information about the usage of the identity pool.
  1623. IdentityPoolUsage *IdentityPoolUsage `type:"structure"`
  1624. }
  1625. // String returns the string representation
  1626. func (s DescribeIdentityPoolUsageOutput) String() string {
  1627. return awsutil.Prettify(s)
  1628. }
  1629. // GoString returns the string representation
  1630. func (s DescribeIdentityPoolUsageOutput) GoString() string {
  1631. return s.String()
  1632. }
  1633. // A request for information about the usage of an identity pool.
  1634. type DescribeIdentityUsageInput struct {
  1635. _ struct{} `type:"structure"`
  1636. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1637. // created by Amazon Cognito. GUID generation is unique within a region.
  1638. //
  1639. // IdentityId is a required field
  1640. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1641. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1642. // created by Amazon Cognito. GUID generation is unique within a region.
  1643. //
  1644. // IdentityPoolId is a required field
  1645. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1646. }
  1647. // String returns the string representation
  1648. func (s DescribeIdentityUsageInput) String() string {
  1649. return awsutil.Prettify(s)
  1650. }
  1651. // GoString returns the string representation
  1652. func (s DescribeIdentityUsageInput) GoString() string {
  1653. return s.String()
  1654. }
  1655. // Validate inspects the fields of the type to determine if they are valid.
  1656. func (s *DescribeIdentityUsageInput) Validate() error {
  1657. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityUsageInput"}
  1658. if s.IdentityId == nil {
  1659. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1660. }
  1661. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1662. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1663. }
  1664. if s.IdentityPoolId == nil {
  1665. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1666. }
  1667. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1668. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1669. }
  1670. if invalidParams.Len() > 0 {
  1671. return invalidParams
  1672. }
  1673. return nil
  1674. }
  1675. // The response to a successful DescribeIdentityUsage request.
  1676. type DescribeIdentityUsageOutput struct {
  1677. _ struct{} `type:"structure"`
  1678. // Usage information for the identity.
  1679. IdentityUsage *IdentityUsage `type:"structure"`
  1680. }
  1681. // String returns the string representation
  1682. func (s DescribeIdentityUsageOutput) String() string {
  1683. return awsutil.Prettify(s)
  1684. }
  1685. // GoString returns the string representation
  1686. func (s DescribeIdentityUsageOutput) GoString() string {
  1687. return s.String()
  1688. }
  1689. // The input for the GetBulkPublishDetails operation.
  1690. type GetBulkPublishDetailsInput struct {
  1691. _ struct{} `type:"structure"`
  1692. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1693. // created by Amazon Cognito. GUID generation is unique within a region.
  1694. //
  1695. // IdentityPoolId is a required field
  1696. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1697. }
  1698. // String returns the string representation
  1699. func (s GetBulkPublishDetailsInput) String() string {
  1700. return awsutil.Prettify(s)
  1701. }
  1702. // GoString returns the string representation
  1703. func (s GetBulkPublishDetailsInput) GoString() string {
  1704. return s.String()
  1705. }
  1706. // Validate inspects the fields of the type to determine if they are valid.
  1707. func (s *GetBulkPublishDetailsInput) Validate() error {
  1708. invalidParams := request.ErrInvalidParams{Context: "GetBulkPublishDetailsInput"}
  1709. if s.IdentityPoolId == nil {
  1710. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1711. }
  1712. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1713. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1714. }
  1715. if invalidParams.Len() > 0 {
  1716. return invalidParams
  1717. }
  1718. return nil
  1719. }
  1720. // The output for the GetBulkPublishDetails operation.
  1721. type GetBulkPublishDetailsOutput struct {
  1722. _ struct{} `type:"structure"`
  1723. // If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation
  1724. // completed.
  1725. BulkPublishCompleteTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1726. // The date/time at which the last bulk publish was initiated.
  1727. BulkPublishStartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1728. // Status of the last bulk publish operation, valid values are: NOT_STARTED
  1729. // - No bulk publish has been requested for this identity pool
  1730. //
  1731. // IN_PROGRESS - Data is being published to the configured stream
  1732. //
  1733. // SUCCEEDED - All data for the identity pool has been published to the configured
  1734. // stream
  1735. //
  1736. // FAILED - Some portion of the data has failed to publish, check FailureMessage
  1737. // for the cause.
  1738. BulkPublishStatus *string `type:"string" enum:"BulkPublishStatus"`
  1739. // If BulkPublishStatus is FAILED this field will contain the error message
  1740. // that caused the bulk publish to fail.
  1741. FailureMessage *string `type:"string"`
  1742. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1743. // created by Amazon Cognito. GUID generation is unique within a region.
  1744. IdentityPoolId *string `min:"1" type:"string"`
  1745. }
  1746. // String returns the string representation
  1747. func (s GetBulkPublishDetailsOutput) String() string {
  1748. return awsutil.Prettify(s)
  1749. }
  1750. // GoString returns the string representation
  1751. func (s GetBulkPublishDetailsOutput) GoString() string {
  1752. return s.String()
  1753. }
  1754. // A request for a list of the configured Cognito Events
  1755. type GetCognitoEventsInput struct {
  1756. _ struct{} `type:"structure"`
  1757. // The Cognito Identity Pool ID for the request
  1758. //
  1759. // IdentityPoolId is a required field
  1760. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1761. }
  1762. // String returns the string representation
  1763. func (s GetCognitoEventsInput) String() string {
  1764. return awsutil.Prettify(s)
  1765. }
  1766. // GoString returns the string representation
  1767. func (s GetCognitoEventsInput) GoString() string {
  1768. return s.String()
  1769. }
  1770. // Validate inspects the fields of the type to determine if they are valid.
  1771. func (s *GetCognitoEventsInput) Validate() error {
  1772. invalidParams := request.ErrInvalidParams{Context: "GetCognitoEventsInput"}
  1773. if s.IdentityPoolId == nil {
  1774. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1775. }
  1776. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1777. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1778. }
  1779. if invalidParams.Len() > 0 {
  1780. return invalidParams
  1781. }
  1782. return nil
  1783. }
  1784. // The response from the GetCognitoEvents request
  1785. type GetCognitoEventsOutput struct {
  1786. _ struct{} `type:"structure"`
  1787. // The Cognito Events returned from the GetCognitoEvents request
  1788. Events map[string]*string `type:"map"`
  1789. }
  1790. // String returns the string representation
  1791. func (s GetCognitoEventsOutput) String() string {
  1792. return awsutil.Prettify(s)
  1793. }
  1794. // GoString returns the string representation
  1795. func (s GetCognitoEventsOutput) GoString() string {
  1796. return s.String()
  1797. }
  1798. // The input for the GetIdentityPoolConfiguration operation.
  1799. type GetIdentityPoolConfigurationInput struct {
  1800. _ struct{} `type:"structure"`
  1801. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1802. // created by Amazon Cognito. This is the ID of the pool for which to return
  1803. // a configuration.
  1804. //
  1805. // IdentityPoolId is a required field
  1806. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1807. }
  1808. // String returns the string representation
  1809. func (s GetIdentityPoolConfigurationInput) String() string {
  1810. return awsutil.Prettify(s)
  1811. }
  1812. // GoString returns the string representation
  1813. func (s GetIdentityPoolConfigurationInput) GoString() string {
  1814. return s.String()
  1815. }
  1816. // Validate inspects the fields of the type to determine if they are valid.
  1817. func (s *GetIdentityPoolConfigurationInput) Validate() error {
  1818. invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolConfigurationInput"}
  1819. if s.IdentityPoolId == nil {
  1820. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1821. }
  1822. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1823. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1824. }
  1825. if invalidParams.Len() > 0 {
  1826. return invalidParams
  1827. }
  1828. return nil
  1829. }
  1830. // The output for the GetIdentityPoolConfiguration operation.
  1831. type GetIdentityPoolConfigurationOutput struct {
  1832. _ struct{} `type:"structure"`
  1833. // Options to apply to this identity pool for Amazon Cognito streams.
  1834. CognitoStreams *CognitoStreams `type:"structure"`
  1835. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1836. // created by Amazon Cognito.
  1837. IdentityPoolId *string `min:"1" type:"string"`
  1838. // Options to apply to this identity pool for push synchronization.
  1839. PushSync *PushSync `type:"structure"`
  1840. }
  1841. // String returns the string representation
  1842. func (s GetIdentityPoolConfigurationOutput) String() string {
  1843. return awsutil.Prettify(s)
  1844. }
  1845. // GoString returns the string representation
  1846. func (s GetIdentityPoolConfigurationOutput) GoString() string {
  1847. return s.String()
  1848. }
  1849. // Usage information for the identity pool.
  1850. type IdentityPoolUsage struct {
  1851. _ struct{} `type:"structure"`
  1852. // Data storage information for the identity pool.
  1853. DataStorage *int64 `type:"long"`
  1854. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1855. // created by Amazon Cognito. GUID generation is unique within a region.
  1856. IdentityPoolId *string `min:"1" type:"string"`
  1857. // Date on which the identity pool was last modified.
  1858. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1859. // Number of sync sessions for the identity pool.
  1860. SyncSessionsCount *int64 `type:"long"`
  1861. }
  1862. // String returns the string representation
  1863. func (s IdentityPoolUsage) String() string {
  1864. return awsutil.Prettify(s)
  1865. }
  1866. // GoString returns the string representation
  1867. func (s IdentityPoolUsage) GoString() string {
  1868. return s.String()
  1869. }
  1870. // Usage information for the identity.
  1871. type IdentityUsage struct {
  1872. _ struct{} `type:"structure"`
  1873. // Total data storage for this identity.
  1874. DataStorage *int64 `type:"long"`
  1875. // Number of datasets for the identity.
  1876. DatasetCount *int64 `type:"integer"`
  1877. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1878. // created by Amazon Cognito. GUID generation is unique within a region.
  1879. IdentityId *string `min:"1" type:"string"`
  1880. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1881. // created by Amazon Cognito. GUID generation is unique within a region.
  1882. IdentityPoolId *string `min:"1" type:"string"`
  1883. // Date on which the identity was last modified.
  1884. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1885. }
  1886. // String returns the string representation
  1887. func (s IdentityUsage) String() string {
  1888. return awsutil.Prettify(s)
  1889. }
  1890. // GoString returns the string representation
  1891. func (s IdentityUsage) GoString() string {
  1892. return s.String()
  1893. }
  1894. // Request for a list of datasets for an identity.
  1895. type ListDatasetsInput struct {
  1896. _ struct{} `type:"structure"`
  1897. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1898. // created by Amazon Cognito. GUID generation is unique within a region.
  1899. //
  1900. // IdentityId is a required field
  1901. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  1902. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  1903. // created by Amazon Cognito. GUID generation is unique within a region.
  1904. //
  1905. // IdentityPoolId is a required field
  1906. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  1907. // The maximum number of results to be returned.
  1908. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  1909. // A pagination token for obtaining the next page of results.
  1910. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  1911. }
  1912. // String returns the string representation
  1913. func (s ListDatasetsInput) String() string {
  1914. return awsutil.Prettify(s)
  1915. }
  1916. // GoString returns the string representation
  1917. func (s ListDatasetsInput) GoString() string {
  1918. return s.String()
  1919. }
  1920. // Validate inspects the fields of the type to determine if they are valid.
  1921. func (s *ListDatasetsInput) Validate() error {
  1922. invalidParams := request.ErrInvalidParams{Context: "ListDatasetsInput"}
  1923. if s.IdentityId == nil {
  1924. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1925. }
  1926. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1927. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1928. }
  1929. if s.IdentityPoolId == nil {
  1930. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1931. }
  1932. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1933. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1934. }
  1935. if invalidParams.Len() > 0 {
  1936. return invalidParams
  1937. }
  1938. return nil
  1939. }
  1940. // Returned for a successful ListDatasets request.
  1941. type ListDatasetsOutput struct {
  1942. _ struct{} `type:"structure"`
  1943. // Number of datasets returned.
  1944. Count *int64 `type:"integer"`
  1945. // A set of datasets.
  1946. Datasets []*Dataset `type:"list"`
  1947. // A pagination token for obtaining the next page of results.
  1948. NextToken *string `type:"string"`
  1949. }
  1950. // String returns the string representation
  1951. func (s ListDatasetsOutput) String() string {
  1952. return awsutil.Prettify(s)
  1953. }
  1954. // GoString returns the string representation
  1955. func (s ListDatasetsOutput) GoString() string {
  1956. return s.String()
  1957. }
  1958. // A request for usage information on an identity pool.
  1959. type ListIdentityPoolUsageInput struct {
  1960. _ struct{} `type:"structure"`
  1961. // The maximum number of results to be returned.
  1962. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  1963. // A pagination token for obtaining the next page of results.
  1964. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  1965. }
  1966. // String returns the string representation
  1967. func (s ListIdentityPoolUsageInput) String() string {
  1968. return awsutil.Prettify(s)
  1969. }
  1970. // GoString returns the string representation
  1971. func (s ListIdentityPoolUsageInput) GoString() string {
  1972. return s.String()
  1973. }
  1974. // Returned for a successful ListIdentityPoolUsage request.
  1975. type ListIdentityPoolUsageOutput struct {
  1976. _ struct{} `type:"structure"`
  1977. // Total number of identities for the identity pool.
  1978. Count *int64 `type:"integer"`
  1979. // Usage information for the identity pools.
  1980. IdentityPoolUsages []*IdentityPoolUsage `type:"list"`
  1981. // The maximum number of results to be returned.
  1982. MaxResults *int64 `type:"integer"`
  1983. // A pagination token for obtaining the next page of results.
  1984. NextToken *string `type:"string"`
  1985. }
  1986. // String returns the string representation
  1987. func (s ListIdentityPoolUsageOutput) String() string {
  1988. return awsutil.Prettify(s)
  1989. }
  1990. // GoString returns the string representation
  1991. func (s ListIdentityPoolUsageOutput) GoString() string {
  1992. return s.String()
  1993. }
  1994. // A request for a list of records.
  1995. type ListRecordsInput struct {
  1996. _ struct{} `type:"structure"`
  1997. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  1998. // (underscore), '-' (dash), and '.' (dot).
  1999. //
  2000. // DatasetName is a required field
  2001. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  2002. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2003. // created by Amazon Cognito. GUID generation is unique within a region.
  2004. //
  2005. // IdentityId is a required field
  2006. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2007. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2008. // created by Amazon Cognito. GUID generation is unique within a region.
  2009. //
  2010. // IdentityPoolId is a required field
  2011. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2012. // The last server sync count for this record.
  2013. LastSyncCount *int64 `location:"querystring" locationName:"lastSyncCount" type:"long"`
  2014. // The maximum number of results to be returned.
  2015. MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"`
  2016. // A pagination token for obtaining the next page of results.
  2017. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  2018. // A token containing a session ID, identity ID, and expiration.
  2019. SyncSessionToken *string `location:"querystring" locationName:"syncSessionToken" type:"string"`
  2020. }
  2021. // String returns the string representation
  2022. func (s ListRecordsInput) String() string {
  2023. return awsutil.Prettify(s)
  2024. }
  2025. // GoString returns the string representation
  2026. func (s ListRecordsInput) GoString() string {
  2027. return s.String()
  2028. }
  2029. // Validate inspects the fields of the type to determine if they are valid.
  2030. func (s *ListRecordsInput) Validate() error {
  2031. invalidParams := request.ErrInvalidParams{Context: "ListRecordsInput"}
  2032. if s.DatasetName == nil {
  2033. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  2034. }
  2035. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  2036. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  2037. }
  2038. if s.IdentityId == nil {
  2039. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2040. }
  2041. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2042. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2043. }
  2044. if s.IdentityPoolId == nil {
  2045. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2046. }
  2047. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2048. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2049. }
  2050. if invalidParams.Len() > 0 {
  2051. return invalidParams
  2052. }
  2053. return nil
  2054. }
  2055. // Returned for a successful ListRecordsRequest.
  2056. type ListRecordsOutput struct {
  2057. _ struct{} `type:"structure"`
  2058. // Total number of records.
  2059. Count *int64 `type:"integer"`
  2060. // A boolean value specifying whether to delete the dataset locally.
  2061. DatasetDeletedAfterRequestedSyncCount *bool `type:"boolean"`
  2062. // Indicates whether the dataset exists.
  2063. DatasetExists *bool `type:"boolean"`
  2064. // Server sync count for this dataset.
  2065. DatasetSyncCount *int64 `type:"long"`
  2066. // The user/device that made the last change to this record.
  2067. LastModifiedBy *string `type:"string"`
  2068. // Names of merged datasets.
  2069. MergedDatasetNames []*string `type:"list"`
  2070. // A pagination token for obtaining the next page of results.
  2071. NextToken *string `type:"string"`
  2072. // A list of all records.
  2073. Records []*Record `type:"list"`
  2074. // A token containing a session ID, identity ID, and expiration.
  2075. SyncSessionToken *string `type:"string"`
  2076. }
  2077. // String returns the string representation
  2078. func (s ListRecordsOutput) String() string {
  2079. return awsutil.Prettify(s)
  2080. }
  2081. // GoString returns the string representation
  2082. func (s ListRecordsOutput) GoString() string {
  2083. return s.String()
  2084. }
  2085. // Configuration options to be applied to the identity pool.
  2086. type PushSync struct {
  2087. _ struct{} `type:"structure"`
  2088. // List of SNS platform application ARNs that could be used by clients.
  2089. ApplicationArns []*string `type:"list"`
  2090. // A role configured to allow Cognito to call SNS on behalf of the developer.
  2091. RoleArn *string `min:"20" type:"string"`
  2092. }
  2093. // String returns the string representation
  2094. func (s PushSync) String() string {
  2095. return awsutil.Prettify(s)
  2096. }
  2097. // GoString returns the string representation
  2098. func (s PushSync) GoString() string {
  2099. return s.String()
  2100. }
  2101. // Validate inspects the fields of the type to determine if they are valid.
  2102. func (s *PushSync) Validate() error {
  2103. invalidParams := request.ErrInvalidParams{Context: "PushSync"}
  2104. if s.RoleArn != nil && len(*s.RoleArn) < 20 {
  2105. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
  2106. }
  2107. if invalidParams.Len() > 0 {
  2108. return invalidParams
  2109. }
  2110. return nil
  2111. }
  2112. // The basic data structure of a dataset.
  2113. type Record struct {
  2114. _ struct{} `type:"structure"`
  2115. // The last modified date of the client device.
  2116. DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2117. // The key for the record.
  2118. Key *string `min:"1" type:"string"`
  2119. // The user/device that made the last change to this record.
  2120. LastModifiedBy *string `type:"string"`
  2121. // The date on which the record was last modified.
  2122. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2123. // The server sync count for this record.
  2124. SyncCount *int64 `type:"long"`
  2125. // The value for the record.
  2126. Value *string `type:"string"`
  2127. }
  2128. // String returns the string representation
  2129. func (s Record) String() string {
  2130. return awsutil.Prettify(s)
  2131. }
  2132. // GoString returns the string representation
  2133. func (s Record) GoString() string {
  2134. return s.String()
  2135. }
  2136. // An update operation for a record.
  2137. type RecordPatch struct {
  2138. _ struct{} `type:"structure"`
  2139. // The last modified date of the client device.
  2140. DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2141. // The key associated with the record patch.
  2142. //
  2143. // Key is a required field
  2144. Key *string `min:"1" type:"string" required:"true"`
  2145. // An operation, either replace or remove.
  2146. //
  2147. // Op is a required field
  2148. Op *string `type:"string" required:"true" enum:"Operation"`
  2149. // Last known server sync count for this record. Set to 0 if unknown.
  2150. //
  2151. // SyncCount is a required field
  2152. SyncCount *int64 `type:"long" required:"true"`
  2153. // The value associated with the record patch.
  2154. Value *string `type:"string"`
  2155. }
  2156. // String returns the string representation
  2157. func (s RecordPatch) String() string {
  2158. return awsutil.Prettify(s)
  2159. }
  2160. // GoString returns the string representation
  2161. func (s RecordPatch) GoString() string {
  2162. return s.String()
  2163. }
  2164. // Validate inspects the fields of the type to determine if they are valid.
  2165. func (s *RecordPatch) Validate() error {
  2166. invalidParams := request.ErrInvalidParams{Context: "RecordPatch"}
  2167. if s.Key == nil {
  2168. invalidParams.Add(request.NewErrParamRequired("Key"))
  2169. }
  2170. if s.Key != nil && len(*s.Key) < 1 {
  2171. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2172. }
  2173. if s.Op == nil {
  2174. invalidParams.Add(request.NewErrParamRequired("Op"))
  2175. }
  2176. if s.SyncCount == nil {
  2177. invalidParams.Add(request.NewErrParamRequired("SyncCount"))
  2178. }
  2179. if invalidParams.Len() > 0 {
  2180. return invalidParams
  2181. }
  2182. return nil
  2183. }
  2184. // A request to RegisterDevice.
  2185. type RegisterDeviceInput struct {
  2186. _ struct{} `type:"structure"`
  2187. // The unique ID for this identity.
  2188. //
  2189. // IdentityId is a required field
  2190. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2191. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2192. // created by Amazon Cognito. Here, the ID of the pool that the identity belongs
  2193. // to.
  2194. //
  2195. // IdentityPoolId is a required field
  2196. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2197. // The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
  2198. //
  2199. // Platform is a required field
  2200. Platform *string `type:"string" required:"true" enum:"Platform"`
  2201. // The push token.
  2202. //
  2203. // Token is a required field
  2204. Token *string `type:"string" required:"true"`
  2205. }
  2206. // String returns the string representation
  2207. func (s RegisterDeviceInput) String() string {
  2208. return awsutil.Prettify(s)
  2209. }
  2210. // GoString returns the string representation
  2211. func (s RegisterDeviceInput) GoString() string {
  2212. return s.String()
  2213. }
  2214. // Validate inspects the fields of the type to determine if they are valid.
  2215. func (s *RegisterDeviceInput) Validate() error {
  2216. invalidParams := request.ErrInvalidParams{Context: "RegisterDeviceInput"}
  2217. if s.IdentityId == nil {
  2218. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2219. }
  2220. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2221. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2222. }
  2223. if s.IdentityPoolId == nil {
  2224. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2225. }
  2226. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2227. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2228. }
  2229. if s.Platform == nil {
  2230. invalidParams.Add(request.NewErrParamRequired("Platform"))
  2231. }
  2232. if s.Token == nil {
  2233. invalidParams.Add(request.NewErrParamRequired("Token"))
  2234. }
  2235. if invalidParams.Len() > 0 {
  2236. return invalidParams
  2237. }
  2238. return nil
  2239. }
  2240. // Response to a RegisterDevice request.
  2241. type RegisterDeviceOutput struct {
  2242. _ struct{} `type:"structure"`
  2243. // The unique ID generated for this device by Cognito.
  2244. DeviceId *string `min:"1" type:"string"`
  2245. }
  2246. // String returns the string representation
  2247. func (s RegisterDeviceOutput) String() string {
  2248. return awsutil.Prettify(s)
  2249. }
  2250. // GoString returns the string representation
  2251. func (s RegisterDeviceOutput) GoString() string {
  2252. return s.String()
  2253. }
  2254. // A request to configure Cognito Events"
  2255. type SetCognitoEventsInput struct {
  2256. _ struct{} `type:"structure"`
  2257. // The events to configure
  2258. //
  2259. // Events is a required field
  2260. Events map[string]*string `type:"map" required:"true"`
  2261. // The Cognito Identity Pool to use when configuring Cognito Events
  2262. //
  2263. // IdentityPoolId is a required field
  2264. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2265. }
  2266. // String returns the string representation
  2267. func (s SetCognitoEventsInput) String() string {
  2268. return awsutil.Prettify(s)
  2269. }
  2270. // GoString returns the string representation
  2271. func (s SetCognitoEventsInput) GoString() string {
  2272. return s.String()
  2273. }
  2274. // Validate inspects the fields of the type to determine if they are valid.
  2275. func (s *SetCognitoEventsInput) Validate() error {
  2276. invalidParams := request.ErrInvalidParams{Context: "SetCognitoEventsInput"}
  2277. if s.Events == nil {
  2278. invalidParams.Add(request.NewErrParamRequired("Events"))
  2279. }
  2280. if s.IdentityPoolId == nil {
  2281. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2282. }
  2283. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2284. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2285. }
  2286. if invalidParams.Len() > 0 {
  2287. return invalidParams
  2288. }
  2289. return nil
  2290. }
  2291. type SetCognitoEventsOutput struct {
  2292. _ struct{} `type:"structure"`
  2293. }
  2294. // String returns the string representation
  2295. func (s SetCognitoEventsOutput) String() string {
  2296. return awsutil.Prettify(s)
  2297. }
  2298. // GoString returns the string representation
  2299. func (s SetCognitoEventsOutput) GoString() string {
  2300. return s.String()
  2301. }
  2302. // The input for the SetIdentityPoolConfiguration operation.
  2303. type SetIdentityPoolConfigurationInput struct {
  2304. _ struct{} `type:"structure"`
  2305. // Options to apply to this identity pool for Amazon Cognito streams.
  2306. CognitoStreams *CognitoStreams `type:"structure"`
  2307. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2308. // created by Amazon Cognito. This is the ID of the pool to modify.
  2309. //
  2310. // IdentityPoolId is a required field
  2311. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2312. // Options to apply to this identity pool for push synchronization.
  2313. PushSync *PushSync `type:"structure"`
  2314. }
  2315. // String returns the string representation
  2316. func (s SetIdentityPoolConfigurationInput) String() string {
  2317. return awsutil.Prettify(s)
  2318. }
  2319. // GoString returns the string representation
  2320. func (s SetIdentityPoolConfigurationInput) GoString() string {
  2321. return s.String()
  2322. }
  2323. // Validate inspects the fields of the type to determine if they are valid.
  2324. func (s *SetIdentityPoolConfigurationInput) Validate() error {
  2325. invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolConfigurationInput"}
  2326. if s.IdentityPoolId == nil {
  2327. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2328. }
  2329. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2330. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2331. }
  2332. if s.CognitoStreams != nil {
  2333. if err := s.CognitoStreams.Validate(); err != nil {
  2334. invalidParams.AddNested("CognitoStreams", err.(request.ErrInvalidParams))
  2335. }
  2336. }
  2337. if s.PushSync != nil {
  2338. if err := s.PushSync.Validate(); err != nil {
  2339. invalidParams.AddNested("PushSync", err.(request.ErrInvalidParams))
  2340. }
  2341. }
  2342. if invalidParams.Len() > 0 {
  2343. return invalidParams
  2344. }
  2345. return nil
  2346. }
  2347. // The output for the SetIdentityPoolConfiguration operation
  2348. type SetIdentityPoolConfigurationOutput struct {
  2349. _ struct{} `type:"structure"`
  2350. // Options to apply to this identity pool for Amazon Cognito streams.
  2351. CognitoStreams *CognitoStreams `type:"structure"`
  2352. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2353. // created by Amazon Cognito.
  2354. IdentityPoolId *string `min:"1" type:"string"`
  2355. // Options to apply to this identity pool for push synchronization.
  2356. PushSync *PushSync `type:"structure"`
  2357. }
  2358. // String returns the string representation
  2359. func (s SetIdentityPoolConfigurationOutput) String() string {
  2360. return awsutil.Prettify(s)
  2361. }
  2362. // GoString returns the string representation
  2363. func (s SetIdentityPoolConfigurationOutput) GoString() string {
  2364. return s.String()
  2365. }
  2366. // A request to SubscribeToDatasetRequest.
  2367. type SubscribeToDatasetInput struct {
  2368. _ struct{} `type:"structure"`
  2369. // The name of the dataset to subcribe to.
  2370. //
  2371. // DatasetName is a required field
  2372. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  2373. // The unique ID generated for this device by Cognito.
  2374. //
  2375. // DeviceId is a required field
  2376. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  2377. // Unique ID for this identity.
  2378. //
  2379. // IdentityId is a required field
  2380. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2381. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2382. // created by Amazon Cognito. The ID of the pool to which the identity belongs.
  2383. //
  2384. // IdentityPoolId is a required field
  2385. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2386. }
  2387. // String returns the string representation
  2388. func (s SubscribeToDatasetInput) String() string {
  2389. return awsutil.Prettify(s)
  2390. }
  2391. // GoString returns the string representation
  2392. func (s SubscribeToDatasetInput) GoString() string {
  2393. return s.String()
  2394. }
  2395. // Validate inspects the fields of the type to determine if they are valid.
  2396. func (s *SubscribeToDatasetInput) Validate() error {
  2397. invalidParams := request.ErrInvalidParams{Context: "SubscribeToDatasetInput"}
  2398. if s.DatasetName == nil {
  2399. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  2400. }
  2401. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  2402. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  2403. }
  2404. if s.DeviceId == nil {
  2405. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  2406. }
  2407. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2408. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2409. }
  2410. if s.IdentityId == nil {
  2411. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2412. }
  2413. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2414. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2415. }
  2416. if s.IdentityPoolId == nil {
  2417. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2418. }
  2419. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2420. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2421. }
  2422. if invalidParams.Len() > 0 {
  2423. return invalidParams
  2424. }
  2425. return nil
  2426. }
  2427. // Response to a SubscribeToDataset request.
  2428. type SubscribeToDatasetOutput struct {
  2429. _ struct{} `type:"structure"`
  2430. }
  2431. // String returns the string representation
  2432. func (s SubscribeToDatasetOutput) String() string {
  2433. return awsutil.Prettify(s)
  2434. }
  2435. // GoString returns the string representation
  2436. func (s SubscribeToDatasetOutput) GoString() string {
  2437. return s.String()
  2438. }
  2439. // A request to UnsubscribeFromDataset.
  2440. type UnsubscribeFromDatasetInput struct {
  2441. _ struct{} `type:"structure"`
  2442. // The name of the dataset from which to unsubcribe.
  2443. //
  2444. // DatasetName is a required field
  2445. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  2446. // The unique ID generated for this device by Cognito.
  2447. //
  2448. // DeviceId is a required field
  2449. DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"`
  2450. // Unique ID for this identity.
  2451. //
  2452. // IdentityId is a required field
  2453. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2454. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2455. // created by Amazon Cognito. The ID of the pool to which this identity belongs.
  2456. //
  2457. // IdentityPoolId is a required field
  2458. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2459. }
  2460. // String returns the string representation
  2461. func (s UnsubscribeFromDatasetInput) String() string {
  2462. return awsutil.Prettify(s)
  2463. }
  2464. // GoString returns the string representation
  2465. func (s UnsubscribeFromDatasetInput) GoString() string {
  2466. return s.String()
  2467. }
  2468. // Validate inspects the fields of the type to determine if they are valid.
  2469. func (s *UnsubscribeFromDatasetInput) Validate() error {
  2470. invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromDatasetInput"}
  2471. if s.DatasetName == nil {
  2472. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  2473. }
  2474. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  2475. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  2476. }
  2477. if s.DeviceId == nil {
  2478. invalidParams.Add(request.NewErrParamRequired("DeviceId"))
  2479. }
  2480. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2481. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2482. }
  2483. if s.IdentityId == nil {
  2484. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2485. }
  2486. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2487. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2488. }
  2489. if s.IdentityPoolId == nil {
  2490. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2491. }
  2492. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2493. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2494. }
  2495. if invalidParams.Len() > 0 {
  2496. return invalidParams
  2497. }
  2498. return nil
  2499. }
  2500. // Response to an UnsubscribeFromDataset request.
  2501. type UnsubscribeFromDatasetOutput struct {
  2502. _ struct{} `type:"structure"`
  2503. }
  2504. // String returns the string representation
  2505. func (s UnsubscribeFromDatasetOutput) String() string {
  2506. return awsutil.Prettify(s)
  2507. }
  2508. // GoString returns the string representation
  2509. func (s UnsubscribeFromDatasetOutput) GoString() string {
  2510. return s.String()
  2511. }
  2512. // A request to post updates to records or add and delete records for a dataset
  2513. // and user.
  2514. type UpdateRecordsInput struct {
  2515. _ struct{} `type:"structure"`
  2516. // Intended to supply a device ID that will populate the lastModifiedBy field
  2517. // referenced in other methods. The ClientContext field is not yet implemented.
  2518. ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string"`
  2519. // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_'
  2520. // (underscore), '-' (dash), and '.' (dot).
  2521. //
  2522. // DatasetName is a required field
  2523. DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"`
  2524. // The unique ID generated for this device by Cognito.
  2525. DeviceId *string `min:"1" type:"string"`
  2526. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2527. // created by Amazon Cognito. GUID generation is unique within a region.
  2528. //
  2529. // IdentityId is a required field
  2530. IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"`
  2531. // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE)
  2532. // created by Amazon Cognito. GUID generation is unique within a region.
  2533. //
  2534. // IdentityPoolId is a required field
  2535. IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"`
  2536. // A list of patch operations.
  2537. RecordPatches []*RecordPatch `type:"list"`
  2538. // The SyncSessionToken returned by a previous call to ListRecords for this
  2539. // dataset and identity.
  2540. //
  2541. // SyncSessionToken is a required field
  2542. SyncSessionToken *string `type:"string" required:"true"`
  2543. }
  2544. // String returns the string representation
  2545. func (s UpdateRecordsInput) String() string {
  2546. return awsutil.Prettify(s)
  2547. }
  2548. // GoString returns the string representation
  2549. func (s UpdateRecordsInput) GoString() string {
  2550. return s.String()
  2551. }
  2552. // Validate inspects the fields of the type to determine if they are valid.
  2553. func (s *UpdateRecordsInput) Validate() error {
  2554. invalidParams := request.ErrInvalidParams{Context: "UpdateRecordsInput"}
  2555. if s.DatasetName == nil {
  2556. invalidParams.Add(request.NewErrParamRequired("DatasetName"))
  2557. }
  2558. if s.DatasetName != nil && len(*s.DatasetName) < 1 {
  2559. invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1))
  2560. }
  2561. if s.DeviceId != nil && len(*s.DeviceId) < 1 {
  2562. invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1))
  2563. }
  2564. if s.IdentityId == nil {
  2565. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2566. }
  2567. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2568. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2569. }
  2570. if s.IdentityPoolId == nil {
  2571. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2572. }
  2573. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2574. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2575. }
  2576. if s.SyncSessionToken == nil {
  2577. invalidParams.Add(request.NewErrParamRequired("SyncSessionToken"))
  2578. }
  2579. if s.RecordPatches != nil {
  2580. for i, v := range s.RecordPatches {
  2581. if v == nil {
  2582. continue
  2583. }
  2584. if err := v.Validate(); err != nil {
  2585. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordPatches", i), err.(request.ErrInvalidParams))
  2586. }
  2587. }
  2588. }
  2589. if invalidParams.Len() > 0 {
  2590. return invalidParams
  2591. }
  2592. return nil
  2593. }
  2594. // Returned for a successful UpdateRecordsRequest.
  2595. type UpdateRecordsOutput struct {
  2596. _ struct{} `type:"structure"`
  2597. // A list of records that have been updated.
  2598. Records []*Record `type:"list"`
  2599. }
  2600. // String returns the string representation
  2601. func (s UpdateRecordsOutput) String() string {
  2602. return awsutil.Prettify(s)
  2603. }
  2604. // GoString returns the string representation
  2605. func (s UpdateRecordsOutput) GoString() string {
  2606. return s.String()
  2607. }
  2608. const (
  2609. // BulkPublishStatusNotStarted is a BulkPublishStatus enum value
  2610. BulkPublishStatusNotStarted = "NOT_STARTED"
  2611. // BulkPublishStatusInProgress is a BulkPublishStatus enum value
  2612. BulkPublishStatusInProgress = "IN_PROGRESS"
  2613. // BulkPublishStatusFailed is a BulkPublishStatus enum value
  2614. BulkPublishStatusFailed = "FAILED"
  2615. // BulkPublishStatusSucceeded is a BulkPublishStatus enum value
  2616. BulkPublishStatusSucceeded = "SUCCEEDED"
  2617. )
  2618. const (
  2619. // OperationReplace is a Operation enum value
  2620. OperationReplace = "replace"
  2621. // OperationRemove is a Operation enum value
  2622. OperationRemove = "remove"
  2623. )
  2624. const (
  2625. // PlatformApns is a Platform enum value
  2626. PlatformApns = "APNS"
  2627. // PlatformApnsSandbox is a Platform enum value
  2628. PlatformApnsSandbox = "APNS_SANDBOX"
  2629. // PlatformGcm is a Platform enum value
  2630. PlatformGcm = "GCM"
  2631. // PlatformAdm is a Platform enum value
  2632. PlatformAdm = "ADM"
  2633. )
  2634. const (
  2635. // StreamingStatusEnabled is a StreamingStatus enum value
  2636. StreamingStatusEnabled = "ENABLED"
  2637. // StreamingStatusDisabled is a StreamingStatus enum value
  2638. StreamingStatusDisabled = "DISABLED"
  2639. )