import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; import type { GetFederationTokenRequest, GetFederationTokenResponse } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link GetFederationTokenCommand}. */ export interface GetFederationTokenCommandInput extends GetFederationTokenRequest { } /** * @public * * The output of {@link GetFederationTokenCommand}. */ export interface GetFederationTokenCommandOutput extends GetFederationTokenResponse, __MetadataBearer { } declare const GetFederationTokenCommand_base: { new (input: GetFederationTokenCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: GetFederationTokenCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Supports SAML sign-in for Amazon Connect. Retrieves a token for federation. The token is for the Amazon Connect user which corresponds to the IAM credentials that were used to invoke this action.

*

For more information about how SAML sign-in works in Amazon Connect, see Configure SAML with IAM for Amazon Connect * in the Amazon Connect Administrator Guide. *

* *

This API doesn't support root users. If you try to invoke GetFederationToken with root credentials, an error * message similar to the following one appears:

*

* Provided identity: Principal: .... User: .... cannot be used for federation with Amazon Connect *

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ConnectClient, GetFederationTokenCommand } from "@aws-sdk/client-connect"; // ES Modules import * // const { ConnectClient, GetFederationTokenCommand } = require("@aws-sdk/client-connect"); // CommonJS import * // import type { ConnectClientConfig } from "@aws-sdk/client-connect"; * const config = {}; // type is ConnectClientConfig * const client = new ConnectClient(config); * const input = { // GetFederationTokenRequest * InstanceId: "STRING_VALUE", // required * }; * const command = new GetFederationTokenCommand(input); * const response = await client.send(command); * // { // GetFederationTokenResponse * // Credentials: { // Credentials * // AccessToken: "STRING_VALUE", * // AccessTokenExpiration: new Date("TIMESTAMP"), * // RefreshToken: "STRING_VALUE", * // RefreshTokenExpiration: new Date("TIMESTAMP"), * // }, * // SignInUrl: "STRING_VALUE", * // UserArn: "STRING_VALUE", * // UserId: "STRING_VALUE", * // }; * * ``` * * @param GetFederationTokenCommandInput - {@link GetFederationTokenCommandInput} * @returns {@link GetFederationTokenCommandOutput} * @see {@link GetFederationTokenCommandInput} for command's `input` shape. * @see {@link GetFederationTokenCommandOutput} for command's `response` shape. * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. * * @throws {@link DuplicateResourceException} (client fault) *

A resource with the specified name already exists.

* * @throws {@link InternalServiceException} (server fault) *

Request processing failed because of an error or failure with the service.

* * @throws {@link InvalidParameterException} (client fault) *

One or more of the specified parameters are not valid.

* * @throws {@link InvalidRequestException} (client fault) *

The request is not valid.

* * @throws {@link ResourceNotFoundException} (client fault) *

The specified resource was not found.

* * @throws {@link UserNotFoundException} (client fault) *

No user with the specified credentials was found in the Amazon Connect instance.

* * @throws {@link ConnectServiceException} *

Base exception class for all service exceptions from Connect service.

* * * @public */ export declare class GetFederationTokenCommand extends GetFederationTokenCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetFederationTokenRequest; output: GetFederationTokenResponse; }; sdk: { input: GetFederationTokenCommandInput; output: GetFederationTokenCommandOutput; }; }; }