ListServicesCommand

Lists the names and codes for the Amazon Web Services integrated with Service Quotas.

Example Syntax

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

import { ServiceQuotasClient, ListServicesCommand } from "@aws-sdk/client-service-quotas"; // ES Modules import
// const { ServiceQuotasClient, ListServicesCommand } = require("@aws-sdk/client-service-quotas"); // CommonJS import
const client = new ServiceQuotasClient(config);
const input = { // ListServicesRequest
  NextToken: "STRING_VALUE",
  MaxResults: Number("int"),
};
const command = new ListServicesCommand(input);
const response = await client.send(command);
// { // ListServicesResponse
//   NextToken: "STRING_VALUE",
//   Services: [ // ServiceInfoListDefinition
//     { // ServiceInfo
//       ServiceCode: "STRING_VALUE",
//       ServiceName: "STRING_VALUE",
//     },
//   ],
// };

ListServicesCommand Input

See ListServicesCommandInput for more details

Parameter
Type
Description
MaxResults
number | undefined

Specifies the maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results.

An API operation can return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

NextToken
string | undefined

Specifies a value for receiving additional results after you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value of the previous call's NextToken response to indicate where the output should continue from.

ListServicesCommand Output

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

If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null.

Services
ServiceInfo[] | undefined

The list of the Amazon Web Service names and service codes.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient permission to perform this action.

IllegalArgumentException
client

Invalid input was provided.

InvalidPaginationTokenException
client

Invalid input was provided.

ServiceException
server

Something went wrong.

TooManyRequestsException
client

Due to throttling, the request was denied. Slow down the rate of request calls, or request an increase for this quota.

ServiceQuotasServiceException
Base exception class for all service exceptions from ServiceQuotas service.