Connect / Client / list_rules

list_rules#

Connect.Client.list_rules(**kwargs)#

List all rules for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

response = client.list_rules(
    InstanceId='string',
    PublishStatus='DRAFT'|'PUBLISHED',
    EventSourceName='OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate',
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • PublishStatus (string) – The publish status of the rule.

  • EventSourceName (string) – The name of the event source.

  • MaxResults (integer) – The maximum number of results to return per page.

  • NextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Return type:

dict

Returns:

Response Syntax

{
    'RuleSummaryList': [
        {
            'Name': 'string',
            'RuleId': 'string',
            'RuleArn': 'string',
            'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate',
            'PublishStatus': 'DRAFT'|'PUBLISHED',
            'ActionSummaries': [
                {
                    'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'
                },
            ],
            'CreatedTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • RuleSummaryList (list) –

      Summary information about a rule.

      • (dict) –

        A list of ActionTypes associated with a rule.

        • Name (string) –

          The name of the rule.

        • RuleId (string) –

          A unique identifier for the rule.

        • RuleArn (string) –

          The Amazon Resource Name (ARN) of the rule.

        • EventSourceName (string) –

          The name of the event source.

        • PublishStatus (string) –

          The publish status of the rule.

        • ActionSummaries (list) –

          A list of ActionTypes associated with a rule.

          • (dict) –

            Information about an action.

            • ActionType (string) –

              The action type.

        • CreatedTime (datetime) –

          The timestamp for when the rule was created.

        • LastUpdatedTime (datetime) –

          The timestamp for when the rule was last updated.

    • NextToken (string) –

      If there are additional results, this is the token for the next set of results.

Exceptions

  • Connect.Client.exceptions.InvalidRequestException

  • Connect.Client.exceptions.InternalServiceException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.AccessDeniedException

  • Connect.Client.exceptions.ResourceNotFoundException