@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
).
Modifier and Type | Class and Description |
---|---|
static class |
LinuxSecurityContext.Builder |
SecurityContext.SecurityContextType
EXPLICITLY_SET_FILTER_NAME, EXPLICITLY_SET_PROPERTY_NAME
Constructor and Description |
---|
LinuxSecurityContext(Integer runAsUser,
Integer runAsGroup,
Boolean isNonRootUserCheckEnabled,
Boolean isRootFileSystemReadonly,
ContainerCapabilities capabilities)
Deprecated.
|
Modifier and Type | Method and 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.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated public LinuxSecurityContext(Integer runAsUser, Integer runAsGroup, Boolean isNonRootUserCheckEnabled, Boolean isRootFileSystemReadonly, ContainerCapabilities capabilities)
public static LinuxSecurityContext.Builder builder()
Create a new builder.
public LinuxSecurityContext.Builder toBuilder()
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.
public Integer getRunAsGroup()
The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided.
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.
public Boolean getIsRootFileSystemReadonly()
Determines if the container will have a read-only root file system. Default value is false.
public ContainerCapabilities getCapabilities()
public String toString()
toString
in class SecurityContext
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
toString
in class SecurityContext
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class SecurityContext
public int hashCode()
hashCode
in class SecurityContext
Copyright © 2016–2024. All rights reserved.