## 子句

```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```