Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the
administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation
returns a paginated response.
example
Use a bare-bones client and the command you need to make an API call.
Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the IAM Identity Center User Guide. This operation returns a paginated response.
Use a bare-bones client and the command you need to make an API call.
import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso"; // ES Modules import // const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso"); // CommonJS import const client = new SSOClient(config); const command = new ListAccountsCommand(input); const response = await client.send(command);
ListAccountsCommandInput for command's
input
shape.ListAccountsCommandOutput for command's
response
shape.config for SSOClient's
config
shape.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.
ResourceNotFoundException (client fault)
The specified resource doesn't exist.
TooManyRequestsException (client fault)
Indicates that the request is being made too frequently and is more than what the server can handle.
UnauthorizedException (client fault)
Indicates that the request is not authorized. This can happen due to an invalid access token in the request.