- 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.
ListAllowListsCommand
Retrieves a subset of information about all the allow lists for an account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Macie2Client, ListAllowListsCommand } from "@aws-sdk/client-macie2"; // ES Modules import
// const { Macie2Client, ListAllowListsCommand } = require("@aws-sdk/client-macie2"); // CommonJS import
const client = new Macie2Client(config);
const input = { // ListAllowListsRequest
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListAllowListsCommand(input);
const response = await client.send(command);
// { // ListAllowListsResponse
// allowLists: [ // __listOfAllowListSummary
// { // AllowListSummary
// arn: "STRING_VALUE",
// createdAt: new Date("TIMESTAMP"),
// description: "STRING_VALUE",
// id: "STRING_VALUE",
// name: "STRING_VALUE",
// updatedAt: new Date("TIMESTAMP"),
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListAllowListsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | The maximum number of items to include in each page of a paginated response. |
nextToken | string | undefined | The nextToken string that specifies which page of results to return in a paginated response. |
ListAllowListsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
allowLists | AllowListSummary[] | undefined | An array of objects, one for each allow list. |
nextToken | string | undefined | The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Provides information about an error that occurred due to insufficient access to a specified resource. |
InternalServerException | server | Provides information about an error that occurred due to an unknown internal server error, exception, or failure. |
ThrottlingException | client | Provides information about an error that occurred because too many requests were sent during a certain amount of time. |
ValidationException | client | Provides information about an error that occurred due to a syntax error in a request. |
Macie2ServiceException | Base exception class for all service exceptions from Macie2 service. |