No Description

AWSCognitoIdentityModel.h 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  1. //
  2. // Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License").
  5. // You may not use this file except in compliance with the License.
  6. // A copy of the License is located at
  7. //
  8. // http://aws.amazon.com/apache2.0
  9. //
  10. // or in the "license" file accompanying this file. This file is distributed
  11. // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. // express or implied. See the License for the specific language governing
  13. // permissions and limitations under the License.
  14. //
  15. #import <Foundation/Foundation.h>
  16. #import "AWSNetworking.h"
  17. #import "AWSModel.h"
  18. NS_ASSUME_NONNULL_BEGIN
  19. FOUNDATION_EXPORT NSString *const AWSCognitoIdentityErrorDomain;
  20. typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorType) {
  21. AWSCognitoIdentityErrorUnknown,
  22. AWSCognitoIdentityErrorConcurrentModification,
  23. AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered,
  24. AWSCognitoIdentityErrorExternalService,
  25. AWSCognitoIdentityErrorInternalError,
  26. AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration,
  27. AWSCognitoIdentityErrorInvalidParameter,
  28. AWSCognitoIdentityErrorLimitExceeded,
  29. AWSCognitoIdentityErrorNotAuthorized,
  30. AWSCognitoIdentityErrorResourceConflict,
  31. AWSCognitoIdentityErrorResourceNotFound,
  32. AWSCognitoIdentityErrorTooManyRequests,
  33. };
  34. typedef NS_ENUM(NSInteger, AWSCognitoIdentityAmbiguousRoleResolutionType) {
  35. AWSCognitoIdentityAmbiguousRoleResolutionTypeUnknown,
  36. AWSCognitoIdentityAmbiguousRoleResolutionTypeAuthenticatedRole,
  37. AWSCognitoIdentityAmbiguousRoleResolutionTypeDeny,
  38. };
  39. typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorCode) {
  40. AWSCognitoIdentityErrorCodeUnknown,
  41. AWSCognitoIdentityErrorCodeAccessDenied,
  42. AWSCognitoIdentityErrorCodeInternalServerError,
  43. };
  44. typedef NS_ENUM(NSInteger, AWSCognitoIdentityMappingRuleMatchType) {
  45. AWSCognitoIdentityMappingRuleMatchTypeUnknown,
  46. AWSCognitoIdentityMappingRuleMatchTypeEquals,
  47. AWSCognitoIdentityMappingRuleMatchTypeContains,
  48. AWSCognitoIdentityMappingRuleMatchTypeStartsWith,
  49. AWSCognitoIdentityMappingRuleMatchTypeNotEqual,
  50. };
  51. typedef NS_ENUM(NSInteger, AWSCognitoIdentityRoleMappingType) {
  52. AWSCognitoIdentityRoleMappingTypeUnknown,
  53. AWSCognitoIdentityRoleMappingTypeToken,
  54. AWSCognitoIdentityRoleMappingTypeRules,
  55. };
  56. @class AWSCognitoIdentityCognitoIdentityProvider;
  57. @class AWSCognitoIdentityCreateIdentityPoolInput;
  58. @class AWSCognitoIdentityCredentials;
  59. @class AWSCognitoIdentityDeleteIdentitiesInput;
  60. @class AWSCognitoIdentityDeleteIdentitiesResponse;
  61. @class AWSCognitoIdentityDeleteIdentityPoolInput;
  62. @class AWSCognitoIdentityDescribeIdentityInput;
  63. @class AWSCognitoIdentityDescribeIdentityPoolInput;
  64. @class AWSCognitoIdentityGetCredentialsForIdentityInput;
  65. @class AWSCognitoIdentityGetCredentialsForIdentityResponse;
  66. @class AWSCognitoIdentityGetIdInput;
  67. @class AWSCognitoIdentityGetIdResponse;
  68. @class AWSCognitoIdentityGetIdentityPoolRolesInput;
  69. @class AWSCognitoIdentityGetIdentityPoolRolesResponse;
  70. @class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput;
  71. @class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse;
  72. @class AWSCognitoIdentityGetOpenIdTokenInput;
  73. @class AWSCognitoIdentityGetOpenIdTokenResponse;
  74. @class AWSCognitoIdentityIdentityDescription;
  75. @class AWSCognitoIdentityIdentityPool;
  76. @class AWSCognitoIdentityIdentityPoolShortDescription;
  77. @class AWSCognitoIdentityListIdentitiesInput;
  78. @class AWSCognitoIdentityListIdentitiesResponse;
  79. @class AWSCognitoIdentityListIdentityPoolsInput;
  80. @class AWSCognitoIdentityListIdentityPoolsResponse;
  81. @class AWSCognitoIdentityListTagsForResourceInput;
  82. @class AWSCognitoIdentityListTagsForResourceResponse;
  83. @class AWSCognitoIdentityLookupDeveloperIdentityInput;
  84. @class AWSCognitoIdentityLookupDeveloperIdentityResponse;
  85. @class AWSCognitoIdentityMappingRule;
  86. @class AWSCognitoIdentityMergeDeveloperIdentitiesInput;
  87. @class AWSCognitoIdentityMergeDeveloperIdentitiesResponse;
  88. @class AWSCognitoIdentityRoleMapping;
  89. @class AWSCognitoIdentityRulesConfigurationType;
  90. @class AWSCognitoIdentitySetIdentityPoolRolesInput;
  91. @class AWSCognitoIdentityTagResourceInput;
  92. @class AWSCognitoIdentityTagResourceResponse;
  93. @class AWSCognitoIdentityUnlinkDeveloperIdentityInput;
  94. @class AWSCognitoIdentityUnlinkIdentityInput;
  95. @class AWSCognitoIdentityUnprocessedIdentityId;
  96. @class AWSCognitoIdentityUntagResourceInput;
  97. @class AWSCognitoIdentityUntagResourceResponse;
  98. /**
  99. <p>A provider representing an Amazon Cognito user pool and its client ID.</p>
  100. */
  101. @interface AWSCognitoIdentityCognitoIdentityProvider : AWSModel
  102. /**
  103. <p>The client ID for the Amazon Cognito user pool.</p>
  104. */
  105. @property (nonatomic, strong) NSString * _Nullable clientId;
  106. /**
  107. <p>The provider name for an Amazon Cognito user pool. For example, <code>cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789</code>.</p>
  108. */
  109. @property (nonatomic, strong) NSString * _Nullable providerName;
  110. /**
  111. <p>TRUE if server-side token validation is enabled for the identity provider’s token.</p><p>Once you set <code>ServerSideTokenCheck</code> to TRUE for an identity pool, that identity pool will check with the integrated user pools to make sure that the user has not been globally signed out or deleted before the identity pool provides an OIDC token or AWS credentials for the user.</p><p>If the user is signed out or deleted, the identity pool will return a 400 Not Authorized error.</p>
  112. */
  113. @property (nonatomic, strong) NSNumber * _Nullable serverSideTokenCheck;
  114. @end
  115. /**
  116. <p>Input to the CreateIdentityPool action.</p>
  117. Required parameters: [IdentityPoolName, AllowUnauthenticatedIdentities]
  118. */
  119. @interface AWSCognitoIdentityCreateIdentityPoolInput : AWSRequest
  120. /**
  121. <p>TRUE if the identity pool supports unauthenticated logins.</p>
  122. */
  123. @property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities;
  124. /**
  125. <p>An array of Amazon Cognito user pools and their client IDs.</p>
  126. */
  127. @property (nonatomic, strong) NSArray<AWSCognitoIdentityCognitoIdentityProvider *> * _Nullable cognitoIdentityProviders;
  128. /**
  129. <p>The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the <code>DeveloperProviderName</code>, you can use letters as well as period (<code>.</code>), underscore (<code>_</code>), and dash (<code>-</code>).</p><p>Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.</p>
  130. */
  131. @property (nonatomic, strong) NSString * _Nullable developerProviderName;
  132. /**
  133. <p>A string that you provide.</p>
  134. */
  135. @property (nonatomic, strong) NSString * _Nullable identityPoolName;
  136. /**
  137. <p>Tags to assign to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>
  138. */
  139. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable identityPoolTags;
  140. /**
  141. <p>A list of OpendID Connect provider ARNs.</p>
  142. */
  143. @property (nonatomic, strong) NSArray<NSString *> * _Nullable openIdConnectProviderARNs;
  144. /**
  145. <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
  146. */
  147. @property (nonatomic, strong) NSArray<NSString *> * _Nullable samlProviderARNs;
  148. /**
  149. <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
  150. */
  151. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable supportedLoginProviders;
  152. @end
  153. /**
  154. <p>Credentials for the provided identity ID.</p>
  155. */
  156. @interface AWSCognitoIdentityCredentials : AWSModel
  157. /**
  158. <p>The Access Key portion of the credentials.</p>
  159. */
  160. @property (nonatomic, strong) NSString * _Nullable accessKeyId;
  161. /**
  162. <p>The date at which these credentials will expire.</p>
  163. */
  164. @property (nonatomic, strong) NSDate * _Nullable expiration;
  165. /**
  166. <p>The Secret Access Key portion of the credentials</p>
  167. */
  168. @property (nonatomic, strong) NSString * _Nullable secretKey;
  169. /**
  170. <p>The Session Token portion of the credentials</p>
  171. */
  172. @property (nonatomic, strong) NSString * _Nullable sessionToken;
  173. @end
  174. /**
  175. <p>Input to the <code>DeleteIdentities</code> action.</p>
  176. Required parameters: [IdentityIdsToDelete]
  177. */
  178. @interface AWSCognitoIdentityDeleteIdentitiesInput : AWSRequest
  179. /**
  180. <p>A list of 1-60 identities that you want to delete.</p>
  181. */
  182. @property (nonatomic, strong) NSArray<NSString *> * _Nullable identityIdsToDelete;
  183. @end
  184. /**
  185. <p>Returned in response to a successful <code>DeleteIdentities</code> operation.</p>
  186. */
  187. @interface AWSCognitoIdentityDeleteIdentitiesResponse : AWSModel
  188. /**
  189. <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
  190. */
  191. @property (nonatomic, strong) NSArray<AWSCognitoIdentityUnprocessedIdentityId *> * _Nullable unprocessedIdentityIds;
  192. @end
  193. /**
  194. <p>Input to the DeleteIdentityPool action.</p>
  195. Required parameters: [IdentityPoolId]
  196. */
  197. @interface AWSCognitoIdentityDeleteIdentityPoolInput : AWSRequest
  198. /**
  199. <p>An identity pool ID in the format REGION:GUID.</p>
  200. */
  201. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  202. @end
  203. /**
  204. <p>Input to the <code>DescribeIdentity</code> action.</p>
  205. Required parameters: [IdentityId]
  206. */
  207. @interface AWSCognitoIdentityDescribeIdentityInput : AWSRequest
  208. /**
  209. <p>A unique identifier in the format REGION:GUID.</p>
  210. */
  211. @property (nonatomic, strong) NSString * _Nullable identityId;
  212. @end
  213. /**
  214. <p>Input to the DescribeIdentityPool action.</p>
  215. Required parameters: [IdentityPoolId]
  216. */
  217. @interface AWSCognitoIdentityDescribeIdentityPoolInput : AWSRequest
  218. /**
  219. <p>An identity pool ID in the format REGION:GUID.</p>
  220. */
  221. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  222. @end
  223. /**
  224. <p>Input to the <code>GetCredentialsForIdentity</code> action.</p>
  225. Required parameters: [IdentityId]
  226. */
  227. @interface AWSCognitoIdentityGetCredentialsForIdentityInput : AWSRequest
  228. /**
  229. <p>The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.</p>
  230. */
  231. @property (nonatomic, strong) NSString * _Nullable customRoleArn;
  232. /**
  233. <p>A unique identifier in the format REGION:GUID.</p>
  234. */
  235. @property (nonatomic, strong) NSString * _Nullable identityId;
  236. /**
  237. <p>A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier".</p><p>Logins should not be specified when trying to get credentials for an unauthenticated identity.</p><p>The Logins parameter is required when using identities associated with external identity providers such as FaceBook. For examples of <code>Logins</code> maps, see the code examples in the <a href="http://docs.aws.amazon.com/cognito/latest/developerguide/external-identity-providers.html">External Identity Providers</a> section of the Amazon Cognito Developer Guide.</p>
  238. */
  239. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
  240. @end
  241. /**
  242. <p>Returned in response to a successful <code>GetCredentialsForIdentity</code> operation.</p>
  243. */
  244. @interface AWSCognitoIdentityGetCredentialsForIdentityResponse : AWSModel
  245. /**
  246. <p>Credentials for the provided identity ID.</p>
  247. */
  248. @property (nonatomic, strong) AWSCognitoIdentityCredentials * _Nullable credentials;
  249. /**
  250. <p>A unique identifier in the format REGION:GUID.</p>
  251. */
  252. @property (nonatomic, strong) NSString * _Nullable identityId;
  253. @end
  254. /**
  255. <p>Input to the GetId action.</p>
  256. Required parameters: [IdentityPoolId]
  257. */
  258. @interface AWSCognitoIdentityGetIdInput : AWSRequest
  259. /**
  260. <p>A standard AWS account ID (9+ digits).</p>
  261. */
  262. @property (nonatomic, strong) NSString * _Nullable accountId;
  263. /**
  264. <p>An identity pool ID in the format REGION:GUID.</p>
  265. */
  266. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  267. /**
  268. <p>A set of optional name-value pairs that map provider names to provider tokens. The available provider names for <code>Logins</code> are as follows:</p><ul><li><p>Facebook: <code>graph.facebook.com</code></p></li><li><p>Amazon Cognito user pool: <code>cognito-idp.&lt;region&gt;.amazonaws.com/&lt;YOUR_USER_POOL_ID&gt;</code>, for example, <code>cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789</code>. </p></li><li><p>Google: <code>accounts.google.com</code></p></li><li><p>Amazon: <code>www.amazon.com</code></p></li><li><p>Twitter: <code>api.twitter.com</code></p></li><li><p>Digits: <code>www.digits.com</code></p></li></ul>
  269. */
  270. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
  271. @end
  272. /**
  273. <p>Returned in response to a GetId request.</p>
  274. */
  275. @interface AWSCognitoIdentityGetIdResponse : AWSModel
  276. /**
  277. <p>A unique identifier in the format REGION:GUID.</p>
  278. */
  279. @property (nonatomic, strong) NSString * _Nullable identityId;
  280. @end
  281. /**
  282. <p>Input to the <code>GetIdentityPoolRoles</code> action.</p>
  283. Required parameters: [IdentityPoolId]
  284. */
  285. @interface AWSCognitoIdentityGetIdentityPoolRolesInput : AWSRequest
  286. /**
  287. <p>An identity pool ID in the format REGION:GUID.</p>
  288. */
  289. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  290. @end
  291. /**
  292. <p>Returned in response to a successful <code>GetIdentityPoolRoles</code> operation.</p>
  293. */
  294. @interface AWSCognitoIdentityGetIdentityPoolRolesResponse : AWSModel
  295. /**
  296. <p>An identity pool ID in the format REGION:GUID.</p>
  297. */
  298. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  299. /**
  300. <p>How users for a specific identity provider are to mapped to roles. This is a String-to-<a>RoleMapping</a> object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".</p>
  301. */
  302. @property (nonatomic, strong) NSDictionary<NSString *, AWSCognitoIdentityRoleMapping *> * _Nullable roleMappings;
  303. /**
  304. <p>The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.</p>
  305. */
  306. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable roles;
  307. @end
  308. /**
  309. <p>Input to the <code>GetOpenIdTokenForDeveloperIdentity</code> action.</p>
  310. Required parameters: [IdentityPoolId, Logins]
  311. */
  312. @interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput : AWSRequest
  313. /**
  314. <p>A unique identifier in the format REGION:GUID.</p>
  315. */
  316. @property (nonatomic, strong) NSString * _Nullable identityId;
  317. /**
  318. <p>An identity pool ID in the format REGION:GUID.</p>
  319. */
  320. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  321. /**
  322. <p>A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax <code>"developer_provider_name": "developer_user_identifier"</code>. The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.</p>
  323. */
  324. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
  325. /**
  326. <p>The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.</p>
  327. */
  328. @property (nonatomic, strong) NSNumber * _Nullable tokenDuration;
  329. @end
  330. /**
  331. <p>Returned in response to a successful <code>GetOpenIdTokenForDeveloperIdentity</code> request.</p>
  332. */
  333. @interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse : AWSModel
  334. /**
  335. <p>A unique identifier in the format REGION:GUID.</p>
  336. */
  337. @property (nonatomic, strong) NSString * _Nullable identityId;
  338. /**
  339. <p>An OpenID token.</p>
  340. */
  341. @property (nonatomic, strong) NSString * _Nullable token;
  342. @end
  343. /**
  344. <p>Input to the GetOpenIdToken action.</p>
  345. Required parameters: [IdentityId]
  346. */
  347. @interface AWSCognitoIdentityGetOpenIdTokenInput : AWSRequest
  348. /**
  349. <p>A unique identifier in the format REGION:GUID.</p>
  350. */
  351. @property (nonatomic, strong) NSString * _Nullable identityId;
  352. /**
  353. <p>A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any other OpenId Connect provider, always include the <code>id_token</code>.</p>
  354. */
  355. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
  356. @end
  357. /**
  358. <p>Returned in response to a successful GetOpenIdToken request.</p>
  359. */
  360. @interface AWSCognitoIdentityGetOpenIdTokenResponse : AWSModel
  361. /**
  362. <p>A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.</p>
  363. */
  364. @property (nonatomic, strong) NSString * _Nullable identityId;
  365. /**
  366. <p>An OpenID token, valid for 10 minutes.</p>
  367. */
  368. @property (nonatomic, strong) NSString * _Nullable token;
  369. @end
  370. /**
  371. <p>A description of the identity.</p>
  372. */
  373. @interface AWSCognitoIdentityIdentityDescription : AWSModel
  374. /**
  375. <p>Date on which the identity was created.</p>
  376. */
  377. @property (nonatomic, strong) NSDate * _Nullable creationDate;
  378. /**
  379. <p>A unique identifier in the format REGION:GUID.</p>
  380. */
  381. @property (nonatomic, strong) NSString * _Nullable identityId;
  382. /**
  383. <p>Date on which the identity was last modified.</p>
  384. */
  385. @property (nonatomic, strong) NSDate * _Nullable lastModifiedDate;
  386. /**
  387. <p>The provider names.</p>
  388. */
  389. @property (nonatomic, strong) NSArray<NSString *> * _Nullable logins;
  390. @end
  391. /**
  392. <p>An object representing an Amazon Cognito identity pool.</p>
  393. Required parameters: [IdentityPoolId, IdentityPoolName, AllowUnauthenticatedIdentities]
  394. */
  395. @interface AWSCognitoIdentityIdentityPool : AWSRequest
  396. /**
  397. <p>TRUE if the identity pool supports unauthenticated logins.</p>
  398. */
  399. @property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities;
  400. /**
  401. <p>A list representing an Amazon Cognito user pool and its client ID.</p>
  402. */
  403. @property (nonatomic, strong) NSArray<AWSCognitoIdentityCognitoIdentityProvider *> * _Nullable cognitoIdentityProviders;
  404. /**
  405. <p>The "domain" by which Cognito will refer to your users.</p>
  406. */
  407. @property (nonatomic, strong) NSString * _Nullable developerProviderName;
  408. /**
  409. <p>An identity pool ID in the format REGION:GUID.</p>
  410. */
  411. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  412. /**
  413. <p>A string that you provide.</p>
  414. */
  415. @property (nonatomic, strong) NSString * _Nullable identityPoolName;
  416. /**
  417. <p>The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.</p>
  418. */
  419. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable identityPoolTags;
  420. /**
  421. <p>A list of OpendID Connect provider ARNs.</p>
  422. */
  423. @property (nonatomic, strong) NSArray<NSString *> * _Nullable openIdConnectProviderARNs;
  424. /**
  425. <p>An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.</p>
  426. */
  427. @property (nonatomic, strong) NSArray<NSString *> * _Nullable samlProviderARNs;
  428. /**
  429. <p>Optional key:value pairs mapping provider names to provider app IDs.</p>
  430. */
  431. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable supportedLoginProviders;
  432. @end
  433. /**
  434. <p>A description of the identity pool.</p>
  435. */
  436. @interface AWSCognitoIdentityIdentityPoolShortDescription : AWSModel
  437. /**
  438. <p>An identity pool ID in the format REGION:GUID.</p>
  439. */
  440. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  441. /**
  442. <p>A string that you provide.</p>
  443. */
  444. @property (nonatomic, strong) NSString * _Nullable identityPoolName;
  445. @end
  446. /**
  447. <p>Input to the ListIdentities action.</p>
  448. Required parameters: [IdentityPoolId, MaxResults]
  449. */
  450. @interface AWSCognitoIdentityListIdentitiesInput : AWSRequest
  451. /**
  452. <p>An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.</p>
  453. */
  454. @property (nonatomic, strong) NSNumber * _Nullable hideDisabled;
  455. /**
  456. <p>An identity pool ID in the format REGION:GUID.</p>
  457. */
  458. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  459. /**
  460. <p>The maximum number of identities to return.</p>
  461. */
  462. @property (nonatomic, strong) NSNumber * _Nullable maxResults;
  463. /**
  464. <p>A pagination token.</p>
  465. */
  466. @property (nonatomic, strong) NSString * _Nullable nextToken;
  467. @end
  468. /**
  469. <p>The response to a ListIdentities request.</p>
  470. */
  471. @interface AWSCognitoIdentityListIdentitiesResponse : AWSModel
  472. /**
  473. <p>An object containing a set of identities and associated mappings.</p>
  474. */
  475. @property (nonatomic, strong) NSArray<AWSCognitoIdentityIdentityDescription *> * _Nullable identities;
  476. /**
  477. <p>An identity pool ID in the format REGION:GUID.</p>
  478. */
  479. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  480. /**
  481. <p>A pagination token.</p>
  482. */
  483. @property (nonatomic, strong) NSString * _Nullable nextToken;
  484. @end
  485. /**
  486. <p>Input to the ListIdentityPools action.</p>
  487. Required parameters: [MaxResults]
  488. */
  489. @interface AWSCognitoIdentityListIdentityPoolsInput : AWSRequest
  490. /**
  491. <p>The maximum number of identities to return.</p>
  492. */
  493. @property (nonatomic, strong) NSNumber * _Nullable maxResults;
  494. /**
  495. <p>A pagination token.</p>
  496. */
  497. @property (nonatomic, strong) NSString * _Nullable nextToken;
  498. @end
  499. /**
  500. <p>The result of a successful ListIdentityPools action.</p>
  501. */
  502. @interface AWSCognitoIdentityListIdentityPoolsResponse : AWSModel
  503. /**
  504. <p>The identity pools returned by the ListIdentityPools action.</p>
  505. */
  506. @property (nonatomic, strong) NSArray<AWSCognitoIdentityIdentityPoolShortDescription *> * _Nullable identityPools;
  507. /**
  508. <p>A pagination token.</p>
  509. */
  510. @property (nonatomic, strong) NSString * _Nullable nextToken;
  511. @end
  512. /**
  513. */
  514. @interface AWSCognitoIdentityListTagsForResourceInput : AWSRequest
  515. /**
  516. <p>The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.</p>
  517. */
  518. @property (nonatomic, strong) NSString * _Nullable resourceArn;
  519. @end
  520. /**
  521. */
  522. @interface AWSCognitoIdentityListTagsForResourceResponse : AWSModel
  523. /**
  524. <p>The tags that are assigned to the identity pool.</p>
  525. */
  526. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable tags;
  527. @end
  528. /**
  529. <p>Input to the <code>LookupDeveloperIdentityInput</code> action.</p>
  530. Required parameters: [IdentityPoolId]
  531. */
  532. @interface AWSCognitoIdentityLookupDeveloperIdentityInput : AWSRequest
  533. /**
  534. <p>A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.</p>
  535. */
  536. @property (nonatomic, strong) NSString * _Nullable developerUserIdentifier;
  537. /**
  538. <p>A unique identifier in the format REGION:GUID.</p>
  539. */
  540. @property (nonatomic, strong) NSString * _Nullable identityId;
  541. /**
  542. <p>An identity pool ID in the format REGION:GUID.</p>
  543. */
  544. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  545. /**
  546. <p>The maximum number of identities to return.</p>
  547. */
  548. @property (nonatomic, strong) NSNumber * _Nullable maxResults;
  549. /**
  550. <p>A pagination token. The first call you make will have <code>NextToken</code> set to null. After that the service will return <code>NextToken</code> values as needed. For example, let's say you make a request with <code>MaxResults</code> set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.</p>
  551. */
  552. @property (nonatomic, strong) NSString * _Nullable nextToken;
  553. @end
  554. /**
  555. <p>Returned in response to a successful <code>LookupDeveloperIdentity</code> action.</p>
  556. */
  557. @interface AWSCognitoIdentityLookupDeveloperIdentityResponse : AWSModel
  558. /**
  559. <p>This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.</p>
  560. */
  561. @property (nonatomic, strong) NSArray<NSString *> * _Nullable developerUserIdentifierList;
  562. /**
  563. <p>A unique identifier in the format REGION:GUID.</p>
  564. */
  565. @property (nonatomic, strong) NSString * _Nullable identityId;
  566. /**
  567. <p>A pagination token. The first call you make will have <code>NextToken</code> set to null. After that the service will return <code>NextToken</code> values as needed. For example, let's say you make a request with <code>MaxResults</code> set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.</p>
  568. */
  569. @property (nonatomic, strong) NSString * _Nullable nextToken;
  570. @end
  571. /**
  572. <p>A rule that maps a claim name, a claim value, and a match type to a role ARN.</p>
  573. Required parameters: [Claim, MatchType, Value, RoleARN]
  574. */
  575. @interface AWSCognitoIdentityMappingRule : AWSModel
  576. /**
  577. <p>The claim name that must be present in the token, for example, "isAdmin" or "paid".</p>
  578. */
  579. @property (nonatomic, strong) NSString * _Nullable claim;
  580. /**
  581. <p>The match condition that specifies how closely the claim value in the IdP token must match <code>Value</code>.</p>
  582. */
  583. @property (nonatomic, assign) AWSCognitoIdentityMappingRuleMatchType matchType;
  584. /**
  585. <p>The role ARN.</p>
  586. */
  587. @property (nonatomic, strong) NSString * _Nullable roleARN;
  588. /**
  589. <p>A brief string that the claim must match, for example, "paid" or "yes".</p>
  590. */
  591. @property (nonatomic, strong) NSString * _Nullable value;
  592. @end
  593. /**
  594. <p>Input to the <code>MergeDeveloperIdentities</code> action.</p>
  595. Required parameters: [SourceUserIdentifier, DestinationUserIdentifier, DeveloperProviderName, IdentityPoolId]
  596. */
  597. @interface AWSCognitoIdentityMergeDeveloperIdentitiesInput : AWSRequest
  598. /**
  599. <p>User identifier for the destination user. The value should be a <code>DeveloperUserIdentifier</code>.</p>
  600. */
  601. @property (nonatomic, strong) NSString * _Nullable destinationUserIdentifier;
  602. /**
  603. <p>The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the <code>DeveloperProviderName</code>, you can use letters as well as period (.), underscore (_), and dash (-).</p>
  604. */
  605. @property (nonatomic, strong) NSString * _Nullable developerProviderName;
  606. /**
  607. <p>An identity pool ID in the format REGION:GUID.</p>
  608. */
  609. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  610. /**
  611. <p>User identifier for the source user. The value should be a <code>DeveloperUserIdentifier</code>.</p>
  612. */
  613. @property (nonatomic, strong) NSString * _Nullable sourceUserIdentifier;
  614. @end
  615. /**
  616. <p>Returned in response to a successful <code>MergeDeveloperIdentities</code> action.</p>
  617. */
  618. @interface AWSCognitoIdentityMergeDeveloperIdentitiesResponse : AWSModel
  619. /**
  620. <p>A unique identifier in the format REGION:GUID.</p>
  621. */
  622. @property (nonatomic, strong) NSString * _Nullable identityId;
  623. @end
  624. /**
  625. <p>A role mapping.</p>
  626. Required parameters: [Type]
  627. */
  628. @interface AWSCognitoIdentityRoleMapping : AWSModel
  629. /**
  630. <p>If you specify Token or Rules as the <code>Type</code>, <code>AmbiguousRoleResolution</code> is required.</p><p>Specifies the action to be taken if either no rules match the claim value for the <code>Rules</code> type, or there is no <code>cognito:preferred_role</code> claim and there are multiple <code>cognito:roles</code> matches for the <code>Token</code> type.</p>
  631. */
  632. @property (nonatomic, assign) AWSCognitoIdentityAmbiguousRoleResolutionType ambiguousRoleResolution;
  633. /**
  634. <p>The rules to be used for mapping users to roles.</p><p>If you specify Rules as the role mapping type, <code>RulesConfiguration</code> is required.</p>
  635. */
  636. @property (nonatomic, strong) AWSCognitoIdentityRulesConfigurationType * _Nullable rulesConfiguration;
  637. /**
  638. <p>The role mapping type. Token will use <code>cognito:roles</code> and <code>cognito:preferred_role</code> claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.</p>
  639. */
  640. @property (nonatomic, assign) AWSCognitoIdentityRoleMappingType types;
  641. @end
  642. /**
  643. <p>A container for rules.</p>
  644. Required parameters: [Rules]
  645. */
  646. @interface AWSCognitoIdentityRulesConfigurationType : AWSModel
  647. /**
  648. <p>An array of rules. You can specify up to 25 rules per identity provider.</p><p>Rules are evaluated in order. The first one to match specifies the role.</p>
  649. */
  650. @property (nonatomic, strong) NSArray<AWSCognitoIdentityMappingRule *> * _Nullable rules;
  651. @end
  652. /**
  653. <p>Input to the <code>SetIdentityPoolRoles</code> action.</p>
  654. Required parameters: [IdentityPoolId, Roles]
  655. */
  656. @interface AWSCognitoIdentitySetIdentityPoolRolesInput : AWSRequest
  657. /**
  658. <p>An identity pool ID in the format REGION:GUID.</p>
  659. */
  660. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  661. /**
  662. <p>How users for a specific identity provider are to mapped to roles. This is a string to <a>RoleMapping</a> object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".</p><p>Up to 25 rules can be specified per identity provider.</p>
  663. */
  664. @property (nonatomic, strong) NSDictionary<NSString *, AWSCognitoIdentityRoleMapping *> * _Nullable roleMappings;
  665. /**
  666. <p>The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.</p>
  667. */
  668. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable roles;
  669. @end
  670. /**
  671. */
  672. @interface AWSCognitoIdentityTagResourceInput : AWSRequest
  673. /**
  674. <p>The Amazon Resource Name (ARN) of the identity pool to assign the tags to.</p>
  675. */
  676. @property (nonatomic, strong) NSString * _Nullable resourceArn;
  677. /**
  678. <p>The tags to assign to the identity pool.</p>
  679. */
  680. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable tags;
  681. @end
  682. /**
  683. */
  684. @interface AWSCognitoIdentityTagResourceResponse : AWSModel
  685. @end
  686. /**
  687. <p>Input to the <code>UnlinkDeveloperIdentity</code> action.</p>
  688. Required parameters: [IdentityId, IdentityPoolId, DeveloperProviderName, DeveloperUserIdentifier]
  689. */
  690. @interface AWSCognitoIdentityUnlinkDeveloperIdentityInput : AWSRequest
  691. /**
  692. <p>The "domain" by which Cognito will refer to your users.</p>
  693. */
  694. @property (nonatomic, strong) NSString * _Nullable developerProviderName;
  695. /**
  696. <p>A unique ID used by your backend authentication process to identify a user.</p>
  697. */
  698. @property (nonatomic, strong) NSString * _Nullable developerUserIdentifier;
  699. /**
  700. <p>A unique identifier in the format REGION:GUID.</p>
  701. */
  702. @property (nonatomic, strong) NSString * _Nullable identityId;
  703. /**
  704. <p>An identity pool ID in the format REGION:GUID.</p>
  705. */
  706. @property (nonatomic, strong) NSString * _Nullable identityPoolId;
  707. @end
  708. /**
  709. <p>Input to the UnlinkIdentity action.</p>
  710. Required parameters: [IdentityId, Logins, LoginsToRemove]
  711. */
  712. @interface AWSCognitoIdentityUnlinkIdentityInput : AWSRequest
  713. /**
  714. <p>A unique identifier in the format REGION:GUID.</p>
  715. */
  716. @property (nonatomic, strong) NSString * _Nullable identityId;
  717. /**
  718. <p>A set of optional name-value pairs that map provider names to provider tokens.</p>
  719. */
  720. @property (nonatomic, strong) NSDictionary<NSString *, NSString *> * _Nullable logins;
  721. /**
  722. <p>Provider names to unlink from this identity.</p>
  723. */
  724. @property (nonatomic, strong) NSArray<NSString *> * _Nullable loginsToRemove;
  725. @end
  726. /**
  727. <p>An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.</p>
  728. */
  729. @interface AWSCognitoIdentityUnprocessedIdentityId : AWSModel
  730. /**
  731. <p>The error code indicating the type of error that occurred.</p>
  732. */
  733. @property (nonatomic, assign) AWSCognitoIdentityErrorCode errorCode;
  734. /**
  735. <p>A unique identifier in the format REGION:GUID.</p>
  736. */
  737. @property (nonatomic, strong) NSString * _Nullable identityId;
  738. @end
  739. /**
  740. */
  741. @interface AWSCognitoIdentityUntagResourceInput : AWSRequest
  742. /**
  743. <p>The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.</p>
  744. */
  745. @property (nonatomic, strong) NSString * _Nullable resourceArn;
  746. /**
  747. <p>The keys of the tags to remove from the user pool.</p>
  748. */
  749. @property (nonatomic, strong) NSArray<NSString *> * _Nullable tagKeys;
  750. @end
  751. /**
  752. */
  753. @interface AWSCognitoIdentityUntagResourceResponse : AWSModel
  754. @end
  755. NS_ASSUME_NONNULL_END