kubernetes.client.models.v1_service_spec 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.v1_service_spec.V1ServiceSpec(*, allocate_load_balancer_node_ports: Annotated[bool, Strict(strict=True)] | None = None, cluster_ip: Annotated[str, Strict(strict=True)] | None = None, cluster_ips: List[Annotated[str, Strict(strict=True)]] | None = None, external_ips: List[Annotated[str, Strict(strict=True)]] | None = None, external_name: Annotated[str, Strict(strict=True)] | None = None, external_traffic_policy: Annotated[str, Strict(strict=True)] | None = None, health_check_node_port: Annotated[int, Strict(strict=True)] | None = None, internal_traffic_policy: Annotated[str, Strict(strict=True)] | None = None, ip_families: List[Annotated[str, Strict(strict=True)]] | None = None, ip_family_policy: Annotated[str, Strict(strict=True)] | None = None, load_balancer_class: Annotated[str, Strict(strict=True)] | None = None, load_balancer_ip: Annotated[str, Strict(strict=True)] | None = None, load_balancer_source_ranges: List[Annotated[str, Strict(strict=True)]] | None = None, ports: List[V1ServicePort] | None = None, publish_not_ready_addresses: Annotated[bool, Strict(strict=True)] | None = None, selector: Dict[str, Annotated[str, Strict(strict=True)]] | None = None, session_affinity: Annotated[str, Strict(strict=True)] | None = None, session_affinity_config: V1SessionAffinityConfig | None = None, traffic_distribution: Annotated[str, Strict(strict=True)] | None = None, type: Annotated[str, Strict(strict=True)] | None = None)

Bases: BaseModel

ServiceSpec describes the attributes that a user creates on a service.

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.

allocate_load_balancer_node_ports: StrictBool | None
attribute_map: ClassVar[Dict[str, str]] = {'allocate_load_balancer_node_ports': 'allocateLoadBalancerNodePorts', 'cluster_ip': 'clusterIP', 'cluster_ips': 'clusterIPs', 'external_ips': 'externalIPs', 'external_name': 'externalName', 'external_traffic_policy': 'externalTrafficPolicy', 'health_check_node_port': 'healthCheckNodePort', 'internal_traffic_policy': 'internalTrafficPolicy', 'ip_families': 'ipFamilies', 'ip_family_policy': 'ipFamilyPolicy', 'load_balancer_class': 'loadBalancerClass', 'load_balancer_ip': 'loadBalancerIP', 'load_balancer_source_ranges': 'loadBalancerSourceRanges', 'ports': 'ports', 'publish_not_ready_addresses': 'publishNotReadyAddresses', 'selector': 'selector', 'session_affinity': 'sessionAffinity', 'session_affinity_config': 'sessionAffinityConfig', 'traffic_distribution': 'trafficDistribution', 'type': 'type'}
cluster_ip: StrictStr | None
cluster_ips: List[StrictStr] | None
external_ips: List[StrictStr] | None
external_name: StrictStr | None
external_traffic_policy: StrictStr | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1ServiceSpec from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1ServiceSpec from a JSON string

health_check_node_port: StrictInt | None
internal_traffic_policy: StrictStr | None
ip_families: List[StrictStr] | None
ip_family_policy: StrictStr | None
load_balancer_class: StrictStr | None
load_balancer_ip: StrictStr | None
load_balancer_source_ranges: List[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].

openapi_types: ClassVar[Dict[str, str]] = {'allocate_load_balancer_node_ports': 'bool', 'cluster_ip': 'str', 'cluster_ips': 'List[str]', 'external_ips': 'List[str]', 'external_name': 'str', 'external_traffic_policy': 'str', 'health_check_node_port': 'int', 'internal_traffic_policy': 'str', 'ip_families': 'List[str]', 'ip_family_policy': 'str', 'load_balancer_class': 'str', 'load_balancer_ip': 'str', 'load_balancer_source_ranges': 'List[str]', 'ports': 'List[V1ServicePort]', 'publish_not_ready_addresses': 'bool', 'selector': 'Dict[str, str]', 'session_affinity': 'str', 'session_affinity_config': 'V1SessionAffinityConfig', 'traffic_distribution': 'str', 'type': 'str'}
ports: List[V1ServicePort] | None
publish_not_ready_addresses: StrictBool | None
selector: Dict[str, StrictStr] | None
session_affinity: StrictStr | None
session_affinity_config: V1SessionAffinityConfig | 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

traffic_distribution: StrictStr | None
type: StrictStr | None