unlinkDeveloperIdentity method
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.
May throw InvalidParameterException. May throw ResourceNotFoundException. May throw NotAuthorizedException. May throw ResourceConflictException. May throw TooManyRequestsException. May throw InternalErrorException.
Parameter developerProviderName
:
The "domain" by which Cognito will refer to your users.
Parameter developerUserIdentifier
:
A unique ID used by your backend authentication process to identify a
user.
Parameter identityId
:
A unique identifier in the format REGION:GUID.
Parameter identityPoolId
:
An identity pool ID in the format REGION:GUID.
Implementation
Future<void> unlinkDeveloperIdentity({
required String developerProviderName,
required String developerUserIdentifier,
required String identityId,
required String identityPoolId,
}) async {
ArgumentError.checkNotNull(developerProviderName, 'developerProviderName');
_s.validateStringLength(
'developerProviderName',
developerProviderName,
1,
128,
isRequired: true,
);
ArgumentError.checkNotNull(
developerUserIdentifier, 'developerUserIdentifier');
_s.validateStringLength(
'developerUserIdentifier',
developerUserIdentifier,
1,
1024,
isRequired: true,
);
ArgumentError.checkNotNull(identityId, 'identityId');
_s.validateStringLength(
'identityId',
identityId,
1,
55,
isRequired: true,
);
ArgumentError.checkNotNull(identityPoolId, 'identityPoolId');
_s.validateStringLength(
'identityPoolId',
identityPoolId,
1,
55,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityService.UnlinkDeveloperIdentity'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DeveloperProviderName': developerProviderName,
'DeveloperUserIdentifier': developerUserIdentifier,
'IdentityId': identityId,
'IdentityPoolId': identityPoolId,
},
);
}