Amazon.CognitoIdentity.AmazonCognitoIdentityClient.GetId C# (CSharp) Метод

GetId() публичный Метод

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.

/// An exception thrown when a dependent service such as Facebook or Twitter is not responding /// /// Thrown when the service encounters an error during processing the request. /// /// Thrown for missing or bad input parameter(s). /// /// Thrown when the total number of user pools has exceeded a preset limit. /// /// Thrown when a user is not authorized to access the requested resource. /// /// Thrown when a user tries to use a login which is already linked to another account. /// /// Thrown when the requested resource (for example, a dataset or record) does not exist. /// /// Thrown when a request is throttled. ///
public GetId ( GetIdRequest request ) : GetIdResponse
request GetIdRequest Container for the necessary parameters to execute the GetId service method.
Результат GetIdResponse
        public GetIdResponse GetId(GetIdRequest request)
        {
            var marshaller = new GetIdRequestMarshaller();
            var unmarshaller = GetIdResponseUnmarshaller.Instance;

            return Invoke<GetIdRequest,GetIdResponse>(request, marshaller, unmarshaller);
        }

Usage Example

Пример #1
0
        protected virtual IdentityState RefreshIdentity()
        {
            bool fromCache = true;

            if (!IsIdentitySet)
            {
                GetIdRequest request = new GetIdRequest
                {
                    AccountId      = AccountId,
                    IdentityPoolId = IdentityPoolId,
                    Logins         = Logins
                };
                GetIdResponse id = cib.GetId(request);
                fromCache = false;
                UpdateIdentity(id.IdentityId);
            }
            return(new IdentityState(identityId, fromCache));
        }
AmazonCognitoIdentityClient