ListNotificationsCommand

Lists all Amazon DataZone notifications.

Example Syntax

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

import { DataZoneClient, ListNotificationsCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, ListNotificationsCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // ListNotificationsInput
  domainIdentifier: "STRING_VALUE", // required
  type: "TASK" || "EVENT", // required
  afterTimestamp: new Date("TIMESTAMP"),
  beforeTimestamp: new Date("TIMESTAMP"),
  subjects: [ // NotificationSubjects
    "STRING_VALUE",
  ],
  taskStatus: "ACTIVE" || "INACTIVE",
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListNotificationsCommand(input);
const response = await client.send(command);
// { // ListNotificationsOutput
//   notifications: [ // NotificationsList
//     { // NotificationOutput
//       identifier: "STRING_VALUE", // required
//       domainIdentifier: "STRING_VALUE", // required
//       type: "TASK" || "EVENT", // required
//       topic: { // Topic
//         subject: "STRING_VALUE", // required
//         resource: { // NotificationResource
//           type: "PROJECT", // required
//           id: "STRING_VALUE", // required
//           name: "STRING_VALUE",
//         },
//         role: "PROJECT_OWNER" || "PROJECT_CONTRIBUTOR" || "PROJECT_VIEWER" || "DOMAIN_OWNER" || "PROJECT_SUBSCRIBER", // required
//       },
//       title: "STRING_VALUE", // required
//       message: "STRING_VALUE", // required
//       status: "ACTIVE" || "INACTIVE",
//       actionLink: "STRING_VALUE", // required
//       creationTimestamp: new Date("TIMESTAMP"), // required
//       lastUpdatedTimestamp: new Date("TIMESTAMP"), // required
//       metadata: { // MetadataMap
//         "<keys>": "STRING_VALUE",
//       },
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListNotificationsCommand Input

See ListNotificationsCommandInput for more details

Parameter
Type
Description
domainIdentifier
Required
string | undefined

The identifier of the Amazon DataZone domain.

type
Required
NotificationType | undefined

The type of notifications.

afterTimestamp
Date | undefined

The time after which you want to list notifications.

beforeTimestamp
Date | undefined

The time before which you want to list notifications.

maxResults
number | undefined

The maximum number of notifications to return in a single call to ListNotifications. When the number of notifications to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListNotifications to list the next set of notifications.

nextToken
string | undefined

When the number of notifications is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of notifications, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListNotifications to list the next set of notifications.

subjects
string[] | undefined

The subjects of notifications.

taskStatus
TaskStatus | undefined

The task status of notifications.

ListNotificationsCommand Output

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

When the number of notifications is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of notifications, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListNotifications to list the next set of notifications.

notifications
NotificationOutput[] | undefined

The results of the ListNotifications action.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

The request has failed because of an unknown error, exception or failure.

ResourceNotFoundException
client

The specified resource cannot be found.

ValidationException
client

The input fails to satisfy the constraints specified by the Amazon Web Services service.

ThrottlingException
client

The request was denied due to request throttling.

UnauthorizedException
client

You do not have permission to perform this action.

DataZoneServiceException
Base exception class for all service exceptions from DataZone service.