api.go 98 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cognitoidentity provides a client for Amazon Cognito Identity.
  3. package cognitoidentity
  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/jsonrpc"
  11. )
  12. const opCreateIdentityPool = "CreateIdentityPool"
  13. // CreateIdentityPoolRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateIdentityPool 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 CreateIdentityPool 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 CreateIdentityPool 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 CreateIdentityPoolRequest method.
  30. // req, resp := client.CreateIdentityPoolRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  38. op := &request.Operation{
  39. Name: opCreateIdentityPool,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateIdentityPoolInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. output = &IdentityPool{}
  48. req.Data = output
  49. return
  50. }
  51. // CreateIdentityPool API operation for Amazon Cognito Identity.
  52. //
  53. // Creates a new identity pool. The identity pool is a store of user identity
  54. // information that is specific to your AWS account. The limit on identity pools
  55. // is 60 per account. The keys for SupportedLoginProviders are as follows: Facebook:
  56. // graph.facebook.com
  57. // Google: accounts.google.com
  58. // Amazon: www.amazon.com
  59. // Twitter: api.twitter.com
  60. // Digits: www.digits.com
  61. // You must use AWS Developer credentials to call this API.
  62. //
  63. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  64. // with awserr.Error's Code and Message methods to get detailed information about
  65. // the error.
  66. //
  67. // See the AWS API reference guide for Amazon Cognito Identity's
  68. // API operation CreateIdentityPool for usage and error information.
  69. //
  70. // Returned Error Codes:
  71. // * InvalidParameterException
  72. // Thrown for missing or bad input parameter(s).
  73. //
  74. // * NotAuthorizedException
  75. // Thrown when a user is not authorized to access the requested resource.
  76. //
  77. // * ResourceConflictException
  78. // Thrown when a user tries to use a login which is already linked to another
  79. // account.
  80. //
  81. // * TooManyRequestsException
  82. // Thrown when a request is throttled.
  83. //
  84. // * InternalErrorException
  85. // Thrown when the service encounters an error during processing the request.
  86. //
  87. // * LimitExceededException
  88. // Thrown when the total number of user pools has exceeded a preset limit.
  89. //
  90. func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) {
  91. req, out := c.CreateIdentityPoolRequest(input)
  92. err := req.Send()
  93. return out, err
  94. }
  95. const opDeleteIdentities = "DeleteIdentities"
  96. // DeleteIdentitiesRequest generates a "aws/request.Request" representing the
  97. // client's request for the DeleteIdentities operation. The "output" return
  98. // value can be used to capture response data after the request's "Send" method
  99. // is called.
  100. //
  101. // See DeleteIdentities for usage and error information.
  102. //
  103. // Creating a request object using this method should be used when you want to inject
  104. // custom logic into the request's lifecycle using a custom handler, or if you want to
  105. // access properties on the request object before or after sending the request. If
  106. // you just want the service response, call the DeleteIdentities method directly
  107. // instead.
  108. //
  109. // Note: You must call the "Send" method on the returned request object in order
  110. // to execute the request.
  111. //
  112. // // Example sending a request using the DeleteIdentitiesRequest method.
  113. // req, resp := client.DeleteIdentitiesRequest(params)
  114. //
  115. // err := req.Send()
  116. // if err == nil { // resp is now filled
  117. // fmt.Println(resp)
  118. // }
  119. //
  120. func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) {
  121. op := &request.Operation{
  122. Name: opDeleteIdentities,
  123. HTTPMethod: "POST",
  124. HTTPPath: "/",
  125. }
  126. if input == nil {
  127. input = &DeleteIdentitiesInput{}
  128. }
  129. req = c.newRequest(op, input, output)
  130. output = &DeleteIdentitiesOutput{}
  131. req.Data = output
  132. return
  133. }
  134. // DeleteIdentities API operation for Amazon Cognito Identity.
  135. //
  136. // Deletes identities from an identity pool. You can specify a list of 1-60
  137. // identities that you want to delete.
  138. //
  139. // You must use AWS Developer credentials to call this API.
  140. //
  141. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  142. // with awserr.Error's Code and Message methods to get detailed information about
  143. // the error.
  144. //
  145. // See the AWS API reference guide for Amazon Cognito Identity's
  146. // API operation DeleteIdentities for usage and error information.
  147. //
  148. // Returned Error Codes:
  149. // * InvalidParameterException
  150. // Thrown for missing or bad input parameter(s).
  151. //
  152. // * TooManyRequestsException
  153. // Thrown when a request is throttled.
  154. //
  155. // * InternalErrorException
  156. // Thrown when the service encounters an error during processing the request.
  157. //
  158. func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) {
  159. req, out := c.DeleteIdentitiesRequest(input)
  160. err := req.Send()
  161. return out, err
  162. }
  163. const opDeleteIdentityPool = "DeleteIdentityPool"
  164. // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the
  165. // client's request for the DeleteIdentityPool operation. The "output" return
  166. // value can be used to capture response data after the request's "Send" method
  167. // is called.
  168. //
  169. // See DeleteIdentityPool for usage and error information.
  170. //
  171. // Creating a request object using this method should be used when you want to inject
  172. // custom logic into the request's lifecycle using a custom handler, or if you want to
  173. // access properties on the request object before or after sending the request. If
  174. // you just want the service response, call the DeleteIdentityPool method directly
  175. // instead.
  176. //
  177. // Note: You must call the "Send" method on the returned request object in order
  178. // to execute the request.
  179. //
  180. // // Example sending a request using the DeleteIdentityPoolRequest method.
  181. // req, resp := client.DeleteIdentityPoolRequest(params)
  182. //
  183. // err := req.Send()
  184. // if err == nil { // resp is now filled
  185. // fmt.Println(resp)
  186. // }
  187. //
  188. func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) {
  189. op := &request.Operation{
  190. Name: opDeleteIdentityPool,
  191. HTTPMethod: "POST",
  192. HTTPPath: "/",
  193. }
  194. if input == nil {
  195. input = &DeleteIdentityPoolInput{}
  196. }
  197. req = c.newRequest(op, input, output)
  198. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  199. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  200. output = &DeleteIdentityPoolOutput{}
  201. req.Data = output
  202. return
  203. }
  204. // DeleteIdentityPool API operation for Amazon Cognito Identity.
  205. //
  206. // Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
  207. // with the pool.
  208. //
  209. // You must use AWS Developer credentials to call this API.
  210. //
  211. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  212. // with awserr.Error's Code and Message methods to get detailed information about
  213. // the error.
  214. //
  215. // See the AWS API reference guide for Amazon Cognito Identity's
  216. // API operation DeleteIdentityPool for usage and error information.
  217. //
  218. // Returned Error Codes:
  219. // * InvalidParameterException
  220. // Thrown for missing or bad input parameter(s).
  221. //
  222. // * ResourceNotFoundException
  223. // Thrown when the requested resource (for example, a dataset or record) does
  224. // not exist.
  225. //
  226. // * NotAuthorizedException
  227. // Thrown when a user is not authorized to access the requested resource.
  228. //
  229. // * TooManyRequestsException
  230. // Thrown when a request is throttled.
  231. //
  232. // * InternalErrorException
  233. // Thrown when the service encounters an error during processing the request.
  234. //
  235. func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) {
  236. req, out := c.DeleteIdentityPoolRequest(input)
  237. err := req.Send()
  238. return out, err
  239. }
  240. const opDescribeIdentity = "DescribeIdentity"
  241. // DescribeIdentityRequest generates a "aws/request.Request" representing the
  242. // client's request for the DescribeIdentity operation. The "output" return
  243. // value can be used to capture response data after the request's "Send" method
  244. // is called.
  245. //
  246. // See DescribeIdentity for usage and error information.
  247. //
  248. // Creating a request object using this method should be used when you want to inject
  249. // custom logic into the request's lifecycle using a custom handler, or if you want to
  250. // access properties on the request object before or after sending the request. If
  251. // you just want the service response, call the DescribeIdentity method directly
  252. // instead.
  253. //
  254. // Note: You must call the "Send" method on the returned request object in order
  255. // to execute the request.
  256. //
  257. // // Example sending a request using the DescribeIdentityRequest method.
  258. // req, resp := client.DescribeIdentityRequest(params)
  259. //
  260. // err := req.Send()
  261. // if err == nil { // resp is now filled
  262. // fmt.Println(resp)
  263. // }
  264. //
  265. func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) {
  266. op := &request.Operation{
  267. Name: opDescribeIdentity,
  268. HTTPMethod: "POST",
  269. HTTPPath: "/",
  270. }
  271. if input == nil {
  272. input = &DescribeIdentityInput{}
  273. }
  274. req = c.newRequest(op, input, output)
  275. output = &IdentityDescription{}
  276. req.Data = output
  277. return
  278. }
  279. // DescribeIdentity API operation for Amazon Cognito Identity.
  280. //
  281. // Returns metadata related to the given identity, including when the identity
  282. // was created and any associated linked logins.
  283. //
  284. // You must use AWS Developer credentials to call this API.
  285. //
  286. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  287. // with awserr.Error's Code and Message methods to get detailed information about
  288. // the error.
  289. //
  290. // See the AWS API reference guide for Amazon Cognito Identity's
  291. // API operation DescribeIdentity for usage and error information.
  292. //
  293. // Returned Error Codes:
  294. // * InvalidParameterException
  295. // Thrown for missing or bad input parameter(s).
  296. //
  297. // * ResourceNotFoundException
  298. // Thrown when the requested resource (for example, a dataset or record) does
  299. // not exist.
  300. //
  301. // * NotAuthorizedException
  302. // Thrown when a user is not authorized to access the requested resource.
  303. //
  304. // * TooManyRequestsException
  305. // Thrown when a request is throttled.
  306. //
  307. // * InternalErrorException
  308. // Thrown when the service encounters an error during processing the request.
  309. //
  310. func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) {
  311. req, out := c.DescribeIdentityRequest(input)
  312. err := req.Send()
  313. return out, err
  314. }
  315. const opDescribeIdentityPool = "DescribeIdentityPool"
  316. // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the
  317. // client's request for the DescribeIdentityPool operation. The "output" return
  318. // value can be used to capture response data after the request's "Send" method
  319. // is called.
  320. //
  321. // See DescribeIdentityPool for usage and error information.
  322. //
  323. // Creating a request object using this method should be used when you want to inject
  324. // custom logic into the request's lifecycle using a custom handler, or if you want to
  325. // access properties on the request object before or after sending the request. If
  326. // you just want the service response, call the DescribeIdentityPool method directly
  327. // instead.
  328. //
  329. // Note: You must call the "Send" method on the returned request object in order
  330. // to execute the request.
  331. //
  332. // // Example sending a request using the DescribeIdentityPoolRequest method.
  333. // req, resp := client.DescribeIdentityPoolRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  341. op := &request.Operation{
  342. Name: opDescribeIdentityPool,
  343. HTTPMethod: "POST",
  344. HTTPPath: "/",
  345. }
  346. if input == nil {
  347. input = &DescribeIdentityPoolInput{}
  348. }
  349. req = c.newRequest(op, input, output)
  350. output = &IdentityPool{}
  351. req.Data = output
  352. return
  353. }
  354. // DescribeIdentityPool API operation for Amazon Cognito Identity.
  355. //
  356. // Gets details about a particular identity pool, including the pool name, ID
  357. // description, creation date, and current number of users.
  358. //
  359. // You must use AWS Developer credentials to call this API.
  360. //
  361. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  362. // with awserr.Error's Code and Message methods to get detailed information about
  363. // the error.
  364. //
  365. // See the AWS API reference guide for Amazon Cognito Identity's
  366. // API operation DescribeIdentityPool for usage and error information.
  367. //
  368. // Returned Error Codes:
  369. // * InvalidParameterException
  370. // Thrown for missing or bad input parameter(s).
  371. //
  372. // * ResourceNotFoundException
  373. // Thrown when the requested resource (for example, a dataset or record) does
  374. // not exist.
  375. //
  376. // * NotAuthorizedException
  377. // Thrown when a user is not authorized to access the requested resource.
  378. //
  379. // * TooManyRequestsException
  380. // Thrown when a request is throttled.
  381. //
  382. // * InternalErrorException
  383. // Thrown when the service encounters an error during processing the request.
  384. //
  385. func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) {
  386. req, out := c.DescribeIdentityPoolRequest(input)
  387. err := req.Send()
  388. return out, err
  389. }
  390. const opGetCredentialsForIdentity = "GetCredentialsForIdentity"
  391. // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the
  392. // client's request for the GetCredentialsForIdentity operation. The "output" return
  393. // value can be used to capture response data after the request's "Send" method
  394. // is called.
  395. //
  396. // See GetCredentialsForIdentity for usage and error information.
  397. //
  398. // Creating a request object using this method should be used when you want to inject
  399. // custom logic into the request's lifecycle using a custom handler, or if you want to
  400. // access properties on the request object before or after sending the request. If
  401. // you just want the service response, call the GetCredentialsForIdentity method directly
  402. // instead.
  403. //
  404. // Note: You must call the "Send" method on the returned request object in order
  405. // to execute the request.
  406. //
  407. // // Example sending a request using the GetCredentialsForIdentityRequest method.
  408. // req, resp := client.GetCredentialsForIdentityRequest(params)
  409. //
  410. // err := req.Send()
  411. // if err == nil { // resp is now filled
  412. // fmt.Println(resp)
  413. // }
  414. //
  415. func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) {
  416. op := &request.Operation{
  417. Name: opGetCredentialsForIdentity,
  418. HTTPMethod: "POST",
  419. HTTPPath: "/",
  420. }
  421. if input == nil {
  422. input = &GetCredentialsForIdentityInput{}
  423. }
  424. req = c.newRequest(op, input, output)
  425. output = &GetCredentialsForIdentityOutput{}
  426. req.Data = output
  427. return
  428. }
  429. // GetCredentialsForIdentity API operation for Amazon Cognito Identity.
  430. //
  431. // Returns credentials for the provided identity ID. Any provided logins will
  432. // be validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
  433. // it will be passed through to AWS Security Token Service with the appropriate
  434. // role for the token.
  435. //
  436. // This is a public API. You do not need any credentials to call this API.
  437. //
  438. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  439. // with awserr.Error's Code and Message methods to get detailed information about
  440. // the error.
  441. //
  442. // See the AWS API reference guide for Amazon Cognito Identity's
  443. // API operation GetCredentialsForIdentity for usage and error information.
  444. //
  445. // Returned Error Codes:
  446. // * InvalidParameterException
  447. // Thrown for missing or bad input parameter(s).
  448. //
  449. // * ResourceNotFoundException
  450. // Thrown when the requested resource (for example, a dataset or record) does
  451. // not exist.
  452. //
  453. // * NotAuthorizedException
  454. // Thrown when a user is not authorized to access the requested resource.
  455. //
  456. // * ResourceConflictException
  457. // Thrown when a user tries to use a login which is already linked to another
  458. // account.
  459. //
  460. // * TooManyRequestsException
  461. // Thrown when a request is throttled.
  462. //
  463. // * InvalidIdentityPoolConfigurationException
  464. // Thrown if the identity pool has no role associated for the given auth type
  465. // (auth/unauth) or if the AssumeRole fails.
  466. //
  467. // * InternalErrorException
  468. // Thrown when the service encounters an error during processing the request.
  469. //
  470. // * ExternalServiceException
  471. // An exception thrown when a dependent service such as Facebook or Twitter
  472. // is not responding
  473. //
  474. func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) {
  475. req, out := c.GetCredentialsForIdentityRequest(input)
  476. err := req.Send()
  477. return out, err
  478. }
  479. const opGetId = "GetId"
  480. // GetIdRequest generates a "aws/request.Request" representing the
  481. // client's request for the GetId operation. The "output" return
  482. // value can be used to capture response data after the request's "Send" method
  483. // is called.
  484. //
  485. // See GetId for usage and error information.
  486. //
  487. // Creating a request object using this method should be used when you want to inject
  488. // custom logic into the request's lifecycle using a custom handler, or if you want to
  489. // access properties on the request object before or after sending the request. If
  490. // you just want the service response, call the GetId method directly
  491. // instead.
  492. //
  493. // Note: You must call the "Send" method on the returned request object in order
  494. // to execute the request.
  495. //
  496. // // Example sending a request using the GetIdRequest method.
  497. // req, resp := client.GetIdRequest(params)
  498. //
  499. // err := req.Send()
  500. // if err == nil { // resp is now filled
  501. // fmt.Println(resp)
  502. // }
  503. //
  504. func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) {
  505. op := &request.Operation{
  506. Name: opGetId,
  507. HTTPMethod: "POST",
  508. HTTPPath: "/",
  509. }
  510. if input == nil {
  511. input = &GetIdInput{}
  512. }
  513. req = c.newRequest(op, input, output)
  514. output = &GetIdOutput{}
  515. req.Data = output
  516. return
  517. }
  518. // GetId API operation for Amazon Cognito Identity.
  519. //
  520. // Generates (or retrieves) a Cognito ID. Supplying multiple logins will create
  521. // an implicit linked account.
  522. //
  523. // This is a public API. You do not need any credentials to call this API.
  524. //
  525. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  526. // with awserr.Error's Code and Message methods to get detailed information about
  527. // the error.
  528. //
  529. // See the AWS API reference guide for Amazon Cognito Identity's
  530. // API operation GetId for usage and error information.
  531. //
  532. // Returned Error Codes:
  533. // * InvalidParameterException
  534. // Thrown for missing or bad input parameter(s).
  535. //
  536. // * ResourceNotFoundException
  537. // Thrown when the requested resource (for example, a dataset or record) does
  538. // not exist.
  539. //
  540. // * NotAuthorizedException
  541. // Thrown when a user is not authorized to access the requested resource.
  542. //
  543. // * ResourceConflictException
  544. // Thrown when a user tries to use a login which is already linked to another
  545. // account.
  546. //
  547. // * TooManyRequestsException
  548. // Thrown when a request is throttled.
  549. //
  550. // * InternalErrorException
  551. // Thrown when the service encounters an error during processing the request.
  552. //
  553. // * LimitExceededException
  554. // Thrown when the total number of user pools has exceeded a preset limit.
  555. //
  556. // * ExternalServiceException
  557. // An exception thrown when a dependent service such as Facebook or Twitter
  558. // is not responding
  559. //
  560. func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) {
  561. req, out := c.GetIdRequest(input)
  562. err := req.Send()
  563. return out, err
  564. }
  565. const opGetIdentityPoolRoles = "GetIdentityPoolRoles"
  566. // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
  567. // client's request for the GetIdentityPoolRoles operation. The "output" return
  568. // value can be used to capture response data after the request's "Send" method
  569. // is called.
  570. //
  571. // See GetIdentityPoolRoles for usage and error information.
  572. //
  573. // Creating a request object using this method should be used when you want to inject
  574. // custom logic into the request's lifecycle using a custom handler, or if you want to
  575. // access properties on the request object before or after sending the request. If
  576. // you just want the service response, call the GetIdentityPoolRoles method directly
  577. // instead.
  578. //
  579. // Note: You must call the "Send" method on the returned request object in order
  580. // to execute the request.
  581. //
  582. // // Example sending a request using the GetIdentityPoolRolesRequest method.
  583. // req, resp := client.GetIdentityPoolRolesRequest(params)
  584. //
  585. // err := req.Send()
  586. // if err == nil { // resp is now filled
  587. // fmt.Println(resp)
  588. // }
  589. //
  590. func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) {
  591. op := &request.Operation{
  592. Name: opGetIdentityPoolRoles,
  593. HTTPMethod: "POST",
  594. HTTPPath: "/",
  595. }
  596. if input == nil {
  597. input = &GetIdentityPoolRolesInput{}
  598. }
  599. req = c.newRequest(op, input, output)
  600. output = &GetIdentityPoolRolesOutput{}
  601. req.Data = output
  602. return
  603. }
  604. // GetIdentityPoolRoles API operation for Amazon Cognito Identity.
  605. //
  606. // Gets the roles for an identity pool.
  607. //
  608. // You must use AWS Developer credentials to call this API.
  609. //
  610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  611. // with awserr.Error's Code and Message methods to get detailed information about
  612. // the error.
  613. //
  614. // See the AWS API reference guide for Amazon Cognito Identity's
  615. // API operation GetIdentityPoolRoles for usage and error information.
  616. //
  617. // Returned Error Codes:
  618. // * InvalidParameterException
  619. // Thrown for missing or bad input parameter(s).
  620. //
  621. // * ResourceNotFoundException
  622. // Thrown when the requested resource (for example, a dataset or record) does
  623. // not exist.
  624. //
  625. // * NotAuthorizedException
  626. // Thrown when a user is not authorized to access the requested resource.
  627. //
  628. // * ResourceConflictException
  629. // Thrown when a user tries to use a login which is already linked to another
  630. // account.
  631. //
  632. // * TooManyRequestsException
  633. // Thrown when a request is throttled.
  634. //
  635. // * InternalErrorException
  636. // Thrown when the service encounters an error during processing the request.
  637. //
  638. func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) {
  639. req, out := c.GetIdentityPoolRolesRequest(input)
  640. err := req.Send()
  641. return out, err
  642. }
  643. const opGetOpenIdToken = "GetOpenIdToken"
  644. // GetOpenIdTokenRequest generates a "aws/request.Request" representing the
  645. // client's request for the GetOpenIdToken operation. The "output" return
  646. // value can be used to capture response data after the request's "Send" method
  647. // is called.
  648. //
  649. // See GetOpenIdToken for usage and error information.
  650. //
  651. // Creating a request object using this method should be used when you want to inject
  652. // custom logic into the request's lifecycle using a custom handler, or if you want to
  653. // access properties on the request object before or after sending the request. If
  654. // you just want the service response, call the GetOpenIdToken method directly
  655. // instead.
  656. //
  657. // Note: You must call the "Send" method on the returned request object in order
  658. // to execute the request.
  659. //
  660. // // Example sending a request using the GetOpenIdTokenRequest method.
  661. // req, resp := client.GetOpenIdTokenRequest(params)
  662. //
  663. // err := req.Send()
  664. // if err == nil { // resp is now filled
  665. // fmt.Println(resp)
  666. // }
  667. //
  668. func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) {
  669. op := &request.Operation{
  670. Name: opGetOpenIdToken,
  671. HTTPMethod: "POST",
  672. HTTPPath: "/",
  673. }
  674. if input == nil {
  675. input = &GetOpenIdTokenInput{}
  676. }
  677. req = c.newRequest(op, input, output)
  678. output = &GetOpenIdTokenOutput{}
  679. req.Data = output
  680. return
  681. }
  682. // GetOpenIdToken API operation for Amazon Cognito Identity.
  683. //
  684. // Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
  685. // returned by GetId. You can optionally add additional logins for the identity.
  686. // Supplying multiple logins creates an implicit link.
  687. //
  688. // The OpenId token is valid for 15 minutes.
  689. //
  690. // This is a public API. You do not need any credentials to call this API.
  691. //
  692. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  693. // with awserr.Error's Code and Message methods to get detailed information about
  694. // the error.
  695. //
  696. // See the AWS API reference guide for Amazon Cognito Identity's
  697. // API operation GetOpenIdToken for usage and error information.
  698. //
  699. // Returned Error Codes:
  700. // * InvalidParameterException
  701. // Thrown for missing or bad input parameter(s).
  702. //
  703. // * ResourceNotFoundException
  704. // Thrown when the requested resource (for example, a dataset or record) does
  705. // not exist.
  706. //
  707. // * NotAuthorizedException
  708. // Thrown when a user is not authorized to access the requested resource.
  709. //
  710. // * ResourceConflictException
  711. // Thrown when a user tries to use a login which is already linked to another
  712. // account.
  713. //
  714. // * TooManyRequestsException
  715. // Thrown when a request is throttled.
  716. //
  717. // * InternalErrorException
  718. // Thrown when the service encounters an error during processing the request.
  719. //
  720. // * ExternalServiceException
  721. // An exception thrown when a dependent service such as Facebook or Twitter
  722. // is not responding
  723. //
  724. func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) {
  725. req, out := c.GetOpenIdTokenRequest(input)
  726. err := req.Send()
  727. return out, err
  728. }
  729. const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity"
  730. // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the
  731. // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return
  732. // value can be used to capture response data after the request's "Send" method
  733. // is called.
  734. //
  735. // See GetOpenIdTokenForDeveloperIdentity for usage and error information.
  736. //
  737. // Creating a request object using this method should be used when you want to inject
  738. // custom logic into the request's lifecycle using a custom handler, or if you want to
  739. // access properties on the request object before or after sending the request. If
  740. // you just want the service response, call the GetOpenIdTokenForDeveloperIdentity method directly
  741. // instead.
  742. //
  743. // Note: You must call the "Send" method on the returned request object in order
  744. // to execute the request.
  745. //
  746. // // Example sending a request using the GetOpenIdTokenForDeveloperIdentityRequest method.
  747. // req, resp := client.GetOpenIdTokenForDeveloperIdentityRequest(params)
  748. //
  749. // err := req.Send()
  750. // if err == nil { // resp is now filled
  751. // fmt.Println(resp)
  752. // }
  753. //
  754. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) {
  755. op := &request.Operation{
  756. Name: opGetOpenIdTokenForDeveloperIdentity,
  757. HTTPMethod: "POST",
  758. HTTPPath: "/",
  759. }
  760. if input == nil {
  761. input = &GetOpenIdTokenForDeveloperIdentityInput{}
  762. }
  763. req = c.newRequest(op, input, output)
  764. output = &GetOpenIdTokenForDeveloperIdentityOutput{}
  765. req.Data = output
  766. return
  767. }
  768. // GetOpenIdTokenForDeveloperIdentity API operation for Amazon Cognito Identity.
  769. //
  770. // Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token
  771. // for a user authenticated by your backend authentication process. Supplying
  772. // multiple logins will create an implicit linked account. You can only specify
  773. // one developer provider as part of the Logins map, which is linked to the
  774. // identity pool. The developer provider is the "domain" by which Cognito will
  775. // refer to your users.
  776. //
  777. // You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and
  778. // to link new logins (that is, user credentials issued by a public provider
  779. // or developer provider) to an existing identity. When you want to create a
  780. // new identity, the IdentityId should be null. When you want to associate a
  781. // new login with an existing authenticated/unauthenticated identity, you can
  782. // do so by providing the existing IdentityId. This API will create the identity
  783. // in the specified IdentityPoolId.
  784. //
  785. // You must use AWS Developer credentials to call this API.
  786. //
  787. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  788. // with awserr.Error's Code and Message methods to get detailed information about
  789. // the error.
  790. //
  791. // See the AWS API reference guide for Amazon Cognito Identity's
  792. // API operation GetOpenIdTokenForDeveloperIdentity for usage and error information.
  793. //
  794. // Returned Error Codes:
  795. // * InvalidParameterException
  796. // Thrown for missing or bad input parameter(s).
  797. //
  798. // * ResourceNotFoundException
  799. // Thrown when the requested resource (for example, a dataset or record) does
  800. // not exist.
  801. //
  802. // * NotAuthorizedException
  803. // Thrown when a user is not authorized to access the requested resource.
  804. //
  805. // * ResourceConflictException
  806. // Thrown when a user tries to use a login which is already linked to another
  807. // account.
  808. //
  809. // * TooManyRequestsException
  810. // Thrown when a request is throttled.
  811. //
  812. // * InternalErrorException
  813. // Thrown when the service encounters an error during processing the request.
  814. //
  815. // * DeveloperUserAlreadyRegisteredException
  816. // The provided developer user identifier is already registered with Cognito
  817. // under a different identity ID.
  818. //
  819. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentity(input *GetOpenIdTokenForDeveloperIdentityInput) (*GetOpenIdTokenForDeveloperIdentityOutput, error) {
  820. req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input)
  821. err := req.Send()
  822. return out, err
  823. }
  824. const opListIdentities = "ListIdentities"
  825. // ListIdentitiesRequest generates a "aws/request.Request" representing the
  826. // client's request for the ListIdentities operation. The "output" return
  827. // value can be used to capture response data after the request's "Send" method
  828. // is called.
  829. //
  830. // See ListIdentities for usage and error information.
  831. //
  832. // Creating a request object using this method should be used when you want to inject
  833. // custom logic into the request's lifecycle using a custom handler, or if you want to
  834. // access properties on the request object before or after sending the request. If
  835. // you just want the service response, call the ListIdentities method directly
  836. // instead.
  837. //
  838. // Note: You must call the "Send" method on the returned request object in order
  839. // to execute the request.
  840. //
  841. // // Example sending a request using the ListIdentitiesRequest method.
  842. // req, resp := client.ListIdentitiesRequest(params)
  843. //
  844. // err := req.Send()
  845. // if err == nil { // resp is now filled
  846. // fmt.Println(resp)
  847. // }
  848. //
  849. func (c *CognitoIdentity) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) {
  850. op := &request.Operation{
  851. Name: opListIdentities,
  852. HTTPMethod: "POST",
  853. HTTPPath: "/",
  854. }
  855. if input == nil {
  856. input = &ListIdentitiesInput{}
  857. }
  858. req = c.newRequest(op, input, output)
  859. output = &ListIdentitiesOutput{}
  860. req.Data = output
  861. return
  862. }
  863. // ListIdentities API operation for Amazon Cognito Identity.
  864. //
  865. // Lists the identities in a pool.
  866. //
  867. // You must use AWS Developer credentials to call this API.
  868. //
  869. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  870. // with awserr.Error's Code and Message methods to get detailed information about
  871. // the error.
  872. //
  873. // See the AWS API reference guide for Amazon Cognito Identity's
  874. // API operation ListIdentities for usage and error information.
  875. //
  876. // Returned Error Codes:
  877. // * InvalidParameterException
  878. // Thrown for missing or bad input parameter(s).
  879. //
  880. // * ResourceNotFoundException
  881. // Thrown when the requested resource (for example, a dataset or record) does
  882. // not exist.
  883. //
  884. // * NotAuthorizedException
  885. // Thrown when a user is not authorized to access the requested resource.
  886. //
  887. // * TooManyRequestsException
  888. // Thrown when a request is throttled.
  889. //
  890. // * InternalErrorException
  891. // Thrown when the service encounters an error during processing the request.
  892. //
  893. func (c *CognitoIdentity) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) {
  894. req, out := c.ListIdentitiesRequest(input)
  895. err := req.Send()
  896. return out, err
  897. }
  898. const opListIdentityPools = "ListIdentityPools"
  899. // ListIdentityPoolsRequest generates a "aws/request.Request" representing the
  900. // client's request for the ListIdentityPools operation. The "output" return
  901. // value can be used to capture response data after the request's "Send" method
  902. // is called.
  903. //
  904. // See ListIdentityPools for usage and error information.
  905. //
  906. // Creating a request object using this method should be used when you want to inject
  907. // custom logic into the request's lifecycle using a custom handler, or if you want to
  908. // access properties on the request object before or after sending the request. If
  909. // you just want the service response, call the ListIdentityPools method directly
  910. // instead.
  911. //
  912. // Note: You must call the "Send" method on the returned request object in order
  913. // to execute the request.
  914. //
  915. // // Example sending a request using the ListIdentityPoolsRequest method.
  916. // req, resp := client.ListIdentityPoolsRequest(params)
  917. //
  918. // err := req.Send()
  919. // if err == nil { // resp is now filled
  920. // fmt.Println(resp)
  921. // }
  922. //
  923. func (c *CognitoIdentity) ListIdentityPoolsRequest(input *ListIdentityPoolsInput) (req *request.Request, output *ListIdentityPoolsOutput) {
  924. op := &request.Operation{
  925. Name: opListIdentityPools,
  926. HTTPMethod: "POST",
  927. HTTPPath: "/",
  928. }
  929. if input == nil {
  930. input = &ListIdentityPoolsInput{}
  931. }
  932. req = c.newRequest(op, input, output)
  933. output = &ListIdentityPoolsOutput{}
  934. req.Data = output
  935. return
  936. }
  937. // ListIdentityPools API operation for Amazon Cognito Identity.
  938. //
  939. // Lists all of the Cognito identity pools registered for your account.
  940. //
  941. // You must use AWS Developer credentials to call this API.
  942. //
  943. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  944. // with awserr.Error's Code and Message methods to get detailed information about
  945. // the error.
  946. //
  947. // See the AWS API reference guide for Amazon Cognito Identity's
  948. // API operation ListIdentityPools for usage and error information.
  949. //
  950. // Returned Error Codes:
  951. // * InvalidParameterException
  952. // Thrown for missing or bad input parameter(s).
  953. //
  954. // * NotAuthorizedException
  955. // Thrown when a user is not authorized to access the requested resource.
  956. //
  957. // * TooManyRequestsException
  958. // Thrown when a request is throttled.
  959. //
  960. // * InternalErrorException
  961. // Thrown when the service encounters an error during processing the request.
  962. //
  963. func (c *CognitoIdentity) ListIdentityPools(input *ListIdentityPoolsInput) (*ListIdentityPoolsOutput, error) {
  964. req, out := c.ListIdentityPoolsRequest(input)
  965. err := req.Send()
  966. return out, err
  967. }
  968. const opLookupDeveloperIdentity = "LookupDeveloperIdentity"
  969. // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the
  970. // client's request for the LookupDeveloperIdentity operation. The "output" return
  971. // value can be used to capture response data after the request's "Send" method
  972. // is called.
  973. //
  974. // See LookupDeveloperIdentity for usage and error information.
  975. //
  976. // Creating a request object using this method should be used when you want to inject
  977. // custom logic into the request's lifecycle using a custom handler, or if you want to
  978. // access properties on the request object before or after sending the request. If
  979. // you just want the service response, call the LookupDeveloperIdentity method directly
  980. // instead.
  981. //
  982. // Note: You must call the "Send" method on the returned request object in order
  983. // to execute the request.
  984. //
  985. // // Example sending a request using the LookupDeveloperIdentityRequest method.
  986. // req, resp := client.LookupDeveloperIdentityRequest(params)
  987. //
  988. // err := req.Send()
  989. // if err == nil { // resp is now filled
  990. // fmt.Println(resp)
  991. // }
  992. //
  993. func (c *CognitoIdentity) LookupDeveloperIdentityRequest(input *LookupDeveloperIdentityInput) (req *request.Request, output *LookupDeveloperIdentityOutput) {
  994. op := &request.Operation{
  995. Name: opLookupDeveloperIdentity,
  996. HTTPMethod: "POST",
  997. HTTPPath: "/",
  998. }
  999. if input == nil {
  1000. input = &LookupDeveloperIdentityInput{}
  1001. }
  1002. req = c.newRequest(op, input, output)
  1003. output = &LookupDeveloperIdentityOutput{}
  1004. req.Data = output
  1005. return
  1006. }
  1007. // LookupDeveloperIdentity API operation for Amazon Cognito Identity.
  1008. //
  1009. // Retrieves the IdentityID associated with a DeveloperUserIdentifier or the
  1010. // list of DeveloperUserIdentifiers associated with an IdentityId for an existing
  1011. // identity. Either IdentityID or DeveloperUserIdentifier must not be null.
  1012. // If you supply only one of these values, the other value will be searched
  1013. // in the database and returned as a part of the response. If you supply both,
  1014. // DeveloperUserIdentifier will be matched against IdentityID. If the values
  1015. // are verified against the database, the response returns both values and is
  1016. // the same as the request. Otherwise a ResourceConflictException is thrown.
  1017. //
  1018. // You must use AWS Developer credentials to call this API.
  1019. //
  1020. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1021. // with awserr.Error's Code and Message methods to get detailed information about
  1022. // the error.
  1023. //
  1024. // See the AWS API reference guide for Amazon Cognito Identity's
  1025. // API operation LookupDeveloperIdentity for usage and error information.
  1026. //
  1027. // Returned Error Codes:
  1028. // * InvalidParameterException
  1029. // Thrown for missing or bad input parameter(s).
  1030. //
  1031. // * ResourceNotFoundException
  1032. // Thrown when the requested resource (for example, a dataset or record) does
  1033. // not exist.
  1034. //
  1035. // * NotAuthorizedException
  1036. // Thrown when a user is not authorized to access the requested resource.
  1037. //
  1038. // * ResourceConflictException
  1039. // Thrown when a user tries to use a login which is already linked to another
  1040. // account.
  1041. //
  1042. // * TooManyRequestsException
  1043. // Thrown when a request is throttled.
  1044. //
  1045. // * InternalErrorException
  1046. // Thrown when the service encounters an error during processing the request.
  1047. //
  1048. func (c *CognitoIdentity) LookupDeveloperIdentity(input *LookupDeveloperIdentityInput) (*LookupDeveloperIdentityOutput, error) {
  1049. req, out := c.LookupDeveloperIdentityRequest(input)
  1050. err := req.Send()
  1051. return out, err
  1052. }
  1053. const opMergeDeveloperIdentities = "MergeDeveloperIdentities"
  1054. // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the
  1055. // client's request for the MergeDeveloperIdentities operation. The "output" return
  1056. // value can be used to capture response data after the request's "Send" method
  1057. // is called.
  1058. //
  1059. // See MergeDeveloperIdentities for usage and error information.
  1060. //
  1061. // Creating a request object using this method should be used when you want to inject
  1062. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1063. // access properties on the request object before or after sending the request. If
  1064. // you just want the service response, call the MergeDeveloperIdentities method directly
  1065. // instead.
  1066. //
  1067. // Note: You must call the "Send" method on the returned request object in order
  1068. // to execute the request.
  1069. //
  1070. // // Example sending a request using the MergeDeveloperIdentitiesRequest method.
  1071. // req, resp := client.MergeDeveloperIdentitiesRequest(params)
  1072. //
  1073. // err := req.Send()
  1074. // if err == nil { // resp is now filled
  1075. // fmt.Println(resp)
  1076. // }
  1077. //
  1078. func (c *CognitoIdentity) MergeDeveloperIdentitiesRequest(input *MergeDeveloperIdentitiesInput) (req *request.Request, output *MergeDeveloperIdentitiesOutput) {
  1079. op := &request.Operation{
  1080. Name: opMergeDeveloperIdentities,
  1081. HTTPMethod: "POST",
  1082. HTTPPath: "/",
  1083. }
  1084. if input == nil {
  1085. input = &MergeDeveloperIdentitiesInput{}
  1086. }
  1087. req = c.newRequest(op, input, output)
  1088. output = &MergeDeveloperIdentitiesOutput{}
  1089. req.Data = output
  1090. return
  1091. }
  1092. // MergeDeveloperIdentities API operation for Amazon Cognito Identity.
  1093. //
  1094. // Merges two users having different IdentityIds, existing in the same identity
  1095. // pool, and identified by the same developer provider. You can use this action
  1096. // to request that discrete users be merged and identified as a single user
  1097. // in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier)
  1098. // with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated
  1099. // users can be merged. If the users to be merged are associated with the same
  1100. // public provider, but as two different users, an exception will be thrown.
  1101. //
  1102. // You must use AWS Developer credentials to call this API.
  1103. //
  1104. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1105. // with awserr.Error's Code and Message methods to get detailed information about
  1106. // the error.
  1107. //
  1108. // See the AWS API reference guide for Amazon Cognito Identity's
  1109. // API operation MergeDeveloperIdentities for usage and error information.
  1110. //
  1111. // Returned Error Codes:
  1112. // * InvalidParameterException
  1113. // Thrown for missing or bad input parameter(s).
  1114. //
  1115. // * ResourceNotFoundException
  1116. // Thrown when the requested resource (for example, a dataset or record) does
  1117. // not exist.
  1118. //
  1119. // * NotAuthorizedException
  1120. // Thrown when a user is not authorized to access the requested resource.
  1121. //
  1122. // * ResourceConflictException
  1123. // Thrown when a user tries to use a login which is already linked to another
  1124. // account.
  1125. //
  1126. // * TooManyRequestsException
  1127. // Thrown when a request is throttled.
  1128. //
  1129. // * InternalErrorException
  1130. // Thrown when the service encounters an error during processing the request.
  1131. //
  1132. func (c *CognitoIdentity) MergeDeveloperIdentities(input *MergeDeveloperIdentitiesInput) (*MergeDeveloperIdentitiesOutput, error) {
  1133. req, out := c.MergeDeveloperIdentitiesRequest(input)
  1134. err := req.Send()
  1135. return out, err
  1136. }
  1137. const opSetIdentityPoolRoles = "SetIdentityPoolRoles"
  1138. // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
  1139. // client's request for the SetIdentityPoolRoles operation. The "output" return
  1140. // value can be used to capture response data after the request's "Send" method
  1141. // is called.
  1142. //
  1143. // See SetIdentityPoolRoles for usage and error information.
  1144. //
  1145. // Creating a request object using this method should be used when you want to inject
  1146. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1147. // access properties on the request object before or after sending the request. If
  1148. // you just want the service response, call the SetIdentityPoolRoles method directly
  1149. // instead.
  1150. //
  1151. // Note: You must call the "Send" method on the returned request object in order
  1152. // to execute the request.
  1153. //
  1154. // // Example sending a request using the SetIdentityPoolRolesRequest method.
  1155. // req, resp := client.SetIdentityPoolRolesRequest(params)
  1156. //
  1157. // err := req.Send()
  1158. // if err == nil { // resp is now filled
  1159. // fmt.Println(resp)
  1160. // }
  1161. //
  1162. func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRolesInput) (req *request.Request, output *SetIdentityPoolRolesOutput) {
  1163. op := &request.Operation{
  1164. Name: opSetIdentityPoolRoles,
  1165. HTTPMethod: "POST",
  1166. HTTPPath: "/",
  1167. }
  1168. if input == nil {
  1169. input = &SetIdentityPoolRolesInput{}
  1170. }
  1171. req = c.newRequest(op, input, output)
  1172. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1173. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1174. output = &SetIdentityPoolRolesOutput{}
  1175. req.Data = output
  1176. return
  1177. }
  1178. // SetIdentityPoolRoles API operation for Amazon Cognito Identity.
  1179. //
  1180. // Sets the roles for an identity pool. These roles are used when making calls
  1181. // to GetCredentialsForIdentity action.
  1182. //
  1183. // You must use AWS Developer credentials to call this API.
  1184. //
  1185. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1186. // with awserr.Error's Code and Message methods to get detailed information about
  1187. // the error.
  1188. //
  1189. // See the AWS API reference guide for Amazon Cognito Identity's
  1190. // API operation SetIdentityPoolRoles for usage and error information.
  1191. //
  1192. // Returned Error Codes:
  1193. // * InvalidParameterException
  1194. // Thrown for missing or bad input parameter(s).
  1195. //
  1196. // * ResourceNotFoundException
  1197. // Thrown when the requested resource (for example, a dataset or record) does
  1198. // not exist.
  1199. //
  1200. // * NotAuthorizedException
  1201. // Thrown when a user is not authorized to access the requested resource.
  1202. //
  1203. // * ResourceConflictException
  1204. // Thrown when a user tries to use a login which is already linked to another
  1205. // account.
  1206. //
  1207. // * TooManyRequestsException
  1208. // Thrown when a request is throttled.
  1209. //
  1210. // * InternalErrorException
  1211. // Thrown when the service encounters an error during processing the request.
  1212. //
  1213. // * ConcurrentModificationException
  1214. // Thrown if there are parallel requests to modify a resource.
  1215. //
  1216. func (c *CognitoIdentity) SetIdentityPoolRoles(input *SetIdentityPoolRolesInput) (*SetIdentityPoolRolesOutput, error) {
  1217. req, out := c.SetIdentityPoolRolesRequest(input)
  1218. err := req.Send()
  1219. return out, err
  1220. }
  1221. const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity"
  1222. // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the
  1223. // client's request for the UnlinkDeveloperIdentity operation. The "output" return
  1224. // value can be used to capture response data after the request's "Send" method
  1225. // is called.
  1226. //
  1227. // See UnlinkDeveloperIdentity for usage and error information.
  1228. //
  1229. // Creating a request object using this method should be used when you want to inject
  1230. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1231. // access properties on the request object before or after sending the request. If
  1232. // you just want the service response, call the UnlinkDeveloperIdentity method directly
  1233. // instead.
  1234. //
  1235. // Note: You must call the "Send" method on the returned request object in order
  1236. // to execute the request.
  1237. //
  1238. // // Example sending a request using the UnlinkDeveloperIdentityRequest method.
  1239. // req, resp := client.UnlinkDeveloperIdentityRequest(params)
  1240. //
  1241. // err := req.Send()
  1242. // if err == nil { // resp is now filled
  1243. // fmt.Println(resp)
  1244. // }
  1245. //
  1246. func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperIdentityInput) (req *request.Request, output *UnlinkDeveloperIdentityOutput) {
  1247. op := &request.Operation{
  1248. Name: opUnlinkDeveloperIdentity,
  1249. HTTPMethod: "POST",
  1250. HTTPPath: "/",
  1251. }
  1252. if input == nil {
  1253. input = &UnlinkDeveloperIdentityInput{}
  1254. }
  1255. req = c.newRequest(op, input, output)
  1256. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1257. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1258. output = &UnlinkDeveloperIdentityOutput{}
  1259. req.Data = output
  1260. return
  1261. }
  1262. // UnlinkDeveloperIdentity API operation for Amazon Cognito Identity.
  1263. //
  1264. // Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer
  1265. // users will be considered new identities next time they are seen. If, for
  1266. // a given Cognito identity, you remove all federated identities as well as
  1267. // the developer user identifier, the Cognito identity becomes inaccessible.
  1268. //
  1269. // You must use AWS Developer credentials to call this API.
  1270. //
  1271. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1272. // with awserr.Error's Code and Message methods to get detailed information about
  1273. // the error.
  1274. //
  1275. // See the AWS API reference guide for Amazon Cognito Identity's
  1276. // API operation UnlinkDeveloperIdentity for usage and error information.
  1277. //
  1278. // Returned Error Codes:
  1279. // * InvalidParameterException
  1280. // Thrown for missing or bad input parameter(s).
  1281. //
  1282. // * ResourceNotFoundException
  1283. // Thrown when the requested resource (for example, a dataset or record) does
  1284. // not exist.
  1285. //
  1286. // * NotAuthorizedException
  1287. // Thrown when a user is not authorized to access the requested resource.
  1288. //
  1289. // * ResourceConflictException
  1290. // Thrown when a user tries to use a login which is already linked to another
  1291. // account.
  1292. //
  1293. // * TooManyRequestsException
  1294. // Thrown when a request is throttled.
  1295. //
  1296. // * InternalErrorException
  1297. // Thrown when the service encounters an error during processing the request.
  1298. //
  1299. func (c *CognitoIdentity) UnlinkDeveloperIdentity(input *UnlinkDeveloperIdentityInput) (*UnlinkDeveloperIdentityOutput, error) {
  1300. req, out := c.UnlinkDeveloperIdentityRequest(input)
  1301. err := req.Send()
  1302. return out, err
  1303. }
  1304. const opUnlinkIdentity = "UnlinkIdentity"
  1305. // UnlinkIdentityRequest generates a "aws/request.Request" representing the
  1306. // client's request for the UnlinkIdentity operation. The "output" return
  1307. // value can be used to capture response data after the request's "Send" method
  1308. // is called.
  1309. //
  1310. // See UnlinkIdentity for usage and error information.
  1311. //
  1312. // Creating a request object using this method should be used when you want to inject
  1313. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1314. // access properties on the request object before or after sending the request. If
  1315. // you just want the service response, call the UnlinkIdentity method directly
  1316. // instead.
  1317. //
  1318. // Note: You must call the "Send" method on the returned request object in order
  1319. // to execute the request.
  1320. //
  1321. // // Example sending a request using the UnlinkIdentityRequest method.
  1322. // req, resp := client.UnlinkIdentityRequest(params)
  1323. //
  1324. // err := req.Send()
  1325. // if err == nil { // resp is now filled
  1326. // fmt.Println(resp)
  1327. // }
  1328. //
  1329. func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req *request.Request, output *UnlinkIdentityOutput) {
  1330. op := &request.Operation{
  1331. Name: opUnlinkIdentity,
  1332. HTTPMethod: "POST",
  1333. HTTPPath: "/",
  1334. }
  1335. if input == nil {
  1336. input = &UnlinkIdentityInput{}
  1337. }
  1338. req = c.newRequest(op, input, output)
  1339. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1340. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1341. output = &UnlinkIdentityOutput{}
  1342. req.Data = output
  1343. return
  1344. }
  1345. // UnlinkIdentity API operation for Amazon Cognito Identity.
  1346. //
  1347. // Unlinks a federated identity from an existing account. Unlinked logins will
  1348. // be considered new identities next time they are seen. Removing the last linked
  1349. // login will make this identity inaccessible.
  1350. //
  1351. // This is a public API. You do not need any credentials to call this API.
  1352. //
  1353. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1354. // with awserr.Error's Code and Message methods to get detailed information about
  1355. // the error.
  1356. //
  1357. // See the AWS API reference guide for Amazon Cognito Identity's
  1358. // API operation UnlinkIdentity for usage and error information.
  1359. //
  1360. // Returned Error Codes:
  1361. // * InvalidParameterException
  1362. // Thrown for missing or bad input parameter(s).
  1363. //
  1364. // * ResourceNotFoundException
  1365. // Thrown when the requested resource (for example, a dataset or record) does
  1366. // not exist.
  1367. //
  1368. // * NotAuthorizedException
  1369. // Thrown when a user is not authorized to access the requested resource.
  1370. //
  1371. // * ResourceConflictException
  1372. // Thrown when a user tries to use a login which is already linked to another
  1373. // account.
  1374. //
  1375. // * TooManyRequestsException
  1376. // Thrown when a request is throttled.
  1377. //
  1378. // * InternalErrorException
  1379. // Thrown when the service encounters an error during processing the request.
  1380. //
  1381. // * ExternalServiceException
  1382. // An exception thrown when a dependent service such as Facebook or Twitter
  1383. // is not responding
  1384. //
  1385. func (c *CognitoIdentity) UnlinkIdentity(input *UnlinkIdentityInput) (*UnlinkIdentityOutput, error) {
  1386. req, out := c.UnlinkIdentityRequest(input)
  1387. err := req.Send()
  1388. return out, err
  1389. }
  1390. const opUpdateIdentityPool = "UpdateIdentityPool"
  1391. // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the
  1392. // client's request for the UpdateIdentityPool operation. The "output" return
  1393. // value can be used to capture response data after the request's "Send" method
  1394. // is called.
  1395. //
  1396. // See UpdateIdentityPool for usage and error information.
  1397. //
  1398. // Creating a request object using this method should be used when you want to inject
  1399. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1400. // access properties on the request object before or after sending the request. If
  1401. // you just want the service response, call the UpdateIdentityPool method directly
  1402. // instead.
  1403. //
  1404. // Note: You must call the "Send" method on the returned request object in order
  1405. // to execute the request.
  1406. //
  1407. // // Example sending a request using the UpdateIdentityPoolRequest method.
  1408. // req, resp := client.UpdateIdentityPoolRequest(params)
  1409. //
  1410. // err := req.Send()
  1411. // if err == nil { // resp is now filled
  1412. // fmt.Println(resp)
  1413. // }
  1414. //
  1415. func (c *CognitoIdentity) UpdateIdentityPoolRequest(input *IdentityPool) (req *request.Request, output *IdentityPool) {
  1416. op := &request.Operation{
  1417. Name: opUpdateIdentityPool,
  1418. HTTPMethod: "POST",
  1419. HTTPPath: "/",
  1420. }
  1421. if input == nil {
  1422. input = &IdentityPool{}
  1423. }
  1424. req = c.newRequest(op, input, output)
  1425. output = &IdentityPool{}
  1426. req.Data = output
  1427. return
  1428. }
  1429. // UpdateIdentityPool API operation for Amazon Cognito Identity.
  1430. //
  1431. // Updates a user pool.
  1432. //
  1433. // You must use AWS Developer credentials to call this API.
  1434. //
  1435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1436. // with awserr.Error's Code and Message methods to get detailed information about
  1437. // the error.
  1438. //
  1439. // See the AWS API reference guide for Amazon Cognito Identity's
  1440. // API operation UpdateIdentityPool for usage and error information.
  1441. //
  1442. // Returned Error Codes:
  1443. // * InvalidParameterException
  1444. // Thrown for missing or bad input parameter(s).
  1445. //
  1446. // * ResourceNotFoundException
  1447. // Thrown when the requested resource (for example, a dataset or record) does
  1448. // not exist.
  1449. //
  1450. // * NotAuthorizedException
  1451. // Thrown when a user is not authorized to access the requested resource.
  1452. //
  1453. // * ResourceConflictException
  1454. // Thrown when a user tries to use a login which is already linked to another
  1455. // account.
  1456. //
  1457. // * TooManyRequestsException
  1458. // Thrown when a request is throttled.
  1459. //
  1460. // * InternalErrorException
  1461. // Thrown when the service encounters an error during processing the request.
  1462. //
  1463. // * ConcurrentModificationException
  1464. // Thrown if there are parallel requests to modify a resource.
  1465. //
  1466. // * LimitExceededException
  1467. // Thrown when the total number of user pools has exceeded a preset limit.
  1468. //
  1469. func (c *CognitoIdentity) UpdateIdentityPool(input *IdentityPool) (*IdentityPool, error) {
  1470. req, out := c.UpdateIdentityPoolRequest(input)
  1471. err := req.Send()
  1472. return out, err
  1473. }
  1474. // Input to the CreateIdentityPool action.
  1475. type CreateIdentityPoolInput struct {
  1476. _ struct{} `type:"structure"`
  1477. // TRUE if the identity pool supports unauthenticated logins.
  1478. //
  1479. // AllowUnauthenticatedIdentities is a required field
  1480. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  1481. // An array of Amazon Cognito Identity user pools.
  1482. CognitoIdentityProviders []*Provider `type:"list"`
  1483. // The "domain" by which Cognito will refer to your users. This name acts as
  1484. // a placeholder that allows your backend and the Cognito service to communicate
  1485. // about the developer provider. For the DeveloperProviderName, you can use
  1486. // letters as well as period (.), underscore (_), and dash (-).
  1487. //
  1488. // Once you have set a developer provider name, you cannot change it. Please
  1489. // take care in setting this parameter.
  1490. DeveloperProviderName *string `min:"1" type:"string"`
  1491. // A string that you provide.
  1492. //
  1493. // IdentityPoolName is a required field
  1494. IdentityPoolName *string `min:"1" type:"string" required:"true"`
  1495. // A list of OpendID Connect provider ARNs.
  1496. OpenIdConnectProviderARNs []*string `type:"list"`
  1497. // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
  1498. // pool.
  1499. SamlProviderARNs []*string `type:"list"`
  1500. // Optional key:value pairs mapping provider names to provider app IDs.
  1501. SupportedLoginProviders map[string]*string `type:"map"`
  1502. }
  1503. // String returns the string representation
  1504. func (s CreateIdentityPoolInput) String() string {
  1505. return awsutil.Prettify(s)
  1506. }
  1507. // GoString returns the string representation
  1508. func (s CreateIdentityPoolInput) GoString() string {
  1509. return s.String()
  1510. }
  1511. // Validate inspects the fields of the type to determine if they are valid.
  1512. func (s *CreateIdentityPoolInput) Validate() error {
  1513. invalidParams := request.ErrInvalidParams{Context: "CreateIdentityPoolInput"}
  1514. if s.AllowUnauthenticatedIdentities == nil {
  1515. invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
  1516. }
  1517. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  1518. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  1519. }
  1520. if s.IdentityPoolName == nil {
  1521. invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
  1522. }
  1523. if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
  1524. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
  1525. }
  1526. if s.CognitoIdentityProviders != nil {
  1527. for i, v := range s.CognitoIdentityProviders {
  1528. if v == nil {
  1529. continue
  1530. }
  1531. if err := v.Validate(); err != nil {
  1532. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
  1533. }
  1534. }
  1535. }
  1536. if invalidParams.Len() > 0 {
  1537. return invalidParams
  1538. }
  1539. return nil
  1540. }
  1541. // Credentials for the provided identity ID.
  1542. type Credentials struct {
  1543. _ struct{} `type:"structure"`
  1544. // The Access Key portion of the credentials.
  1545. AccessKeyId *string `type:"string"`
  1546. // The date at which these credentials will expire.
  1547. Expiration *time.Time `type:"timestamp" timestampFormat:"unix"`
  1548. // The Secret Access Key portion of the credentials
  1549. SecretKey *string `type:"string"`
  1550. // The Session Token portion of the credentials
  1551. SessionToken *string `type:"string"`
  1552. }
  1553. // String returns the string representation
  1554. func (s Credentials) String() string {
  1555. return awsutil.Prettify(s)
  1556. }
  1557. // GoString returns the string representation
  1558. func (s Credentials) GoString() string {
  1559. return s.String()
  1560. }
  1561. // Input to the DeleteIdentities action.
  1562. type DeleteIdentitiesInput struct {
  1563. _ struct{} `type:"structure"`
  1564. // A list of 1-60 identities that you want to delete.
  1565. //
  1566. // IdentityIdsToDelete is a required field
  1567. IdentityIdsToDelete []*string `min:"1" type:"list" required:"true"`
  1568. }
  1569. // String returns the string representation
  1570. func (s DeleteIdentitiesInput) String() string {
  1571. return awsutil.Prettify(s)
  1572. }
  1573. // GoString returns the string representation
  1574. func (s DeleteIdentitiesInput) GoString() string {
  1575. return s.String()
  1576. }
  1577. // Validate inspects the fields of the type to determine if they are valid.
  1578. func (s *DeleteIdentitiesInput) Validate() error {
  1579. invalidParams := request.ErrInvalidParams{Context: "DeleteIdentitiesInput"}
  1580. if s.IdentityIdsToDelete == nil {
  1581. invalidParams.Add(request.NewErrParamRequired("IdentityIdsToDelete"))
  1582. }
  1583. if s.IdentityIdsToDelete != nil && len(s.IdentityIdsToDelete) < 1 {
  1584. invalidParams.Add(request.NewErrParamMinLen("IdentityIdsToDelete", 1))
  1585. }
  1586. if invalidParams.Len() > 0 {
  1587. return invalidParams
  1588. }
  1589. return nil
  1590. }
  1591. // Returned in response to a successful DeleteIdentities operation.
  1592. type DeleteIdentitiesOutput struct {
  1593. _ struct{} `type:"structure"`
  1594. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  1595. // and IdentityId.
  1596. UnprocessedIdentityIds []*UnprocessedIdentityId `type:"list"`
  1597. }
  1598. // String returns the string representation
  1599. func (s DeleteIdentitiesOutput) String() string {
  1600. return awsutil.Prettify(s)
  1601. }
  1602. // GoString returns the string representation
  1603. func (s DeleteIdentitiesOutput) GoString() string {
  1604. return s.String()
  1605. }
  1606. // Input to the DeleteIdentityPool action.
  1607. type DeleteIdentityPoolInput struct {
  1608. _ struct{} `type:"structure"`
  1609. // An identity pool ID in the format REGION:GUID.
  1610. //
  1611. // IdentityPoolId is a required field
  1612. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1613. }
  1614. // String returns the string representation
  1615. func (s DeleteIdentityPoolInput) String() string {
  1616. return awsutil.Prettify(s)
  1617. }
  1618. // GoString returns the string representation
  1619. func (s DeleteIdentityPoolInput) GoString() string {
  1620. return s.String()
  1621. }
  1622. // Validate inspects the fields of the type to determine if they are valid.
  1623. func (s *DeleteIdentityPoolInput) Validate() error {
  1624. invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityPoolInput"}
  1625. if s.IdentityPoolId == nil {
  1626. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1627. }
  1628. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1629. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1630. }
  1631. if invalidParams.Len() > 0 {
  1632. return invalidParams
  1633. }
  1634. return nil
  1635. }
  1636. type DeleteIdentityPoolOutput struct {
  1637. _ struct{} `type:"structure"`
  1638. }
  1639. // String returns the string representation
  1640. func (s DeleteIdentityPoolOutput) String() string {
  1641. return awsutil.Prettify(s)
  1642. }
  1643. // GoString returns the string representation
  1644. func (s DeleteIdentityPoolOutput) GoString() string {
  1645. return s.String()
  1646. }
  1647. // Input to the DescribeIdentity action.
  1648. type DescribeIdentityInput struct {
  1649. _ struct{} `type:"structure"`
  1650. // A unique identifier in the format REGION:GUID.
  1651. //
  1652. // IdentityId is a required field
  1653. IdentityId *string `min:"1" type:"string" required:"true"`
  1654. }
  1655. // String returns the string representation
  1656. func (s DescribeIdentityInput) String() string {
  1657. return awsutil.Prettify(s)
  1658. }
  1659. // GoString returns the string representation
  1660. func (s DescribeIdentityInput) GoString() string {
  1661. return s.String()
  1662. }
  1663. // Validate inspects the fields of the type to determine if they are valid.
  1664. func (s *DescribeIdentityInput) Validate() error {
  1665. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityInput"}
  1666. if s.IdentityId == nil {
  1667. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1668. }
  1669. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1670. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1671. }
  1672. if invalidParams.Len() > 0 {
  1673. return invalidParams
  1674. }
  1675. return nil
  1676. }
  1677. // Input to the DescribeIdentityPool action.
  1678. type DescribeIdentityPoolInput struct {
  1679. _ struct{} `type:"structure"`
  1680. // An identity pool ID in the format REGION:GUID.
  1681. //
  1682. // IdentityPoolId is a required field
  1683. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1684. }
  1685. // String returns the string representation
  1686. func (s DescribeIdentityPoolInput) String() string {
  1687. return awsutil.Prettify(s)
  1688. }
  1689. // GoString returns the string representation
  1690. func (s DescribeIdentityPoolInput) GoString() string {
  1691. return s.String()
  1692. }
  1693. // Validate inspects the fields of the type to determine if they are valid.
  1694. func (s *DescribeIdentityPoolInput) Validate() error {
  1695. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolInput"}
  1696. if s.IdentityPoolId == nil {
  1697. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1698. }
  1699. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1700. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1701. }
  1702. if invalidParams.Len() > 0 {
  1703. return invalidParams
  1704. }
  1705. return nil
  1706. }
  1707. // Input to the GetCredentialsForIdentity action.
  1708. type GetCredentialsForIdentityInput struct {
  1709. _ struct{} `type:"structure"`
  1710. // The Amazon Resource Name (ARN) of the role to be assumed when multiple roles
  1711. // were received in the token from the identity provider. For example, a SAML-based
  1712. // identity provider. This parameter is optional for identity providers that
  1713. // do not support role customization.
  1714. CustomRoleArn *string `min:"20" type:"string"`
  1715. // A unique identifier in the format REGION:GUID.
  1716. //
  1717. // IdentityId is a required field
  1718. IdentityId *string `min:"1" type:"string" required:"true"`
  1719. // A set of optional name-value pairs that map provider names to provider tokens.
  1720. Logins map[string]*string `type:"map"`
  1721. }
  1722. // String returns the string representation
  1723. func (s GetCredentialsForIdentityInput) String() string {
  1724. return awsutil.Prettify(s)
  1725. }
  1726. // GoString returns the string representation
  1727. func (s GetCredentialsForIdentityInput) GoString() string {
  1728. return s.String()
  1729. }
  1730. // Validate inspects the fields of the type to determine if they are valid.
  1731. func (s *GetCredentialsForIdentityInput) Validate() error {
  1732. invalidParams := request.ErrInvalidParams{Context: "GetCredentialsForIdentityInput"}
  1733. if s.CustomRoleArn != nil && len(*s.CustomRoleArn) < 20 {
  1734. invalidParams.Add(request.NewErrParamMinLen("CustomRoleArn", 20))
  1735. }
  1736. if s.IdentityId == nil {
  1737. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1738. }
  1739. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1740. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1741. }
  1742. if invalidParams.Len() > 0 {
  1743. return invalidParams
  1744. }
  1745. return nil
  1746. }
  1747. // Returned in response to a successful GetCredentialsForIdentity operation.
  1748. type GetCredentialsForIdentityOutput struct {
  1749. _ struct{} `type:"structure"`
  1750. // Credentials for the provided identity ID.
  1751. Credentials *Credentials `type:"structure"`
  1752. // A unique identifier in the format REGION:GUID.
  1753. IdentityId *string `min:"1" type:"string"`
  1754. }
  1755. // String returns the string representation
  1756. func (s GetCredentialsForIdentityOutput) String() string {
  1757. return awsutil.Prettify(s)
  1758. }
  1759. // GoString returns the string representation
  1760. func (s GetCredentialsForIdentityOutput) GoString() string {
  1761. return s.String()
  1762. }
  1763. // Input to the GetId action.
  1764. type GetIdInput struct {
  1765. _ struct{} `type:"structure"`
  1766. // A standard AWS account ID (9+ digits).
  1767. AccountId *string `min:"1" type:"string"`
  1768. // An identity pool ID in the format REGION:GUID.
  1769. //
  1770. // IdentityPoolId is a required field
  1771. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1772. // A set of optional name-value pairs that map provider names to provider tokens.
  1773. //
  1774. // The available provider names for Logins are as follows: Facebook: graph.facebook.com
  1775. //
  1776. // Google: accounts.google.com
  1777. // Amazon: www.amazon.com
  1778. // Twitter: api.twitter.com
  1779. // Digits: www.digits.com
  1780. Logins map[string]*string `type:"map"`
  1781. }
  1782. // String returns the string representation
  1783. func (s GetIdInput) String() string {
  1784. return awsutil.Prettify(s)
  1785. }
  1786. // GoString returns the string representation
  1787. func (s GetIdInput) GoString() string {
  1788. return s.String()
  1789. }
  1790. // Validate inspects the fields of the type to determine if they are valid.
  1791. func (s *GetIdInput) Validate() error {
  1792. invalidParams := request.ErrInvalidParams{Context: "GetIdInput"}
  1793. if s.AccountId != nil && len(*s.AccountId) < 1 {
  1794. invalidParams.Add(request.NewErrParamMinLen("AccountId", 1))
  1795. }
  1796. if s.IdentityPoolId == nil {
  1797. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1798. }
  1799. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1800. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1801. }
  1802. if invalidParams.Len() > 0 {
  1803. return invalidParams
  1804. }
  1805. return nil
  1806. }
  1807. // Returned in response to a GetId request.
  1808. type GetIdOutput struct {
  1809. _ struct{} `type:"structure"`
  1810. // A unique identifier in the format REGION:GUID.
  1811. IdentityId *string `min:"1" type:"string"`
  1812. }
  1813. // String returns the string representation
  1814. func (s GetIdOutput) String() string {
  1815. return awsutil.Prettify(s)
  1816. }
  1817. // GoString returns the string representation
  1818. func (s GetIdOutput) GoString() string {
  1819. return s.String()
  1820. }
  1821. // Input to the GetIdentityPoolRoles action.
  1822. type GetIdentityPoolRolesInput struct {
  1823. _ struct{} `type:"structure"`
  1824. // An identity pool ID in the format REGION:GUID.
  1825. //
  1826. // IdentityPoolId is a required field
  1827. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1828. }
  1829. // String returns the string representation
  1830. func (s GetIdentityPoolRolesInput) String() string {
  1831. return awsutil.Prettify(s)
  1832. }
  1833. // GoString returns the string representation
  1834. func (s GetIdentityPoolRolesInput) GoString() string {
  1835. return s.String()
  1836. }
  1837. // Validate inspects the fields of the type to determine if they are valid.
  1838. func (s *GetIdentityPoolRolesInput) Validate() error {
  1839. invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolRolesInput"}
  1840. if s.IdentityPoolId == nil {
  1841. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1842. }
  1843. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1844. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1845. }
  1846. if invalidParams.Len() > 0 {
  1847. return invalidParams
  1848. }
  1849. return nil
  1850. }
  1851. // Returned in response to a successful GetIdentityPoolRoles operation.
  1852. type GetIdentityPoolRolesOutput struct {
  1853. _ struct{} `type:"structure"`
  1854. // An identity pool ID in the format REGION:GUID.
  1855. IdentityPoolId *string `min:"1" type:"string"`
  1856. // The map of roles associated with this pool. Currently only authenticated
  1857. // and unauthenticated roles are supported.
  1858. Roles map[string]*string `type:"map"`
  1859. }
  1860. // String returns the string representation
  1861. func (s GetIdentityPoolRolesOutput) String() string {
  1862. return awsutil.Prettify(s)
  1863. }
  1864. // GoString returns the string representation
  1865. func (s GetIdentityPoolRolesOutput) GoString() string {
  1866. return s.String()
  1867. }
  1868. // Input to the GetOpenIdTokenForDeveloperIdentity action.
  1869. type GetOpenIdTokenForDeveloperIdentityInput struct {
  1870. _ struct{} `type:"structure"`
  1871. // A unique identifier in the format REGION:GUID.
  1872. IdentityId *string `min:"1" type:"string"`
  1873. // An identity pool ID in the format REGION:GUID.
  1874. //
  1875. // IdentityPoolId is a required field
  1876. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1877. // A set of optional name-value pairs that map provider names to provider tokens.
  1878. // Each name-value pair represents a user from a public provider or developer
  1879. // provider. If the user is from a developer provider, the name-value pair will
  1880. // follow the syntax "developer_provider_name": "developer_user_identifier".
  1881. // The developer provider is the "domain" by which Cognito will refer to your
  1882. // users; you provided this domain while creating/updating the identity pool.
  1883. // The developer user identifier is an identifier from your backend that uniquely
  1884. // identifies a user. When you create an identity pool, you can specify the
  1885. // supported logins.
  1886. //
  1887. // Logins is a required field
  1888. Logins map[string]*string `type:"map" required:"true"`
  1889. // The expiration time of the token, in seconds. You can specify a custom expiration
  1890. // time for the token so that you can cache it. If you don't provide an expiration
  1891. // time, the token is valid for 15 minutes. You can exchange the token with
  1892. // Amazon STS for temporary AWS credentials, which are valid for a maximum of
  1893. // one hour. The maximum token duration you can set is 24 hours. You should
  1894. // take care in setting the expiration time for a token, as there are significant
  1895. // security implications: an attacker could use a leaked token to access your
  1896. // AWS resources for the token's duration.
  1897. TokenDuration *int64 `min:"1" type:"long"`
  1898. }
  1899. // String returns the string representation
  1900. func (s GetOpenIdTokenForDeveloperIdentityInput) String() string {
  1901. return awsutil.Prettify(s)
  1902. }
  1903. // GoString returns the string representation
  1904. func (s GetOpenIdTokenForDeveloperIdentityInput) GoString() string {
  1905. return s.String()
  1906. }
  1907. // Validate inspects the fields of the type to determine if they are valid.
  1908. func (s *GetOpenIdTokenForDeveloperIdentityInput) Validate() error {
  1909. invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenForDeveloperIdentityInput"}
  1910. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1911. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1912. }
  1913. if s.IdentityPoolId == nil {
  1914. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1915. }
  1916. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1917. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1918. }
  1919. if s.Logins == nil {
  1920. invalidParams.Add(request.NewErrParamRequired("Logins"))
  1921. }
  1922. if s.TokenDuration != nil && *s.TokenDuration < 1 {
  1923. invalidParams.Add(request.NewErrParamMinValue("TokenDuration", 1))
  1924. }
  1925. if invalidParams.Len() > 0 {
  1926. return invalidParams
  1927. }
  1928. return nil
  1929. }
  1930. // Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.
  1931. type GetOpenIdTokenForDeveloperIdentityOutput struct {
  1932. _ struct{} `type:"structure"`
  1933. // A unique identifier in the format REGION:GUID.
  1934. IdentityId *string `min:"1" type:"string"`
  1935. // An OpenID token.
  1936. Token *string `type:"string"`
  1937. }
  1938. // String returns the string representation
  1939. func (s GetOpenIdTokenForDeveloperIdentityOutput) String() string {
  1940. return awsutil.Prettify(s)
  1941. }
  1942. // GoString returns the string representation
  1943. func (s GetOpenIdTokenForDeveloperIdentityOutput) GoString() string {
  1944. return s.String()
  1945. }
  1946. // Input to the GetOpenIdToken action.
  1947. type GetOpenIdTokenInput struct {
  1948. _ struct{} `type:"structure"`
  1949. // A unique identifier in the format REGION:GUID.
  1950. //
  1951. // IdentityId is a required field
  1952. IdentityId *string `min:"1" type:"string" required:"true"`
  1953. // A set of optional name-value pairs that map provider names to provider tokens.
  1954. // When using graph.facebook.com and www.amazon.com, supply the access_token
  1955. // returned from the provider's authflow. For accounts.google.com or any other
  1956. // OpenId Connect provider, always include the id_token.
  1957. Logins map[string]*string `type:"map"`
  1958. }
  1959. // String returns the string representation
  1960. func (s GetOpenIdTokenInput) String() string {
  1961. return awsutil.Prettify(s)
  1962. }
  1963. // GoString returns the string representation
  1964. func (s GetOpenIdTokenInput) GoString() string {
  1965. return s.String()
  1966. }
  1967. // Validate inspects the fields of the type to determine if they are valid.
  1968. func (s *GetOpenIdTokenInput) Validate() error {
  1969. invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenInput"}
  1970. if s.IdentityId == nil {
  1971. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1972. }
  1973. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1974. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1975. }
  1976. if invalidParams.Len() > 0 {
  1977. return invalidParams
  1978. }
  1979. return nil
  1980. }
  1981. // Returned in response to a successful GetOpenIdToken request.
  1982. type GetOpenIdTokenOutput struct {
  1983. _ struct{} `type:"structure"`
  1984. // A unique identifier in the format REGION:GUID. Note that the IdentityId returned
  1985. // may not match the one passed on input.
  1986. IdentityId *string `min:"1" type:"string"`
  1987. // An OpenID token, valid for 15 minutes.
  1988. Token *string `type:"string"`
  1989. }
  1990. // String returns the string representation
  1991. func (s GetOpenIdTokenOutput) String() string {
  1992. return awsutil.Prettify(s)
  1993. }
  1994. // GoString returns the string representation
  1995. func (s GetOpenIdTokenOutput) GoString() string {
  1996. return s.String()
  1997. }
  1998. // A description of the identity.
  1999. type IdentityDescription struct {
  2000. _ struct{} `type:"structure"`
  2001. // Date on which the identity was created.
  2002. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2003. // A unique identifier in the format REGION:GUID.
  2004. IdentityId *string `min:"1" type:"string"`
  2005. // Date on which the identity was last modified.
  2006. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2007. // A set of optional name-value pairs that map provider names to provider tokens.
  2008. Logins []*string `type:"list"`
  2009. }
  2010. // String returns the string representation
  2011. func (s IdentityDescription) String() string {
  2012. return awsutil.Prettify(s)
  2013. }
  2014. // GoString returns the string representation
  2015. func (s IdentityDescription) GoString() string {
  2016. return s.String()
  2017. }
  2018. // An object representing a Cognito identity pool.
  2019. type IdentityPool struct {
  2020. _ struct{} `type:"structure"`
  2021. // TRUE if the identity pool supports unauthenticated logins.
  2022. //
  2023. // AllowUnauthenticatedIdentities is a required field
  2024. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  2025. // A list representing an Amazon Cognito Identity User Pool and its client ID.
  2026. CognitoIdentityProviders []*Provider `type:"list"`
  2027. // The "domain" by which Cognito will refer to your users.
  2028. DeveloperProviderName *string `min:"1" type:"string"`
  2029. // An identity pool ID in the format REGION:GUID.
  2030. //
  2031. // IdentityPoolId is a required field
  2032. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2033. // A string that you provide.
  2034. //
  2035. // IdentityPoolName is a required field
  2036. IdentityPoolName *string `min:"1" type:"string" required:"true"`
  2037. // A list of OpendID Connect provider ARNs.
  2038. OpenIdConnectProviderARNs []*string `type:"list"`
  2039. // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
  2040. // pool.
  2041. SamlProviderARNs []*string `type:"list"`
  2042. // Optional key:value pairs mapping provider names to provider app IDs.
  2043. SupportedLoginProviders map[string]*string `type:"map"`
  2044. }
  2045. // String returns the string representation
  2046. func (s IdentityPool) String() string {
  2047. return awsutil.Prettify(s)
  2048. }
  2049. // GoString returns the string representation
  2050. func (s IdentityPool) GoString() string {
  2051. return s.String()
  2052. }
  2053. // Validate inspects the fields of the type to determine if they are valid.
  2054. func (s *IdentityPool) Validate() error {
  2055. invalidParams := request.ErrInvalidParams{Context: "IdentityPool"}
  2056. if s.AllowUnauthenticatedIdentities == nil {
  2057. invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
  2058. }
  2059. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  2060. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  2061. }
  2062. if s.IdentityPoolId == nil {
  2063. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2064. }
  2065. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2066. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2067. }
  2068. if s.IdentityPoolName == nil {
  2069. invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
  2070. }
  2071. if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
  2072. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
  2073. }
  2074. if s.CognitoIdentityProviders != nil {
  2075. for i, v := range s.CognitoIdentityProviders {
  2076. if v == nil {
  2077. continue
  2078. }
  2079. if err := v.Validate(); err != nil {
  2080. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
  2081. }
  2082. }
  2083. }
  2084. if invalidParams.Len() > 0 {
  2085. return invalidParams
  2086. }
  2087. return nil
  2088. }
  2089. // A description of the identity pool.
  2090. type IdentityPoolShortDescription struct {
  2091. _ struct{} `type:"structure"`
  2092. // An identity pool ID in the format REGION:GUID.
  2093. IdentityPoolId *string `min:"1" type:"string"`
  2094. // A string that you provide.
  2095. IdentityPoolName *string `min:"1" type:"string"`
  2096. }
  2097. // String returns the string representation
  2098. func (s IdentityPoolShortDescription) String() string {
  2099. return awsutil.Prettify(s)
  2100. }
  2101. // GoString returns the string representation
  2102. func (s IdentityPoolShortDescription) GoString() string {
  2103. return s.String()
  2104. }
  2105. // Input to the ListIdentities action.
  2106. type ListIdentitiesInput struct {
  2107. _ struct{} `type:"structure"`
  2108. // An optional boolean parameter that allows you to hide disabled identities.
  2109. // If omitted, the ListIdentities API will include disabled identities in the
  2110. // response.
  2111. HideDisabled *bool `type:"boolean"`
  2112. // An identity pool ID in the format REGION:GUID.
  2113. //
  2114. // IdentityPoolId is a required field
  2115. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2116. // The maximum number of identities to return.
  2117. //
  2118. // MaxResults is a required field
  2119. MaxResults *int64 `min:"1" type:"integer" required:"true"`
  2120. // A pagination token.
  2121. NextToken *string `min:"1" type:"string"`
  2122. }
  2123. // String returns the string representation
  2124. func (s ListIdentitiesInput) String() string {
  2125. return awsutil.Prettify(s)
  2126. }
  2127. // GoString returns the string representation
  2128. func (s ListIdentitiesInput) GoString() string {
  2129. return s.String()
  2130. }
  2131. // Validate inspects the fields of the type to determine if they are valid.
  2132. func (s *ListIdentitiesInput) Validate() error {
  2133. invalidParams := request.ErrInvalidParams{Context: "ListIdentitiesInput"}
  2134. if s.IdentityPoolId == nil {
  2135. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2136. }
  2137. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2138. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2139. }
  2140. if s.MaxResults == nil {
  2141. invalidParams.Add(request.NewErrParamRequired("MaxResults"))
  2142. }
  2143. if s.MaxResults != nil && *s.MaxResults < 1 {
  2144. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2145. }
  2146. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2147. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2148. }
  2149. if invalidParams.Len() > 0 {
  2150. return invalidParams
  2151. }
  2152. return nil
  2153. }
  2154. // The response to a ListIdentities request.
  2155. type ListIdentitiesOutput struct {
  2156. _ struct{} `type:"structure"`
  2157. // An object containing a set of identities and associated mappings.
  2158. Identities []*IdentityDescription `type:"list"`
  2159. // An identity pool ID in the format REGION:GUID.
  2160. IdentityPoolId *string `min:"1" type:"string"`
  2161. // A pagination token.
  2162. NextToken *string `min:"1" type:"string"`
  2163. }
  2164. // String returns the string representation
  2165. func (s ListIdentitiesOutput) String() string {
  2166. return awsutil.Prettify(s)
  2167. }
  2168. // GoString returns the string representation
  2169. func (s ListIdentitiesOutput) GoString() string {
  2170. return s.String()
  2171. }
  2172. // Input to the ListIdentityPools action.
  2173. type ListIdentityPoolsInput struct {
  2174. _ struct{} `type:"structure"`
  2175. // The maximum number of identities to return.
  2176. //
  2177. // MaxResults is a required field
  2178. MaxResults *int64 `min:"1" type:"integer" required:"true"`
  2179. // A pagination token.
  2180. NextToken *string `min:"1" type:"string"`
  2181. }
  2182. // String returns the string representation
  2183. func (s ListIdentityPoolsInput) String() string {
  2184. return awsutil.Prettify(s)
  2185. }
  2186. // GoString returns the string representation
  2187. func (s ListIdentityPoolsInput) GoString() string {
  2188. return s.String()
  2189. }
  2190. // Validate inspects the fields of the type to determine if they are valid.
  2191. func (s *ListIdentityPoolsInput) Validate() error {
  2192. invalidParams := request.ErrInvalidParams{Context: "ListIdentityPoolsInput"}
  2193. if s.MaxResults == nil {
  2194. invalidParams.Add(request.NewErrParamRequired("MaxResults"))
  2195. }
  2196. if s.MaxResults != nil && *s.MaxResults < 1 {
  2197. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2198. }
  2199. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2200. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2201. }
  2202. if invalidParams.Len() > 0 {
  2203. return invalidParams
  2204. }
  2205. return nil
  2206. }
  2207. // The result of a successful ListIdentityPools action.
  2208. type ListIdentityPoolsOutput struct {
  2209. _ struct{} `type:"structure"`
  2210. // The identity pools returned by the ListIdentityPools action.
  2211. IdentityPools []*IdentityPoolShortDescription `type:"list"`
  2212. // A pagination token.
  2213. NextToken *string `min:"1" type:"string"`
  2214. }
  2215. // String returns the string representation
  2216. func (s ListIdentityPoolsOutput) String() string {
  2217. return awsutil.Prettify(s)
  2218. }
  2219. // GoString returns the string representation
  2220. func (s ListIdentityPoolsOutput) GoString() string {
  2221. return s.String()
  2222. }
  2223. // Input to the LookupDeveloperIdentityInput action.
  2224. type LookupDeveloperIdentityInput struct {
  2225. _ struct{} `type:"structure"`
  2226. // A unique ID used by your backend authentication process to identify a user.
  2227. // Typically, a developer identity provider would issue many developer user
  2228. // identifiers, in keeping with the number of users.
  2229. DeveloperUserIdentifier *string `min:"1" type:"string"`
  2230. // A unique identifier in the format REGION:GUID.
  2231. IdentityId *string `min:"1" type:"string"`
  2232. // An identity pool ID in the format REGION:GUID.
  2233. //
  2234. // IdentityPoolId is a required field
  2235. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2236. // The maximum number of identities to return.
  2237. MaxResults *int64 `min:"1" type:"integer"`
  2238. // A pagination token. The first call you make will have NextToken set to null.
  2239. // After that the service will return NextToken values as needed. For example,
  2240. // let's say you make a request with MaxResults set to 10, and there are 20
  2241. // matches in the database. The service will return a pagination token as a
  2242. // part of the response. This token can be used to call the API again and get
  2243. // results starting from the 11th match.
  2244. NextToken *string `min:"1" type:"string"`
  2245. }
  2246. // String returns the string representation
  2247. func (s LookupDeveloperIdentityInput) String() string {
  2248. return awsutil.Prettify(s)
  2249. }
  2250. // GoString returns the string representation
  2251. func (s LookupDeveloperIdentityInput) GoString() string {
  2252. return s.String()
  2253. }
  2254. // Validate inspects the fields of the type to determine if they are valid.
  2255. func (s *LookupDeveloperIdentityInput) Validate() error {
  2256. invalidParams := request.ErrInvalidParams{Context: "LookupDeveloperIdentityInput"}
  2257. if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
  2258. invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
  2259. }
  2260. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2261. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2262. }
  2263. if s.IdentityPoolId == nil {
  2264. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2265. }
  2266. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2267. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2268. }
  2269. if s.MaxResults != nil && *s.MaxResults < 1 {
  2270. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2271. }
  2272. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2273. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2274. }
  2275. if invalidParams.Len() > 0 {
  2276. return invalidParams
  2277. }
  2278. return nil
  2279. }
  2280. // Returned in response to a successful LookupDeveloperIdentity action.
  2281. type LookupDeveloperIdentityOutput struct {
  2282. _ struct{} `type:"structure"`
  2283. // This is the list of developer user identifiers associated with an identity
  2284. // ID. Cognito supports the association of multiple developer user identifiers
  2285. // with an identity ID.
  2286. DeveloperUserIdentifierList []*string `type:"list"`
  2287. // A unique identifier in the format REGION:GUID.
  2288. IdentityId *string `min:"1" type:"string"`
  2289. // A pagination token. The first call you make will have NextToken set to null.
  2290. // After that the service will return NextToken values as needed. For example,
  2291. // let's say you make a request with MaxResults set to 10, and there are 20
  2292. // matches in the database. The service will return a pagination token as a
  2293. // part of the response. This token can be used to call the API again and get
  2294. // results starting from the 11th match.
  2295. NextToken *string `min:"1" type:"string"`
  2296. }
  2297. // String returns the string representation
  2298. func (s LookupDeveloperIdentityOutput) String() string {
  2299. return awsutil.Prettify(s)
  2300. }
  2301. // GoString returns the string representation
  2302. func (s LookupDeveloperIdentityOutput) GoString() string {
  2303. return s.String()
  2304. }
  2305. // Input to the MergeDeveloperIdentities action.
  2306. type MergeDeveloperIdentitiesInput struct {
  2307. _ struct{} `type:"structure"`
  2308. // User identifier for the destination user. The value should be a DeveloperUserIdentifier.
  2309. //
  2310. // DestinationUserIdentifier is a required field
  2311. DestinationUserIdentifier *string `min:"1" type:"string" required:"true"`
  2312. // The "domain" by which Cognito will refer to your users. This is a (pseudo)
  2313. // domain name that you provide while creating an identity pool. This name acts
  2314. // as a placeholder that allows your backend and the Cognito service to communicate
  2315. // about the developer provider. For the DeveloperProviderName, you can use
  2316. // letters as well as period (.), underscore (_), and dash (-).
  2317. //
  2318. // DeveloperProviderName is a required field
  2319. DeveloperProviderName *string `min:"1" type:"string" required:"true"`
  2320. // An identity pool ID in the format REGION:GUID.
  2321. //
  2322. // IdentityPoolId is a required field
  2323. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2324. // User identifier for the source user. The value should be a DeveloperUserIdentifier.
  2325. //
  2326. // SourceUserIdentifier is a required field
  2327. SourceUserIdentifier *string `min:"1" type:"string" required:"true"`
  2328. }
  2329. // String returns the string representation
  2330. func (s MergeDeveloperIdentitiesInput) String() string {
  2331. return awsutil.Prettify(s)
  2332. }
  2333. // GoString returns the string representation
  2334. func (s MergeDeveloperIdentitiesInput) GoString() string {
  2335. return s.String()
  2336. }
  2337. // Validate inspects the fields of the type to determine if they are valid.
  2338. func (s *MergeDeveloperIdentitiesInput) Validate() error {
  2339. invalidParams := request.ErrInvalidParams{Context: "MergeDeveloperIdentitiesInput"}
  2340. if s.DestinationUserIdentifier == nil {
  2341. invalidParams.Add(request.NewErrParamRequired("DestinationUserIdentifier"))
  2342. }
  2343. if s.DestinationUserIdentifier != nil && len(*s.DestinationUserIdentifier) < 1 {
  2344. invalidParams.Add(request.NewErrParamMinLen("DestinationUserIdentifier", 1))
  2345. }
  2346. if s.DeveloperProviderName == nil {
  2347. invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
  2348. }
  2349. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  2350. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  2351. }
  2352. if s.IdentityPoolId == nil {
  2353. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2354. }
  2355. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2356. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2357. }
  2358. if s.SourceUserIdentifier == nil {
  2359. invalidParams.Add(request.NewErrParamRequired("SourceUserIdentifier"))
  2360. }
  2361. if s.SourceUserIdentifier != nil && len(*s.SourceUserIdentifier) < 1 {
  2362. invalidParams.Add(request.NewErrParamMinLen("SourceUserIdentifier", 1))
  2363. }
  2364. if invalidParams.Len() > 0 {
  2365. return invalidParams
  2366. }
  2367. return nil
  2368. }
  2369. // Returned in response to a successful MergeDeveloperIdentities action.
  2370. type MergeDeveloperIdentitiesOutput struct {
  2371. _ struct{} `type:"structure"`
  2372. // A unique identifier in the format REGION:GUID.
  2373. IdentityId *string `min:"1" type:"string"`
  2374. }
  2375. // String returns the string representation
  2376. func (s MergeDeveloperIdentitiesOutput) String() string {
  2377. return awsutil.Prettify(s)
  2378. }
  2379. // GoString returns the string representation
  2380. func (s MergeDeveloperIdentitiesOutput) GoString() string {
  2381. return s.String()
  2382. }
  2383. // A provider representing an Amazon Cognito Identity User Pool and its client
  2384. // ID.
  2385. type Provider struct {
  2386. _ struct{} `type:"structure"`
  2387. // The client ID for the Amazon Cognito Identity User Pool.
  2388. ClientId *string `min:"1" type:"string"`
  2389. // The provider name for an Amazon Cognito Identity User Pool. For example,
  2390. // cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.
  2391. ProviderName *string `min:"1" type:"string"`
  2392. }
  2393. // String returns the string representation
  2394. func (s Provider) String() string {
  2395. return awsutil.Prettify(s)
  2396. }
  2397. // GoString returns the string representation
  2398. func (s Provider) GoString() string {
  2399. return s.String()
  2400. }
  2401. // Validate inspects the fields of the type to determine if they are valid.
  2402. func (s *Provider) Validate() error {
  2403. invalidParams := request.ErrInvalidParams{Context: "Provider"}
  2404. if s.ClientId != nil && len(*s.ClientId) < 1 {
  2405. invalidParams.Add(request.NewErrParamMinLen("ClientId", 1))
  2406. }
  2407. if s.ProviderName != nil && len(*s.ProviderName) < 1 {
  2408. invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1))
  2409. }
  2410. if invalidParams.Len() > 0 {
  2411. return invalidParams
  2412. }
  2413. return nil
  2414. }
  2415. // Input to the SetIdentityPoolRoles action.
  2416. type SetIdentityPoolRolesInput struct {
  2417. _ struct{} `type:"structure"`
  2418. // An identity pool ID in the format REGION:GUID.
  2419. //
  2420. // IdentityPoolId is a required field
  2421. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2422. // The map of roles associated with this pool. For a given role, the key will
  2423. // be either "authenticated" or "unauthenticated" and the value will be the
  2424. // Role ARN.
  2425. //
  2426. // Roles is a required field
  2427. Roles map[string]*string `type:"map" required:"true"`
  2428. }
  2429. // String returns the string representation
  2430. func (s SetIdentityPoolRolesInput) String() string {
  2431. return awsutil.Prettify(s)
  2432. }
  2433. // GoString returns the string representation
  2434. func (s SetIdentityPoolRolesInput) GoString() string {
  2435. return s.String()
  2436. }
  2437. // Validate inspects the fields of the type to determine if they are valid.
  2438. func (s *SetIdentityPoolRolesInput) Validate() error {
  2439. invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolRolesInput"}
  2440. if s.IdentityPoolId == nil {
  2441. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2442. }
  2443. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2444. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2445. }
  2446. if s.Roles == nil {
  2447. invalidParams.Add(request.NewErrParamRequired("Roles"))
  2448. }
  2449. if invalidParams.Len() > 0 {
  2450. return invalidParams
  2451. }
  2452. return nil
  2453. }
  2454. type SetIdentityPoolRolesOutput struct {
  2455. _ struct{} `type:"structure"`
  2456. }
  2457. // String returns the string representation
  2458. func (s SetIdentityPoolRolesOutput) String() string {
  2459. return awsutil.Prettify(s)
  2460. }
  2461. // GoString returns the string representation
  2462. func (s SetIdentityPoolRolesOutput) GoString() string {
  2463. return s.String()
  2464. }
  2465. // Input to the UnlinkDeveloperIdentity action.
  2466. type UnlinkDeveloperIdentityInput struct {
  2467. _ struct{} `type:"structure"`
  2468. // The "domain" by which Cognito will refer to your users.
  2469. //
  2470. // DeveloperProviderName is a required field
  2471. DeveloperProviderName *string `min:"1" type:"string" required:"true"`
  2472. // A unique ID used by your backend authentication process to identify a user.
  2473. //
  2474. // DeveloperUserIdentifier is a required field
  2475. DeveloperUserIdentifier *string `min:"1" type:"string" required:"true"`
  2476. // A unique identifier in the format REGION:GUID.
  2477. //
  2478. // IdentityId is a required field
  2479. IdentityId *string `min:"1" type:"string" required:"true"`
  2480. // An identity pool ID in the format REGION:GUID.
  2481. //
  2482. // IdentityPoolId is a required field
  2483. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  2484. }
  2485. // String returns the string representation
  2486. func (s UnlinkDeveloperIdentityInput) String() string {
  2487. return awsutil.Prettify(s)
  2488. }
  2489. // GoString returns the string representation
  2490. func (s UnlinkDeveloperIdentityInput) GoString() string {
  2491. return s.String()
  2492. }
  2493. // Validate inspects the fields of the type to determine if they are valid.
  2494. func (s *UnlinkDeveloperIdentityInput) Validate() error {
  2495. invalidParams := request.ErrInvalidParams{Context: "UnlinkDeveloperIdentityInput"}
  2496. if s.DeveloperProviderName == nil {
  2497. invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
  2498. }
  2499. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  2500. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  2501. }
  2502. if s.DeveloperUserIdentifier == nil {
  2503. invalidParams.Add(request.NewErrParamRequired("DeveloperUserIdentifier"))
  2504. }
  2505. if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
  2506. invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
  2507. }
  2508. if s.IdentityId == nil {
  2509. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2510. }
  2511. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2512. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2513. }
  2514. if s.IdentityPoolId == nil {
  2515. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  2516. }
  2517. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  2518. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  2519. }
  2520. if invalidParams.Len() > 0 {
  2521. return invalidParams
  2522. }
  2523. return nil
  2524. }
  2525. type UnlinkDeveloperIdentityOutput struct {
  2526. _ struct{} `type:"structure"`
  2527. }
  2528. // String returns the string representation
  2529. func (s UnlinkDeveloperIdentityOutput) String() string {
  2530. return awsutil.Prettify(s)
  2531. }
  2532. // GoString returns the string representation
  2533. func (s UnlinkDeveloperIdentityOutput) GoString() string {
  2534. return s.String()
  2535. }
  2536. // Input to the UnlinkIdentity action.
  2537. type UnlinkIdentityInput struct {
  2538. _ struct{} `type:"structure"`
  2539. // A unique identifier in the format REGION:GUID.
  2540. //
  2541. // IdentityId is a required field
  2542. IdentityId *string `min:"1" type:"string" required:"true"`
  2543. // A set of optional name-value pairs that map provider names to provider tokens.
  2544. //
  2545. // Logins is a required field
  2546. Logins map[string]*string `type:"map" required:"true"`
  2547. // Provider names to unlink from this identity.
  2548. //
  2549. // LoginsToRemove is a required field
  2550. LoginsToRemove []*string `type:"list" required:"true"`
  2551. }
  2552. // String returns the string representation
  2553. func (s UnlinkIdentityInput) String() string {
  2554. return awsutil.Prettify(s)
  2555. }
  2556. // GoString returns the string representation
  2557. func (s UnlinkIdentityInput) GoString() string {
  2558. return s.String()
  2559. }
  2560. // Validate inspects the fields of the type to determine if they are valid.
  2561. func (s *UnlinkIdentityInput) Validate() error {
  2562. invalidParams := request.ErrInvalidParams{Context: "UnlinkIdentityInput"}
  2563. if s.IdentityId == nil {
  2564. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  2565. }
  2566. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  2567. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  2568. }
  2569. if s.Logins == nil {
  2570. invalidParams.Add(request.NewErrParamRequired("Logins"))
  2571. }
  2572. if s.LoginsToRemove == nil {
  2573. invalidParams.Add(request.NewErrParamRequired("LoginsToRemove"))
  2574. }
  2575. if invalidParams.Len() > 0 {
  2576. return invalidParams
  2577. }
  2578. return nil
  2579. }
  2580. type UnlinkIdentityOutput struct {
  2581. _ struct{} `type:"structure"`
  2582. }
  2583. // String returns the string representation
  2584. func (s UnlinkIdentityOutput) String() string {
  2585. return awsutil.Prettify(s)
  2586. }
  2587. // GoString returns the string representation
  2588. func (s UnlinkIdentityOutput) GoString() string {
  2589. return s.String()
  2590. }
  2591. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  2592. // and IdentityId.
  2593. type UnprocessedIdentityId struct {
  2594. _ struct{} `type:"structure"`
  2595. // The error code indicating the type of error that occurred.
  2596. ErrorCode *string `type:"string" enum:"ErrorCode"`
  2597. // A unique identifier in the format REGION:GUID.
  2598. IdentityId *string `min:"1" type:"string"`
  2599. }
  2600. // String returns the string representation
  2601. func (s UnprocessedIdentityId) String() string {
  2602. return awsutil.Prettify(s)
  2603. }
  2604. // GoString returns the string representation
  2605. func (s UnprocessedIdentityId) GoString() string {
  2606. return s.String()
  2607. }
  2608. const (
  2609. // ErrorCodeAccessDenied is a ErrorCode enum value
  2610. ErrorCodeAccessDenied = "AccessDenied"
  2611. // ErrorCodeInternalServerError is a ErrorCode enum value
  2612. ErrorCodeInternalServerError = "InternalServerError"
  2613. )