--- id: write-match-rule title: Write a Match Rule sidebar_label: Match Rule description: Learn how to write a match rule. slug: /help/docs/cse/rules/write-match-rule/ canonical: https://www.sumologic.com/help/docs/cse/rules/write-match-rule/ --- import useBaseUrl from '@docusaurus/useBaseUrl'; import CseRule from '../../reuse/cse-rule-description-links.md'; import CseDynamicSeverity from '../../reuse/cse-dynamic-severity.md'; import Iframe from 'react-iframe';  This topic has information about match rules and how to create them in the Cloud SIEM UI. :::info If you are new to writing rules, see [About Cloud SIEM Rules](/docs/cse/rules/about-cse-rules) for information about rule expressions and other rule options. ::: import TerraformLink from '../../reuse/terraform-link.md'; :::tip You can use Terraform to manage match rules with the [`sumologic_cse_match_rule`](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs/resources/cse_match_rule) resource. ::: ## About match rules A match rule is the simplest type of Cloud SIEM rule. Each time a single record matches the rule expression, a signal is fired.  A match rule doesn’t allow you to define other conditions for signal, like requiring multiple records to match the rule expression, or looking for events of the different types within a timespan. Here’s an example of the rule expression for a match rule: ```sumo metadata_vendor = 'Amazon AWS' AND metadata_product = 'CloudTrail' AND metadata_deviceEventId = 'AwsApiCall-CreateUserPoolClient' ``` This rule fires a signal each time a UserPoolClient, which has permission to call unauthenticated API operations, is created. :::training Micro Lesson Watch this micro lesson to learn how to create a match rule.