kubernetes.client.models.v1beta1_match_resources module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1beta1_match_resources.V1beta1MatchResources(*, exclude_resource_rules: List[V1beta1NamedRuleWithOperations] | None = None, match_policy: Annotated[str, Strict(strict=True)] | None = None, namespace_selector: V1LabelSelector | None = None, object_selector: V1LabelSelector | None = None, resource_rules: List[V1beta1NamedRuleWithOperations] | None = None)

Bases: BaseModel

MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

attribute_map: ClassVar[Dict[str, str]] = {'exclude_resource_rules': 'excludeResourceRules', 'match_policy': 'matchPolicy', 'namespace_selector': 'namespaceSelector', 'object_selector': 'objectSelector', 'resource_rules': 'resourceRules'}
exclude_resource_rules: List[V1beta1NamedRuleWithOperations] | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1beta1MatchResources from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1beta1MatchResources from a JSON string

match_policy: StrictStr | None
model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

namespace_selector: V1LabelSelector | None
object_selector: V1LabelSelector | None
openapi_types: ClassVar[Dict[str, str]] = {'exclude_resource_rules': 'List[V1beta1NamedRuleWithOperations]', 'match_policy': 'str', 'namespace_selector': 'V1LabelSelector', 'object_selector': 'V1LabelSelector', 'resource_rules': 'List[V1beta1NamedRuleWithOperations]'}
resource_rules: List[V1beta1NamedRuleWithOperations] | None
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model