api.go 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281
  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. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateIdentityPool method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateIdentityPoolRequest method.
  28. // req, resp := client.CreateIdentityPoolRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  36. op := &request.Operation{
  37. Name: opCreateIdentityPool,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &CreateIdentityPoolInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &IdentityPool{}
  46. req.Data = output
  47. return
  48. }
  49. // Creates a new identity pool. The identity pool is a store of user identity
  50. // information that is specific to your AWS account. The limit on identity pools
  51. // is 60 per account. The keys for SupportedLoginProviders are as follows:
  52. // Facebook: graph.facebook.com Google: accounts.google.com Amazon: www.amazon.com
  53. // Twitter: api.twitter.com Digits: www.digits.com You must use AWS Developer
  54. // credentials to call this API.
  55. func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) {
  56. req, out := c.CreateIdentityPoolRequest(input)
  57. err := req.Send()
  58. return out, err
  59. }
  60. const opDeleteIdentities = "DeleteIdentities"
  61. // DeleteIdentitiesRequest generates a "aws/request.Request" representing the
  62. // client's request for the DeleteIdentities operation. The "output" return
  63. // value can be used to capture response data after the request's "Send" method
  64. // is called.
  65. //
  66. // Creating a request object using this method should be used when you want to inject
  67. // custom logic into the request's lifecycle using a custom handler, or if you want to
  68. // access properties on the request object before or after sending the request. If
  69. // you just want the service response, call the DeleteIdentities method directly
  70. // instead.
  71. //
  72. // Note: You must call the "Send" method on the returned request object in order
  73. // to execute the request.
  74. //
  75. // // Example sending a request using the DeleteIdentitiesRequest method.
  76. // req, resp := client.DeleteIdentitiesRequest(params)
  77. //
  78. // err := req.Send()
  79. // if err == nil { // resp is now filled
  80. // fmt.Println(resp)
  81. // }
  82. //
  83. func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) {
  84. op := &request.Operation{
  85. Name: opDeleteIdentities,
  86. HTTPMethod: "POST",
  87. HTTPPath: "/",
  88. }
  89. if input == nil {
  90. input = &DeleteIdentitiesInput{}
  91. }
  92. req = c.newRequest(op, input, output)
  93. output = &DeleteIdentitiesOutput{}
  94. req.Data = output
  95. return
  96. }
  97. // Deletes identities from an identity pool. You can specify a list of 1-60
  98. // identities that you want to delete.
  99. //
  100. // You must use AWS Developer credentials to call this API.
  101. func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) {
  102. req, out := c.DeleteIdentitiesRequest(input)
  103. err := req.Send()
  104. return out, err
  105. }
  106. const opDeleteIdentityPool = "DeleteIdentityPool"
  107. // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the
  108. // client's request for the DeleteIdentityPool operation. The "output" return
  109. // value can be used to capture response data after the request's "Send" method
  110. // is called.
  111. //
  112. // Creating a request object using this method should be used when you want to inject
  113. // custom logic into the request's lifecycle using a custom handler, or if you want to
  114. // access properties on the request object before or after sending the request. If
  115. // you just want the service response, call the DeleteIdentityPool method directly
  116. // instead.
  117. //
  118. // Note: You must call the "Send" method on the returned request object in order
  119. // to execute the request.
  120. //
  121. // // Example sending a request using the DeleteIdentityPoolRequest method.
  122. // req, resp := client.DeleteIdentityPoolRequest(params)
  123. //
  124. // err := req.Send()
  125. // if err == nil { // resp is now filled
  126. // fmt.Println(resp)
  127. // }
  128. //
  129. func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) {
  130. op := &request.Operation{
  131. Name: opDeleteIdentityPool,
  132. HTTPMethod: "POST",
  133. HTTPPath: "/",
  134. }
  135. if input == nil {
  136. input = &DeleteIdentityPoolInput{}
  137. }
  138. req = c.newRequest(op, input, output)
  139. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  140. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  141. output = &DeleteIdentityPoolOutput{}
  142. req.Data = output
  143. return
  144. }
  145. // Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
  146. // with the pool.
  147. //
  148. // You must use AWS Developer credentials to call this API.
  149. func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) {
  150. req, out := c.DeleteIdentityPoolRequest(input)
  151. err := req.Send()
  152. return out, err
  153. }
  154. const opDescribeIdentity = "DescribeIdentity"
  155. // DescribeIdentityRequest generates a "aws/request.Request" representing the
  156. // client's request for the DescribeIdentity operation. The "output" return
  157. // value can be used to capture response data after the request's "Send" method
  158. // is called.
  159. //
  160. // Creating a request object using this method should be used when you want to inject
  161. // custom logic into the request's lifecycle using a custom handler, or if you want to
  162. // access properties on the request object before or after sending the request. If
  163. // you just want the service response, call the DescribeIdentity method directly
  164. // instead.
  165. //
  166. // Note: You must call the "Send" method on the returned request object in order
  167. // to execute the request.
  168. //
  169. // // Example sending a request using the DescribeIdentityRequest method.
  170. // req, resp := client.DescribeIdentityRequest(params)
  171. //
  172. // err := req.Send()
  173. // if err == nil { // resp is now filled
  174. // fmt.Println(resp)
  175. // }
  176. //
  177. func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) {
  178. op := &request.Operation{
  179. Name: opDescribeIdentity,
  180. HTTPMethod: "POST",
  181. HTTPPath: "/",
  182. }
  183. if input == nil {
  184. input = &DescribeIdentityInput{}
  185. }
  186. req = c.newRequest(op, input, output)
  187. output = &IdentityDescription{}
  188. req.Data = output
  189. return
  190. }
  191. // Returns metadata related to the given identity, including when the identity
  192. // was created and any associated linked logins.
  193. //
  194. // You must use AWS Developer credentials to call this API.
  195. func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) {
  196. req, out := c.DescribeIdentityRequest(input)
  197. err := req.Send()
  198. return out, err
  199. }
  200. const opDescribeIdentityPool = "DescribeIdentityPool"
  201. // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the
  202. // client's request for the DescribeIdentityPool operation. The "output" return
  203. // value can be used to capture response data after the request's "Send" method
  204. // is called.
  205. //
  206. // Creating a request object using this method should be used when you want to inject
  207. // custom logic into the request's lifecycle using a custom handler, or if you want to
  208. // access properties on the request object before or after sending the request. If
  209. // you just want the service response, call the DescribeIdentityPool method directly
  210. // instead.
  211. //
  212. // Note: You must call the "Send" method on the returned request object in order
  213. // to execute the request.
  214. //
  215. // // Example sending a request using the DescribeIdentityPoolRequest method.
  216. // req, resp := client.DescribeIdentityPoolRequest(params)
  217. //
  218. // err := req.Send()
  219. // if err == nil { // resp is now filled
  220. // fmt.Println(resp)
  221. // }
  222. //
  223. func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  224. op := &request.Operation{
  225. Name: opDescribeIdentityPool,
  226. HTTPMethod: "POST",
  227. HTTPPath: "/",
  228. }
  229. if input == nil {
  230. input = &DescribeIdentityPoolInput{}
  231. }
  232. req = c.newRequest(op, input, output)
  233. output = &IdentityPool{}
  234. req.Data = output
  235. return
  236. }
  237. // Gets details about a particular identity pool, including the pool name, ID
  238. // description, creation date, and current number of users.
  239. //
  240. // You must use AWS Developer credentials to call this API.
  241. func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) {
  242. req, out := c.DescribeIdentityPoolRequest(input)
  243. err := req.Send()
  244. return out, err
  245. }
  246. const opGetCredentialsForIdentity = "GetCredentialsForIdentity"
  247. // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the
  248. // client's request for the GetCredentialsForIdentity operation. The "output" return
  249. // value can be used to capture response data after the request's "Send" method
  250. // is called.
  251. //
  252. // Creating a request object using this method should be used when you want to inject
  253. // custom logic into the request's lifecycle using a custom handler, or if you want to
  254. // access properties on the request object before or after sending the request. If
  255. // you just want the service response, call the GetCredentialsForIdentity method directly
  256. // instead.
  257. //
  258. // Note: You must call the "Send" method on the returned request object in order
  259. // to execute the request.
  260. //
  261. // // Example sending a request using the GetCredentialsForIdentityRequest method.
  262. // req, resp := client.GetCredentialsForIdentityRequest(params)
  263. //
  264. // err := req.Send()
  265. // if err == nil { // resp is now filled
  266. // fmt.Println(resp)
  267. // }
  268. //
  269. func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) {
  270. op := &request.Operation{
  271. Name: opGetCredentialsForIdentity,
  272. HTTPMethod: "POST",
  273. HTTPPath: "/",
  274. }
  275. if input == nil {
  276. input = &GetCredentialsForIdentityInput{}
  277. }
  278. req = c.newRequest(op, input, output)
  279. output = &GetCredentialsForIdentityOutput{}
  280. req.Data = output
  281. return
  282. }
  283. // Returns credentials for the provided identity ID. Any provided logins will
  284. // be validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
  285. // it will be passed through to AWS Security Token Service with the appropriate
  286. // role for the token.
  287. //
  288. // This is a public API. You do not need any credentials to call this API.
  289. func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) {
  290. req, out := c.GetCredentialsForIdentityRequest(input)
  291. err := req.Send()
  292. return out, err
  293. }
  294. const opGetId = "GetId"
  295. // GetIdRequest generates a "aws/request.Request" representing the
  296. // client's request for the GetId operation. The "output" return
  297. // value can be used to capture response data after the request's "Send" method
  298. // is called.
  299. //
  300. // Creating a request object using this method should be used when you want to inject
  301. // custom logic into the request's lifecycle using a custom handler, or if you want to
  302. // access properties on the request object before or after sending the request. If
  303. // you just want the service response, call the GetId method directly
  304. // instead.
  305. //
  306. // Note: You must call the "Send" method on the returned request object in order
  307. // to execute the request.
  308. //
  309. // // Example sending a request using the GetIdRequest method.
  310. // req, resp := client.GetIdRequest(params)
  311. //
  312. // err := req.Send()
  313. // if err == nil { // resp is now filled
  314. // fmt.Println(resp)
  315. // }
  316. //
  317. func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) {
  318. op := &request.Operation{
  319. Name: opGetId,
  320. HTTPMethod: "POST",
  321. HTTPPath: "/",
  322. }
  323. if input == nil {
  324. input = &GetIdInput{}
  325. }
  326. req = c.newRequest(op, input, output)
  327. output = &GetIdOutput{}
  328. req.Data = output
  329. return
  330. }
  331. // Generates (or retrieves) a Cognito ID. Supplying multiple logins will create
  332. // an implicit linked account.
  333. //
  334. // This is a public API. You do not need any credentials to call this API.
  335. func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) {
  336. req, out := c.GetIdRequest(input)
  337. err := req.Send()
  338. return out, err
  339. }
  340. const opGetIdentityPoolRoles = "GetIdentityPoolRoles"
  341. // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
  342. // client's request for the GetIdentityPoolRoles operation. The "output" return
  343. // value can be used to capture response data after the request's "Send" method
  344. // is called.
  345. //
  346. // Creating a request object using this method should be used when you want to inject
  347. // custom logic into the request's lifecycle using a custom handler, or if you want to
  348. // access properties on the request object before or after sending the request. If
  349. // you just want the service response, call the GetIdentityPoolRoles method directly
  350. // instead.
  351. //
  352. // Note: You must call the "Send" method on the returned request object in order
  353. // to execute the request.
  354. //
  355. // // Example sending a request using the GetIdentityPoolRolesRequest method.
  356. // req, resp := client.GetIdentityPoolRolesRequest(params)
  357. //
  358. // err := req.Send()
  359. // if err == nil { // resp is now filled
  360. // fmt.Println(resp)
  361. // }
  362. //
  363. func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) {
  364. op := &request.Operation{
  365. Name: opGetIdentityPoolRoles,
  366. HTTPMethod: "POST",
  367. HTTPPath: "/",
  368. }
  369. if input == nil {
  370. input = &GetIdentityPoolRolesInput{}
  371. }
  372. req = c.newRequest(op, input, output)
  373. output = &GetIdentityPoolRolesOutput{}
  374. req.Data = output
  375. return
  376. }
  377. // Gets the roles for an identity pool.
  378. //
  379. // You must use AWS Developer credentials to call this API.
  380. func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) {
  381. req, out := c.GetIdentityPoolRolesRequest(input)
  382. err := req.Send()
  383. return out, err
  384. }
  385. const opGetOpenIdToken = "GetOpenIdToken"
  386. // GetOpenIdTokenRequest generates a "aws/request.Request" representing the
  387. // client's request for the GetOpenIdToken operation. The "output" return
  388. // value can be used to capture response data after the request's "Send" method
  389. // is called.
  390. //
  391. // Creating a request object using this method should be used when you want to inject
  392. // custom logic into the request's lifecycle using a custom handler, or if you want to
  393. // access properties on the request object before or after sending the request. If
  394. // you just want the service response, call the GetOpenIdToken method directly
  395. // instead.
  396. //
  397. // Note: You must call the "Send" method on the returned request object in order
  398. // to execute the request.
  399. //
  400. // // Example sending a request using the GetOpenIdTokenRequest method.
  401. // req, resp := client.GetOpenIdTokenRequest(params)
  402. //
  403. // err := req.Send()
  404. // if err == nil { // resp is now filled
  405. // fmt.Println(resp)
  406. // }
  407. //
  408. func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) {
  409. op := &request.Operation{
  410. Name: opGetOpenIdToken,
  411. HTTPMethod: "POST",
  412. HTTPPath: "/",
  413. }
  414. if input == nil {
  415. input = &GetOpenIdTokenInput{}
  416. }
  417. req = c.newRequest(op, input, output)
  418. output = &GetOpenIdTokenOutput{}
  419. req.Data = output
  420. return
  421. }
  422. // Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
  423. // returned by GetId. You can optionally add additional logins for the identity.
  424. // Supplying multiple logins creates an implicit link.
  425. //
  426. // The OpenId token is valid for 15 minutes.
  427. //
  428. // This is a public API. You do not need any credentials to call this API.
  429. func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) {
  430. req, out := c.GetOpenIdTokenRequest(input)
  431. err := req.Send()
  432. return out, err
  433. }
  434. const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity"
  435. // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the
  436. // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return
  437. // value can be used to capture response data after the request's "Send" method
  438. // is called.
  439. //
  440. // Creating a request object using this method should be used when you want to inject
  441. // custom logic into the request's lifecycle using a custom handler, or if you want to
  442. // access properties on the request object before or after sending the request. If
  443. // you just want the service response, call the GetOpenIdTokenForDeveloperIdentity method directly
  444. // instead.
  445. //
  446. // Note: You must call the "Send" method on the returned request object in order
  447. // to execute the request.
  448. //
  449. // // Example sending a request using the GetOpenIdTokenForDeveloperIdentityRequest method.
  450. // req, resp := client.GetOpenIdTokenForDeveloperIdentityRequest(params)
  451. //
  452. // err := req.Send()
  453. // if err == nil { // resp is now filled
  454. // fmt.Println(resp)
  455. // }
  456. //
  457. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) {
  458. op := &request.Operation{
  459. Name: opGetOpenIdTokenForDeveloperIdentity,
  460. HTTPMethod: "POST",
  461. HTTPPath: "/",
  462. }
  463. if input == nil {
  464. input = &GetOpenIdTokenForDeveloperIdentityInput{}
  465. }
  466. req = c.newRequest(op, input, output)
  467. output = &GetOpenIdTokenForDeveloperIdentityOutput{}
  468. req.Data = output
  469. return
  470. }
  471. // Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token
  472. // for a user authenticated by your backend authentication process. Supplying
  473. // multiple logins will create an implicit linked account. You can only specify
  474. // one developer provider as part of the Logins map, which is linked to the
  475. // identity pool. The developer provider is the "domain" by which Cognito will
  476. // refer to your users.
  477. //
  478. // You can use GetOpenIdTokenForDeveloperIdentity to create a new identity
  479. // and to link new logins (that is, user credentials issued by a public provider
  480. // or developer provider) to an existing identity. When you want to create a
  481. // new identity, the IdentityId should be null. When you want to associate a
  482. // new login with an existing authenticated/unauthenticated identity, you can
  483. // do so by providing the existing IdentityId. This API will create the identity
  484. // in the specified IdentityPoolId.
  485. //
  486. // You must use AWS Developer credentials to call this API.
  487. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentity(input *GetOpenIdTokenForDeveloperIdentityInput) (*GetOpenIdTokenForDeveloperIdentityOutput, error) {
  488. req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input)
  489. err := req.Send()
  490. return out, err
  491. }
  492. const opListIdentities = "ListIdentities"
  493. // ListIdentitiesRequest generates a "aws/request.Request" representing the
  494. // client's request for the ListIdentities operation. The "output" return
  495. // value can be used to capture response data after the request's "Send" method
  496. // is called.
  497. //
  498. // Creating a request object using this method should be used when you want to inject
  499. // custom logic into the request's lifecycle using a custom handler, or if you want to
  500. // access properties on the request object before or after sending the request. If
  501. // you just want the service response, call the ListIdentities method directly
  502. // instead.
  503. //
  504. // Note: You must call the "Send" method on the returned request object in order
  505. // to execute the request.
  506. //
  507. // // Example sending a request using the ListIdentitiesRequest method.
  508. // req, resp := client.ListIdentitiesRequest(params)
  509. //
  510. // err := req.Send()
  511. // if err == nil { // resp is now filled
  512. // fmt.Println(resp)
  513. // }
  514. //
  515. func (c *CognitoIdentity) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) {
  516. op := &request.Operation{
  517. Name: opListIdentities,
  518. HTTPMethod: "POST",
  519. HTTPPath: "/",
  520. }
  521. if input == nil {
  522. input = &ListIdentitiesInput{}
  523. }
  524. req = c.newRequest(op, input, output)
  525. output = &ListIdentitiesOutput{}
  526. req.Data = output
  527. return
  528. }
  529. // Lists the identities in a pool.
  530. //
  531. // You must use AWS Developer credentials to call this API.
  532. func (c *CognitoIdentity) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) {
  533. req, out := c.ListIdentitiesRequest(input)
  534. err := req.Send()
  535. return out, err
  536. }
  537. const opListIdentityPools = "ListIdentityPools"
  538. // ListIdentityPoolsRequest generates a "aws/request.Request" representing the
  539. // client's request for the ListIdentityPools operation. The "output" return
  540. // value can be used to capture response data after the request's "Send" method
  541. // is called.
  542. //
  543. // Creating a request object using this method should be used when you want to inject
  544. // custom logic into the request's lifecycle using a custom handler, or if you want to
  545. // access properties on the request object before or after sending the request. If
  546. // you just want the service response, call the ListIdentityPools method directly
  547. // instead.
  548. //
  549. // Note: You must call the "Send" method on the returned request object in order
  550. // to execute the request.
  551. //
  552. // // Example sending a request using the ListIdentityPoolsRequest method.
  553. // req, resp := client.ListIdentityPoolsRequest(params)
  554. //
  555. // err := req.Send()
  556. // if err == nil { // resp is now filled
  557. // fmt.Println(resp)
  558. // }
  559. //
  560. func (c *CognitoIdentity) ListIdentityPoolsRequest(input *ListIdentityPoolsInput) (req *request.Request, output *ListIdentityPoolsOutput) {
  561. op := &request.Operation{
  562. Name: opListIdentityPools,
  563. HTTPMethod: "POST",
  564. HTTPPath: "/",
  565. }
  566. if input == nil {
  567. input = &ListIdentityPoolsInput{}
  568. }
  569. req = c.newRequest(op, input, output)
  570. output = &ListIdentityPoolsOutput{}
  571. req.Data = output
  572. return
  573. }
  574. // Lists all of the Cognito identity pools registered for your account.
  575. //
  576. // You must use AWS Developer credentials to call this API.
  577. func (c *CognitoIdentity) ListIdentityPools(input *ListIdentityPoolsInput) (*ListIdentityPoolsOutput, error) {
  578. req, out := c.ListIdentityPoolsRequest(input)
  579. err := req.Send()
  580. return out, err
  581. }
  582. const opLookupDeveloperIdentity = "LookupDeveloperIdentity"
  583. // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the
  584. // client's request for the LookupDeveloperIdentity operation. The "output" return
  585. // value can be used to capture response data after the request's "Send" method
  586. // is called.
  587. //
  588. // Creating a request object using this method should be used when you want to inject
  589. // custom logic into the request's lifecycle using a custom handler, or if you want to
  590. // access properties on the request object before or after sending the request. If
  591. // you just want the service response, call the LookupDeveloperIdentity method directly
  592. // instead.
  593. //
  594. // Note: You must call the "Send" method on the returned request object in order
  595. // to execute the request.
  596. //
  597. // // Example sending a request using the LookupDeveloperIdentityRequest method.
  598. // req, resp := client.LookupDeveloperIdentityRequest(params)
  599. //
  600. // err := req.Send()
  601. // if err == nil { // resp is now filled
  602. // fmt.Println(resp)
  603. // }
  604. //
  605. func (c *CognitoIdentity) LookupDeveloperIdentityRequest(input *LookupDeveloperIdentityInput) (req *request.Request, output *LookupDeveloperIdentityOutput) {
  606. op := &request.Operation{
  607. Name: opLookupDeveloperIdentity,
  608. HTTPMethod: "POST",
  609. HTTPPath: "/",
  610. }
  611. if input == nil {
  612. input = &LookupDeveloperIdentityInput{}
  613. }
  614. req = c.newRequest(op, input, output)
  615. output = &LookupDeveloperIdentityOutput{}
  616. req.Data = output
  617. return
  618. }
  619. // Retrieves the IdentityID associated with a DeveloperUserIdentifier or the
  620. // list of DeveloperUserIdentifiers associated with an IdentityId for an existing
  621. // identity. Either IdentityID or DeveloperUserIdentifier must not be null.
  622. // If you supply only one of these values, the other value will be searched
  623. // in the database and returned as a part of the response. If you supply both,
  624. // DeveloperUserIdentifier will be matched against IdentityID. If the values
  625. // are verified against the database, the response returns both values and is
  626. // the same as the request. Otherwise a ResourceConflictException is thrown.
  627. //
  628. // You must use AWS Developer credentials to call this API.
  629. func (c *CognitoIdentity) LookupDeveloperIdentity(input *LookupDeveloperIdentityInput) (*LookupDeveloperIdentityOutput, error) {
  630. req, out := c.LookupDeveloperIdentityRequest(input)
  631. err := req.Send()
  632. return out, err
  633. }
  634. const opMergeDeveloperIdentities = "MergeDeveloperIdentities"
  635. // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the
  636. // client's request for the MergeDeveloperIdentities operation. The "output" return
  637. // value can be used to capture response data after the request's "Send" method
  638. // is called.
  639. //
  640. // Creating a request object using this method should be used when you want to inject
  641. // custom logic into the request's lifecycle using a custom handler, or if you want to
  642. // access properties on the request object before or after sending the request. If
  643. // you just want the service response, call the MergeDeveloperIdentities method directly
  644. // instead.
  645. //
  646. // Note: You must call the "Send" method on the returned request object in order
  647. // to execute the request.
  648. //
  649. // // Example sending a request using the MergeDeveloperIdentitiesRequest method.
  650. // req, resp := client.MergeDeveloperIdentitiesRequest(params)
  651. //
  652. // err := req.Send()
  653. // if err == nil { // resp is now filled
  654. // fmt.Println(resp)
  655. // }
  656. //
  657. func (c *CognitoIdentity) MergeDeveloperIdentitiesRequest(input *MergeDeveloperIdentitiesInput) (req *request.Request, output *MergeDeveloperIdentitiesOutput) {
  658. op := &request.Operation{
  659. Name: opMergeDeveloperIdentities,
  660. HTTPMethod: "POST",
  661. HTTPPath: "/",
  662. }
  663. if input == nil {
  664. input = &MergeDeveloperIdentitiesInput{}
  665. }
  666. req = c.newRequest(op, input, output)
  667. output = &MergeDeveloperIdentitiesOutput{}
  668. req.Data = output
  669. return
  670. }
  671. // Merges two users having different IdentityIds, existing in the same identity
  672. // pool, and identified by the same developer provider. You can use this action
  673. // to request that discrete users be merged and identified as a single user
  674. // in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier)
  675. // with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated
  676. // users can be merged. If the users to be merged are associated with the same
  677. // public provider, but as two different users, an exception will be thrown.
  678. //
  679. // You must use AWS Developer credentials to call this API.
  680. func (c *CognitoIdentity) MergeDeveloperIdentities(input *MergeDeveloperIdentitiesInput) (*MergeDeveloperIdentitiesOutput, error) {
  681. req, out := c.MergeDeveloperIdentitiesRequest(input)
  682. err := req.Send()
  683. return out, err
  684. }
  685. const opSetIdentityPoolRoles = "SetIdentityPoolRoles"
  686. // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the
  687. // client's request for the SetIdentityPoolRoles operation. The "output" return
  688. // value can be used to capture response data after the request's "Send" method
  689. // is called.
  690. //
  691. // Creating a request object using this method should be used when you want to inject
  692. // custom logic into the request's lifecycle using a custom handler, or if you want to
  693. // access properties on the request object before or after sending the request. If
  694. // you just want the service response, call the SetIdentityPoolRoles method directly
  695. // instead.
  696. //
  697. // Note: You must call the "Send" method on the returned request object in order
  698. // to execute the request.
  699. //
  700. // // Example sending a request using the SetIdentityPoolRolesRequest method.
  701. // req, resp := client.SetIdentityPoolRolesRequest(params)
  702. //
  703. // err := req.Send()
  704. // if err == nil { // resp is now filled
  705. // fmt.Println(resp)
  706. // }
  707. //
  708. func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRolesInput) (req *request.Request, output *SetIdentityPoolRolesOutput) {
  709. op := &request.Operation{
  710. Name: opSetIdentityPoolRoles,
  711. HTTPMethod: "POST",
  712. HTTPPath: "/",
  713. }
  714. if input == nil {
  715. input = &SetIdentityPoolRolesInput{}
  716. }
  717. req = c.newRequest(op, input, output)
  718. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  719. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  720. output = &SetIdentityPoolRolesOutput{}
  721. req.Data = output
  722. return
  723. }
  724. // Sets the roles for an identity pool. These roles are used when making calls
  725. // to GetCredentialsForIdentity action.
  726. //
  727. // You must use AWS Developer credentials to call this API.
  728. func (c *CognitoIdentity) SetIdentityPoolRoles(input *SetIdentityPoolRolesInput) (*SetIdentityPoolRolesOutput, error) {
  729. req, out := c.SetIdentityPoolRolesRequest(input)
  730. err := req.Send()
  731. return out, err
  732. }
  733. const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity"
  734. // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the
  735. // client's request for the UnlinkDeveloperIdentity operation. The "output" return
  736. // value can be used to capture response data after the request's "Send" method
  737. // is called.
  738. //
  739. // Creating a request object using this method should be used when you want to inject
  740. // custom logic into the request's lifecycle using a custom handler, or if you want to
  741. // access properties on the request object before or after sending the request. If
  742. // you just want the service response, call the UnlinkDeveloperIdentity method directly
  743. // instead.
  744. //
  745. // Note: You must call the "Send" method on the returned request object in order
  746. // to execute the request.
  747. //
  748. // // Example sending a request using the UnlinkDeveloperIdentityRequest method.
  749. // req, resp := client.UnlinkDeveloperIdentityRequest(params)
  750. //
  751. // err := req.Send()
  752. // if err == nil { // resp is now filled
  753. // fmt.Println(resp)
  754. // }
  755. //
  756. func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperIdentityInput) (req *request.Request, output *UnlinkDeveloperIdentityOutput) {
  757. op := &request.Operation{
  758. Name: opUnlinkDeveloperIdentity,
  759. HTTPMethod: "POST",
  760. HTTPPath: "/",
  761. }
  762. if input == nil {
  763. input = &UnlinkDeveloperIdentityInput{}
  764. }
  765. req = c.newRequest(op, input, output)
  766. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  767. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  768. output = &UnlinkDeveloperIdentityOutput{}
  769. req.Data = output
  770. return
  771. }
  772. // Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer
  773. // users will be considered new identities next time they are seen. If, for
  774. // a given Cognito identity, you remove all federated identities as well as
  775. // the developer user identifier, the Cognito identity becomes inaccessible.
  776. //
  777. // You must use AWS Developer credentials to call this API.
  778. func (c *CognitoIdentity) UnlinkDeveloperIdentity(input *UnlinkDeveloperIdentityInput) (*UnlinkDeveloperIdentityOutput, error) {
  779. req, out := c.UnlinkDeveloperIdentityRequest(input)
  780. err := req.Send()
  781. return out, err
  782. }
  783. const opUnlinkIdentity = "UnlinkIdentity"
  784. // UnlinkIdentityRequest generates a "aws/request.Request" representing the
  785. // client's request for the UnlinkIdentity operation. The "output" return
  786. // value can be used to capture response data after the request's "Send" method
  787. // is called.
  788. //
  789. // Creating a request object using this method should be used when you want to inject
  790. // custom logic into the request's lifecycle using a custom handler, or if you want to
  791. // access properties on the request object before or after sending the request. If
  792. // you just want the service response, call the UnlinkIdentity method directly
  793. // instead.
  794. //
  795. // Note: You must call the "Send" method on the returned request object in order
  796. // to execute the request.
  797. //
  798. // // Example sending a request using the UnlinkIdentityRequest method.
  799. // req, resp := client.UnlinkIdentityRequest(params)
  800. //
  801. // err := req.Send()
  802. // if err == nil { // resp is now filled
  803. // fmt.Println(resp)
  804. // }
  805. //
  806. func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req *request.Request, output *UnlinkIdentityOutput) {
  807. op := &request.Operation{
  808. Name: opUnlinkIdentity,
  809. HTTPMethod: "POST",
  810. HTTPPath: "/",
  811. }
  812. if input == nil {
  813. input = &UnlinkIdentityInput{}
  814. }
  815. req = c.newRequest(op, input, output)
  816. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  817. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  818. output = &UnlinkIdentityOutput{}
  819. req.Data = output
  820. return
  821. }
  822. // Unlinks a federated identity from an existing account. Unlinked logins will
  823. // be considered new identities next time they are seen. Removing the last linked
  824. // login will make this identity inaccessible.
  825. //
  826. // This is a public API. You do not need any credentials to call this API.
  827. func (c *CognitoIdentity) UnlinkIdentity(input *UnlinkIdentityInput) (*UnlinkIdentityOutput, error) {
  828. req, out := c.UnlinkIdentityRequest(input)
  829. err := req.Send()
  830. return out, err
  831. }
  832. const opUpdateIdentityPool = "UpdateIdentityPool"
  833. // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the
  834. // client's request for the UpdateIdentityPool operation. The "output" return
  835. // value can be used to capture response data after the request's "Send" method
  836. // is called.
  837. //
  838. // Creating a request object using this method should be used when you want to inject
  839. // custom logic into the request's lifecycle using a custom handler, or if you want to
  840. // access properties on the request object before or after sending the request. If
  841. // you just want the service response, call the UpdateIdentityPool method directly
  842. // instead.
  843. //
  844. // Note: You must call the "Send" method on the returned request object in order
  845. // to execute the request.
  846. //
  847. // // Example sending a request using the UpdateIdentityPoolRequest method.
  848. // req, resp := client.UpdateIdentityPoolRequest(params)
  849. //
  850. // err := req.Send()
  851. // if err == nil { // resp is now filled
  852. // fmt.Println(resp)
  853. // }
  854. //
  855. func (c *CognitoIdentity) UpdateIdentityPoolRequest(input *IdentityPool) (req *request.Request, output *IdentityPool) {
  856. op := &request.Operation{
  857. Name: opUpdateIdentityPool,
  858. HTTPMethod: "POST",
  859. HTTPPath: "/",
  860. }
  861. if input == nil {
  862. input = &IdentityPool{}
  863. }
  864. req = c.newRequest(op, input, output)
  865. output = &IdentityPool{}
  866. req.Data = output
  867. return
  868. }
  869. // Updates a user pool.
  870. //
  871. // You must use AWS Developer credentials to call this API.
  872. func (c *CognitoIdentity) UpdateIdentityPool(input *IdentityPool) (*IdentityPool, error) {
  873. req, out := c.UpdateIdentityPoolRequest(input)
  874. err := req.Send()
  875. return out, err
  876. }
  877. // Input to the CreateIdentityPool action.
  878. type CreateIdentityPoolInput struct {
  879. _ struct{} `type:"structure"`
  880. // TRUE if the identity pool supports unauthenticated logins.
  881. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  882. // An array of Amazon Cognito Identity user pools.
  883. CognitoIdentityProviders []*Provider `type:"list"`
  884. // The "domain" by which Cognito will refer to your users. This name acts as
  885. // a placeholder that allows your backend and the Cognito service to communicate
  886. // about the developer provider. For the DeveloperProviderName, you can use
  887. // letters as well as period (.), underscore (_), and dash (-).
  888. //
  889. // Once you have set a developer provider name, you cannot change it. Please
  890. // take care in setting this parameter.
  891. DeveloperProviderName *string `min:"1" type:"string"`
  892. // A string that you provide.
  893. IdentityPoolName *string `min:"1" type:"string" required:"true"`
  894. // A list of OpendID Connect provider ARNs.
  895. OpenIdConnectProviderARNs []*string `type:"list"`
  896. // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
  897. // pool.
  898. SamlProviderARNs []*string `type:"list"`
  899. // Optional key:value pairs mapping provider names to provider app IDs.
  900. SupportedLoginProviders map[string]*string `type:"map"`
  901. }
  902. // String returns the string representation
  903. func (s CreateIdentityPoolInput) String() string {
  904. return awsutil.Prettify(s)
  905. }
  906. // GoString returns the string representation
  907. func (s CreateIdentityPoolInput) GoString() string {
  908. return s.String()
  909. }
  910. // Validate inspects the fields of the type to determine if they are valid.
  911. func (s *CreateIdentityPoolInput) Validate() error {
  912. invalidParams := request.ErrInvalidParams{Context: "CreateIdentityPoolInput"}
  913. if s.AllowUnauthenticatedIdentities == nil {
  914. invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
  915. }
  916. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  917. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  918. }
  919. if s.IdentityPoolName == nil {
  920. invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
  921. }
  922. if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
  923. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
  924. }
  925. if s.CognitoIdentityProviders != nil {
  926. for i, v := range s.CognitoIdentityProviders {
  927. if v == nil {
  928. continue
  929. }
  930. if err := v.Validate(); err != nil {
  931. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
  932. }
  933. }
  934. }
  935. if invalidParams.Len() > 0 {
  936. return invalidParams
  937. }
  938. return nil
  939. }
  940. // Credentials for the provided identity ID.
  941. type Credentials struct {
  942. _ struct{} `type:"structure"`
  943. // The Access Key portion of the credentials.
  944. AccessKeyId *string `type:"string"`
  945. // The date at which these credentials will expire.
  946. Expiration *time.Time `type:"timestamp" timestampFormat:"unix"`
  947. // The Secret Access Key portion of the credentials
  948. SecretKey *string `type:"string"`
  949. // The Session Token portion of the credentials
  950. SessionToken *string `type:"string"`
  951. }
  952. // String returns the string representation
  953. func (s Credentials) String() string {
  954. return awsutil.Prettify(s)
  955. }
  956. // GoString returns the string representation
  957. func (s Credentials) GoString() string {
  958. return s.String()
  959. }
  960. // Input to the DeleteIdentities action.
  961. type DeleteIdentitiesInput struct {
  962. _ struct{} `type:"structure"`
  963. // A list of 1-60 identities that you want to delete.
  964. IdentityIdsToDelete []*string `min:"1" type:"list" required:"true"`
  965. }
  966. // String returns the string representation
  967. func (s DeleteIdentitiesInput) String() string {
  968. return awsutil.Prettify(s)
  969. }
  970. // GoString returns the string representation
  971. func (s DeleteIdentitiesInput) GoString() string {
  972. return s.String()
  973. }
  974. // Validate inspects the fields of the type to determine if they are valid.
  975. func (s *DeleteIdentitiesInput) Validate() error {
  976. invalidParams := request.ErrInvalidParams{Context: "DeleteIdentitiesInput"}
  977. if s.IdentityIdsToDelete == nil {
  978. invalidParams.Add(request.NewErrParamRequired("IdentityIdsToDelete"))
  979. }
  980. if s.IdentityIdsToDelete != nil && len(s.IdentityIdsToDelete) < 1 {
  981. invalidParams.Add(request.NewErrParamMinLen("IdentityIdsToDelete", 1))
  982. }
  983. if invalidParams.Len() > 0 {
  984. return invalidParams
  985. }
  986. return nil
  987. }
  988. // Returned in response to a successful DeleteIdentities operation.
  989. type DeleteIdentitiesOutput struct {
  990. _ struct{} `type:"structure"`
  991. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  992. // and IdentityId.
  993. UnprocessedIdentityIds []*UnprocessedIdentityId `type:"list"`
  994. }
  995. // String returns the string representation
  996. func (s DeleteIdentitiesOutput) String() string {
  997. return awsutil.Prettify(s)
  998. }
  999. // GoString returns the string representation
  1000. func (s DeleteIdentitiesOutput) GoString() string {
  1001. return s.String()
  1002. }
  1003. // Input to the DeleteIdentityPool action.
  1004. type DeleteIdentityPoolInput struct {
  1005. _ struct{} `type:"structure"`
  1006. // An identity pool ID in the format REGION:GUID.
  1007. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1008. }
  1009. // String returns the string representation
  1010. func (s DeleteIdentityPoolInput) String() string {
  1011. return awsutil.Prettify(s)
  1012. }
  1013. // GoString returns the string representation
  1014. func (s DeleteIdentityPoolInput) GoString() string {
  1015. return s.String()
  1016. }
  1017. // Validate inspects the fields of the type to determine if they are valid.
  1018. func (s *DeleteIdentityPoolInput) Validate() error {
  1019. invalidParams := request.ErrInvalidParams{Context: "DeleteIdentityPoolInput"}
  1020. if s.IdentityPoolId == nil {
  1021. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1022. }
  1023. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1024. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1025. }
  1026. if invalidParams.Len() > 0 {
  1027. return invalidParams
  1028. }
  1029. return nil
  1030. }
  1031. type DeleteIdentityPoolOutput struct {
  1032. _ struct{} `type:"structure"`
  1033. }
  1034. // String returns the string representation
  1035. func (s DeleteIdentityPoolOutput) String() string {
  1036. return awsutil.Prettify(s)
  1037. }
  1038. // GoString returns the string representation
  1039. func (s DeleteIdentityPoolOutput) GoString() string {
  1040. return s.String()
  1041. }
  1042. // Input to the DescribeIdentity action.
  1043. type DescribeIdentityInput struct {
  1044. _ struct{} `type:"structure"`
  1045. // A unique identifier in the format REGION:GUID.
  1046. IdentityId *string `min:"1" type:"string" required:"true"`
  1047. }
  1048. // String returns the string representation
  1049. func (s DescribeIdentityInput) String() string {
  1050. return awsutil.Prettify(s)
  1051. }
  1052. // GoString returns the string representation
  1053. func (s DescribeIdentityInput) GoString() string {
  1054. return s.String()
  1055. }
  1056. // Validate inspects the fields of the type to determine if they are valid.
  1057. func (s *DescribeIdentityInput) Validate() error {
  1058. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityInput"}
  1059. if s.IdentityId == nil {
  1060. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1061. }
  1062. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1063. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1064. }
  1065. if invalidParams.Len() > 0 {
  1066. return invalidParams
  1067. }
  1068. return nil
  1069. }
  1070. // Input to the DescribeIdentityPool action.
  1071. type DescribeIdentityPoolInput struct {
  1072. _ struct{} `type:"structure"`
  1073. // An identity pool ID in the format REGION:GUID.
  1074. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1075. }
  1076. // String returns the string representation
  1077. func (s DescribeIdentityPoolInput) String() string {
  1078. return awsutil.Prettify(s)
  1079. }
  1080. // GoString returns the string representation
  1081. func (s DescribeIdentityPoolInput) GoString() string {
  1082. return s.String()
  1083. }
  1084. // Validate inspects the fields of the type to determine if they are valid.
  1085. func (s *DescribeIdentityPoolInput) Validate() error {
  1086. invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolInput"}
  1087. if s.IdentityPoolId == nil {
  1088. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1089. }
  1090. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1091. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1092. }
  1093. if invalidParams.Len() > 0 {
  1094. return invalidParams
  1095. }
  1096. return nil
  1097. }
  1098. // Input to the GetCredentialsForIdentity action.
  1099. type GetCredentialsForIdentityInput struct {
  1100. _ struct{} `type:"structure"`
  1101. // The Amazon Resource Name (ARN) of the role to be assumed when multiple roles
  1102. // were received in the token from the identity provider. For example, a SAML-based
  1103. // identity provider. This parameter is optional for identity providers that
  1104. // do not support role customization.
  1105. CustomRoleArn *string `min:"20" type:"string"`
  1106. // A unique identifier in the format REGION:GUID.
  1107. IdentityId *string `min:"1" type:"string" required:"true"`
  1108. // A set of optional name-value pairs that map provider names to provider tokens.
  1109. Logins map[string]*string `type:"map"`
  1110. }
  1111. // String returns the string representation
  1112. func (s GetCredentialsForIdentityInput) String() string {
  1113. return awsutil.Prettify(s)
  1114. }
  1115. // GoString returns the string representation
  1116. func (s GetCredentialsForIdentityInput) GoString() string {
  1117. return s.String()
  1118. }
  1119. // Validate inspects the fields of the type to determine if they are valid.
  1120. func (s *GetCredentialsForIdentityInput) Validate() error {
  1121. invalidParams := request.ErrInvalidParams{Context: "GetCredentialsForIdentityInput"}
  1122. if s.CustomRoleArn != nil && len(*s.CustomRoleArn) < 20 {
  1123. invalidParams.Add(request.NewErrParamMinLen("CustomRoleArn", 20))
  1124. }
  1125. if s.IdentityId == nil {
  1126. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1127. }
  1128. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1129. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1130. }
  1131. if invalidParams.Len() > 0 {
  1132. return invalidParams
  1133. }
  1134. return nil
  1135. }
  1136. // Returned in response to a successful GetCredentialsForIdentity operation.
  1137. type GetCredentialsForIdentityOutput struct {
  1138. _ struct{} `type:"structure"`
  1139. // Credentials for the provided identity ID.
  1140. Credentials *Credentials `type:"structure"`
  1141. // A unique identifier in the format REGION:GUID.
  1142. IdentityId *string `min:"1" type:"string"`
  1143. }
  1144. // String returns the string representation
  1145. func (s GetCredentialsForIdentityOutput) String() string {
  1146. return awsutil.Prettify(s)
  1147. }
  1148. // GoString returns the string representation
  1149. func (s GetCredentialsForIdentityOutput) GoString() string {
  1150. return s.String()
  1151. }
  1152. // Input to the GetId action.
  1153. type GetIdInput struct {
  1154. _ struct{} `type:"structure"`
  1155. // A standard AWS account ID (9+ digits).
  1156. AccountId *string `min:"1" type:"string"`
  1157. // An identity pool ID in the format REGION:GUID.
  1158. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1159. // A set of optional name-value pairs that map provider names to provider tokens.
  1160. //
  1161. // The available provider names for Logins are as follows: Facebook: graph.facebook.com
  1162. // Google: accounts.google.com Amazon: www.amazon.com Twitter: api.twitter.com
  1163. // Digits: www.digits.com
  1164. Logins map[string]*string `type:"map"`
  1165. }
  1166. // String returns the string representation
  1167. func (s GetIdInput) String() string {
  1168. return awsutil.Prettify(s)
  1169. }
  1170. // GoString returns the string representation
  1171. func (s GetIdInput) GoString() string {
  1172. return s.String()
  1173. }
  1174. // Validate inspects the fields of the type to determine if they are valid.
  1175. func (s *GetIdInput) Validate() error {
  1176. invalidParams := request.ErrInvalidParams{Context: "GetIdInput"}
  1177. if s.AccountId != nil && len(*s.AccountId) < 1 {
  1178. invalidParams.Add(request.NewErrParamMinLen("AccountId", 1))
  1179. }
  1180. if s.IdentityPoolId == nil {
  1181. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1182. }
  1183. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1184. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1185. }
  1186. if invalidParams.Len() > 0 {
  1187. return invalidParams
  1188. }
  1189. return nil
  1190. }
  1191. // Returned in response to a GetId request.
  1192. type GetIdOutput struct {
  1193. _ struct{} `type:"structure"`
  1194. // A unique identifier in the format REGION:GUID.
  1195. IdentityId *string `min:"1" type:"string"`
  1196. }
  1197. // String returns the string representation
  1198. func (s GetIdOutput) String() string {
  1199. return awsutil.Prettify(s)
  1200. }
  1201. // GoString returns the string representation
  1202. func (s GetIdOutput) GoString() string {
  1203. return s.String()
  1204. }
  1205. // Input to the GetIdentityPoolRoles action.
  1206. type GetIdentityPoolRolesInput struct {
  1207. _ struct{} `type:"structure"`
  1208. // An identity pool ID in the format REGION:GUID.
  1209. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1210. }
  1211. // String returns the string representation
  1212. func (s GetIdentityPoolRolesInput) String() string {
  1213. return awsutil.Prettify(s)
  1214. }
  1215. // GoString returns the string representation
  1216. func (s GetIdentityPoolRolesInput) GoString() string {
  1217. return s.String()
  1218. }
  1219. // Validate inspects the fields of the type to determine if they are valid.
  1220. func (s *GetIdentityPoolRolesInput) Validate() error {
  1221. invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolRolesInput"}
  1222. if s.IdentityPoolId == nil {
  1223. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1224. }
  1225. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1226. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1227. }
  1228. if invalidParams.Len() > 0 {
  1229. return invalidParams
  1230. }
  1231. return nil
  1232. }
  1233. // Returned in response to a successful GetIdentityPoolRoles operation.
  1234. type GetIdentityPoolRolesOutput struct {
  1235. _ struct{} `type:"structure"`
  1236. // An identity pool ID in the format REGION:GUID.
  1237. IdentityPoolId *string `min:"1" type:"string"`
  1238. // The map of roles associated with this pool. Currently only authenticated
  1239. // and unauthenticated roles are supported.
  1240. Roles map[string]*string `type:"map"`
  1241. }
  1242. // String returns the string representation
  1243. func (s GetIdentityPoolRolesOutput) String() string {
  1244. return awsutil.Prettify(s)
  1245. }
  1246. // GoString returns the string representation
  1247. func (s GetIdentityPoolRolesOutput) GoString() string {
  1248. return s.String()
  1249. }
  1250. // Input to the GetOpenIdTokenForDeveloperIdentity action.
  1251. type GetOpenIdTokenForDeveloperIdentityInput struct {
  1252. _ struct{} `type:"structure"`
  1253. // A unique identifier in the format REGION:GUID.
  1254. IdentityId *string `min:"1" type:"string"`
  1255. // An identity pool ID in the format REGION:GUID.
  1256. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1257. // A set of optional name-value pairs that map provider names to provider tokens.
  1258. // Each name-value pair represents a user from a public provider or developer
  1259. // provider. If the user is from a developer provider, the name-value pair will
  1260. // follow the syntax "developer_provider_name": "developer_user_identifier".
  1261. // The developer provider is the "domain" by which Cognito will refer to your
  1262. // users; you provided this domain while creating/updating the identity pool.
  1263. // The developer user identifier is an identifier from your backend that uniquely
  1264. // identifies a user. When you create an identity pool, you can specify the
  1265. // supported logins.
  1266. Logins map[string]*string `type:"map" required:"true"`
  1267. // The expiration time of the token, in seconds. You can specify a custom expiration
  1268. // time for the token so that you can cache it. If you don't provide an expiration
  1269. // time, the token is valid for 15 minutes. You can exchange the token with
  1270. // Amazon STS for temporary AWS credentials, which are valid for a maximum of
  1271. // one hour. The maximum token duration you can set is 24 hours. You should
  1272. // take care in setting the expiration time for a token, as there are significant
  1273. // security implications: an attacker could use a leaked token to access your
  1274. // AWS resources for the token's duration.
  1275. TokenDuration *int64 `min:"1" type:"long"`
  1276. }
  1277. // String returns the string representation
  1278. func (s GetOpenIdTokenForDeveloperIdentityInput) String() string {
  1279. return awsutil.Prettify(s)
  1280. }
  1281. // GoString returns the string representation
  1282. func (s GetOpenIdTokenForDeveloperIdentityInput) GoString() string {
  1283. return s.String()
  1284. }
  1285. // Validate inspects the fields of the type to determine if they are valid.
  1286. func (s *GetOpenIdTokenForDeveloperIdentityInput) Validate() error {
  1287. invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenForDeveloperIdentityInput"}
  1288. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1289. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1290. }
  1291. if s.IdentityPoolId == nil {
  1292. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1293. }
  1294. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1295. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1296. }
  1297. if s.Logins == nil {
  1298. invalidParams.Add(request.NewErrParamRequired("Logins"))
  1299. }
  1300. if s.TokenDuration != nil && *s.TokenDuration < 1 {
  1301. invalidParams.Add(request.NewErrParamMinValue("TokenDuration", 1))
  1302. }
  1303. if invalidParams.Len() > 0 {
  1304. return invalidParams
  1305. }
  1306. return nil
  1307. }
  1308. // Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.
  1309. type GetOpenIdTokenForDeveloperIdentityOutput struct {
  1310. _ struct{} `type:"structure"`
  1311. // A unique identifier in the format REGION:GUID.
  1312. IdentityId *string `min:"1" type:"string"`
  1313. // An OpenID token.
  1314. Token *string `type:"string"`
  1315. }
  1316. // String returns the string representation
  1317. func (s GetOpenIdTokenForDeveloperIdentityOutput) String() string {
  1318. return awsutil.Prettify(s)
  1319. }
  1320. // GoString returns the string representation
  1321. func (s GetOpenIdTokenForDeveloperIdentityOutput) GoString() string {
  1322. return s.String()
  1323. }
  1324. // Input to the GetOpenIdToken action.
  1325. type GetOpenIdTokenInput struct {
  1326. _ struct{} `type:"structure"`
  1327. // A unique identifier in the format REGION:GUID.
  1328. IdentityId *string `min:"1" type:"string" required:"true"`
  1329. // A set of optional name-value pairs that map provider names to provider tokens.
  1330. // When using graph.facebook.com and www.amazon.com, supply the access_token
  1331. // returned from the provider's authflow. For accounts.google.com or any other
  1332. // OpenId Connect provider, always include the id_token.
  1333. Logins map[string]*string `type:"map"`
  1334. }
  1335. // String returns the string representation
  1336. func (s GetOpenIdTokenInput) String() string {
  1337. return awsutil.Prettify(s)
  1338. }
  1339. // GoString returns the string representation
  1340. func (s GetOpenIdTokenInput) GoString() string {
  1341. return s.String()
  1342. }
  1343. // Validate inspects the fields of the type to determine if they are valid.
  1344. func (s *GetOpenIdTokenInput) Validate() error {
  1345. invalidParams := request.ErrInvalidParams{Context: "GetOpenIdTokenInput"}
  1346. if s.IdentityId == nil {
  1347. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1348. }
  1349. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1350. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1351. }
  1352. if invalidParams.Len() > 0 {
  1353. return invalidParams
  1354. }
  1355. return nil
  1356. }
  1357. // Returned in response to a successful GetOpenIdToken request.
  1358. type GetOpenIdTokenOutput struct {
  1359. _ struct{} `type:"structure"`
  1360. // A unique identifier in the format REGION:GUID. Note that the IdentityId returned
  1361. // may not match the one passed on input.
  1362. IdentityId *string `min:"1" type:"string"`
  1363. // An OpenID token, valid for 15 minutes.
  1364. Token *string `type:"string"`
  1365. }
  1366. // String returns the string representation
  1367. func (s GetOpenIdTokenOutput) String() string {
  1368. return awsutil.Prettify(s)
  1369. }
  1370. // GoString returns the string representation
  1371. func (s GetOpenIdTokenOutput) GoString() string {
  1372. return s.String()
  1373. }
  1374. // A description of the identity.
  1375. type IdentityDescription struct {
  1376. _ struct{} `type:"structure"`
  1377. // Date on which the identity was created.
  1378. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1379. // A unique identifier in the format REGION:GUID.
  1380. IdentityId *string `min:"1" type:"string"`
  1381. // Date on which the identity was last modified.
  1382. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  1383. // A set of optional name-value pairs that map provider names to provider tokens.
  1384. Logins []*string `type:"list"`
  1385. }
  1386. // String returns the string representation
  1387. func (s IdentityDescription) String() string {
  1388. return awsutil.Prettify(s)
  1389. }
  1390. // GoString returns the string representation
  1391. func (s IdentityDescription) GoString() string {
  1392. return s.String()
  1393. }
  1394. // An object representing a Cognito identity pool.
  1395. type IdentityPool struct {
  1396. _ struct{} `type:"structure"`
  1397. // TRUE if the identity pool supports unauthenticated logins.
  1398. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  1399. // A list representing an Amazon Cognito Identity User Pool and its client ID.
  1400. CognitoIdentityProviders []*Provider `type:"list"`
  1401. // The "domain" by which Cognito will refer to your users.
  1402. DeveloperProviderName *string `min:"1" type:"string"`
  1403. // An identity pool ID in the format REGION:GUID.
  1404. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1405. // A string that you provide.
  1406. IdentityPoolName *string `min:"1" type:"string" required:"true"`
  1407. // A list of OpendID Connect provider ARNs.
  1408. OpenIdConnectProviderARNs []*string `type:"list"`
  1409. // An array of Amazon Resource Names (ARNs) of the SAML provider for your identity
  1410. // pool.
  1411. SamlProviderARNs []*string `type:"list"`
  1412. // Optional key:value pairs mapping provider names to provider app IDs.
  1413. SupportedLoginProviders map[string]*string `type:"map"`
  1414. }
  1415. // String returns the string representation
  1416. func (s IdentityPool) String() string {
  1417. return awsutil.Prettify(s)
  1418. }
  1419. // GoString returns the string representation
  1420. func (s IdentityPool) GoString() string {
  1421. return s.String()
  1422. }
  1423. // Validate inspects the fields of the type to determine if they are valid.
  1424. func (s *IdentityPool) Validate() error {
  1425. invalidParams := request.ErrInvalidParams{Context: "IdentityPool"}
  1426. if s.AllowUnauthenticatedIdentities == nil {
  1427. invalidParams.Add(request.NewErrParamRequired("AllowUnauthenticatedIdentities"))
  1428. }
  1429. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  1430. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  1431. }
  1432. if s.IdentityPoolId == nil {
  1433. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1434. }
  1435. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1436. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1437. }
  1438. if s.IdentityPoolName == nil {
  1439. invalidParams.Add(request.NewErrParamRequired("IdentityPoolName"))
  1440. }
  1441. if s.IdentityPoolName != nil && len(*s.IdentityPoolName) < 1 {
  1442. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolName", 1))
  1443. }
  1444. if s.CognitoIdentityProviders != nil {
  1445. for i, v := range s.CognitoIdentityProviders {
  1446. if v == nil {
  1447. continue
  1448. }
  1449. if err := v.Validate(); err != nil {
  1450. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CognitoIdentityProviders", i), err.(request.ErrInvalidParams))
  1451. }
  1452. }
  1453. }
  1454. if invalidParams.Len() > 0 {
  1455. return invalidParams
  1456. }
  1457. return nil
  1458. }
  1459. // A description of the identity pool.
  1460. type IdentityPoolShortDescription struct {
  1461. _ struct{} `type:"structure"`
  1462. // An identity pool ID in the format REGION:GUID.
  1463. IdentityPoolId *string `min:"1" type:"string"`
  1464. // A string that you provide.
  1465. IdentityPoolName *string `min:"1" type:"string"`
  1466. }
  1467. // String returns the string representation
  1468. func (s IdentityPoolShortDescription) String() string {
  1469. return awsutil.Prettify(s)
  1470. }
  1471. // GoString returns the string representation
  1472. func (s IdentityPoolShortDescription) GoString() string {
  1473. return s.String()
  1474. }
  1475. // Input to the ListIdentities action.
  1476. type ListIdentitiesInput struct {
  1477. _ struct{} `type:"structure"`
  1478. // An optional boolean parameter that allows you to hide disabled identities.
  1479. // If omitted, the ListIdentities API will include disabled identities in the
  1480. // response.
  1481. HideDisabled *bool `type:"boolean"`
  1482. // An identity pool ID in the format REGION:GUID.
  1483. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1484. // The maximum number of identities to return.
  1485. MaxResults *int64 `min:"1" type:"integer" required:"true"`
  1486. // A pagination token.
  1487. NextToken *string `min:"1" type:"string"`
  1488. }
  1489. // String returns the string representation
  1490. func (s ListIdentitiesInput) String() string {
  1491. return awsutil.Prettify(s)
  1492. }
  1493. // GoString returns the string representation
  1494. func (s ListIdentitiesInput) GoString() string {
  1495. return s.String()
  1496. }
  1497. // Validate inspects the fields of the type to determine if they are valid.
  1498. func (s *ListIdentitiesInput) Validate() error {
  1499. invalidParams := request.ErrInvalidParams{Context: "ListIdentitiesInput"}
  1500. if s.IdentityPoolId == nil {
  1501. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1502. }
  1503. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1504. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1505. }
  1506. if s.MaxResults == nil {
  1507. invalidParams.Add(request.NewErrParamRequired("MaxResults"))
  1508. }
  1509. if s.MaxResults != nil && *s.MaxResults < 1 {
  1510. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1511. }
  1512. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1513. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1514. }
  1515. if invalidParams.Len() > 0 {
  1516. return invalidParams
  1517. }
  1518. return nil
  1519. }
  1520. // The response to a ListIdentities request.
  1521. type ListIdentitiesOutput struct {
  1522. _ struct{} `type:"structure"`
  1523. // An object containing a set of identities and associated mappings.
  1524. Identities []*IdentityDescription `type:"list"`
  1525. // An identity pool ID in the format REGION:GUID.
  1526. IdentityPoolId *string `min:"1" type:"string"`
  1527. // A pagination token.
  1528. NextToken *string `min:"1" type:"string"`
  1529. }
  1530. // String returns the string representation
  1531. func (s ListIdentitiesOutput) String() string {
  1532. return awsutil.Prettify(s)
  1533. }
  1534. // GoString returns the string representation
  1535. func (s ListIdentitiesOutput) GoString() string {
  1536. return s.String()
  1537. }
  1538. // Input to the ListIdentityPools action.
  1539. type ListIdentityPoolsInput struct {
  1540. _ struct{} `type:"structure"`
  1541. // The maximum number of identities to return.
  1542. MaxResults *int64 `min:"1" type:"integer" required:"true"`
  1543. // A pagination token.
  1544. NextToken *string `min:"1" type:"string"`
  1545. }
  1546. // String returns the string representation
  1547. func (s ListIdentityPoolsInput) String() string {
  1548. return awsutil.Prettify(s)
  1549. }
  1550. // GoString returns the string representation
  1551. func (s ListIdentityPoolsInput) GoString() string {
  1552. return s.String()
  1553. }
  1554. // Validate inspects the fields of the type to determine if they are valid.
  1555. func (s *ListIdentityPoolsInput) Validate() error {
  1556. invalidParams := request.ErrInvalidParams{Context: "ListIdentityPoolsInput"}
  1557. if s.MaxResults == nil {
  1558. invalidParams.Add(request.NewErrParamRequired("MaxResults"))
  1559. }
  1560. if s.MaxResults != nil && *s.MaxResults < 1 {
  1561. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1562. }
  1563. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1564. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1565. }
  1566. if invalidParams.Len() > 0 {
  1567. return invalidParams
  1568. }
  1569. return nil
  1570. }
  1571. // The result of a successful ListIdentityPools action.
  1572. type ListIdentityPoolsOutput struct {
  1573. _ struct{} `type:"structure"`
  1574. // The identity pools returned by the ListIdentityPools action.
  1575. IdentityPools []*IdentityPoolShortDescription `type:"list"`
  1576. // A pagination token.
  1577. NextToken *string `min:"1" type:"string"`
  1578. }
  1579. // String returns the string representation
  1580. func (s ListIdentityPoolsOutput) String() string {
  1581. return awsutil.Prettify(s)
  1582. }
  1583. // GoString returns the string representation
  1584. func (s ListIdentityPoolsOutput) GoString() string {
  1585. return s.String()
  1586. }
  1587. // Input to the LookupDeveloperIdentityInput action.
  1588. type LookupDeveloperIdentityInput struct {
  1589. _ struct{} `type:"structure"`
  1590. // A unique ID used by your backend authentication process to identify a user.
  1591. // Typically, a developer identity provider would issue many developer user
  1592. // identifiers, in keeping with the number of users.
  1593. DeveloperUserIdentifier *string `min:"1" type:"string"`
  1594. // A unique identifier in the format REGION:GUID.
  1595. IdentityId *string `min:"1" type:"string"`
  1596. // An identity pool ID in the format REGION:GUID.
  1597. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1598. // The maximum number of identities to return.
  1599. MaxResults *int64 `min:"1" type:"integer"`
  1600. // A pagination token. The first call you make will have NextToken set to null.
  1601. // After that the service will return NextToken values as needed. For example,
  1602. // let's say you make a request with MaxResults set to 10, and there are 20
  1603. // matches in the database. The service will return a pagination token as a
  1604. // part of the response. This token can be used to call the API again and get
  1605. // results starting from the 11th match.
  1606. NextToken *string `min:"1" type:"string"`
  1607. }
  1608. // String returns the string representation
  1609. func (s LookupDeveloperIdentityInput) String() string {
  1610. return awsutil.Prettify(s)
  1611. }
  1612. // GoString returns the string representation
  1613. func (s LookupDeveloperIdentityInput) GoString() string {
  1614. return s.String()
  1615. }
  1616. // Validate inspects the fields of the type to determine if they are valid.
  1617. func (s *LookupDeveloperIdentityInput) Validate() error {
  1618. invalidParams := request.ErrInvalidParams{Context: "LookupDeveloperIdentityInput"}
  1619. if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
  1620. invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
  1621. }
  1622. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1623. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1624. }
  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 s.MaxResults != nil && *s.MaxResults < 1 {
  1632. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1633. }
  1634. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1635. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1636. }
  1637. if invalidParams.Len() > 0 {
  1638. return invalidParams
  1639. }
  1640. return nil
  1641. }
  1642. // Returned in response to a successful LookupDeveloperIdentity action.
  1643. type LookupDeveloperIdentityOutput struct {
  1644. _ struct{} `type:"structure"`
  1645. // This is the list of developer user identifiers associated with an identity
  1646. // ID. Cognito supports the association of multiple developer user identifiers
  1647. // with an identity ID.
  1648. DeveloperUserIdentifierList []*string `type:"list"`
  1649. // A unique identifier in the format REGION:GUID.
  1650. IdentityId *string `min:"1" type:"string"`
  1651. // A pagination token. The first call you make will have NextToken set to null.
  1652. // After that the service will return NextToken values as needed. For example,
  1653. // let's say you make a request with MaxResults set to 10, and there are 20
  1654. // matches in the database. The service will return a pagination token as a
  1655. // part of the response. This token can be used to call the API again and get
  1656. // results starting from the 11th match.
  1657. NextToken *string `min:"1" type:"string"`
  1658. }
  1659. // String returns the string representation
  1660. func (s LookupDeveloperIdentityOutput) String() string {
  1661. return awsutil.Prettify(s)
  1662. }
  1663. // GoString returns the string representation
  1664. func (s LookupDeveloperIdentityOutput) GoString() string {
  1665. return s.String()
  1666. }
  1667. // Input to the MergeDeveloperIdentities action.
  1668. type MergeDeveloperIdentitiesInput struct {
  1669. _ struct{} `type:"structure"`
  1670. // User identifier for the destination user. The value should be a DeveloperUserIdentifier.
  1671. DestinationUserIdentifier *string `min:"1" type:"string" required:"true"`
  1672. // The "domain" by which Cognito will refer to your users. This is a (pseudo)
  1673. // domain name that you provide while creating an identity pool. This name acts
  1674. // as a placeholder that allows your backend and the Cognito service to communicate
  1675. // about the developer provider. For the DeveloperProviderName, you can use
  1676. // letters as well as period (.), underscore (_), and dash (-).
  1677. DeveloperProviderName *string `min:"1" type:"string" required:"true"`
  1678. // An identity pool ID in the format REGION:GUID.
  1679. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1680. // User identifier for the source user. The value should be a DeveloperUserIdentifier.
  1681. SourceUserIdentifier *string `min:"1" type:"string" required:"true"`
  1682. }
  1683. // String returns the string representation
  1684. func (s MergeDeveloperIdentitiesInput) String() string {
  1685. return awsutil.Prettify(s)
  1686. }
  1687. // GoString returns the string representation
  1688. func (s MergeDeveloperIdentitiesInput) GoString() string {
  1689. return s.String()
  1690. }
  1691. // Validate inspects the fields of the type to determine if they are valid.
  1692. func (s *MergeDeveloperIdentitiesInput) Validate() error {
  1693. invalidParams := request.ErrInvalidParams{Context: "MergeDeveloperIdentitiesInput"}
  1694. if s.DestinationUserIdentifier == nil {
  1695. invalidParams.Add(request.NewErrParamRequired("DestinationUserIdentifier"))
  1696. }
  1697. if s.DestinationUserIdentifier != nil && len(*s.DestinationUserIdentifier) < 1 {
  1698. invalidParams.Add(request.NewErrParamMinLen("DestinationUserIdentifier", 1))
  1699. }
  1700. if s.DeveloperProviderName == nil {
  1701. invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
  1702. }
  1703. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  1704. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  1705. }
  1706. if s.IdentityPoolId == nil {
  1707. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1708. }
  1709. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1710. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1711. }
  1712. if s.SourceUserIdentifier == nil {
  1713. invalidParams.Add(request.NewErrParamRequired("SourceUserIdentifier"))
  1714. }
  1715. if s.SourceUserIdentifier != nil && len(*s.SourceUserIdentifier) < 1 {
  1716. invalidParams.Add(request.NewErrParamMinLen("SourceUserIdentifier", 1))
  1717. }
  1718. if invalidParams.Len() > 0 {
  1719. return invalidParams
  1720. }
  1721. return nil
  1722. }
  1723. // Returned in response to a successful MergeDeveloperIdentities action.
  1724. type MergeDeveloperIdentitiesOutput struct {
  1725. _ struct{} `type:"structure"`
  1726. // A unique identifier in the format REGION:GUID.
  1727. IdentityId *string `min:"1" type:"string"`
  1728. }
  1729. // String returns the string representation
  1730. func (s MergeDeveloperIdentitiesOutput) String() string {
  1731. return awsutil.Prettify(s)
  1732. }
  1733. // GoString returns the string representation
  1734. func (s MergeDeveloperIdentitiesOutput) GoString() string {
  1735. return s.String()
  1736. }
  1737. // A provider representing an Amazon Cognito Identity User Pool and its client
  1738. // ID.
  1739. type Provider struct {
  1740. _ struct{} `type:"structure"`
  1741. // The client ID for the Amazon Cognito Identity User Pool.
  1742. ClientId *string `min:"1" type:"string"`
  1743. // The provider name for an Amazon Cognito Identity User Pool. For example,
  1744. // cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.
  1745. ProviderName *string `min:"1" type:"string"`
  1746. }
  1747. // String returns the string representation
  1748. func (s Provider) String() string {
  1749. return awsutil.Prettify(s)
  1750. }
  1751. // GoString returns the string representation
  1752. func (s Provider) GoString() string {
  1753. return s.String()
  1754. }
  1755. // Validate inspects the fields of the type to determine if they are valid.
  1756. func (s *Provider) Validate() error {
  1757. invalidParams := request.ErrInvalidParams{Context: "Provider"}
  1758. if s.ClientId != nil && len(*s.ClientId) < 1 {
  1759. invalidParams.Add(request.NewErrParamMinLen("ClientId", 1))
  1760. }
  1761. if s.ProviderName != nil && len(*s.ProviderName) < 1 {
  1762. invalidParams.Add(request.NewErrParamMinLen("ProviderName", 1))
  1763. }
  1764. if invalidParams.Len() > 0 {
  1765. return invalidParams
  1766. }
  1767. return nil
  1768. }
  1769. // Input to the SetIdentityPoolRoles action.
  1770. type SetIdentityPoolRolesInput struct {
  1771. _ struct{} `type:"structure"`
  1772. // An identity pool ID in the format REGION:GUID.
  1773. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1774. // The map of roles associated with this pool. For a given role, the key will
  1775. // be either "authenticated" or "unauthenticated" and the value will be the
  1776. // Role ARN.
  1777. Roles map[string]*string `type:"map" required:"true"`
  1778. }
  1779. // String returns the string representation
  1780. func (s SetIdentityPoolRolesInput) String() string {
  1781. return awsutil.Prettify(s)
  1782. }
  1783. // GoString returns the string representation
  1784. func (s SetIdentityPoolRolesInput) GoString() string {
  1785. return s.String()
  1786. }
  1787. // Validate inspects the fields of the type to determine if they are valid.
  1788. func (s *SetIdentityPoolRolesInput) Validate() error {
  1789. invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolRolesInput"}
  1790. if s.IdentityPoolId == nil {
  1791. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1792. }
  1793. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1794. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1795. }
  1796. if s.Roles == nil {
  1797. invalidParams.Add(request.NewErrParamRequired("Roles"))
  1798. }
  1799. if invalidParams.Len() > 0 {
  1800. return invalidParams
  1801. }
  1802. return nil
  1803. }
  1804. type SetIdentityPoolRolesOutput struct {
  1805. _ struct{} `type:"structure"`
  1806. }
  1807. // String returns the string representation
  1808. func (s SetIdentityPoolRolesOutput) String() string {
  1809. return awsutil.Prettify(s)
  1810. }
  1811. // GoString returns the string representation
  1812. func (s SetIdentityPoolRolesOutput) GoString() string {
  1813. return s.String()
  1814. }
  1815. // Input to the UnlinkDeveloperIdentity action.
  1816. type UnlinkDeveloperIdentityInput struct {
  1817. _ struct{} `type:"structure"`
  1818. // The "domain" by which Cognito will refer to your users.
  1819. DeveloperProviderName *string `min:"1" type:"string" required:"true"`
  1820. // A unique ID used by your backend authentication process to identify a user.
  1821. DeveloperUserIdentifier *string `min:"1" type:"string" required:"true"`
  1822. // A unique identifier in the format REGION:GUID.
  1823. IdentityId *string `min:"1" type:"string" required:"true"`
  1824. // An identity pool ID in the format REGION:GUID.
  1825. IdentityPoolId *string `min:"1" type:"string" required:"true"`
  1826. }
  1827. // String returns the string representation
  1828. func (s UnlinkDeveloperIdentityInput) String() string {
  1829. return awsutil.Prettify(s)
  1830. }
  1831. // GoString returns the string representation
  1832. func (s UnlinkDeveloperIdentityInput) GoString() string {
  1833. return s.String()
  1834. }
  1835. // Validate inspects the fields of the type to determine if they are valid.
  1836. func (s *UnlinkDeveloperIdentityInput) Validate() error {
  1837. invalidParams := request.ErrInvalidParams{Context: "UnlinkDeveloperIdentityInput"}
  1838. if s.DeveloperProviderName == nil {
  1839. invalidParams.Add(request.NewErrParamRequired("DeveloperProviderName"))
  1840. }
  1841. if s.DeveloperProviderName != nil && len(*s.DeveloperProviderName) < 1 {
  1842. invalidParams.Add(request.NewErrParamMinLen("DeveloperProviderName", 1))
  1843. }
  1844. if s.DeveloperUserIdentifier == nil {
  1845. invalidParams.Add(request.NewErrParamRequired("DeveloperUserIdentifier"))
  1846. }
  1847. if s.DeveloperUserIdentifier != nil && len(*s.DeveloperUserIdentifier) < 1 {
  1848. invalidParams.Add(request.NewErrParamMinLen("DeveloperUserIdentifier", 1))
  1849. }
  1850. if s.IdentityId == nil {
  1851. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1852. }
  1853. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1854. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1855. }
  1856. if s.IdentityPoolId == nil {
  1857. invalidParams.Add(request.NewErrParamRequired("IdentityPoolId"))
  1858. }
  1859. if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 {
  1860. invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1))
  1861. }
  1862. if invalidParams.Len() > 0 {
  1863. return invalidParams
  1864. }
  1865. return nil
  1866. }
  1867. type UnlinkDeveloperIdentityOutput struct {
  1868. _ struct{} `type:"structure"`
  1869. }
  1870. // String returns the string representation
  1871. func (s UnlinkDeveloperIdentityOutput) String() string {
  1872. return awsutil.Prettify(s)
  1873. }
  1874. // GoString returns the string representation
  1875. func (s UnlinkDeveloperIdentityOutput) GoString() string {
  1876. return s.String()
  1877. }
  1878. // Input to the UnlinkIdentity action.
  1879. type UnlinkIdentityInput struct {
  1880. _ struct{} `type:"structure"`
  1881. // A unique identifier in the format REGION:GUID.
  1882. IdentityId *string `min:"1" type:"string" required:"true"`
  1883. // A set of optional name-value pairs that map provider names to provider tokens.
  1884. Logins map[string]*string `type:"map" required:"true"`
  1885. // Provider names to unlink from this identity.
  1886. LoginsToRemove []*string `type:"list" required:"true"`
  1887. }
  1888. // String returns the string representation
  1889. func (s UnlinkIdentityInput) String() string {
  1890. return awsutil.Prettify(s)
  1891. }
  1892. // GoString returns the string representation
  1893. func (s UnlinkIdentityInput) GoString() string {
  1894. return s.String()
  1895. }
  1896. // Validate inspects the fields of the type to determine if they are valid.
  1897. func (s *UnlinkIdentityInput) Validate() error {
  1898. invalidParams := request.ErrInvalidParams{Context: "UnlinkIdentityInput"}
  1899. if s.IdentityId == nil {
  1900. invalidParams.Add(request.NewErrParamRequired("IdentityId"))
  1901. }
  1902. if s.IdentityId != nil && len(*s.IdentityId) < 1 {
  1903. invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1))
  1904. }
  1905. if s.Logins == nil {
  1906. invalidParams.Add(request.NewErrParamRequired("Logins"))
  1907. }
  1908. if s.LoginsToRemove == nil {
  1909. invalidParams.Add(request.NewErrParamRequired("LoginsToRemove"))
  1910. }
  1911. if invalidParams.Len() > 0 {
  1912. return invalidParams
  1913. }
  1914. return nil
  1915. }
  1916. type UnlinkIdentityOutput struct {
  1917. _ struct{} `type:"structure"`
  1918. }
  1919. // String returns the string representation
  1920. func (s UnlinkIdentityOutput) String() string {
  1921. return awsutil.Prettify(s)
  1922. }
  1923. // GoString returns the string representation
  1924. func (s UnlinkIdentityOutput) GoString() string {
  1925. return s.String()
  1926. }
  1927. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  1928. // and IdentityId.
  1929. type UnprocessedIdentityId struct {
  1930. _ struct{} `type:"structure"`
  1931. // The error code indicating the type of error that occurred.
  1932. ErrorCode *string `type:"string" enum:"ErrorCode"`
  1933. // A unique identifier in the format REGION:GUID.
  1934. IdentityId *string `min:"1" type:"string"`
  1935. }
  1936. // String returns the string representation
  1937. func (s UnprocessedIdentityId) String() string {
  1938. return awsutil.Prettify(s)
  1939. }
  1940. // GoString returns the string representation
  1941. func (s UnprocessedIdentityId) GoString() string {
  1942. return s.String()
  1943. }
  1944. const (
  1945. // @enum ErrorCode
  1946. ErrorCodeAccessDenied = "AccessDenied"
  1947. // @enum ErrorCode
  1948. ErrorCodeInternalServerError = "InternalServerError"
  1949. )