Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogoutCommand

Removes the locally stored SSO tokens from the client-side cache and sends an API call to the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in session.

If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set. More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user, and the corresponding temporary AWS credentials are returned to the client.

After user logout, any existing IAM role sessions that were created by using IAM Identity Center permission sets continue based on the duration configured in the permission set. For more information, see User authentications in the IAM Identity Center User Guide.

example

Use a bare-bones client and the command you need to make an API call.

import { SSOClient, LogoutCommand } from "@aws-sdk/client-sso"; // ES Modules import
// const { SSOClient, LogoutCommand } = require("@aws-sdk/client-sso"); // CommonJS import
const client = new SSOClient(config);
const command = new LogoutCommand(input);
const response = await client.send(command);
see

LogoutCommandInput for command's input shape.

see

LogoutCommandOutput for command's response shape.

see

config for SSOClient's config shape.

throws

InvalidRequestException (client fault)

Indicates that a problem occurred with the input to the request. For example, a required parameter might be missing or out of range.

throws

TooManyRequestsException (client fault)

Indicates that the request is being made too frequently and is more than what the server can handle.

throws

UnauthorizedException (client fault)

Indicates that the request is not authorized. This can happen due to an invalid access token in the request.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

Readonly middlewareStack

middlewareStack: IMiddlewareStack<LogoutCommandInput, LogoutCommandOutput>

Methods

Static getEndpointParameterInstructions