你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

LabelSelectorExpression Class

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

Constructor

LabelSelectorExpression(*args: Any, **kwargs: Any)

Variables

Name Description
key
str

key is a string of 63 characters or less, and must consist of alphanumeric characters, '-', '_' or '.'.

operator

operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. Known values are: "In", "NotIn", "Exists", and "DoesNotExist".

values_property

values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.

Attributes

key

key is a string of 63 characters or less, and must consist of alphanumeric characters, '-', '_' or '.'.

key: str | None

operator

operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. Known values are: "In", "NotIn", "Exists", and "DoesNotExist".

operator: str | _models.LabelSelectorOperator | None

values_property

values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.

values_property: list[str] | None