CreateLinuxSecurityContextDetails

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

Bases: CreateSecurityContextDetails

Security context for Linux container.

Methods:

__init__(**kwargs)

Initializes a new CreateLinuxSecurityContextDetails 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.

Attributes:

capabilities

Gets the capabilities of this CreateLinuxSecurityContextDetails.

is_non_root_user_check_enabled

Gets the is_non_root_user_check_enabled of this CreateLinuxSecurityContextDetails.

is_root_file_system_readonly

Gets the is_root_file_system_readonly of this CreateLinuxSecurityContextDetails.

run_as_group

Gets the run_as_group of this CreateLinuxSecurityContextDetails.

run_as_user

Gets the run_as_user of this CreateLinuxSecurityContextDetails.

security_context_type

Gets the security_context_type of this CreateSecurityContextDetails.

__init__(**kwargs)

Initializes a new CreateLinuxSecurityContextDetails 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 CreateLinuxSecurityContextDetails.

  • run_as_user (int) – The value to assign to the run_as_user property of this CreateLinuxSecurityContextDetails.

  • run_as_group (int) – The value to assign to the run_as_group property of this CreateLinuxSecurityContextDetails.

  • is_non_root_user_check_enabled (bool) – The value to assign to the is_non_root_user_check_enabled property of this CreateLinuxSecurityContextDetails.

  • is_root_file_system_readonly (bool) – The value to assign to the is_root_file_system_readonly property of this CreateLinuxSecurityContextDetails.

  • capabilities (oci.container_instances.models.ContainerCapabilities) – The value to assign to the capabilities property of this CreateLinuxSecurityContextDetails.

property capabilities

Gets the capabilities of this CreateLinuxSecurityContextDetails.

Returns

The capabilities of this CreateLinuxSecurityContextDetails.

Return type

oci.container_instances.models.ContainerCapabilities

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 is_non_root_user_check_enabled

Gets the is_non_root_user_check_enabled of this CreateLinuxSecurityContextDetails. Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails.

Returns

The is_non_root_user_check_enabled of this CreateLinuxSecurityContextDetails.

Return type

bool

property is_root_file_system_readonly

Gets the is_root_file_system_readonly of this CreateLinuxSecurityContextDetails. Determines if the container will have a read-only root file system. Default value is false.

Returns

The is_root_file_system_readonly of this CreateLinuxSecurityContextDetails.

Return type

bool

property run_as_group

Gets the run_as_group of this CreateLinuxSecurityContextDetails. The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided.

Returns

The run_as_group of this CreateLinuxSecurityContextDetails.

Return type

int

property run_as_user

Gets the run_as_user of this CreateLinuxSecurityContextDetails. The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided.

Returns

The run_as_user of this CreateLinuxSecurityContextDetails.

Return type

int

property security_context_type

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

Returns

The security_context_type of this CreateSecurityContextDetails.

Return type

str