AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Implementation for accessing CognitoIdentity
Amazon Cognito Federated IdentitiesAmazon 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.
Namespace: Amazon.CognitoIdentity
Assembly: AWSSDK.CognitoIdentity.dll
Version: 3.x.y.z
public class AmazonCognitoIdentityClient : AmazonServiceClient IAmazonCognitoIdentity, IAmazonService, IDisposable
The AmazonCognitoIdentityClient type exposes the following members
Name | Description | |
---|---|---|
AmazonCognitoIdentityClient() |
Constructs AmazonCognitoIdentityClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCognitoIdentityClient(RegionEndpoint) |
Constructs AmazonCognitoIdentityClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCognitoIdentityClient(AmazonCognitoIdentityConfig) |
Constructs AmazonCognitoIdentityClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCognitoIdentityClient(AWSCredentials) |
Constructs AmazonCognitoIdentityClient with AWS Credentials |
|
AmazonCognitoIdentityClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonCognitoIdentityClient with AWS Credentials |
|
AmazonCognitoIdentityClient(AWSCredentials, AmazonCognitoIdentityConfig) |
Constructs AmazonCognitoIdentityClient with AWS Credentials and an AmazonCognitoIdentityClient Configuration object. |
|
AmazonCognitoIdentityClient(string, string) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCognitoIdentityClient(string, string, RegionEndpoint) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCognitoIdentityClient(string, string, AmazonCognitoIdentityConfig) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID, AWS Secret Key and an AmazonCognitoIdentityClient Configuration object. |
|
AmazonCognitoIdentityClient(string, string, string) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCognitoIdentityClient(string, string, string, RegionEndpoint) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCognitoIdentityClient(string, string, string, AmazonCognitoIdentityConfig) |
Constructs AmazonCognitoIdentityClient with AWS Access Key ID, AWS Secret Key and an AmazonCognitoIdentityClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. | |
Paginators | Amazon.CognitoIdentity.Model.ICognitoIdentityPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
CreateIdentityPool(CreateIdentityPoolRequest) |
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
You must use AWS Developer credentials to call this API. |
|
CreateIdentityPoolAsync(CreateIdentityPoolRequest, CancellationToken) |
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
You must use AWS Developer credentials to call this API. |
|
DeleteIdentities(DeleteIdentitiesRequest) |
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. |
|
DeleteIdentitiesAsync(DeleteIdentitiesRequest, CancellationToken) |
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. |
|
DeleteIdentityPool(string) |
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. |
|
DeleteIdentityPool(DeleteIdentityPoolRequest) |
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. |
|
DeleteIdentityPoolAsync(string, CancellationToken) |
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. |
|
DeleteIdentityPoolAsync(DeleteIdentityPoolRequest, CancellationToken) |
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. |
|
DescribeIdentity(string) |
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. |
|
DescribeIdentity(DescribeIdentityRequest) |
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. |
|
DescribeIdentityAsync(string, CancellationToken) |
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. |
|
DescribeIdentityAsync(DescribeIdentityRequest, CancellationToken) |
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. |
|
DescribeIdentityPool(string) |
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. |
|
DescribeIdentityPool(DescribeIdentityPoolRequest) |
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. |
|
DescribeIdentityPoolAsync(string, CancellationToken) |
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. |
|
DescribeIdentityPoolAsync(DescribeIdentityPoolRequest, CancellationToken) |
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. |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
GetCredentialsForIdentity(string) |
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. |
|
GetCredentialsForIdentity(string, Dictionary<String, String>) |
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. |
|
GetCredentialsForIdentity(GetCredentialsForIdentityRequest) |
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. |
|
GetCredentialsForIdentityAsync(string, CancellationToken) |
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. |
|
GetCredentialsForIdentityAsync(string, Dictionary<String, String>, CancellationToken) |
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. |
|
GetCredentialsForIdentityAsync(GetCredentialsForIdentityRequest, CancellationToken) |
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. |
|
GetId(GetIdRequest) |
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. |
|
GetIdAsync(GetIdRequest, CancellationToken) |
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. |
|
GetIdentityPoolRoles(string) |
Gets the roles for an identity pool. You must use AWS Developer credentials to call this API. |
|
GetIdentityPoolRoles(GetIdentityPoolRolesRequest) |
Gets the roles for an identity pool. You must use AWS Developer credentials to call this API. |
|
GetIdentityPoolRolesAsync(string, CancellationToken) |
Gets the roles for an identity pool. You must use AWS Developer credentials to call this API. |
|
GetIdentityPoolRolesAsync(GetIdentityPoolRolesRequest, CancellationToken) |
Gets the roles for an identity pool. You must use AWS Developer credentials to call this API. |
|
GetOpenIdToken(string) |
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. |
|
GetOpenIdToken(GetOpenIdTokenRequest) |
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. |
|
GetOpenIdTokenAsync(string, CancellationToken) |
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. |
|
GetOpenIdTokenAsync(GetOpenIdTokenRequest, CancellationToken) |
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. |
|
GetOpenIdTokenForDeveloperIdentity(GetOpenIdTokenForDeveloperIdentityRequest) |
Registers (or retrieves) a Cognito
You can use You must use AWS Developer credentials to call this API. |
|
GetOpenIdTokenForDeveloperIdentityAsync(GetOpenIdTokenForDeveloperIdentityRequest, CancellationToken) |
Registers (or retrieves) a Cognito
You can use You must use AWS Developer credentials to call this API. |
|
GetPrincipalTagAttributeMap(GetPrincipalTagAttributeMapRequest) |
Use |
|
GetPrincipalTagAttributeMapAsync(GetPrincipalTagAttributeMapRequest, CancellationToken) |
Use |
|
ListIdentities(ListIdentitiesRequest) |
Lists the identities in an identity pool. You must use AWS Developer credentials to call this API. |
|
ListIdentitiesAsync(ListIdentitiesRequest, CancellationToken) |
Lists the identities in an identity pool. You must use AWS Developer credentials to call this API. |
|
ListIdentityPools(ListIdentityPoolsRequest) |
Lists all of the Cognito identity pools registered for your account. You must use AWS Developer credentials to call this API. |
|
ListIdentityPoolsAsync(ListIdentityPoolsRequest, CancellationToken) |
Lists all of the Cognito identity pools registered for your account. You must use AWS Developer credentials to call this API. |
|
ListTagsForResource(ListTagsForResourceRequest) |
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. |
|
ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken) |
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. |
|
LookupDeveloperIdentity(LookupDeveloperIdentityRequest) |
Retrieves the
You must use AWS Developer credentials to call this API. |
|
LookupDeveloperIdentityAsync(LookupDeveloperIdentityRequest, CancellationToken) |
Retrieves the
You must use AWS Developer credentials to call this API. |
|
MergeDeveloperIdentities(MergeDeveloperIdentitiesRequest) |
Merges two users having different
The number of linked logins is limited to 20. So, the number of linked logins for
the source user, You must use AWS Developer credentials to call this API. |
|
MergeDeveloperIdentitiesAsync(MergeDeveloperIdentitiesRequest, CancellationToken) |
Merges two users having different
The number of linked logins is limited to 20. So, the number of linked logins for
the source user, You must use AWS Developer credentials to call this API. |
|
SetIdentityPoolRoles(string, Dictionary<String, String>) |
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. |
|
SetIdentityPoolRoles(SetIdentityPoolRolesRequest) |
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. |
|
SetIdentityPoolRolesAsync(string, Dictionary<String, String>, CancellationToken) |
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. |
|
SetIdentityPoolRolesAsync(SetIdentityPoolRolesRequest, CancellationToken) |
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. |
|
SetPrincipalTagAttributeMap(SetPrincipalTagAttributeMapRequest) |
You can use this operation to use default (username and clientID) attribute or custom attribute mappings. |
|
SetPrincipalTagAttributeMapAsync(SetPrincipalTagAttributeMapRequest, CancellationToken) |
You can use this operation to use default (username and clientID) attribute or custom attribute mappings. |
|
TagResource(TagResourceRequest) |
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 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. |
|
TagResourceAsync(TagResourceRequest, CancellationToken) |
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 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. |
|
UnlinkDeveloperIdentity(UnlinkDeveloperIdentityRequest) |
Unlinks a You must use AWS Developer credentials to call this API. |
|
UnlinkDeveloperIdentityAsync(UnlinkDeveloperIdentityRequest, CancellationToken) |
Unlinks a You must use AWS Developer credentials to call this API. |
|
UnlinkIdentity(UnlinkIdentityRequest) |
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. |
|
UnlinkIdentityAsync(UnlinkIdentityRequest, CancellationToken) |
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. |
|
UntagResource(UntagResourceRequest) |
Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account |
|
UntagResourceAsync(UntagResourceRequest, CancellationToken) |
Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account |
|
UpdateIdentityPool(UpdateIdentityPoolRequest) |
Updates an identity pool. You must use AWS Developer credentials to call this API. |
|
UpdateIdentityPoolAsync(UpdateIdentityPoolRequest, CancellationToken) |
Updates an identity pool. You must use AWS Developer credentials to call this API. |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5