## 子句

```matchExpression:
- and:
- key: properties.powerState
operator: eq
value: ON
- key: syncStatus
operator: notEq
value: MISSING```

```matchExpression:
- or:
- key: properties.powerState
operator: eq
value: ON
- key: properties.powerState
operator: eq
value: OFF
```

## 運算子

eq 等於。尋找完全相符項。

```matchExpression:
- and:
- key: properties.powerState
operator: eq
value: ON```
notEq 不等於。避免完全相符項。

```matchExpression:
- and:
- key: properties.powerState
operator: notEq
value: OFF```
hasAny 在物件集合中尋找相符項。

```matchExpression:
- key: storage.disks
operator: hasAny
value:
matchExpression:
- and:
- key: iops
operator: eq
value: 100
- key: service
operator: eq
value: ebs```
in 在一組值中尋找相符項。

```matchExpression:
- and:
- key: properties.powerState
operator: in
value: OFF, SUSPEND```
notIn 避免與一組值相符。

```matchExpression:
- and:
- key: properties.powerState
operator: notIn
value: OFF, SUSPEND```
greaterThan 尋找高於指定臨界值的相符項。僅適用於數值。

```matchExpression:
- and:
- key: storage.disks[0].iops
operator: greaterThan
value: 50```
lessThan 尋找低於指定臨界值的相符項。僅適用於數值。

```matchExpression:
- and:
- key: storage.disks[0].iops
operator: lessThan
value: 200```
greaterThanEquals 尋找等於或高於指定臨界值的相符項。僅適用於數值。

```matchExpression:
- and:
- key: storage.disks[0].iops
operator: greaterThanEquals
value: 100```
lessThanEquals 尋找等於或低於指定臨界值的相符項。僅適用於數值。

```matchExpression:
- and:
- key: storage.disks[0].iops
operator: lessThanEquals
value: 100```
matchesRegex 使用規則運算式尋找相符項。

```matchExpression:
- and:
- key: properties.zone
operator: matchesRegex
value: (us-east-1)+(a|c){1,2}```

## 範例

```matchExpression:
- key: properties.tags
operator: hasAny
value:
matchExpression:
- and:
- key: key
operator: eq
value: key1
- key: value
operator: eq
value: value1```

```matchExpression:
- or:
- key: properties.tags
operator: hasAny
value:
matchExpression:
- and:
- key: key
operator: eq
value: key1
- key: value
operator: eq
value: value1
- key: properties.tags
operator: hasAny
value:
matchExpression:
- and:
- key: key
operator: eq
value: key2
- key: value
operator: eq
value: value2```