kubernetes.client.models.v1_security_context 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_security_context.V1SecurityContext(*, allow_privilege_escalation: Annotated[bool, Strict(strict=True)] | None = None, app_armor_profile: V1AppArmorProfile | None = None, capabilities: V1Capabilities | None = None, privileged: Annotated[bool, Strict(strict=True)] | None = None, proc_mount: Annotated[str, Strict(strict=True)] | None = None, read_only_root_filesystem: Annotated[bool, Strict(strict=True)] | None = None, run_as_group: Annotated[int, Strict(strict=True)] | None = None, run_as_non_root: Annotated[bool, Strict(strict=True)] | None = None, run_as_user: Annotated[int, Strict(strict=True)] | None = None, se_linux_options: V1SELinuxOptions | None = None, seccomp_profile: V1SeccompProfile | None = None, windows_options: V1WindowsSecurityContextOptions | None = None)

Bases: BaseModel

SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.

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.

allow_privilege_escalation: StrictBool | None
app_armor_profile: V1AppArmorProfile | None
attribute_map: ClassVar[Dict[str, str]] = {'allow_privilege_escalation': 'allowPrivilegeEscalation', 'app_armor_profile': 'appArmorProfile', 'capabilities': 'capabilities', 'privileged': 'privileged', 'proc_mount': 'procMount', 'read_only_root_filesystem': 'readOnlyRootFilesystem', 'run_as_group': 'runAsGroup', 'run_as_non_root': 'runAsNonRoot', 'run_as_user': 'runAsUser', 'se_linux_options': 'seLinuxOptions', 'seccomp_profile': 'seccompProfile', 'windows_options': 'windowsOptions'}
capabilities: V1Capabilities | None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1SecurityContext from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1SecurityContext from a JSON string

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]] = {'allow_privilege_escalation': 'bool', 'app_armor_profile': 'V1AppArmorProfile', 'capabilities': 'V1Capabilities', 'privileged': 'bool', 'proc_mount': 'str', 'read_only_root_filesystem': 'bool', 'run_as_group': 'int', 'run_as_non_root': 'bool', 'run_as_user': 'int', 'se_linux_options': 'V1SELinuxOptions', 'seccomp_profile': 'V1SeccompProfile', 'windows_options': 'V1WindowsSecurityContextOptions'}
privileged: StrictBool | None
proc_mount: StrictStr | None
read_only_root_filesystem: StrictBool | None
run_as_group: StrictInt | None
run_as_non_root: StrictBool | None
run_as_user: StrictInt | None
se_linux_options: V1SELinuxOptions | None
seccomp_profile: V1SeccompProfile | 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

windows_options: V1WindowsSecurityContextOptions | None