ListHsmsCommand

  • This API is deprecated.

This is documentation for AWS CloudHSM Classic. For more information, see AWS CloudHSM Classic FAQs , the AWS CloudHSM Classic User Guide , and the AWS CloudHSM Classic API Reference .

For information about the current version of AWS CloudHSM, see AWS CloudHSM , the AWS CloudHSM User Guide , and the AWS CloudHSM API Reference .

Retrieves the identifiers of all of the HSMs provisioned for the current customer.

This operation supports pagination with the use of the NextToken member. If more results are available, the NextToken member of the response contains a token that you pass in the next call to ListHsms to retrieve the next set of items.

Example Syntax

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

import { CloudHSMClient, ListHsmsCommand } from "@aws-sdk/client-cloudhsm"; // ES Modules import
// const { CloudHSMClient, ListHsmsCommand } = require("@aws-sdk/client-cloudhsm"); // CommonJS import
const client = new CloudHSMClient(config);
const input = { // ListHsmsRequest
  NextToken: "STRING_VALUE",
};
const command = new ListHsmsCommand(input);
const response = await client.send(command);
// { // ListHsmsResponse
//   HsmList: [ // HsmList
//     "STRING_VALUE",
//   ],
//   NextToken: "STRING_VALUE",
// };

ListHsmsCommand Input

See ListHsmsCommandInput for more details

Parameter
Type
Description
NextToken
string | undefined

The NextToken value from a previous call to ListHsms. Pass null if this is the first call.

ListHsmsCommand Output

See ListHsmsCommandOutput for details

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

The list of ARNs that identify the HSMs.

NextToken
string | undefined

If not null, more results are available. Pass this value to ListHsms to retrieve the next set of items.

Throws

Name
Fault
Details
CloudHsmInternalException
server

Indicates that an internal error occurred.

[CloudHsmServiceException](@aws-sdk/client-cloudhsm!CloudHsmServiceException:Class) (client fault) <p>Indicates that an exception occurred in the AWS CloudHSM service.</p>
InvalidRequestException
client

Indicates that one or more of the request parameters are not valid.

[CloudHSMServiceException](@aws-sdk/client-cloudhsm!CloudHSMServiceException:Class) <p>Base exception class for all service exceptions from CloudHSM service.</p>