We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.
Protected
Returns a list of the notification rule targets for an Amazon Web Services account.
Use a bare-bones client and the command you need to make an API call.
import { CodestarNotificationsClient, ListTargetsCommand } from "@aws-sdk/client-codestar-notifications"; // ES Modules import// const { CodestarNotificationsClient, ListTargetsCommand } = require("@aws-sdk/client-codestar-notifications"); // CommonJS importconst client = new CodestarNotificationsClient(config);const input = { // ListTargetsRequest Filters: [ // ListTargetsFilters { // ListTargetsFilter Name: "TARGET_TYPE" || "TARGET_ADDRESS" || "TARGET_STATUS", // required Value: "STRING_VALUE", // required }, ], NextToken: "STRING_VALUE", MaxResults: Number("int"),};const command = new ListTargetsCommand(input);const response = await client.send(command);// { // ListTargetsResult// Targets: [ // TargetsBatch// { // TargetSummary// TargetAddress: "STRING_VALUE",// TargetType: "STRING_VALUE",// TargetStatus: "PENDING" || "ACTIVE" || "UNREACHABLE" || "INACTIVE" || "DEACTIVATED",// },// ],// NextToken: "STRING_VALUE",// };
ListTargetsCommandInput
ListTargetsCommandOutput
input
response
config
InvalidNextTokenException (client fault)
The value for the enumeration token used in the request to return the next batch of the results is not valid.
ValidationException (client fault)
One or more parameter values are not valid.
CodestarNotificationsServiceException
Base exception class for all service exceptions from CodestarNotifications service.
Readonly
Static
Returns a list of the notification rule targets for an Amazon Web Services account.
Example
Use a bare-bones client and the command you need to make an API call.
Param
ListTargetsCommandInput
Returns
ListTargetsCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidNextTokenException (client fault)
The value for the enumeration token used in the request to return the next batch of the results is not valid.
Throws
ValidationException (client fault)
One or more parameter values are not valid.
Throws
CodestarNotificationsServiceException
Base exception class for all service exceptions from CodestarNotifications service.