- 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
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
Parameter | Type | Description |
---|
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 An API operation can return fewer results than the maximum even when there are more results available. You should check |
NextToken | string | undefined | Specifies a value for receiving additional results after you receive a |
ListServicesCommand Output
Parameter | Type | Description |
---|
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 |
Services | ServiceInfo[] | undefined | The list of the Amazon Web Service names and service codes. |
Throws
Name | Fault | Details |
---|
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. |