AWSCognitoIdentity
Objective-C
@interface AWSCognitoIdentity : AWSService
Swift
class AWSCognitoIdentity : AWSService
Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.
Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.
For a description of the authentication flow from the Amazon Cognito Developer Guide see Authentication Flow.
For more information see Amazon Cognito Federated Identities.
-
The service configuration used to instantiate this service client.
Warning
Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.Declaration
Objective-C
@property (nonatomic, strong, readonly) AWSServiceConfiguration *_Nonnull configuration;
Swift
var configuration: AWSServiceConfiguration { get }
-
Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with
defaultServiceConfiguration
from[AWSServiceManager defaultServiceManager]
. The reference to this object is maintained by the SDK, and you do not need to retain it manually.For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider) AWSServiceManager.default().defaultServiceConfiguration = configuration return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:credentialsProvider]; [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; return YES; }
Then call the following to get the default service client:
Swift
let CognitoIdentity = AWSCognitoIdentity.default()
Objective-C
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity defaultCognitoIdentity];
Declaration
Objective-C
+ (nonnull instancetype)defaultCognitoIdentity;
Swift
class func `default`() -> Self
Return Value
The default service client.
-
Creates a service client with the given service configuration and registers it for the key.
For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity") return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 credentialsProvider:credentialsProvider]; [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"]; return YES; }
Then call the following to get the service client:
Swift
let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
Objective-C
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
Warning
After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
Declaration
Objective-C
+ (void)registerCognitoIdentityWithConfiguration: (nonnull AWSServiceConfiguration *)configuration forKey:(nonnull NSString *)key;
Swift
class func register(with configuration: AWSServiceConfiguration, forKey key: String)
Parameters
configuration
A service configuration object.
key
A string to identify the service client.
-
Retrieves the service client associated with the key. You need to call
+ registerCognitoIdentityWithConfiguration:forKey:
before invoking this method.For example, set the default service configuration in
- application:didFinishLaunchingWithOptions:
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity") return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 identityPoolId:@"YourIdentityPoolId"]; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 credentialsProvider:credentialsProvider]; [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"]; return YES; }
Then call the following to get the service client:
Swift
let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity")
Objective-C
AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"];
Declaration
Objective-C
+ (nonnull instancetype)CognitoIdentityForKey:(nonnull NSString *)key;
Swift
convenience init(forKey key: String)
Parameters
key
A string to identify the service client.
Return Value
An instance of the service client.
-
Removes the service client associated with the key and release it.
Warning
Before calling this method, make sure no method is running on this client.
Declaration
Objective-C
+ (void)removeCognitoIdentityForKey:(nonnull NSString *)key;
Swift
class func remove(forKey key: String)
Parameters
key
A string to identify the service client.
-
Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The keys for
SupportedLoginProviders
are as follows:Facebook:
graph.facebook.com
Google:
accounts.google.com
Amazon:
www.amazon.com
Twitter:
api.twitter.com
Digits:
www.digits.com
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityCreateIdentityPoolInput
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityIdentityPool *> *)createIdentityPool: (nonnull AWSCognitoIdentityCreateIdentityPoolInput *)request;
Swift
func createIdentityPool(_ request: AWSCognitoIdentityCreateIdentityPoolInput) -> AWSTask<AWSCognitoIdentityIdentityPool>
Parameters
request
A container for the necessary parameters to execute the CreateIdentityPool service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityIdentityPool
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorLimitExceeded
. -
Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The keys for
SupportedLoginProviders
are as follows:Facebook:
graph.facebook.com
Google:
accounts.google.com
Amazon:
www.amazon.com
Twitter:
api.twitter.com
Digits:
www.digits.com
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityCreateIdentityPoolInput
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (void)createIdentityPool: (nonnull AWSCognitoIdentityCreateIdentityPoolInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityIdentityPool *_Nullable, NSError *_Nullable))completionHandler;
Swift
func createIdentityPool(_ request: AWSCognitoIdentityCreateIdentityPoolInput) async throws -> AWSCognitoIdentityIdentityPool
Parameters
request
A container for the necessary parameters to execute the CreateIdentityPool service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorLimitExceeded
. -
Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDeleteIdentitiesInput
See
AWSCognitoIdentityDeleteIdentitiesResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityDeleteIdentitiesResponse *> *) deleteIdentities:(nonnull AWSCognitoIdentityDeleteIdentitiesInput *)request;
Swift
func deleteIdentities(_ request: AWSCognitoIdentityDeleteIdentitiesInput) -> AWSTask<AWSCognitoIdentityDeleteIdentitiesResponse>
Parameters
request
A container for the necessary parameters to execute the DeleteIdentities service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityDeleteIdentitiesResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDeleteIdentitiesInput
See
AWSCognitoIdentityDeleteIdentitiesResponse
Declaration
Objective-C
- (void) deleteIdentities:(nonnull AWSCognitoIdentityDeleteIdentitiesInput *)request completionHandler:(void (^_Nullable)( AWSCognitoIdentityDeleteIdentitiesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func deleteIdentities(_ request: AWSCognitoIdentityDeleteIdentitiesInput) async throws -> AWSCognitoIdentityDeleteIdentitiesResponse
Parameters
request
A container for the necessary parameters to execute the DeleteIdentities service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDeleteIdentityPoolInput
Declaration
Objective-C
- (nonnull AWSTask *)deleteIdentityPool: (nonnull AWSCognitoIdentityDeleteIdentityPoolInput *)request;
Swift
func deletePool(_ request: AWSCognitoIdentityDeleteIdentityPoolInput) -> AWSTask<AnyObject>
Parameters
request
A container for the necessary parameters to execute the DeleteIdentityPool service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will benil
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Deletes an identity pool. Once a pool is deleted, users will not be able to authenticate with the pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDeleteIdentityPoolInput
Declaration
Objective-C
- (void)deleteIdentityPool: (nonnull AWSCognitoIdentityDeleteIdentityPoolInput *)request completionHandler: (void (^_Nullable)(NSError *_Nullable))completionHandler;
Swift
func deletePool(_ request: AWSCognitoIdentityDeleteIdentityPoolInput) async throws
Parameters
request
A container for the necessary parameters to execute the DeleteIdentityPool service method.
completionHandler
The completion handler to call when the load request is complete.
error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDescribeIdentityInput
See
AWSCognitoIdentityIdentityDescription
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityIdentityDescription *> *)describeIdentity: (nonnull AWSCognitoIdentityDescribeIdentityInput *)request;
Swift
func describe(_ request: AWSCognitoIdentityDescribeIdentityInput) -> AWSTask<AWSCognitoIdentityIdentityDescription>
Parameters
request
A container for the necessary parameters to execute the DescribeIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityIdentityDescription
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Returns metadata related to the given identity, including when the identity was created and any associated linked logins.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDescribeIdentityInput
See
AWSCognitoIdentityIdentityDescription
Declaration
Objective-C
- (void)describeIdentity: (nonnull AWSCognitoIdentityDescribeIdentityInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityIdentityDescription *_Nullable, NSError *_Nullable))completionHandler;
Swift
func describe(_ request: AWSCognitoIdentityDescribeIdentityInput) async throws -> AWSCognitoIdentityIdentityDescription
Parameters
request
A container for the necessary parameters to execute the DescribeIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDescribeIdentityPoolInput
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityIdentityPool *> *)describeIdentityPool: (nonnull AWSCognitoIdentityDescribeIdentityPoolInput *)request;
Swift
func describePool(_ request: AWSCognitoIdentityDescribeIdentityPoolInput) -> AWSTask<AWSCognitoIdentityIdentityPool>
Parameters
request
A container for the necessary parameters to execute the DescribeIdentityPool service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityIdentityPool
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityDescribeIdentityPoolInput
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (void)describeIdentityPool: (nonnull AWSCognitoIdentityDescribeIdentityPoolInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityIdentityPool *_Nullable, NSError *_Nullable))completionHandler;
Swift
func describePool(_ request: AWSCognitoIdentityDescribeIdentityPoolInput) async throws -> AWSCognitoIdentityIdentityPool
Parameters
request
A container for the necessary parameters to execute the DescribeIdentityPool service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetCredentialsForIdentityInput
See
AWSCognitoIdentityGetCredentialsForIdentityResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetCredentialsForIdentityResponse *> *) getCredentialsForIdentity: (nonnull AWSCognitoIdentityGetCredentialsForIdentityInput *)request;
Swift
func getCredentialsForIdentity(_ request: AWSCognitoIdentityGetCredentialsForIdentityInput) -> AWSTask<AWSCognitoIdentityGetCredentialsForIdentityResponse>
Parameters
request
A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetCredentialsForIdentityResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetCredentialsForIdentityInput
See
AWSCognitoIdentityGetCredentialsForIdentityResponse
Declaration
Objective-C
- (void)getCredentialsForIdentity: (nonnull AWSCognitoIdentityGetCredentialsForIdentityInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityGetCredentialsForIdentityResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func credentials(forIdentity request: AWSCognitoIdentityGetCredentialsForIdentityInput) async throws -> AWSCognitoIdentityGetCredentialsForIdentityResponse
Parameters
request
A container for the necessary parameters to execute the GetCredentialsForIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetIdInput
See
AWSCognitoIdentityGetIdResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetIdResponse *> *)getId: (nonnull AWSCognitoIdentityGetIdInput *)request;
Swift
func getId(_ request: AWSCognitoIdentityGetIdInput) -> AWSTask<AWSCognitoIdentityGetIdResponse>
Parameters
request
A container for the necessary parameters to execute the GetId service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetIdResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorLimitExceeded
,AWSCognitoIdentityErrorExternalService
. -
Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetIdInput
See
AWSCognitoIdentityGetIdResponse
Declaration
Objective-C
- (void)getId:(nonnull AWSCognitoIdentityGetIdInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityGetIdResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func id(_ request: AWSCognitoIdentityGetIdInput) async throws -> AWSCognitoIdentityGetIdResponse
Parameters
request
A container for the necessary parameters to execute the GetId service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorLimitExceeded
,AWSCognitoIdentityErrorExternalService
. -
Gets the roles for an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityGetIdentityPoolRolesInput
See
AWSCognitoIdentityGetIdentityPoolRolesResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetIdentityPoolRolesResponse *> *) getIdentityPoolRoles: (nonnull AWSCognitoIdentityGetIdentityPoolRolesInput *)request;
Swift
func getPoolRoles(_ request: AWSCognitoIdentityGetIdentityPoolRolesInput) -> AWSTask<AWSCognitoIdentityGetIdentityPoolRolesResponse>
Parameters
request
A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetIdentityPoolRolesResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Gets the roles for an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityGetIdentityPoolRolesInput
See
AWSCognitoIdentityGetIdentityPoolRolesResponse
Declaration
Objective-C
- (void)getIdentityPoolRoles: (nonnull AWSCognitoIdentityGetIdentityPoolRolesInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityGetIdentityPoolRolesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func poolRoles(_ request: AWSCognitoIdentityGetIdentityPoolRolesInput) async throws -> AWSCognitoIdentityGetIdentityPoolRolesResponse
Parameters
request
A container for the necessary parameters to execute the GetIdentityPoolRoles service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.
The OpenID token is valid for 10 minutes.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetOpenIdTokenInput
See
AWSCognitoIdentityGetOpenIdTokenResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetOpenIdTokenResponse *> *)getOpenIdToken: (nonnull AWSCognitoIdentityGetOpenIdTokenInput *)request;
Swift
func getOpenIdToken(_ request: AWSCognitoIdentityGetOpenIdTokenInput) -> AWSTask<AWSCognitoIdentityGetOpenIdTokenResponse>
Parameters
request
A container for the necessary parameters to execute the GetOpenIdToken service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetOpenIdTokenResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.
The OpenID token is valid for 10 minutes.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityGetOpenIdTokenInput
See
AWSCognitoIdentityGetOpenIdTokenResponse
Declaration
Objective-C
- (void)getOpenIdToken:(nonnull AWSCognitoIdentityGetOpenIdTokenInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityGetOpenIdTokenResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func openIdToken(_ request: AWSCognitoIdentityGetOpenIdTokenInput) async throws -> AWSCognitoIdentityGetOpenIdTokenResponse
Parameters
request
A container for the necessary parameters to execute the GetOpenIdToken service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Registers (or retrieves) a Cognito
IdentityId
and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of theLogins
map, which is linked to the identity pool. The developer provider is the “domain” by which Cognito will refer to your users.You can use
GetOpenIdTokenForDeveloperIdentity
to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, theIdentityId
should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existingIdentityId
. This API will create the identity in the specifiedIdentityPoolId
.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
See
AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *> *)getOpenIdTokenForDeveloperIdentity: (nonnull AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *) request;
Swift
func getOpenIdToken(forDeveloperIdentity request: AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput) -> AWSTask<AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse>
Parameters
request
A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered
. -
Registers (or retrieves) a Cognito
IdentityId
and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of theLogins
map, which is linked to the identity pool. The developer provider is the “domain” by which Cognito will refer to your users.You can use
GetOpenIdTokenForDeveloperIdentity
to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, theIdentityId
should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existingIdentityId
. This API will create the identity in the specifiedIdentityPoolId
.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput
See
AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
Declaration
Objective-C
- (void) getOpenIdTokenForDeveloperIdentity: (nonnull AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *) request completionHandler: (void (^_Nullable)( AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func openIdToken(forDeveloperIdentity request: AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput) async throws -> AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse
Parameters
request
A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered
. -
Use
GetPrincipalTagAttributeMap
to list all mappings betweenPrincipalTags
and user attributes.See
AWSCognitoIdentityGetPrincipalTagAttributeMapInput
See
AWSCognitoIdentityGetPrincipalTagAttributeMapResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityGetPrincipalTagAttributeMapResponse *> *) getPrincipalTagAttributeMap: (nonnull AWSCognitoIdentityGetPrincipalTagAttributeMapInput *)request;
Swift
func getPrincipalTagAttributeMap(_ request: AWSCognitoIdentityGetPrincipalTagAttributeMapInput) -> AWSTask<AWSCognitoIdentityGetPrincipalTagAttributeMapResponse>
Parameters
request
A container for the necessary parameters to execute the GetPrincipalTagAttributeMap service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityGetPrincipalTagAttributeMapResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Use
GetPrincipalTagAttributeMap
to list all mappings betweenPrincipalTags
and user attributes.See
AWSCognitoIdentityGetPrincipalTagAttributeMapInput
See
AWSCognitoIdentityGetPrincipalTagAttributeMapResponse
Declaration
Objective-C
- (void)getPrincipalTagAttributeMap: (nonnull AWSCognitoIdentityGetPrincipalTagAttributeMapInput *) request completionHandler: (void (^_Nullable)( AWSCognitoIdentityGetPrincipalTagAttributeMapResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func principalTagAttributeMap(_ request: AWSCognitoIdentityGetPrincipalTagAttributeMapInput) async throws -> AWSCognitoIdentityGetPrincipalTagAttributeMapResponse
Parameters
request
A container for the necessary parameters to execute the GetPrincipalTagAttributeMap service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Lists the identities in an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityListIdentitiesInput
See
AWSCognitoIdentityListIdentitiesResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityListIdentitiesResponse *> *)listIdentities: (nonnull AWSCognitoIdentityListIdentitiesInput *)request;
Swift
func listIdentities(_ request: AWSCognitoIdentityListIdentitiesInput) -> AWSTask<AWSCognitoIdentityListIdentitiesResponse>
Parameters
request
A container for the necessary parameters to execute the ListIdentities service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityListIdentitiesResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Lists the identities in an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityListIdentitiesInput
See
AWSCognitoIdentityListIdentitiesResponse
Declaration
Objective-C
- (void)listIdentities:(nonnull AWSCognitoIdentityListIdentitiesInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityListIdentitiesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listIdentities(_ request: AWSCognitoIdentityListIdentitiesInput) async throws -> AWSCognitoIdentityListIdentitiesResponse
Parameters
request
A container for the necessary parameters to execute the ListIdentities service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Lists all of the Cognito identity pools registered for your account.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityListIdentityPoolsInput
See
AWSCognitoIdentityListIdentityPoolsResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityListIdentityPoolsResponse *> *) listIdentityPools: (nonnull AWSCognitoIdentityListIdentityPoolsInput *)request;
Swift
func listIdentityPools(_ request: AWSCognitoIdentityListIdentityPoolsInput) -> AWSTask<AWSCognitoIdentityListIdentityPoolsResponse>
Parameters
request
A container for the necessary parameters to execute the ListIdentityPools service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityListIdentityPoolsResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorInternalError
. -
Lists all of the Cognito identity pools registered for your account.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityListIdentityPoolsInput
See
AWSCognitoIdentityListIdentityPoolsResponse
Declaration
Objective-C
- (void)listIdentityPools: (nonnull AWSCognitoIdentityListIdentityPoolsInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityListIdentityPoolsResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listIdentityPools(_ request: AWSCognitoIdentityListIdentityPoolsInput) async throws -> AWSCognitoIdentityListIdentityPoolsResponse
Parameters
request
A container for the necessary parameters to execute the ListIdentityPools service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorInternalError
. -
Lists the tags that are assigned to an Amazon Cognito 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.
You can use this action up to 10 times per second, per account.
See
AWSCognitoIdentityListTagsForResourceInput
See
AWSCognitoIdentityListTagsForResourceResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityListTagsForResourceResponse *> *) listTagsForResource: (nonnull AWSCognitoIdentityListTagsForResourceInput *)request;
Swift
func listTags(forResource request: AWSCognitoIdentityListTagsForResourceInput) -> AWSTask<AWSCognitoIdentityListTagsForResourceResponse>
Parameters
request
A container for the necessary parameters to execute the ListTagsForResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityListTagsForResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Lists the tags that are assigned to an Amazon Cognito 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.
You can use this action up to 10 times per second, per account.
See
AWSCognitoIdentityListTagsForResourceInput
See
AWSCognitoIdentityListTagsForResourceResponse
Declaration
Objective-C
- (void)listTagsForResource: (nonnull AWSCognitoIdentityListTagsForResourceInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityListTagsForResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func listTags(forResource request: AWSCognitoIdentityListTagsForResourceInput) async throws -> AWSCognitoIdentityListTagsForResourceResponse
Parameters
request
A container for the necessary parameters to execute the ListTagsForResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Retrieves the
IdentityID
associated with aDeveloperUserIdentifier
or the list ofDeveloperUserIdentifier
values associated with anIdentityId
for an existing identity. EitherIdentityID
orDeveloperUserIdentifier
must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both,DeveloperUserIdentifier
will be matched againstIdentityID
. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise aResourceConflictException
is thrown.LookupDeveloperIdentity
is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a better option for higher-volume operations for user authentication.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityLookupDeveloperIdentityInput
See
AWSCognitoIdentityLookupDeveloperIdentityResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityLookupDeveloperIdentityResponse *> *) lookupDeveloperIdentity: (nonnull AWSCognitoIdentityLookupDeveloperIdentityInput *)request;
Swift
func lookupDeveloperIdentity(_ request: AWSCognitoIdentityLookupDeveloperIdentityInput) -> AWSTask<AWSCognitoIdentityLookupDeveloperIdentityResponse>
Parameters
request
A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityLookupDeveloperIdentityResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Retrieves the
IdentityID
associated with aDeveloperUserIdentifier
or the list ofDeveloperUserIdentifier
values associated with anIdentityId
for an existing identity. EitherIdentityID
orDeveloperUserIdentifier
must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both,DeveloperUserIdentifier
will be matched againstIdentityID
. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise aResourceConflictException
is thrown.LookupDeveloperIdentity
is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled. GetOpenIdTokenForDeveloperIdentity is a better option for higher-volume operations for user authentication.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityLookupDeveloperIdentityInput
See
AWSCognitoIdentityLookupDeveloperIdentityResponse
Declaration
Objective-C
- (void) lookupDeveloperIdentity: (nonnull AWSCognitoIdentityLookupDeveloperIdentityInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityLookupDeveloperIdentityResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func lookupDeveloperIdentity(_ request: AWSCognitoIdentityLookupDeveloperIdentityInput) async throws -> AWSCognitoIdentityLookupDeveloperIdentityResponse
Parameters
request
A container for the necessary parameters to execute the LookupDeveloperIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Merges two users having different
IdentityId
s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier
) with theIdentityId
of theDestinationUserIdentifier
. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.The number of linked logins is limited to 20. So, the number of linked logins for the source user,
SourceUserIdentifier
, and the destination user,DestinationUserIdentifier
, together should not be larger than 20. Otherwise, an exception will be thrown.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityMergeDeveloperIdentitiesInput
See
AWSCognitoIdentityMergeDeveloperIdentitiesResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityMergeDeveloperIdentitiesResponse *> *) mergeDeveloperIdentities: (nonnull AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request;
Swift
func mergeDeveloperIdentities(_ request: AWSCognitoIdentityMergeDeveloperIdentitiesInput) -> AWSTask<AWSCognitoIdentityMergeDeveloperIdentitiesResponse>
Parameters
request
A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityMergeDeveloperIdentitiesResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Merges two users having different
IdentityId
s, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier
) with theIdentityId
of theDestinationUserIdentifier
. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.The number of linked logins is limited to 20. So, the number of linked logins for the source user,
SourceUserIdentifier
, and the destination user,DestinationUserIdentifier
, together should not be larger than 20. Otherwise, an exception will be thrown.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityMergeDeveloperIdentitiesInput
See
AWSCognitoIdentityMergeDeveloperIdentitiesResponse
Declaration
Objective-C
- (void)mergeDeveloperIdentities: (nonnull AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request completionHandler: (void (^_Nullable)( AWSCognitoIdentityMergeDeveloperIdentitiesResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func mergeDeveloperIdentities(_ request: AWSCognitoIdentityMergeDeveloperIdentitiesInput) async throws -> AWSCognitoIdentityMergeDeveloperIdentitiesResponse
Parameters
request
A container for the necessary parameters to execute the MergeDeveloperIdentities service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentitySetIdentityPoolRolesInput
Declaration
Objective-C
- (nonnull AWSTask *)setIdentityPoolRoles: (nonnull AWSCognitoIdentitySetIdentityPoolRolesInput *)request;
Swift
func setIdentityPoolRoles(_ request: AWSCognitoIdentitySetIdentityPoolRolesInput) -> AWSTask<AnyObject>
Parameters
request
A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will benil
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorConcurrentModification
. -
Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentitySetIdentityPoolRolesInput
Declaration
Objective-C
- (void)setIdentityPoolRoles: (nonnull AWSCognitoIdentitySetIdentityPoolRolesInput *)request completionHandler: (void (^_Nullable)(NSError *_Nullable))completionHandler;
Swift
func setIdentityPoolRoles(_ request: AWSCognitoIdentitySetIdentityPoolRolesInput) async throws
Parameters
request
A container for the necessary parameters to execute the SetIdentityPoolRoles service method.
completionHandler
The completion handler to call when the load request is complete.
error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorConcurrentModification
. -
You can use this operation to use default (username and clientID) attribute or custom attribute mappings.
See
AWSCognitoIdentitySetPrincipalTagAttributeMapInput
See
AWSCognitoIdentitySetPrincipalTagAttributeMapResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentitySetPrincipalTagAttributeMapResponse *> *) setPrincipalTagAttributeMap: (nonnull AWSCognitoIdentitySetPrincipalTagAttributeMapInput *)request;
Swift
func setPrincipalTagAttributeMap(_ request: AWSCognitoIdentitySetPrincipalTagAttributeMapInput) -> AWSTask<AWSCognitoIdentitySetPrincipalTagAttributeMapResponse>
Parameters
request
A container for the necessary parameters to execute the SetPrincipalTagAttributeMap service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentitySetPrincipalTagAttributeMapResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
You can use this operation to use default (username and clientID) attribute or custom attribute mappings.
See
AWSCognitoIdentitySetPrincipalTagAttributeMapInput
See
AWSCognitoIdentitySetPrincipalTagAttributeMapResponse
Declaration
Objective-C
- (void)setPrincipalTagAttributeMap: (nonnull AWSCognitoIdentitySetPrincipalTagAttributeMapInput *) request completionHandler: (void (^_Nullable)( AWSCognitoIdentitySetPrincipalTagAttributeMapResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func setPrincipalTagAttributeMap(_ request: AWSCognitoIdentitySetPrincipalTagAttributeMapInput) async throws -> AWSCognitoIdentitySetPrincipalTagAttributeMapResponse
Parameters
request
A container for the necessary parameters to execute the SetPrincipalTagAttributeMap service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.
Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an
Environment
tag key to both identity pools. The value of this key might beTest
for one identity pool andProduction
for the other.Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.
You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.
See
AWSCognitoIdentityTagResourceInput
See
AWSCognitoIdentityTagResourceResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityTagResourceResponse *> *)tagResource: (nonnull AWSCognitoIdentityTagResourceInput *)request;
Swift
func tagResource(_ request: AWSCognitoIdentityTagResourceInput) -> AWSTask<AWSCognitoIdentityTagResourceResponse>
Parameters
request
A container for the necessary parameters to execute the TagResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityTagResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.
Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an
Environment
tag key to both identity pools. The value of this key might beTest
for one identity pool andProduction
for the other.Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools. In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.
You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.
See
AWSCognitoIdentityTagResourceInput
See
AWSCognitoIdentityTagResourceResponse
Declaration
Objective-C
- (void)tagResource:(nonnull AWSCognitoIdentityTagResourceInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityTagResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func tagResource(_ request: AWSCognitoIdentityTagResourceInput) async throws -> AWSCognitoIdentityTagResourceResponse
Parameters
request
A container for the necessary parameters to execute the TagResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Unlinks a
DeveloperUserIdentifier
from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityUnlinkDeveloperIdentityInput
Declaration
Objective-C
- (nonnull AWSTask *)unlinkDeveloperIdentity: (nonnull AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request;
Swift
func unlinkDeveloperIdentity(_ request: AWSCognitoIdentityUnlinkDeveloperIdentityInput) -> AWSTask<AnyObject>
Parameters
request
A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will benil
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Unlinks a
DeveloperUserIdentifier
from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityUnlinkDeveloperIdentityInput
Declaration
Objective-C
- (void)unlinkDeveloperIdentity: (nonnull AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request completionHandler: (void (^_Nullable)(NSError *_Nullable))completionHandler;
Swift
func unlinkDeveloperIdentity(_ request: AWSCognitoIdentityUnlinkDeveloperIdentityInput) async throws
Parameters
request
A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityUnlinkIdentityInput
Declaration
Objective-C
- (nonnull AWSTask *)unlinkIdentity: (nonnull AWSCognitoIdentityUnlinkIdentityInput *)request;
Swift
func unlinkIdentity(_ request: AWSCognitoIdentityUnlinkIdentityInput) -> AWSTask<AnyObject>
Parameters
request
A container for the necessary parameters to execute the UnlinkIdentity service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will benil
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.
This is a public API. You do not need any credentials to call this API.
See
AWSCognitoIdentityUnlinkIdentityInput
Declaration
Objective-C
- (void)unlinkIdentity:(nonnull AWSCognitoIdentityUnlinkIdentityInput *)request completionHandler:(void (^_Nullable)(NSError *_Nullable))completionHandler;
Swift
func unlinkIdentity(_ request: AWSCognitoIdentityUnlinkIdentityInput) async throws
Parameters
request
A container for the necessary parameters to execute the UnlinkIdentity service method.
completionHandler
The completion handler to call when the load request is complete.
error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorExternalService
. -
Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account
See
AWSCognitoIdentityUntagResourceInput
See
AWSCognitoIdentityUntagResourceResponse
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityUntagResourceResponse *> *)untagResource: (nonnull AWSCognitoIdentityUntagResourceInput *)request;
Swift
func untagResource(_ request: AWSCognitoIdentityUntagResourceInput) -> AWSTask<AWSCognitoIdentityUntagResourceResponse>
Parameters
request
A container for the necessary parameters to execute the UntagResource service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityUntagResourceResponse
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account
See
AWSCognitoIdentityUntagResourceInput
See
AWSCognitoIdentityUntagResourceResponse
Declaration
Objective-C
- (void)untagResource:(nonnull AWSCognitoIdentityUntagResourceInput *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityUntagResourceResponse *_Nullable, NSError *_Nullable))completionHandler;
Swift
func untagResource(_ request: AWSCognitoIdentityUntagResourceInput) async throws -> AWSCognitoIdentityUntagResourceResponse
Parameters
request
A container for the necessary parameters to execute the UntagResource service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
. -
Updates an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityIdentityPool
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (nonnull AWSTask<AWSCognitoIdentityIdentityPool *> *)updateIdentityPool: (nonnull AWSCognitoIdentityIdentityPool *)request;
Swift
func update(_ request: AWSCognitoIdentityIdentityPool) -> AWSTask<AWSCognitoIdentityIdentityPool>
Parameters
request
A container for the necessary parameters to execute the UpdateIdentityPool service method.
Return Value
An instance of
AWSTask
. On successful execution,task.result
will contain an instance ofAWSCognitoIdentityIdentityPool
. On failed execution,task.error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorConcurrentModification
,AWSCognitoIdentityErrorLimitExceeded
. -
Updates an identity pool.
You must use AWS Developer credentials to call this API.
See
AWSCognitoIdentityIdentityPool
See
AWSCognitoIdentityIdentityPool
Declaration
Objective-C
- (void)updateIdentityPool:(nonnull AWSCognitoIdentityIdentityPool *)request completionHandler: (void (^_Nullable)(AWSCognitoIdentityIdentityPool *_Nullable, NSError *_Nullable))completionHandler;
Swift
func update(_ request: AWSCognitoIdentityIdentityPool) async throws -> AWSCognitoIdentityIdentityPool
Parameters
request
A container for the necessary parameters to execute the UpdateIdentityPool service method.
completionHandler
The completion handler to call when the load request is complete.
response
- A response object, ornil
if the request failed.error
- An error object that indicates why the request failed, ornil
if the request was successful. On failed execution,error
may contain anNSError
withAWSCognitoIdentityErrorDomain
domain and the following error code:AWSCognitoIdentityErrorInvalidParameter
,AWSCognitoIdentityErrorResourceNotFound
,AWSCognitoIdentityErrorNotAuthorized
,AWSCognitoIdentityErrorResourceConflict
,AWSCognitoIdentityErrorTooManyRequests
,AWSCognitoIdentityErrorInternalError
,AWSCognitoIdentityErrorConcurrentModification
,AWSCognitoIdentityErrorLimitExceeded
.