kubernetes_asyncio.client.models.v1_network_policy_ingress_rule module

Kubernetes

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

The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech

class kubernetes_asyncio.client.models.v1_network_policy_ingress_rule.V1NetworkPolicyIngressRule(_from=None, ports=None, local_vars_configuration=None)

Bases: object

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

attribute_map = {'_from': 'from', 'ports': 'ports'}
openapi_types = {'_from': 'list[V1NetworkPolicyPeer]', 'ports': 'list[V1NetworkPolicyPort]'}
property ports

Gets the ports of this V1NetworkPolicyIngressRule. # noqa: E501

ports is a list of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. # noqa: E501

Returns:

The ports of this V1NetworkPolicyIngressRule. # noqa: E501

Return type:

list[V1NetworkPolicyPort]

to_dict(serialize=False)

Returns the model properties as a dict

to_str()

Returns the string representation of the model