getFederationToken method
Supports SAML sign-in for Connect Customer. Retrieves a token for federation. The token is for the Connect Customer user which corresponds to the IAM credentials that were used to invoke this action.
For more information about how SAML sign-in works in Connect Customer, see Configure SAML with IAM for Connect Customer in the Connect Customer Administrator Guide.
Provided identity: Principal: .... User: .... cannot be used for
federation with Connect Customer
May throw DuplicateResourceException.
May throw InternalServiceException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw UserNotFoundException.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Implementation
Future<GetFederationTokenResponse> getFederationToken({
required String instanceId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/user/federate/${Uri.encodeComponent(instanceId)}',
exceptionFnMap: _exceptionFns,
);
return GetFederationTokenResponse.fromJson(response);
}