ListAssetsCommand

Lists the hardware assets for the specified Outpost.

Use filters to return specific results. If you specify multiple filters, the results include only the resources that match all of the specified filters. For a filter where you can specify multiple values, the results include items that match any of the values that you specify for the filter.

Example Syntax

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

import { OutpostsClient, ListAssetsCommand } from "@aws-sdk/client-outposts"; // ES Modules import
// const { OutpostsClient, ListAssetsCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
const client = new OutpostsClient(config);
const input = { // ListAssetsInput
  OutpostIdentifier: "STRING_VALUE", // required
  HostIdFilter: [ // HostIdList
    "STRING_VALUE",
  ],
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
  StatusFilter: [ // StatusList
    "ACTIVE" || "RETIRING" || "ISOLATED",
  ],
};
const command = new ListAssetsCommand(input);
const response = await client.send(command);
// { // ListAssetsOutput
//   Assets: [ // AssetListDefinition
//     { // AssetInfo
//       AssetId: "STRING_VALUE",
//       RackId: "STRING_VALUE",
//       AssetType: "COMPUTE",
//       ComputeAttributes: { // ComputeAttributes
//         HostId: "STRING_VALUE",
//         State: "ACTIVE" || "ISOLATED" || "RETIRING",
//         InstanceFamilies: [ // InstanceFamilies
//           "STRING_VALUE",
//         ],
//         InstanceTypeCapacities: [ // AssetInstanceCapacityList
//           { // AssetInstanceTypeCapacity
//             InstanceType: "STRING_VALUE", // required
//             Count: Number("int"), // required
//           },
//         ],
//         MaxVcpus: Number("int"),
//       },
//       AssetLocation: { // AssetLocation
//         RackElevation: Number("float"),
//       },
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListAssetsCommand Input

See ListAssetsCommandInput for more details

Parameter
Type
Description
OutpostIdentifier
Required
string | undefined

The ID or the Amazon Resource Name (ARN) of the Outpost.

HostIdFilter
string[] | undefined

Filters the results by the host ID of a Dedicated Host.

MaxResults
number | undefined

The maximum page size.

NextToken
string | undefined

The pagination token.

StatusFilter
AssetState[] | undefined

Filters the results by state.

ListAssetsCommand Output

See ListAssetsCommandOutput for details

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

Information about the hardware assets.

NextToken
string | undefined

The pagination token.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have permission to perform this operation.

InternalServerException
server

An internal error has occurred.

NotFoundException
client

The specified request is not valid.

ValidationException
client

A parameter is not valid.

OutpostsServiceException
Base exception class for all service exceptions from Outposts service.