CodeStarNotifications / Client / list_notification_rules

list_notification_rules#

CodeStarNotifications.Client.list_notification_rules(**kwargs)#

Returns a list of the notification rules for an Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

response = client.list_notification_rules(
    Filters=[
        {
            'Name': 'EVENT_TYPE_ID'|'CREATED_BY'|'RESOURCE'|'TARGET_ADDRESS',
            'Value': 'string'
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters:
  • Filters (list) –

    The filters to use to return information by service or resource type. For valid values, see ListNotificationRulesFilter.

    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.

    • (dict) –

      Information about a filter to apply to the list of returned notification rules. You can filter by event type, owner, resource, or target.

      • Name (string) – [REQUIRED]

        The name of the attribute you want to use to filter the returned notification rules.

      • Value (string) – [REQUIRED]

        The value of the attribute you want to use to filter the returned notification rules. For example, if you specify filtering by RESOURCE in Name, you might specify the ARN of a pipeline in CodePipeline for the value.

  • NextToken (string) – An enumeration token that, when provided in a request, returns the next batch of the results.

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

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'NotificationRules': [
        {
            'Id': 'string',
            'Arn': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • NextToken (string) –

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

    • NotificationRules (list) –

      The list of notification rules for the Amazon Web Services account, by Amazon Resource Name (ARN) and ID.

      • (dict) –

        Information about a specified notification rule.

        • Id (string) –

          The unique ID of the notification rule.

        • Arn (string) –

          The Amazon Resource Name (ARN) of the notification rule.

Exceptions

  • CodeStarNotifications.Client.exceptions.InvalidNextTokenException

  • CodeStarNotifications.Client.exceptions.ValidationException