ListServiceVersionsCommand

Lists all supported versions for Snow on-device services. Returns an array of ServiceVersion object containing the supported versions for a particular service.

Example Syntax

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

import { SnowballClient, ListServiceVersionsCommand } from "@aws-sdk/client-snowball"; // ES Modules import
// const { SnowballClient, ListServiceVersionsCommand } = require("@aws-sdk/client-snowball"); // CommonJS import
const client = new SnowballClient(config);
const input = { // ListServiceVersionsRequest
  ServiceName: "KUBERNETES" || "EKS_ANYWHERE", // required
  DependentServices: [ // DependentServiceList
    { // DependentService
      ServiceName: "KUBERNETES" || "EKS_ANYWHERE",
      ServiceVersion: { // ServiceVersion
        Version: "STRING_VALUE",
      },
    },
  ],
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListServiceVersionsCommand(input);
const response = await client.send(command);
// { // ListServiceVersionsResult
//   ServiceVersions: [ // ServiceVersionList // required
//     { // ServiceVersion
//       Version: "STRING_VALUE",
//     },
//   ],
//   ServiceName: "KUBERNETES" || "EKS_ANYWHERE", // required
//   DependentServices: [ // DependentServiceList
//     { // DependentService
//       ServiceName: "KUBERNETES" || "EKS_ANYWHERE",
//       ServiceVersion: {
//         Version: "STRING_VALUE",
//       },
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListServiceVersionsCommand Input

See ListServiceVersionsCommandInput for more details

Parameter
Type
Description
ServiceName
Required
ServiceName | undefined

The name of the service for which you're requesting supported versions.

DependentServices
DependentService[] | undefined

A list of names and versions of dependant services of the requested service.

MaxResults
number | undefined

The maximum number of ListServiceVersions objects to return.

NextToken
string | undefined

Because HTTP requests are stateless, this is the starting point for the next list of returned ListServiceVersionsRequest versions.

ListServiceVersionsCommand Output

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

The name of the service for which the system provided supported versions.

ServiceVersions
Required
ServiceVersion[] | undefined

A list of supported versions.

DependentServices
DependentService[] | undefined

A list of names and versions of dependant services of the service for which the system provided supported versions.

NextToken
string | undefined

Because HTTP requests are stateless, this is the starting point of the next list of returned ListServiceVersionsResult results.

Throws

Name
Fault
Details
InvalidNextTokenException
client

The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

InvalidResourceException
client

The specified resource can't be found. Check the information you provided in your last request, and try again.

SnowballServiceException
Base exception class for all service exceptions from Snowball service.