- 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.
ListPackagesCommand
Returns a list of packages.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PanoramaClient, ListPackagesCommand } from "@aws-sdk/client-panorama"; // ES Modules import
// const { PanoramaClient, ListPackagesCommand } = require("@aws-sdk/client-panorama"); // CommonJS import
const client = new PanoramaClient(config);
const input = { // ListPackagesRequest
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new ListPackagesCommand(input);
const response = await client.send(command);
// { // ListPackagesResponse
// Packages: [ // PackageList
// { // PackageListItem
// PackageId: "STRING_VALUE",
// PackageName: "STRING_VALUE",
// Arn: "STRING_VALUE",
// CreatedTime: new Date("TIMESTAMP"),
// Tags: { // TagMap
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// NextToken: "STRING_VALUE",
// };
ListPackagesCommand Input
See ListPackagesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The maximum number of packages to return in one page of results. |
NextToken | string | undefined | Specify the pagination token from a previous request to retrieve the next page of results. |
ListPackagesCommand Output
See ListPackagesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NextToken | string | undefined | A pagination token that's included if more results are available. |
Packages | PackageListItem[] | undefined | A list of packages. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The requestor does not have permission to access the target action or resource. |
ConflictException | client | The target resource is in use. |
InternalServerException | server | An internal error occurred. |
ResourceNotFoundException | client | The target resource was not found. |
ValidationException | client | The request contains an invalid parameter value. |
PanoramaServiceException | Base exception class for all service exceptions from Panorama service. |