ListTargets - AWS CodeStar Notifications

ListTargets

Returns a list of the notification rule targets for an AWS account.

Request Syntax

POST /listTargets HTTP/1.1 Content-type: application/json { "Filters": [ { "Name": "string", "Value": "string" } ], "MaxResults": number, "NextToken": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Filters

The filters to use to return information by service or resource type. Valid filters include target type, target address, and target status.

Note

A filter with the same name can appear more than once when used with OR statements. Filters with different names should be applied with AND statements.

Type: Array of ListTargetsFilter objects

Required: No

MaxResults

A non-negative integer used to limit the number of returned results. The maximum number of results that can be returned is 100.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NextToken

An enumeration token that, when provided in a request, returns the next batch of the results.

Type: String

Pattern: ^[\w/+=]+$

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "NextToken": "string", "Targets": [ { "TargetAddress": "string", "TargetStatus": "string", "TargetType": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextToken

An enumeration token that can be used in a request to return the next batch of results.

Type: String

Pattern: ^[\w/+=]+$

Targets

The list of notification rule targets.

Type: Array of TargetSummary objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidNextTokenException

The value for the enumeration token used in the request to return the next batch of the results is not valid.

HTTP Status Code: 400

ValidationException

One or more parameter values are not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: