LinuxContainerInstanceSecurityContext

class oci.container_instances.models.LinuxContainerInstanceSecurityContext(**kwargs)

Bases: ContainerInstanceSecurityContext

Security context for all containers in a container instance.

Attributes:

FS_GROUP_CHANGE_POLICY_ALWAYS

A constant which can be used with the fs_group_change_policy property of a LinuxContainerInstanceSecurityContext.

FS_GROUP_CHANGE_POLICY_ON_ROOT_MISMATCH

A constant which can be used with the fs_group_change_policy property of a LinuxContainerInstanceSecurityContext.

SECURITY_CONTEXT_TYPE_LINUX

A constant which can be used with the security_context_type property of a ContainerInstanceSecurityContext.

fs_group

Gets the fs_group of this LinuxContainerInstanceSecurityContext.

fs_group_change_policy

Gets the fs_group_change_policy of this LinuxContainerInstanceSecurityContext.

security_context_type

Gets the security_context_type of this ContainerInstanceSecurityContext.

Methods:

__init__(**kwargs)

Initializes a new LinuxContainerInstanceSecurityContext object with values from keyword arguments.

get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

FS_GROUP_CHANGE_POLICY_ALWAYS = 'ALWAYS'

A constant which can be used with the fs_group_change_policy property of a LinuxContainerInstanceSecurityContext. This constant has a value of “ALWAYS”

FS_GROUP_CHANGE_POLICY_ON_ROOT_MISMATCH = 'ON_ROOT_MISMATCH'

A constant which can be used with the fs_group_change_policy property of a LinuxContainerInstanceSecurityContext. This constant has a value of “ON_ROOT_MISMATCH”

SECURITY_CONTEXT_TYPE_LINUX = 'LINUX'

A constant which can be used with the security_context_type property of a ContainerInstanceSecurityContext. This constant has a value of “LINUX”

__init__(**kwargs)

Initializes a new LinuxContainerInstanceSecurityContext object with values from keyword arguments. The default value of the security_context_type attribute of this class is LINUX and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • security_context_type (str) – The value to assign to the security_context_type property of this LinuxContainerInstanceSecurityContext. Allowed values for this property are: “LINUX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • fs_group (int) – The value to assign to the fs_group property of this LinuxContainerInstanceSecurityContext.

  • fs_group_change_policy (str) – The value to assign to the fs_group_change_policy property of this LinuxContainerInstanceSecurityContext. Allowed values for this property are: “ALWAYS”, “ON_ROOT_MISMATCH”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

property fs_group

Gets the fs_group of this LinuxContainerInstanceSecurityContext. A special supplemental group that applies to all containers in the container instance. Some volume types allow the container instance to change ownership of the volume. The owning GID will be the fsGroup, the setgid bit will be set (new files will be owned by the fsGroup), and the permission bits are OR’d with rw-rw—-. If unset, the container instance will not modify the ownership and permissions of volumes.

Returns

The fs_group of this LinuxContainerInstanceSecurityContext.

Return type

int

property fs_group_change_policy

Gets the fs_group_change_policy of this LinuxContainerInstanceSecurityContext. Defines behavior of changing ownership and permission of the volume before being exposed inside the containers. This only applies to volumes which support fsGroup ownership and permissions, and will have no effect on ephemeral volumes. ON_ROOT_MISMATCH only changes permissions and ownership if the permission and ownership of the root directory does not match the expected permissions and ownership of the volume. This can improve container instance start times. ALWAYS changes permission and ownership of the volume when it is mounted. If unset, ALWAYS is used.

Allowed values for this property are: “ALWAYS”, “ON_ROOT_MISMATCH”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The fs_group_change_policy of this LinuxContainerInstanceSecurityContext.

Return type

str

static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

property security_context_type

Gets the security_context_type of this ContainerInstanceSecurityContext. The type of security context

Allowed values for this property are: “LINUX”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The security_context_type of this ContainerInstanceSecurityContext.

Return type

str