The existing user in the user pool to be linked to the external identity provider user account. Can be a
native (Username + Password) Cognito User Pools user or a federated user (for example, a SAML or Facebook
user). If the user doesn't exist, an exception is thrown. This is the user that is returned when the new user
(with the linked identity provider attribute) signs in.
For a native username + password user, the ProviderAttributeValue
for the
DestinationUser
should be the username in the user pool. For a federated user, it should be the
provider-specific user_id
.
The ProviderAttributeName
of the DestinationUser
is ignored.
The ProviderName
should be set to Cognito
for users in Cognito user pools.
This is a convenience that creates an instance of the
ProviderUserIdentifierType.Builder avoiding the
need to create one manually via
ProviderUserIdentifierType#builder().
When the
Consumer completes,
ProviderUserIdentifierType.Builder#build() is called immediately
and its result is passed to
#destinationUser(ProviderUserIdentifierType).