- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListAliasesCommand
Retrieves all aliases for this Amazon Web Services account. You can filter the result set by alias name and/or routing strategy type. Use the pagination parameters to retrieve results in sequential pages.
Returned aliases are not listed in any particular order.
Related actions
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { GameLiftClient, ListAliasesCommand } from "@aws-sdk/client-gamelift"; // ES Modules import
// const { GameLiftClient, ListAliasesCommand } = require("@aws-sdk/client-gamelift"); // CommonJS import
const client = new GameLiftClient(config);
const input = { // ListAliasesInput
RoutingStrategyType: "SIMPLE" || "TERMINAL",
Name: "STRING_VALUE",
Limit: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListAliasesCommand(input);
const response = await client.send(command);
// { // ListAliasesOutput
// Aliases: [ // AliasList
// { // Alias
// AliasId: "STRING_VALUE",
// Name: "STRING_VALUE",
// AliasArn: "STRING_VALUE",
// Description: "STRING_VALUE",
// RoutingStrategy: { // RoutingStrategy
// Type: "SIMPLE" || "TERMINAL",
// FleetId: "STRING_VALUE",
// Message: "STRING_VALUE",
// },
// CreationTime: new Date("TIMESTAMP"),
// LastUpdatedTime: new Date("TIMESTAMP"),
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListAliasesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Limit | number | undefined | The maximum number of results to return. Use this parameter with |
Name | string | undefined | A descriptive label that is associated with an alias. Alias names do not need to be unique. |
NextToken | string | undefined | A token that indicates the start of the next sequential page of results. Use the token that is returned with a previous call to this operation. To start at the beginning of the result set, do not specify a value. |
RoutingStrategyType | RoutingStrategyType | undefined | The routing type to filter results on. Use this parameter to retrieve only aliases with a certain routing type. To retrieve all aliases, leave this parameter empty. Possible routing types include the following:
|
ListAliasesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Aliases | Alias[] | undefined | A collection of alias resources that match the request parameters. |
NextToken | string | undefined | A token that indicates where to resume retrieving results on the next call to this operation. If no token is returned, these results represent the end of the list. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServiceException | server | The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period. |
InvalidRequestException | client | One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying. |
UnauthorizedException | client | The client failed authentication. Clients should not retry such requests. |
GameLiftServiceException | Base exception class for all service exceptions from GameLift service. |