Class LinuxSecurityContext
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.containerinstances.model.SecurityContext
-
- com.oracle.bmc.containerinstances.model.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 theLinuxSecurityContext.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 theLinuxSecurityContext.Builder
, which maintain a set of all explicitly set fields calledLinuxSecurityContext.Builder.__explicitlySet__
. ThehashCode()
andequals(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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinuxSecurityContext.Builder
-
Nested classes/interfaces inherited from class com.oracle.bmc.containerinstances.model.SecurityContext
SecurityContext.SecurityContextType
-
-
Constructor Summary
Constructors Constructor Description LinuxSecurityContext(Integer runAsUser, Integer runAsGroup, Boolean isNonRootUserCheckEnabled, Boolean isRootFileSystemReadonly, ContainerCapabilities capabilities)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LinuxSecurityContext.Builder
builder()
Create a new builder.boolean
equals(Object o)
ContainerCapabilities
getCapabilities()
Boolean
getIsNonRootUserCheckEnabled()
Indicates if the container must run as a non-root user.Boolean
getIsRootFileSystemReadonly()
Determines if the container will have a read-only root file system.Integer
getRunAsGroup()
The group ID (GID) to run the entrypoint process of the container.Integer
getRunAsUser()
The user ID (UID) to run the entrypoint process of the container.int
hashCode()
LinuxSecurityContext.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
LinuxSecurityContext
@Deprecated public LinuxSecurityContext(Integer runAsUser, Integer runAsGroup, Boolean isNonRootUserCheckEnabled, Boolean isRootFileSystemReadonly, ContainerCapabilities capabilities)
Deprecated.
-
-
Method Detail
-
builder
public static LinuxSecurityContext.Builder builder()
Create a new builder.
-
toBuilder
public LinuxSecurityContext.Builder toBuilder()
-
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
-
getCapabilities
public ContainerCapabilities getCapabilities()
-
toString
public String toString()
- Overrides:
toString
in classSecurityContext
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.- Overrides:
toString
in classSecurityContext
- Parameters:
includeByteArrayContents
- true to include the full contents of byte arrays- Returns:
- string representation
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classSecurityContext
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSecurityContext
-
-