ListAliasesCommand

Lists the aliases of a specified image or image version.

Example Syntax

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

import { SageMakerClient, ListAliasesCommand } from "@aws-sdk/client-sagemaker"; // ES Modules import
// const { SageMakerClient, ListAliasesCommand } = require("@aws-sdk/client-sagemaker"); // CommonJS import
const client = new SageMakerClient(config);
const input = { // ListAliasesRequest
  ImageName: "STRING_VALUE", // required
  Alias: "STRING_VALUE",
  Version: Number("int"),
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListAliasesCommand(input);
const response = await client.send(command);
// { // ListAliasesResponse
//   SageMakerImageVersionAliases: [ // SageMakerImageVersionAliases
//     "STRING_VALUE",
//   ],
//   NextToken: "STRING_VALUE",
// };

ListAliasesCommand Input

See ListAliasesCommandInput for more details

Parameter
Type
Description
ImageName
Required
string | undefined

The name of the image.

Alias
string | undefined

The alias of the image version.

MaxResults
number | undefined

The maximum number of aliases to return.

NextToken
string | undefined

If the previous call to ListAliases didn't return the full set of aliases, the call returns a token for retrieving the next set of aliases.

Version
number | undefined

The version of the image. If image version is not specified, the aliases of all versions of the image are listed.

ListAliasesCommand Output

See ListAliasesCommandOutput for details

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

A token for getting the next set of aliases, if more aliases exist.

SageMakerImageVersionAliases
string[] | undefined

A list of SageMaker AI image version aliases.

Throws

Name
Fault
Details
ResourceNotFound
client

Resource being access is not found.

SageMakerServiceException
Base exception class for all service exceptions from SageMaker service.