- 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.
ListServicesCommand
List services with summaries of detail data.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ProtonClient, ListServicesCommand } from "@aws-sdk/client-proton"; // ES Modules import
// const { ProtonClient, ListServicesCommand } = require("@aws-sdk/client-proton"); // CommonJS import
const client = new ProtonClient(config);
const input = { // ListServicesInput
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListServicesCommand(input);
const response = await client.send(command);
// { // ListServicesOutput
// nextToken: "STRING_VALUE",
// services: [ // ServiceSummaryList // required
// { // ServiceSummary
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// arn: "STRING_VALUE", // required
// templateName: "STRING_VALUE", // required
// createdAt: new Date("TIMESTAMP"), // required
// lastModifiedAt: new Date("TIMESTAMP"), // required
// status: "STRING_VALUE", // required
// statusMessage: "STRING_VALUE",
// },
// ],
// };
ListServicesCommand Input
See ListServicesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | The maximum number of services to list. |
nextToken | string | undefined | A token that indicates the location of the next service in the array of services, after the list of services that was previously requested. |
ListServicesCommand Output
See ListServicesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
services Required | ServiceSummary[] | undefined | An array of services with summaries of detail data. |
nextToken | string | undefined | A token that indicates the location of the next service in the array of services, after the current requested list of services. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | There isn't sufficient access for performing this action. |
InternalServerException | server | The request failed to register with the service. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input is invalid or an out-of-range value was supplied for the input parameter. |
ProtonServiceException | Base exception class for all service exceptions from Proton service. |