DescribeAddressesCommand

Returns a specified number of ADDRESS objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.

Example Syntax

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

import { SnowballClient, DescribeAddressesCommand } from "@aws-sdk/client-snowball"; // ES Modules import
// const { SnowballClient, DescribeAddressesCommand } = require("@aws-sdk/client-snowball"); // CommonJS import
const client = new SnowballClient(config);
const input = { // DescribeAddressesRequest
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new DescribeAddressesCommand(input);
const response = await client.send(command);
// { // DescribeAddressesResult
//   Addresses: [ // AddressList
//     { // Address
//       AddressId: "STRING_VALUE",
//       Name: "STRING_VALUE",
//       Company: "STRING_VALUE",
//       Street1: "STRING_VALUE",
//       Street2: "STRING_VALUE",
//       Street3: "STRING_VALUE",
//       City: "STRING_VALUE",
//       StateOrProvince: "STRING_VALUE",
//       PrefectureOrDistrict: "STRING_VALUE",
//       Landmark: "STRING_VALUE",
//       Country: "STRING_VALUE",
//       PostalCode: "STRING_VALUE",
//       PhoneNumber: "STRING_VALUE",
//       IsRestricted: true || false,
//       Type: "CUST_PICKUP" || "AWS_SHIP",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

Example Usage

 Loading code editor

DescribeAddressesCommand Input

See DescribeAddressesCommandInput for more details

Parameter
Type
Description
MaxResults
number | undefined

The number of ADDRESS objects to return.

NextToken
string | undefined

HTTP requests are stateless. To identify what object comes "next" in the list of ADDRESS objects, you have the option of specifying a value for NextToken as the starting point for your list of returned addresses.

DescribeAddressesCommand Output

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

The Snow device shipping addresses that were created for this account.

NextToken
string | undefined

HTTP requests are stateless. If you use the automatically generated NextToken value in your next DescribeAddresses call, your list of returned addresses will start from this point in the array.

Throws

Name
Fault
Details
InvalidNextTokenException
client

The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

InvalidResourceException
client

The specified resource can't be found. Check the information you provided in your last request, and try again.

SnowballServiceException
Base exception class for all service exceptions from Snowball service.