Connect / Client / search_rules

search_rules

Connect.Client.search_rules(**kwargs)

Searches rules in an Connect Customer instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

response = client.search_rules(
    InstanceId='string',
    MaxResults=123,
    NextToken='string',
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        }
    },
    SearchFilter={
        'AttributeFilter': {
            'OrConditions': [
                {
                    'TagConditions': [
                        {
                            'TagKey': 'string',
                            'TagValue': 'string'
                        },
                    ]
                },
            ],
            'AndCondition': {
                'TagConditions': [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ]
            },
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    }
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

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

  • 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.

  • SearchCriteria (dict) –

    The search criteria to be used to return rules.

    • OrConditions (list) –

      A list of conditions which would be applied together with an OR condition.

      • (dict) –

        The search criteria to be used to return rules.

    • AndConditions (list) –

      A list of conditions which would be applied together with an AND condition.

      • (dict) –

        The search criteria to be used to return rules.

    • StringCondition (dict) –

      A leaf node condition which can be used to specify a string condition.

      Note

      The currently supported values for FieldName are Name, PublishStatus, EventSourceName, RuleId, IntegrationAssociationId, ActionSummaries, and RuleCapabilityTiers.

      • FieldName (string) –

        The name of the field in the string condition.

      • Value (string) –

        The value of the string.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the string condition.

  • SearchFilter (dict) –

    Filters to be applied to search results, such as tag-based filters.

    • AttributeFilter (dict) –

      An object that can be used to specify tag conditions inside the SearchFilter.

      • OrConditions (list) –

        A list of conditions which would be applied together with an OR condition.

        • (dict) –

          A list of conditions which would be applied together with an AND condition.

          • TagConditions (list) –

            A list of tag conditions that need to be applied with AND condition.

            • (dict) –

              A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

              • TagKey (string) –

                The tag key in the tag condition.

              • TagValue (string) –

                The tag value in the tag condition.

      • AndCondition (dict) –

        A list of conditions which would be applied together with an AND condition.

        • TagConditions (list) –

          A list of tag conditions that need to be applied with AND condition.

          • (dict) –

            A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

            • TagKey (string) –

              The tag key in the tag condition.

            • TagValue (string) –

              The tag value in the tag condition.

      • TagCondition (dict) –

        A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

        • TagKey (string) –

          The tag key in the tag condition.

        • TagValue (string) –

          The tag value in the tag condition.

Return type:

dict

Returns:

Response Syntax

{
    'Rules': [
        {
            'Name': 'string',
            'RuleId': 'string',
            'RuleArn': 'string',
            'TriggerEventSource': {
                'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnEmailAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate'|'OnCaseCreate'|'OnCaseUpdate'|'OnSlaBreach'|'OnAlertUpdate'|'OnSchedulePublish'|'OnScheduleUpdate'|'OnScheduleTimeOffRequestActivity',
                'IntegrationAssociationId': 'string'
            },
            'ActionSummaries': [
                {
                    'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'|'CREATE_CASE'|'UPDATE_CASE'|'ASSIGN_SLA'|'END_ASSOCIATED_TASKS'|'SUBMIT_AUTO_EVALUATION'
                },
            ],
            'RuleCapabilityTiers': [
                'GenerativeAI',
            ],
            'PublishStatus': 'DRAFT'|'PUBLISHED',
            'CreatedTime': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'LastUpdatedBy': 'string',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'ApproximateTotalCount': 123,
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Rules (list) –

      Information about the rules.

      • (dict) –

        A summary of information about a rule, returned as part of the response to a SearchRules operation.

        • 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.

        • TriggerEventSource (dict) –

          The event source to trigger the rule.

          • EventSourceName (string) –

            The name of the event source.

          • IntegrationAssociationId (string) –

            The identifier for the integration association.

        • ActionSummaries (list) –

          A list of ActionTypes associated with a rule.

          • (dict) –

            Information about an action.

            • ActionType (string) –

              The action type.

        • RuleCapabilityTiers (list) –

          The list of capability tiers associated with the rule. Used for categorizing rules by capability (for example, GenerativeAI).

          • (string) –

        • PublishStatus (string) –

          The publish status of the rule.

        • CreatedTime (datetime) –

          The timestamp for when the rule was created.

        • LastUpdatedTime (datetime) –

          The timestamp for when the rule was last updated.

        • LastUpdatedBy (string) –

          The Amazon Resource Name (ARN) of the user who last updated the rule.

        • Tags (dict) –

          The tags used to organize, track, or control access for this resource. For example, { “Tags”: {“key1”:”value1”, “key2”:”value2”} }.

          • (string) –

            • (string) –

    • ApproximateTotalCount (integer) –

      The total number of rules which matched your search query.

    • NextToken (string) –

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

Exceptions