api.go 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566
  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. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. )
  9. const opCreateIdentityPool = "CreateIdentityPool"
  10. // CreateIdentityPoolRequest generates a request for the CreateIdentityPool operation.
  11. func (c *CognitoIdentity) CreateIdentityPoolRequest(input *CreateIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  12. op := &request.Operation{
  13. Name: opCreateIdentityPool,
  14. HTTPMethod: "POST",
  15. HTTPPath: "/",
  16. }
  17. if input == nil {
  18. input = &CreateIdentityPoolInput{}
  19. }
  20. req = c.newRequest(op, input, output)
  21. output = &IdentityPool{}
  22. req.Data = output
  23. return
  24. }
  25. // Creates a new identity pool. The identity pool is a store of user identity
  26. // information that is specific to your AWS account. The limit on identity pools
  27. // is 60 per account. You must use AWS Developer credentials to call this API.
  28. func (c *CognitoIdentity) CreateIdentityPool(input *CreateIdentityPoolInput) (*IdentityPool, error) {
  29. req, out := c.CreateIdentityPoolRequest(input)
  30. err := req.Send()
  31. return out, err
  32. }
  33. const opDeleteIdentities = "DeleteIdentities"
  34. // DeleteIdentitiesRequest generates a request for the DeleteIdentities operation.
  35. func (c *CognitoIdentity) DeleteIdentitiesRequest(input *DeleteIdentitiesInput) (req *request.Request, output *DeleteIdentitiesOutput) {
  36. op := &request.Operation{
  37. Name: opDeleteIdentities,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &DeleteIdentitiesInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &DeleteIdentitiesOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // Deletes identities from an identity pool. You can specify a list of 1-60
  50. // identities that you want to delete.
  51. //
  52. // You must use AWS Developer credentials to call this API.
  53. func (c *CognitoIdentity) DeleteIdentities(input *DeleteIdentitiesInput) (*DeleteIdentitiesOutput, error) {
  54. req, out := c.DeleteIdentitiesRequest(input)
  55. err := req.Send()
  56. return out, err
  57. }
  58. const opDeleteIdentityPool = "DeleteIdentityPool"
  59. // DeleteIdentityPoolRequest generates a request for the DeleteIdentityPool operation.
  60. func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInput) (req *request.Request, output *DeleteIdentityPoolOutput) {
  61. op := &request.Operation{
  62. Name: opDeleteIdentityPool,
  63. HTTPMethod: "POST",
  64. HTTPPath: "/",
  65. }
  66. if input == nil {
  67. input = &DeleteIdentityPoolInput{}
  68. }
  69. req = c.newRequest(op, input, output)
  70. output = &DeleteIdentityPoolOutput{}
  71. req.Data = output
  72. return
  73. }
  74. // Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
  75. // with the pool.
  76. //
  77. // You must use AWS Developer credentials to call this API.
  78. func (c *CognitoIdentity) DeleteIdentityPool(input *DeleteIdentityPoolInput) (*DeleteIdentityPoolOutput, error) {
  79. req, out := c.DeleteIdentityPoolRequest(input)
  80. err := req.Send()
  81. return out, err
  82. }
  83. const opDescribeIdentity = "DescribeIdentity"
  84. // DescribeIdentityRequest generates a request for the DescribeIdentity operation.
  85. func (c *CognitoIdentity) DescribeIdentityRequest(input *DescribeIdentityInput) (req *request.Request, output *IdentityDescription) {
  86. op := &request.Operation{
  87. Name: opDescribeIdentity,
  88. HTTPMethod: "POST",
  89. HTTPPath: "/",
  90. }
  91. if input == nil {
  92. input = &DescribeIdentityInput{}
  93. }
  94. req = c.newRequest(op, input, output)
  95. output = &IdentityDescription{}
  96. req.Data = output
  97. return
  98. }
  99. // Returns metadata related to the given identity, including when the identity
  100. // was created and any associated linked logins.
  101. //
  102. // You must use AWS Developer credentials to call this API.
  103. func (c *CognitoIdentity) DescribeIdentity(input *DescribeIdentityInput) (*IdentityDescription, error) {
  104. req, out := c.DescribeIdentityRequest(input)
  105. err := req.Send()
  106. return out, err
  107. }
  108. const opDescribeIdentityPool = "DescribeIdentityPool"
  109. // DescribeIdentityPoolRequest generates a request for the DescribeIdentityPool operation.
  110. func (c *CognitoIdentity) DescribeIdentityPoolRequest(input *DescribeIdentityPoolInput) (req *request.Request, output *IdentityPool) {
  111. op := &request.Operation{
  112. Name: opDescribeIdentityPool,
  113. HTTPMethod: "POST",
  114. HTTPPath: "/",
  115. }
  116. if input == nil {
  117. input = &DescribeIdentityPoolInput{}
  118. }
  119. req = c.newRequest(op, input, output)
  120. output = &IdentityPool{}
  121. req.Data = output
  122. return
  123. }
  124. // Gets details about a particular identity pool, including the pool name, ID
  125. // description, creation date, and current number of users.
  126. //
  127. // You must use AWS Developer credentials to call this API.
  128. func (c *CognitoIdentity) DescribeIdentityPool(input *DescribeIdentityPoolInput) (*IdentityPool, error) {
  129. req, out := c.DescribeIdentityPoolRequest(input)
  130. err := req.Send()
  131. return out, err
  132. }
  133. const opGetCredentialsForIdentity = "GetCredentialsForIdentity"
  134. // GetCredentialsForIdentityRequest generates a request for the GetCredentialsForIdentity operation.
  135. func (c *CognitoIdentity) GetCredentialsForIdentityRequest(input *GetCredentialsForIdentityInput) (req *request.Request, output *GetCredentialsForIdentityOutput) {
  136. op := &request.Operation{
  137. Name: opGetCredentialsForIdentity,
  138. HTTPMethod: "POST",
  139. HTTPPath: "/",
  140. }
  141. if input == nil {
  142. input = &GetCredentialsForIdentityInput{}
  143. }
  144. req = c.newRequest(op, input, output)
  145. output = &GetCredentialsForIdentityOutput{}
  146. req.Data = output
  147. return
  148. }
  149. // Returns credentials for the the provided identity ID. Any provided logins
  150. // will be validated against supported login providers. If the token is for
  151. // cognito-identity.amazonaws.com, it will be passed through to AWS Security
  152. // Token Service with the appropriate role for the token.
  153. //
  154. // This is a public API. You do not need any credentials to call this API.
  155. func (c *CognitoIdentity) GetCredentialsForIdentity(input *GetCredentialsForIdentityInput) (*GetCredentialsForIdentityOutput, error) {
  156. req, out := c.GetCredentialsForIdentityRequest(input)
  157. err := req.Send()
  158. return out, err
  159. }
  160. const opGetId = "GetId"
  161. // GetIdRequest generates a request for the GetId operation.
  162. func (c *CognitoIdentity) GetIdRequest(input *GetIdInput) (req *request.Request, output *GetIdOutput) {
  163. op := &request.Operation{
  164. Name: opGetId,
  165. HTTPMethod: "POST",
  166. HTTPPath: "/",
  167. }
  168. if input == nil {
  169. input = &GetIdInput{}
  170. }
  171. req = c.newRequest(op, input, output)
  172. output = &GetIdOutput{}
  173. req.Data = output
  174. return
  175. }
  176. // Generates (or retrieves) a Cognito ID. Supplying multiple logins will create
  177. // an implicit linked account.
  178. //
  179. // token+";"+tokenSecret.
  180. //
  181. // This is a public API. You do not need any credentials to call this API.
  182. func (c *CognitoIdentity) GetId(input *GetIdInput) (*GetIdOutput, error) {
  183. req, out := c.GetIdRequest(input)
  184. err := req.Send()
  185. return out, err
  186. }
  187. const opGetIdentityPoolRoles = "GetIdentityPoolRoles"
  188. // GetIdentityPoolRolesRequest generates a request for the GetIdentityPoolRoles operation.
  189. func (c *CognitoIdentity) GetIdentityPoolRolesRequest(input *GetIdentityPoolRolesInput) (req *request.Request, output *GetIdentityPoolRolesOutput) {
  190. op := &request.Operation{
  191. Name: opGetIdentityPoolRoles,
  192. HTTPMethod: "POST",
  193. HTTPPath: "/",
  194. }
  195. if input == nil {
  196. input = &GetIdentityPoolRolesInput{}
  197. }
  198. req = c.newRequest(op, input, output)
  199. output = &GetIdentityPoolRolesOutput{}
  200. req.Data = output
  201. return
  202. }
  203. // Gets the roles for an identity pool.
  204. //
  205. // You must use AWS Developer credentials to call this API.
  206. func (c *CognitoIdentity) GetIdentityPoolRoles(input *GetIdentityPoolRolesInput) (*GetIdentityPoolRolesOutput, error) {
  207. req, out := c.GetIdentityPoolRolesRequest(input)
  208. err := req.Send()
  209. return out, err
  210. }
  211. const opGetOpenIdToken = "GetOpenIdToken"
  212. // GetOpenIdTokenRequest generates a request for the GetOpenIdToken operation.
  213. func (c *CognitoIdentity) GetOpenIdTokenRequest(input *GetOpenIdTokenInput) (req *request.Request, output *GetOpenIdTokenOutput) {
  214. op := &request.Operation{
  215. Name: opGetOpenIdToken,
  216. HTTPMethod: "POST",
  217. HTTPPath: "/",
  218. }
  219. if input == nil {
  220. input = &GetOpenIdTokenInput{}
  221. }
  222. req = c.newRequest(op, input, output)
  223. output = &GetOpenIdTokenOutput{}
  224. req.Data = output
  225. return
  226. }
  227. // Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
  228. // returned by GetId. You can optionally add additional logins for the identity.
  229. // Supplying multiple logins creates an implicit link.
  230. //
  231. // The OpenId token is valid for 15 minutes.
  232. //
  233. // This is a public API. You do not need any credentials to call this API.
  234. func (c *CognitoIdentity) GetOpenIdToken(input *GetOpenIdTokenInput) (*GetOpenIdTokenOutput, error) {
  235. req, out := c.GetOpenIdTokenRequest(input)
  236. err := req.Send()
  237. return out, err
  238. }
  239. const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity"
  240. // GetOpenIdTokenForDeveloperIdentityRequest generates a request for the GetOpenIdTokenForDeveloperIdentity operation.
  241. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentityRequest(input *GetOpenIdTokenForDeveloperIdentityInput) (req *request.Request, output *GetOpenIdTokenForDeveloperIdentityOutput) {
  242. op := &request.Operation{
  243. Name: opGetOpenIdTokenForDeveloperIdentity,
  244. HTTPMethod: "POST",
  245. HTTPPath: "/",
  246. }
  247. if input == nil {
  248. input = &GetOpenIdTokenForDeveloperIdentityInput{}
  249. }
  250. req = c.newRequest(op, input, output)
  251. output = &GetOpenIdTokenForDeveloperIdentityOutput{}
  252. req.Data = output
  253. return
  254. }
  255. // Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token
  256. // for a user authenticated by your backend authentication process. Supplying
  257. // multiple logins will create an implicit linked account. You can only specify
  258. // one developer provider as part of the Logins map, which is linked to the
  259. // identity pool. The developer provider is the "domain" by which Cognito will
  260. // refer to your users.
  261. //
  262. // You can use GetOpenIdTokenForDeveloperIdentity to create a new identity
  263. // and to link new logins (that is, user credentials issued by a public provider
  264. // or developer provider) to an existing identity. When you want to create a
  265. // new identity, the IdentityId should be null. When you want to associate a
  266. // new login with an existing authenticated/unauthenticated identity, you can
  267. // do so by providing the existing IdentityId. This API will create the identity
  268. // in the specified IdentityPoolId.
  269. //
  270. // You must use AWS Developer credentials to call this API.
  271. func (c *CognitoIdentity) GetOpenIdTokenForDeveloperIdentity(input *GetOpenIdTokenForDeveloperIdentityInput) (*GetOpenIdTokenForDeveloperIdentityOutput, error) {
  272. req, out := c.GetOpenIdTokenForDeveloperIdentityRequest(input)
  273. err := req.Send()
  274. return out, err
  275. }
  276. const opListIdentities = "ListIdentities"
  277. // ListIdentitiesRequest generates a request for the ListIdentities operation.
  278. func (c *CognitoIdentity) ListIdentitiesRequest(input *ListIdentitiesInput) (req *request.Request, output *ListIdentitiesOutput) {
  279. op := &request.Operation{
  280. Name: opListIdentities,
  281. HTTPMethod: "POST",
  282. HTTPPath: "/",
  283. }
  284. if input == nil {
  285. input = &ListIdentitiesInput{}
  286. }
  287. req = c.newRequest(op, input, output)
  288. output = &ListIdentitiesOutput{}
  289. req.Data = output
  290. return
  291. }
  292. // Lists the identities in a pool.
  293. //
  294. // You must use AWS Developer credentials to call this API.
  295. func (c *CognitoIdentity) ListIdentities(input *ListIdentitiesInput) (*ListIdentitiesOutput, error) {
  296. req, out := c.ListIdentitiesRequest(input)
  297. err := req.Send()
  298. return out, err
  299. }
  300. const opListIdentityPools = "ListIdentityPools"
  301. // ListIdentityPoolsRequest generates a request for the ListIdentityPools operation.
  302. func (c *CognitoIdentity) ListIdentityPoolsRequest(input *ListIdentityPoolsInput) (req *request.Request, output *ListIdentityPoolsOutput) {
  303. op := &request.Operation{
  304. Name: opListIdentityPools,
  305. HTTPMethod: "POST",
  306. HTTPPath: "/",
  307. }
  308. if input == nil {
  309. input = &ListIdentityPoolsInput{}
  310. }
  311. req = c.newRequest(op, input, output)
  312. output = &ListIdentityPoolsOutput{}
  313. req.Data = output
  314. return
  315. }
  316. // Lists all of the Cognito identity pools registered for your account.
  317. //
  318. // This is a public API. You do not need any credentials to call this API.
  319. func (c *CognitoIdentity) ListIdentityPools(input *ListIdentityPoolsInput) (*ListIdentityPoolsOutput, error) {
  320. req, out := c.ListIdentityPoolsRequest(input)
  321. err := req.Send()
  322. return out, err
  323. }
  324. const opLookupDeveloperIdentity = "LookupDeveloperIdentity"
  325. // LookupDeveloperIdentityRequest generates a request for the LookupDeveloperIdentity operation.
  326. func (c *CognitoIdentity) LookupDeveloperIdentityRequest(input *LookupDeveloperIdentityInput) (req *request.Request, output *LookupDeveloperIdentityOutput) {
  327. op := &request.Operation{
  328. Name: opLookupDeveloperIdentity,
  329. HTTPMethod: "POST",
  330. HTTPPath: "/",
  331. }
  332. if input == nil {
  333. input = &LookupDeveloperIdentityInput{}
  334. }
  335. req = c.newRequest(op, input, output)
  336. output = &LookupDeveloperIdentityOutput{}
  337. req.Data = output
  338. return
  339. }
  340. // Retrieves the IdentityID associated with a DeveloperUserIdentifier or the
  341. // list of DeveloperUserIdentifiers associated with an IdentityId for an existing
  342. // identity. Either IdentityID or DeveloperUserIdentifier must not be null.
  343. // If you supply only one of these values, the other value will be searched
  344. // in the database and returned as a part of the response. If you supply both,
  345. // DeveloperUserIdentifier will be matched against IdentityID. If the values
  346. // are verified against the database, the response returns both values and is
  347. // the same as the request. Otherwise a ResourceConflictException is thrown.
  348. //
  349. // You must use AWS Developer credentials to call this API.
  350. func (c *CognitoIdentity) LookupDeveloperIdentity(input *LookupDeveloperIdentityInput) (*LookupDeveloperIdentityOutput, error) {
  351. req, out := c.LookupDeveloperIdentityRequest(input)
  352. err := req.Send()
  353. return out, err
  354. }
  355. const opMergeDeveloperIdentities = "MergeDeveloperIdentities"
  356. // MergeDeveloperIdentitiesRequest generates a request for the MergeDeveloperIdentities operation.
  357. func (c *CognitoIdentity) MergeDeveloperIdentitiesRequest(input *MergeDeveloperIdentitiesInput) (req *request.Request, output *MergeDeveloperIdentitiesOutput) {
  358. op := &request.Operation{
  359. Name: opMergeDeveloperIdentities,
  360. HTTPMethod: "POST",
  361. HTTPPath: "/",
  362. }
  363. if input == nil {
  364. input = &MergeDeveloperIdentitiesInput{}
  365. }
  366. req = c.newRequest(op, input, output)
  367. output = &MergeDeveloperIdentitiesOutput{}
  368. req.Data = output
  369. return
  370. }
  371. // Merges two users having different IdentityIds, existing in the same identity
  372. // pool, and identified by the same developer provider. You can use this action
  373. // to request that discrete users be merged and identified as a single user
  374. // in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier)
  375. // with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated
  376. // users can be merged. If the users to be merged are associated with the same
  377. // public provider, but as two different users, an exception will be thrown.
  378. //
  379. // You must use AWS Developer credentials to call this API.
  380. func (c *CognitoIdentity) MergeDeveloperIdentities(input *MergeDeveloperIdentitiesInput) (*MergeDeveloperIdentitiesOutput, error) {
  381. req, out := c.MergeDeveloperIdentitiesRequest(input)
  382. err := req.Send()
  383. return out, err
  384. }
  385. const opSetIdentityPoolRoles = "SetIdentityPoolRoles"
  386. // SetIdentityPoolRolesRequest generates a request for the SetIdentityPoolRoles operation.
  387. func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRolesInput) (req *request.Request, output *SetIdentityPoolRolesOutput) {
  388. op := &request.Operation{
  389. Name: opSetIdentityPoolRoles,
  390. HTTPMethod: "POST",
  391. HTTPPath: "/",
  392. }
  393. if input == nil {
  394. input = &SetIdentityPoolRolesInput{}
  395. }
  396. req = c.newRequest(op, input, output)
  397. output = &SetIdentityPoolRolesOutput{}
  398. req.Data = output
  399. return
  400. }
  401. // Sets the roles for an identity pool. These roles are used when making calls
  402. // to GetCredentialsForIdentity action.
  403. //
  404. // You must use AWS Developer credentials to call this API.
  405. func (c *CognitoIdentity) SetIdentityPoolRoles(input *SetIdentityPoolRolesInput) (*SetIdentityPoolRolesOutput, error) {
  406. req, out := c.SetIdentityPoolRolesRequest(input)
  407. err := req.Send()
  408. return out, err
  409. }
  410. const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity"
  411. // UnlinkDeveloperIdentityRequest generates a request for the UnlinkDeveloperIdentity operation.
  412. func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperIdentityInput) (req *request.Request, output *UnlinkDeveloperIdentityOutput) {
  413. op := &request.Operation{
  414. Name: opUnlinkDeveloperIdentity,
  415. HTTPMethod: "POST",
  416. HTTPPath: "/",
  417. }
  418. if input == nil {
  419. input = &UnlinkDeveloperIdentityInput{}
  420. }
  421. req = c.newRequest(op, input, output)
  422. output = &UnlinkDeveloperIdentityOutput{}
  423. req.Data = output
  424. return
  425. }
  426. // Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer
  427. // users will be considered new identities next time they are seen. If, for
  428. // a given Cognito identity, you remove all federated identities as well as
  429. // the developer user identifier, the Cognito identity becomes inaccessible.
  430. //
  431. // This is a public API. You do not need any credentials to call this API.
  432. func (c *CognitoIdentity) UnlinkDeveloperIdentity(input *UnlinkDeveloperIdentityInput) (*UnlinkDeveloperIdentityOutput, error) {
  433. req, out := c.UnlinkDeveloperIdentityRequest(input)
  434. err := req.Send()
  435. return out, err
  436. }
  437. const opUnlinkIdentity = "UnlinkIdentity"
  438. // UnlinkIdentityRequest generates a request for the UnlinkIdentity operation.
  439. func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req *request.Request, output *UnlinkIdentityOutput) {
  440. op := &request.Operation{
  441. Name: opUnlinkIdentity,
  442. HTTPMethod: "POST",
  443. HTTPPath: "/",
  444. }
  445. if input == nil {
  446. input = &UnlinkIdentityInput{}
  447. }
  448. req = c.newRequest(op, input, output)
  449. output = &UnlinkIdentityOutput{}
  450. req.Data = output
  451. return
  452. }
  453. // Unlinks a federated identity from an existing account. Unlinked logins will
  454. // be considered new identities next time they are seen. Removing the last linked
  455. // login will make this identity inaccessible.
  456. //
  457. // This is a public API. You do not need any credentials to call this API.
  458. func (c *CognitoIdentity) UnlinkIdentity(input *UnlinkIdentityInput) (*UnlinkIdentityOutput, error) {
  459. req, out := c.UnlinkIdentityRequest(input)
  460. err := req.Send()
  461. return out, err
  462. }
  463. const opUpdateIdentityPool = "UpdateIdentityPool"
  464. // UpdateIdentityPoolRequest generates a request for the UpdateIdentityPool operation.
  465. func (c *CognitoIdentity) UpdateIdentityPoolRequest(input *IdentityPool) (req *request.Request, output *IdentityPool) {
  466. op := &request.Operation{
  467. Name: opUpdateIdentityPool,
  468. HTTPMethod: "POST",
  469. HTTPPath: "/",
  470. }
  471. if input == nil {
  472. input = &IdentityPool{}
  473. }
  474. req = c.newRequest(op, input, output)
  475. output = &IdentityPool{}
  476. req.Data = output
  477. return
  478. }
  479. // Updates a user pool.
  480. //
  481. // You must use AWS Developer credentials to call this API.
  482. func (c *CognitoIdentity) UpdateIdentityPool(input *IdentityPool) (*IdentityPool, error) {
  483. req, out := c.UpdateIdentityPoolRequest(input)
  484. err := req.Send()
  485. return out, err
  486. }
  487. // Input to the CreateIdentityPool action.
  488. type CreateIdentityPoolInput struct {
  489. // TRUE if the identity pool supports unauthenticated logins.
  490. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  491. // The "domain" by which Cognito will refer to your users. This name acts as
  492. // a placeholder that allows your backend and the Cognito service to communicate
  493. // about the developer provider. For the DeveloperProviderName, you can use
  494. // letters as well as period (.), underscore (_), and dash (-).
  495. //
  496. // Once you have set a developer provider name, you cannot change it. Please
  497. // take care in setting this parameter.
  498. DeveloperProviderName *string `type:"string"`
  499. // A string that you provide.
  500. IdentityPoolName *string `type:"string" required:"true"`
  501. // A list of OpendID Connect provider ARNs.
  502. OpenIdConnectProviderARNs []*string `type:"list"`
  503. // Optional key:value pairs mapping provider names to provider app IDs.
  504. SupportedLoginProviders map[string]*string `type:"map"`
  505. metadataCreateIdentityPoolInput `json:"-" xml:"-"`
  506. }
  507. type metadataCreateIdentityPoolInput struct {
  508. SDKShapeTraits bool `type:"structure"`
  509. }
  510. // String returns the string representation
  511. func (s CreateIdentityPoolInput) String() string {
  512. return awsutil.Prettify(s)
  513. }
  514. // GoString returns the string representation
  515. func (s CreateIdentityPoolInput) GoString() string {
  516. return s.String()
  517. }
  518. // Credentials for the the provided identity ID.
  519. type Credentials struct {
  520. // The Access Key portion of the credentials.
  521. AccessKeyId *string `type:"string"`
  522. // The date at which these credentials will expire.
  523. Expiration *time.Time `type:"timestamp" timestampFormat:"unix"`
  524. // The Secret Access Key portion of the credentials
  525. SecretKey *string `type:"string"`
  526. // The Session Token portion of the credentials
  527. SessionToken *string `type:"string"`
  528. metadataCredentials `json:"-" xml:"-"`
  529. }
  530. type metadataCredentials struct {
  531. SDKShapeTraits bool `type:"structure"`
  532. }
  533. // String returns the string representation
  534. func (s Credentials) String() string {
  535. return awsutil.Prettify(s)
  536. }
  537. // GoString returns the string representation
  538. func (s Credentials) GoString() string {
  539. return s.String()
  540. }
  541. // Input to the DeleteIdentities action.
  542. type DeleteIdentitiesInput struct {
  543. // A list of 1-60 identities that you want to delete.
  544. IdentityIdsToDelete []*string `type:"list" required:"true"`
  545. metadataDeleteIdentitiesInput `json:"-" xml:"-"`
  546. }
  547. type metadataDeleteIdentitiesInput struct {
  548. SDKShapeTraits bool `type:"structure"`
  549. }
  550. // String returns the string representation
  551. func (s DeleteIdentitiesInput) String() string {
  552. return awsutil.Prettify(s)
  553. }
  554. // GoString returns the string representation
  555. func (s DeleteIdentitiesInput) GoString() string {
  556. return s.String()
  557. }
  558. // Returned in response to a successful DeleteIdentities operation.
  559. type DeleteIdentitiesOutput struct {
  560. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  561. // and IdentityId.
  562. UnprocessedIdentityIds []*UnprocessedIdentityId `type:"list"`
  563. metadataDeleteIdentitiesOutput `json:"-" xml:"-"`
  564. }
  565. type metadataDeleteIdentitiesOutput struct {
  566. SDKShapeTraits bool `type:"structure"`
  567. }
  568. // String returns the string representation
  569. func (s DeleteIdentitiesOutput) String() string {
  570. return awsutil.Prettify(s)
  571. }
  572. // GoString returns the string representation
  573. func (s DeleteIdentitiesOutput) GoString() string {
  574. return s.String()
  575. }
  576. // Input to the DeleteIdentityPool action.
  577. type DeleteIdentityPoolInput struct {
  578. // An identity pool ID in the format REGION:GUID.
  579. IdentityPoolId *string `type:"string" required:"true"`
  580. metadataDeleteIdentityPoolInput `json:"-" xml:"-"`
  581. }
  582. type metadataDeleteIdentityPoolInput struct {
  583. SDKShapeTraits bool `type:"structure"`
  584. }
  585. // String returns the string representation
  586. func (s DeleteIdentityPoolInput) String() string {
  587. return awsutil.Prettify(s)
  588. }
  589. // GoString returns the string representation
  590. func (s DeleteIdentityPoolInput) GoString() string {
  591. return s.String()
  592. }
  593. type DeleteIdentityPoolOutput struct {
  594. metadataDeleteIdentityPoolOutput `json:"-" xml:"-"`
  595. }
  596. type metadataDeleteIdentityPoolOutput struct {
  597. SDKShapeTraits bool `type:"structure"`
  598. }
  599. // String returns the string representation
  600. func (s DeleteIdentityPoolOutput) String() string {
  601. return awsutil.Prettify(s)
  602. }
  603. // GoString returns the string representation
  604. func (s DeleteIdentityPoolOutput) GoString() string {
  605. return s.String()
  606. }
  607. // Input to the DescribeIdentity action.
  608. type DescribeIdentityInput struct {
  609. // A unique identifier in the format REGION:GUID.
  610. IdentityId *string `type:"string" required:"true"`
  611. metadataDescribeIdentityInput `json:"-" xml:"-"`
  612. }
  613. type metadataDescribeIdentityInput struct {
  614. SDKShapeTraits bool `type:"structure"`
  615. }
  616. // String returns the string representation
  617. func (s DescribeIdentityInput) String() string {
  618. return awsutil.Prettify(s)
  619. }
  620. // GoString returns the string representation
  621. func (s DescribeIdentityInput) GoString() string {
  622. return s.String()
  623. }
  624. // Input to the DescribeIdentityPool action.
  625. type DescribeIdentityPoolInput struct {
  626. // An identity pool ID in the format REGION:GUID.
  627. IdentityPoolId *string `type:"string" required:"true"`
  628. metadataDescribeIdentityPoolInput `json:"-" xml:"-"`
  629. }
  630. type metadataDescribeIdentityPoolInput struct {
  631. SDKShapeTraits bool `type:"structure"`
  632. }
  633. // String returns the string representation
  634. func (s DescribeIdentityPoolInput) String() string {
  635. return awsutil.Prettify(s)
  636. }
  637. // GoString returns the string representation
  638. func (s DescribeIdentityPoolInput) GoString() string {
  639. return s.String()
  640. }
  641. // Input to the GetCredentialsForIdentity action.
  642. type GetCredentialsForIdentityInput struct {
  643. // A unique identifier in the format REGION:GUID.
  644. IdentityId *string `type:"string" required:"true"`
  645. // A set of optional name-value pairs that map provider names to provider tokens.
  646. Logins map[string]*string `type:"map"`
  647. metadataGetCredentialsForIdentityInput `json:"-" xml:"-"`
  648. }
  649. type metadataGetCredentialsForIdentityInput struct {
  650. SDKShapeTraits bool `type:"structure"`
  651. }
  652. // String returns the string representation
  653. func (s GetCredentialsForIdentityInput) String() string {
  654. return awsutil.Prettify(s)
  655. }
  656. // GoString returns the string representation
  657. func (s GetCredentialsForIdentityInput) GoString() string {
  658. return s.String()
  659. }
  660. // Returned in response to a successful GetCredentialsForIdentity operation.
  661. type GetCredentialsForIdentityOutput struct {
  662. // Credentials for the the provided identity ID.
  663. Credentials *Credentials `type:"structure"`
  664. // A unique identifier in the format REGION:GUID.
  665. IdentityId *string `type:"string"`
  666. metadataGetCredentialsForIdentityOutput `json:"-" xml:"-"`
  667. }
  668. type metadataGetCredentialsForIdentityOutput struct {
  669. SDKShapeTraits bool `type:"structure"`
  670. }
  671. // String returns the string representation
  672. func (s GetCredentialsForIdentityOutput) String() string {
  673. return awsutil.Prettify(s)
  674. }
  675. // GoString returns the string representation
  676. func (s GetCredentialsForIdentityOutput) GoString() string {
  677. return s.String()
  678. }
  679. // Input to the GetId action.
  680. type GetIdInput struct {
  681. // A standard AWS account ID (9+ digits).
  682. AccountId *string `type:"string"`
  683. // An identity pool ID in the format REGION:GUID.
  684. IdentityPoolId *string `type:"string" required:"true"`
  685. // A set of optional name-value pairs that map provider names to provider tokens.
  686. //
  687. // The available provider names for Logins are as follows: Facebook: graph.facebook.com
  688. // Google: accounts.google.com Amazon: www.amazon.com Twitter: www.twitter.com
  689. // Digits: www.digits.com
  690. Logins map[string]*string `type:"map"`
  691. metadataGetIdInput `json:"-" xml:"-"`
  692. }
  693. type metadataGetIdInput struct {
  694. SDKShapeTraits bool `type:"structure"`
  695. }
  696. // String returns the string representation
  697. func (s GetIdInput) String() string {
  698. return awsutil.Prettify(s)
  699. }
  700. // GoString returns the string representation
  701. func (s GetIdInput) GoString() string {
  702. return s.String()
  703. }
  704. // Returned in response to a GetId request.
  705. type GetIdOutput struct {
  706. // A unique identifier in the format REGION:GUID.
  707. IdentityId *string `type:"string"`
  708. metadataGetIdOutput `json:"-" xml:"-"`
  709. }
  710. type metadataGetIdOutput struct {
  711. SDKShapeTraits bool `type:"structure"`
  712. }
  713. // String returns the string representation
  714. func (s GetIdOutput) String() string {
  715. return awsutil.Prettify(s)
  716. }
  717. // GoString returns the string representation
  718. func (s GetIdOutput) GoString() string {
  719. return s.String()
  720. }
  721. // Input to the GetIdentityPoolRoles action.
  722. type GetIdentityPoolRolesInput struct {
  723. // An identity pool ID in the format REGION:GUID.
  724. IdentityPoolId *string `type:"string" required:"true"`
  725. metadataGetIdentityPoolRolesInput `json:"-" xml:"-"`
  726. }
  727. type metadataGetIdentityPoolRolesInput struct {
  728. SDKShapeTraits bool `type:"structure"`
  729. }
  730. // String returns the string representation
  731. func (s GetIdentityPoolRolesInput) String() string {
  732. return awsutil.Prettify(s)
  733. }
  734. // GoString returns the string representation
  735. func (s GetIdentityPoolRolesInput) GoString() string {
  736. return s.String()
  737. }
  738. // Returned in response to a successful GetIdentityPoolRoles operation.
  739. type GetIdentityPoolRolesOutput struct {
  740. // An identity pool ID in the format REGION:GUID.
  741. IdentityPoolId *string `type:"string"`
  742. // The map of roles associated with this pool. Currently only authenticated
  743. // and unauthenticated roles are supported.
  744. Roles map[string]*string `type:"map"`
  745. metadataGetIdentityPoolRolesOutput `json:"-" xml:"-"`
  746. }
  747. type metadataGetIdentityPoolRolesOutput struct {
  748. SDKShapeTraits bool `type:"structure"`
  749. }
  750. // String returns the string representation
  751. func (s GetIdentityPoolRolesOutput) String() string {
  752. return awsutil.Prettify(s)
  753. }
  754. // GoString returns the string representation
  755. func (s GetIdentityPoolRolesOutput) GoString() string {
  756. return s.String()
  757. }
  758. // Input to the GetOpenIdTokenForDeveloperIdentity action.
  759. type GetOpenIdTokenForDeveloperIdentityInput struct {
  760. // A unique identifier in the format REGION:GUID.
  761. IdentityId *string `type:"string"`
  762. // An identity pool ID in the format REGION:GUID.
  763. IdentityPoolId *string `type:"string" required:"true"`
  764. // A set of optional name-value pairs that map provider names to provider tokens.
  765. // Each name-value pair represents a user from a public provider or developer
  766. // provider. If the user is from a developer provider, the name-value pair will
  767. // follow the syntax "developer_provider_name": "developer_user_identifier".
  768. // The developer provider is the "domain" by which Cognito will refer to your
  769. // users; you provided this domain while creating/updating the identity pool.
  770. // The developer user identifier is an identifier from your backend that uniquely
  771. // identifies a user. When you create an identity pool, you can specify the
  772. // supported logins.
  773. Logins map[string]*string `type:"map" required:"true"`
  774. // The expiration time of the token, in seconds. You can specify a custom expiration
  775. // time for the token so that you can cache it. If you don't provide an expiration
  776. // time, the token is valid for 15 minutes. You can exchange the token with
  777. // Amazon STS for temporary AWS credentials, which are valid for a maximum of
  778. // one hour. The maximum token duration you can set is 24 hours. You should
  779. // take care in setting the expiration time for a token, as there are significant
  780. // security implications: an attacker could use a leaked token to access your
  781. // AWS resources for the token's duration.
  782. TokenDuration *int64 `type:"long"`
  783. metadataGetOpenIdTokenForDeveloperIdentityInput `json:"-" xml:"-"`
  784. }
  785. type metadataGetOpenIdTokenForDeveloperIdentityInput struct {
  786. SDKShapeTraits bool `type:"structure"`
  787. }
  788. // String returns the string representation
  789. func (s GetOpenIdTokenForDeveloperIdentityInput) String() string {
  790. return awsutil.Prettify(s)
  791. }
  792. // GoString returns the string representation
  793. func (s GetOpenIdTokenForDeveloperIdentityInput) GoString() string {
  794. return s.String()
  795. }
  796. // Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.
  797. type GetOpenIdTokenForDeveloperIdentityOutput struct {
  798. // A unique identifier in the format REGION:GUID.
  799. IdentityId *string `type:"string"`
  800. // An OpenID token.
  801. Token *string `type:"string"`
  802. metadataGetOpenIdTokenForDeveloperIdentityOutput `json:"-" xml:"-"`
  803. }
  804. type metadataGetOpenIdTokenForDeveloperIdentityOutput struct {
  805. SDKShapeTraits bool `type:"structure"`
  806. }
  807. // String returns the string representation
  808. func (s GetOpenIdTokenForDeveloperIdentityOutput) String() string {
  809. return awsutil.Prettify(s)
  810. }
  811. // GoString returns the string representation
  812. func (s GetOpenIdTokenForDeveloperIdentityOutput) GoString() string {
  813. return s.String()
  814. }
  815. // Input to the GetOpenIdToken action.
  816. type GetOpenIdTokenInput struct {
  817. // A unique identifier in the format REGION:GUID.
  818. IdentityId *string `type:"string" required:"true"`
  819. // A set of optional name-value pairs that map provider names to provider tokens.
  820. // When using graph.facebook.com and www.amazon.com, supply the access_token
  821. // returned from the provider's authflow. For accounts.google.com or any other
  822. // OpenId Connect provider, always include the id_token.
  823. Logins map[string]*string `type:"map"`
  824. metadataGetOpenIdTokenInput `json:"-" xml:"-"`
  825. }
  826. type metadataGetOpenIdTokenInput struct {
  827. SDKShapeTraits bool `type:"structure"`
  828. }
  829. // String returns the string representation
  830. func (s GetOpenIdTokenInput) String() string {
  831. return awsutil.Prettify(s)
  832. }
  833. // GoString returns the string representation
  834. func (s GetOpenIdTokenInput) GoString() string {
  835. return s.String()
  836. }
  837. // Returned in response to a successful GetOpenIdToken request.
  838. type GetOpenIdTokenOutput struct {
  839. // A unique identifier in the format REGION:GUID. Note that the IdentityId returned
  840. // may not match the one passed on input.
  841. IdentityId *string `type:"string"`
  842. // An OpenID token, valid for 15 minutes.
  843. Token *string `type:"string"`
  844. metadataGetOpenIdTokenOutput `json:"-" xml:"-"`
  845. }
  846. type metadataGetOpenIdTokenOutput struct {
  847. SDKShapeTraits bool `type:"structure"`
  848. }
  849. // String returns the string representation
  850. func (s GetOpenIdTokenOutput) String() string {
  851. return awsutil.Prettify(s)
  852. }
  853. // GoString returns the string representation
  854. func (s GetOpenIdTokenOutput) GoString() string {
  855. return s.String()
  856. }
  857. // A description of the identity.
  858. type IdentityDescription struct {
  859. // Date on which the identity was created.
  860. CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  861. // A unique identifier in the format REGION:GUID.
  862. IdentityId *string `type:"string"`
  863. // Date on which the identity was last modified.
  864. LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  865. // A set of optional name-value pairs that map provider names to provider tokens.
  866. Logins []*string `type:"list"`
  867. metadataIdentityDescription `json:"-" xml:"-"`
  868. }
  869. type metadataIdentityDescription struct {
  870. SDKShapeTraits bool `type:"structure"`
  871. }
  872. // String returns the string representation
  873. func (s IdentityDescription) String() string {
  874. return awsutil.Prettify(s)
  875. }
  876. // GoString returns the string representation
  877. func (s IdentityDescription) GoString() string {
  878. return s.String()
  879. }
  880. // An object representing a Cognito identity pool.
  881. type IdentityPool struct {
  882. // TRUE if the identity pool supports unauthenticated logins.
  883. AllowUnauthenticatedIdentities *bool `type:"boolean" required:"true"`
  884. // The "domain" by which Cognito will refer to your users.
  885. DeveloperProviderName *string `type:"string"`
  886. // An identity pool ID in the format REGION:GUID.
  887. IdentityPoolId *string `type:"string" required:"true"`
  888. // A string that you provide.
  889. IdentityPoolName *string `type:"string" required:"true"`
  890. // A list of OpendID Connect provider ARNs.
  891. OpenIdConnectProviderARNs []*string `type:"list"`
  892. // Optional key:value pairs mapping provider names to provider app IDs.
  893. SupportedLoginProviders map[string]*string `type:"map"`
  894. metadataIdentityPool `json:"-" xml:"-"`
  895. }
  896. type metadataIdentityPool struct {
  897. SDKShapeTraits bool `type:"structure"`
  898. }
  899. // String returns the string representation
  900. func (s IdentityPool) String() string {
  901. return awsutil.Prettify(s)
  902. }
  903. // GoString returns the string representation
  904. func (s IdentityPool) GoString() string {
  905. return s.String()
  906. }
  907. // A description of the identity pool.
  908. type IdentityPoolShortDescription struct {
  909. // An identity pool ID in the format REGION:GUID.
  910. IdentityPoolId *string `type:"string"`
  911. // A string that you provide.
  912. IdentityPoolName *string `type:"string"`
  913. metadataIdentityPoolShortDescription `json:"-" xml:"-"`
  914. }
  915. type metadataIdentityPoolShortDescription struct {
  916. SDKShapeTraits bool `type:"structure"`
  917. }
  918. // String returns the string representation
  919. func (s IdentityPoolShortDescription) String() string {
  920. return awsutil.Prettify(s)
  921. }
  922. // GoString returns the string representation
  923. func (s IdentityPoolShortDescription) GoString() string {
  924. return s.String()
  925. }
  926. // Input to the ListIdentities action.
  927. type ListIdentitiesInput struct {
  928. // An optional boolean parameter that allows you to hide disabled identities.
  929. // If omitted, the ListIdentities API will include disabled identities in the
  930. // response.
  931. HideDisabled *bool `type:"boolean"`
  932. // An identity pool ID in the format REGION:GUID.
  933. IdentityPoolId *string `type:"string" required:"true"`
  934. // The maximum number of identities to return.
  935. MaxResults *int64 `type:"integer" required:"true"`
  936. // A pagination token.
  937. NextToken *string `type:"string"`
  938. metadataListIdentitiesInput `json:"-" xml:"-"`
  939. }
  940. type metadataListIdentitiesInput struct {
  941. SDKShapeTraits bool `type:"structure"`
  942. }
  943. // String returns the string representation
  944. func (s ListIdentitiesInput) String() string {
  945. return awsutil.Prettify(s)
  946. }
  947. // GoString returns the string representation
  948. func (s ListIdentitiesInput) GoString() string {
  949. return s.String()
  950. }
  951. // The response to a ListIdentities request.
  952. type ListIdentitiesOutput struct {
  953. // An object containing a set of identities and associated mappings.
  954. Identities []*IdentityDescription `type:"list"`
  955. // An identity pool ID in the format REGION:GUID.
  956. IdentityPoolId *string `type:"string"`
  957. // A pagination token.
  958. NextToken *string `type:"string"`
  959. metadataListIdentitiesOutput `json:"-" xml:"-"`
  960. }
  961. type metadataListIdentitiesOutput struct {
  962. SDKShapeTraits bool `type:"structure"`
  963. }
  964. // String returns the string representation
  965. func (s ListIdentitiesOutput) String() string {
  966. return awsutil.Prettify(s)
  967. }
  968. // GoString returns the string representation
  969. func (s ListIdentitiesOutput) GoString() string {
  970. return s.String()
  971. }
  972. // Input to the ListIdentityPools action.
  973. type ListIdentityPoolsInput struct {
  974. // The maximum number of identities to return.
  975. MaxResults *int64 `type:"integer" required:"true"`
  976. // A pagination token.
  977. NextToken *string `type:"string"`
  978. metadataListIdentityPoolsInput `json:"-" xml:"-"`
  979. }
  980. type metadataListIdentityPoolsInput struct {
  981. SDKShapeTraits bool `type:"structure"`
  982. }
  983. // String returns the string representation
  984. func (s ListIdentityPoolsInput) String() string {
  985. return awsutil.Prettify(s)
  986. }
  987. // GoString returns the string representation
  988. func (s ListIdentityPoolsInput) GoString() string {
  989. return s.String()
  990. }
  991. // The result of a successful ListIdentityPools action.
  992. type ListIdentityPoolsOutput struct {
  993. // The identity pools returned by the ListIdentityPools action.
  994. IdentityPools []*IdentityPoolShortDescription `type:"list"`
  995. // A pagination token.
  996. NextToken *string `type:"string"`
  997. metadataListIdentityPoolsOutput `json:"-" xml:"-"`
  998. }
  999. type metadataListIdentityPoolsOutput struct {
  1000. SDKShapeTraits bool `type:"structure"`
  1001. }
  1002. // String returns the string representation
  1003. func (s ListIdentityPoolsOutput) String() string {
  1004. return awsutil.Prettify(s)
  1005. }
  1006. // GoString returns the string representation
  1007. func (s ListIdentityPoolsOutput) GoString() string {
  1008. return s.String()
  1009. }
  1010. // Input to the LookupDeveloperIdentityInput action.
  1011. type LookupDeveloperIdentityInput struct {
  1012. // A unique ID used by your backend authentication process to identify a user.
  1013. // Typically, a developer identity provider would issue many developer user
  1014. // identifiers, in keeping with the number of users.
  1015. DeveloperUserIdentifier *string `type:"string"`
  1016. // A unique identifier in the format REGION:GUID.
  1017. IdentityId *string `type:"string"`
  1018. // An identity pool ID in the format REGION:GUID.
  1019. IdentityPoolId *string `type:"string" required:"true"`
  1020. // The maximum number of identities to return.
  1021. MaxResults *int64 `type:"integer"`
  1022. // A pagination token. The first call you make will have NextToken set to null.
  1023. // After that the service will return NextToken values as needed. For example,
  1024. // let's say you make a request with MaxResults set to 10, and there are 20
  1025. // matches in the database. The service will return a pagination token as a
  1026. // part of the response. This token can be used to call the API again and get
  1027. // results starting from the 11th match.
  1028. NextToken *string `type:"string"`
  1029. metadataLookupDeveloperIdentityInput `json:"-" xml:"-"`
  1030. }
  1031. type metadataLookupDeveloperIdentityInput struct {
  1032. SDKShapeTraits bool `type:"structure"`
  1033. }
  1034. // String returns the string representation
  1035. func (s LookupDeveloperIdentityInput) String() string {
  1036. return awsutil.Prettify(s)
  1037. }
  1038. // GoString returns the string representation
  1039. func (s LookupDeveloperIdentityInput) GoString() string {
  1040. return s.String()
  1041. }
  1042. // Returned in response to a successful LookupDeveloperIdentity action.
  1043. type LookupDeveloperIdentityOutput struct {
  1044. // This is the list of developer user identifiers associated with an identity
  1045. // ID. Cognito supports the association of multiple developer user identifiers
  1046. // with an identity ID.
  1047. DeveloperUserIdentifierList []*string `type:"list"`
  1048. // A unique identifier in the format REGION:GUID.
  1049. IdentityId *string `type:"string"`
  1050. // A pagination token. The first call you make will have NextToken set to null.
  1051. // After that the service will return NextToken values as needed. For example,
  1052. // let's say you make a request with MaxResults set to 10, and there are 20
  1053. // matches in the database. The service will return a pagination token as a
  1054. // part of the response. This token can be used to call the API again and get
  1055. // results starting from the 11th match.
  1056. NextToken *string `type:"string"`
  1057. metadataLookupDeveloperIdentityOutput `json:"-" xml:"-"`
  1058. }
  1059. type metadataLookupDeveloperIdentityOutput struct {
  1060. SDKShapeTraits bool `type:"structure"`
  1061. }
  1062. // String returns the string representation
  1063. func (s LookupDeveloperIdentityOutput) String() string {
  1064. return awsutil.Prettify(s)
  1065. }
  1066. // GoString returns the string representation
  1067. func (s LookupDeveloperIdentityOutput) GoString() string {
  1068. return s.String()
  1069. }
  1070. // Input to the MergeDeveloperIdentities action.
  1071. type MergeDeveloperIdentitiesInput struct {
  1072. // User identifier for the destination user. The value should be a DeveloperUserIdentifier.
  1073. DestinationUserIdentifier *string `type:"string" required:"true"`
  1074. // The "domain" by which Cognito will refer to your users. This is a (pseudo)
  1075. // domain name that you provide while creating an identity pool. This name acts
  1076. // as a placeholder that allows your backend and the Cognito service to communicate
  1077. // about the developer provider. For the DeveloperProviderName, you can use
  1078. // letters as well as period (.), underscore (_), and dash (-).
  1079. DeveloperProviderName *string `type:"string" required:"true"`
  1080. // An identity pool ID in the format REGION:GUID.
  1081. IdentityPoolId *string `type:"string" required:"true"`
  1082. // User identifier for the source user. The value should be a DeveloperUserIdentifier.
  1083. SourceUserIdentifier *string `type:"string" required:"true"`
  1084. metadataMergeDeveloperIdentitiesInput `json:"-" xml:"-"`
  1085. }
  1086. type metadataMergeDeveloperIdentitiesInput struct {
  1087. SDKShapeTraits bool `type:"structure"`
  1088. }
  1089. // String returns the string representation
  1090. func (s MergeDeveloperIdentitiesInput) String() string {
  1091. return awsutil.Prettify(s)
  1092. }
  1093. // GoString returns the string representation
  1094. func (s MergeDeveloperIdentitiesInput) GoString() string {
  1095. return s.String()
  1096. }
  1097. // Returned in response to a successful MergeDeveloperIdentities action.
  1098. type MergeDeveloperIdentitiesOutput struct {
  1099. // A unique identifier in the format REGION:GUID.
  1100. IdentityId *string `type:"string"`
  1101. metadataMergeDeveloperIdentitiesOutput `json:"-" xml:"-"`
  1102. }
  1103. type metadataMergeDeveloperIdentitiesOutput struct {
  1104. SDKShapeTraits bool `type:"structure"`
  1105. }
  1106. // String returns the string representation
  1107. func (s MergeDeveloperIdentitiesOutput) String() string {
  1108. return awsutil.Prettify(s)
  1109. }
  1110. // GoString returns the string representation
  1111. func (s MergeDeveloperIdentitiesOutput) GoString() string {
  1112. return s.String()
  1113. }
  1114. // Input to the SetIdentityPoolRoles action.
  1115. type SetIdentityPoolRolesInput struct {
  1116. // An identity pool ID in the format REGION:GUID.
  1117. IdentityPoolId *string `type:"string" required:"true"`
  1118. // The map of roles associated with this pool. For a given role, the key will
  1119. // be either "authenticated" or "unauthenticated" and the value will be the
  1120. // Role ARN.
  1121. Roles map[string]*string `type:"map" required:"true"`
  1122. metadataSetIdentityPoolRolesInput `json:"-" xml:"-"`
  1123. }
  1124. type metadataSetIdentityPoolRolesInput struct {
  1125. SDKShapeTraits bool `type:"structure"`
  1126. }
  1127. // String returns the string representation
  1128. func (s SetIdentityPoolRolesInput) String() string {
  1129. return awsutil.Prettify(s)
  1130. }
  1131. // GoString returns the string representation
  1132. func (s SetIdentityPoolRolesInput) GoString() string {
  1133. return s.String()
  1134. }
  1135. type SetIdentityPoolRolesOutput struct {
  1136. metadataSetIdentityPoolRolesOutput `json:"-" xml:"-"`
  1137. }
  1138. type metadataSetIdentityPoolRolesOutput struct {
  1139. SDKShapeTraits bool `type:"structure"`
  1140. }
  1141. // String returns the string representation
  1142. func (s SetIdentityPoolRolesOutput) String() string {
  1143. return awsutil.Prettify(s)
  1144. }
  1145. // GoString returns the string representation
  1146. func (s SetIdentityPoolRolesOutput) GoString() string {
  1147. return s.String()
  1148. }
  1149. // Input to the UnlinkDeveloperIdentity action.
  1150. type UnlinkDeveloperIdentityInput struct {
  1151. // The "domain" by which Cognito will refer to your users.
  1152. DeveloperProviderName *string `type:"string" required:"true"`
  1153. // A unique ID used by your backend authentication process to identify a user.
  1154. DeveloperUserIdentifier *string `type:"string" required:"true"`
  1155. // A unique identifier in the format REGION:GUID.
  1156. IdentityId *string `type:"string" required:"true"`
  1157. // An identity pool ID in the format REGION:GUID.
  1158. IdentityPoolId *string `type:"string" required:"true"`
  1159. metadataUnlinkDeveloperIdentityInput `json:"-" xml:"-"`
  1160. }
  1161. type metadataUnlinkDeveloperIdentityInput struct {
  1162. SDKShapeTraits bool `type:"structure"`
  1163. }
  1164. // String returns the string representation
  1165. func (s UnlinkDeveloperIdentityInput) String() string {
  1166. return awsutil.Prettify(s)
  1167. }
  1168. // GoString returns the string representation
  1169. func (s UnlinkDeveloperIdentityInput) GoString() string {
  1170. return s.String()
  1171. }
  1172. type UnlinkDeveloperIdentityOutput struct {
  1173. metadataUnlinkDeveloperIdentityOutput `json:"-" xml:"-"`
  1174. }
  1175. type metadataUnlinkDeveloperIdentityOutput struct {
  1176. SDKShapeTraits bool `type:"structure"`
  1177. }
  1178. // String returns the string representation
  1179. func (s UnlinkDeveloperIdentityOutput) String() string {
  1180. return awsutil.Prettify(s)
  1181. }
  1182. // GoString returns the string representation
  1183. func (s UnlinkDeveloperIdentityOutput) GoString() string {
  1184. return s.String()
  1185. }
  1186. // Input to the UnlinkIdentity action.
  1187. type UnlinkIdentityInput struct {
  1188. // A unique identifier in the format REGION:GUID.
  1189. IdentityId *string `type:"string" required:"true"`
  1190. // A set of optional name-value pairs that map provider names to provider tokens.
  1191. Logins map[string]*string `type:"map" required:"true"`
  1192. // Provider names to unlink from this identity.
  1193. LoginsToRemove []*string `type:"list" required:"true"`
  1194. metadataUnlinkIdentityInput `json:"-" xml:"-"`
  1195. }
  1196. type metadataUnlinkIdentityInput struct {
  1197. SDKShapeTraits bool `type:"structure"`
  1198. }
  1199. // String returns the string representation
  1200. func (s UnlinkIdentityInput) String() string {
  1201. return awsutil.Prettify(s)
  1202. }
  1203. // GoString returns the string representation
  1204. func (s UnlinkIdentityInput) GoString() string {
  1205. return s.String()
  1206. }
  1207. type UnlinkIdentityOutput struct {
  1208. metadataUnlinkIdentityOutput `json:"-" xml:"-"`
  1209. }
  1210. type metadataUnlinkIdentityOutput struct {
  1211. SDKShapeTraits bool `type:"structure"`
  1212. }
  1213. // String returns the string representation
  1214. func (s UnlinkIdentityOutput) String() string {
  1215. return awsutil.Prettify(s)
  1216. }
  1217. // GoString returns the string representation
  1218. func (s UnlinkIdentityOutput) GoString() string {
  1219. return s.String()
  1220. }
  1221. // An array of UnprocessedIdentityId objects, each of which contains an ErrorCode
  1222. // and IdentityId.
  1223. type UnprocessedIdentityId struct {
  1224. // The error code indicating the type of error that occurred.
  1225. ErrorCode *string `type:"string" enum:"ErrorCode"`
  1226. // A unique identifier in the format REGION:GUID.
  1227. IdentityId *string `type:"string"`
  1228. metadataUnprocessedIdentityId `json:"-" xml:"-"`
  1229. }
  1230. type metadataUnprocessedIdentityId struct {
  1231. SDKShapeTraits bool `type:"structure"`
  1232. }
  1233. // String returns the string representation
  1234. func (s UnprocessedIdentityId) String() string {
  1235. return awsutil.Prettify(s)
  1236. }
  1237. // GoString returns the string representation
  1238. func (s UnprocessedIdentityId) GoString() string {
  1239. return s.String()
  1240. }
  1241. const (
  1242. // @enum ErrorCode
  1243. ErrorCodeAccessDenied = "AccessDenied"
  1244. // @enum ErrorCode
  1245. ErrorCodeInternalServerError = "InternalServerError"
  1246. )