ListAliasesCommand

Creates a paginated call to list the aliases associated with a given entity.

Example Syntax

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

import { WorkMailClient, ListAliasesCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, ListAliasesCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // ListAliasesRequest
  OrganizationId: "STRING_VALUE", // required
  EntityId: "STRING_VALUE", // required
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListAliasesCommand(input);
const response = await client.send(command);
// { // ListAliasesResponse
//   Aliases: [ // Aliases
//     "STRING_VALUE",
//   ],
//   NextToken: "STRING_VALUE",
// };

ListAliasesCommand Input

See ListAliasesCommandInput for more details

Parameter
Type
Description
EntityId
Required
string | undefined

The identifier for the entity for which to list the aliases.

OrganizationId
Required
string | undefined

The identifier for the organization under which the entity exists.

MaxResults
number | undefined

The maximum number of results to return in a single call.

NextToken
string | undefined

The token to use to retrieve the next page of results. The first call does not contain any tokens.

ListAliasesCommand Output

See ListAliasesCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Aliases
string[] | undefined

The entity's paginated aliases.

NextToken
string | undefined

The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.

Throws

Name
Fault
Details
EntityNotFoundException
client

The identifier supplied for the user, group, or resource does not exist in your organization.

EntityStateException
client

You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user.

InvalidParameterException
client

One or more of the input parameters don't match the service's restrictions.

OrganizationNotFoundException
client

An operation received a valid organization identifier that either doesn't belong or exist in the system.

OrganizationStateException
client

The organization must have a valid state to perform certain operations on the organization or its members.

WorkMailServiceException
Base exception class for all service exceptions from WorkMail service.