Class LinuxSecurityContext


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20210415")
    public final class LinuxSecurityContext
    extends SecurityContext
    Security context for Linux container.
    Note: Objects should always be created or deserialized using the LinuxSecurityContext.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the LinuxSecurityContext.Builder, which maintain a set of all explicitly set fields called LinuxSecurityContext.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
    • Method Detail

      • getRunAsUser

        public Integer getRunAsUser()
        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 value
      • getRunAsGroup

        public Integer getRunAsGroup()
        The group ID (GID) to run the entrypoint process of the container.

        Uses runtime default if not provided.

        Returns:
        the value
      • getIsNonRootUserCheckEnabled

        public Boolean getIsNonRootUserCheckEnabled()
        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 value
      • getIsRootFileSystemReadonly

        public Boolean getIsRootFileSystemReadonly()
        Determines if the container will have a read-only root file system.

        Default value is false.

        Returns:
        the value
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Overrides:
        toString in class SecurityContext
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation