Skip to content

Commit c68971c

Browse files
committed
add more operations
1 parent 12d861e commit c68971c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

localstack-core/localstack/services/events/resource_providers/aws_events_rule.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,17 @@ class Target(TypedDict):
167167

168168
REPEATED_INVOCATION = "repeated_invocation"
169169

170+
MATCHING_OPERATIONS = [
171+
"prefix",
172+
"cidr",
173+
"exists",
174+
"suffix",
175+
"anything-but",
176+
"numeric",
177+
"equals-ignore-case",
178+
"wildcard",
179+
]
180+
170181

171182
def extract_rule_name(rule_id: str) -> str:
172183
return rule_id.rsplit("|", maxsplit=1)[-1]
@@ -229,12 +240,7 @@ def create(
229240
def wrap_in_lists(o, **kwargs):
230241
if isinstance(o, dict):
231242
for k, v in o.items():
232-
if not isinstance(v, (dict, list)) and k not in [
233-
"prefix",
234-
"cidr",
235-
"exists",
236-
"suffix",
237-
]:
243+
if not isinstance(v, (dict, list)) and k not in MATCHING_OPERATIONS:
238244
o[k] = [v]
239245
return o
240246

0 commit comments

Comments
 (0)