ListGatewaysCommand

Retrieves a paginated list of gateways.

Example Syntax

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

import { IoTSiteWiseClient, ListGatewaysCommand } from "@aws-sdk/client-iotsitewise"; // ES Modules import
// const { IoTSiteWiseClient, ListGatewaysCommand } = require("@aws-sdk/client-iotsitewise"); // CommonJS import
const client = new IoTSiteWiseClient(config);
const input = { // ListGatewaysRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListGatewaysCommand(input);
const response = await client.send(command);
// { // ListGatewaysResponse
//   gatewaySummaries: [ // GatewaySummaries // required
//     { // GatewaySummary
//       gatewayId: "STRING_VALUE", // required
//       gatewayName: "STRING_VALUE", // required
//       gatewayPlatform: { // GatewayPlatform
//         greengrass: { // Greengrass
//           groupArn: "STRING_VALUE", // required
//         },
//         greengrassV2: { // GreengrassV2
//           coreDeviceThingName: "STRING_VALUE", // required
//           coreDeviceOperatingSystem: "LINUX_AARCH64" || "LINUX_AMD64" || "WINDOWS_AMD64",
//         },
//         siemensIE: { // SiemensIE
//           iotCoreThingName: "STRING_VALUE", // required
//         },
//       },
//       gatewayVersion: "STRING_VALUE",
//       gatewayCapabilitySummaries: [ // GatewayCapabilitySummaries
//         { // GatewayCapabilitySummary
//           capabilityNamespace: "STRING_VALUE", // required
//           capabilitySyncStatus: "IN_SYNC" || "OUT_OF_SYNC" || "SYNC_FAILED" || "UNKNOWN" || "NOT_APPLICABLE", // required
//         },
//       ],
//       creationDate: new Date("TIMESTAMP"), // required
//       lastUpdateDate: new Date("TIMESTAMP"), // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListGatewaysCommand Input

See ListGatewaysCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results to return for each paginated request.

Default: 50

nextToken
string | undefined

The token to be used for the next set of paginated results.

ListGatewaysCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
gatewaySummaries
Required
GatewaySummary[] | undefined

A list that summarizes each gateway.

nextToken
string | undefined

The token for the next set of results, or null if there are no additional results.

Throws

Name
Fault
Details
InternalFailureException
server

IoT SiteWise can't process your request right now. Try again later.

InvalidRequestException
client

The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

ThrottlingException
client

Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

For more information, see Quotas  in the IoT SiteWise User Guide.

IoTSiteWiseServiceException
Base exception class for all service exceptions from IoTSiteWise service.