list_targets
(**kwargs)¶Returns a list of the notification rule targets for an Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
response = client.list_targets(
Filters=[
{
'Name': 'TARGET_TYPE'|'TARGET_ADDRESS'|'TARGET_STATUS',
'Value': 'string'
},
],
NextToken='string',
MaxResults=123
)
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.
Information about a filter to apply to the list of returned targets. You can filter by target type, address, or status. For example, to filter results to notification rules that have active Chatbot topics as targets, you could specify a ListTargetsFilter Name as TargetType
and a Value of SNS
, and a Name of TARGET_STATUS
and a Value of ACTIVE
.
The name of the attribute you want to use to filter the returned targets.
The value of the attribute you want to use to filter the returned targets. For example, if you specify SNS
for the Target type, you could specify an Amazon Resource Name (ARN) for a topic as the value.
dict
Response Syntax
{
'Targets': [
{
'TargetAddress': 'string',
'TargetType': 'string',
'TargetStatus': 'PENDING'|'ACTIVE'|'UNREACHABLE'|'INACTIVE'|'DEACTIVATED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Targets (list) --
The list of notification rule targets.
(dict) --
Information about the targets specified for a notification rule.
TargetAddress (string) --
The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client.
TargetType (string) --
The type of the target (for example, SNS
).
SNS
.AWSChatbotSlack
.TargetStatus (string) --
The status of the target.
NextToken (string) --
An enumeration token that can be used in a request to return the next batch of results.
Exceptions
CodeStarNotifications.Client.exceptions.InvalidNextTokenException
CodeStarNotifications.Client.exceptions.ValidationException