SecurityContextDefinition Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. SecurityContextDefinition
- com.
Implements
public final class SecurityContextDefinition
implements JsonSerializable<SecurityContextDefinition>
The security context for the container.
Constructor Summary
Constructor | Description |
---|---|
SecurityContextDefinition() |
Creates an instance of Security |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
allowPrivilegeEscalation()
Get the allow |
Security |
capabilities()
Get the capabilities property: The capabilities to add or drop from a container. |
static
Security |
fromJson(JsonReader jsonReader)
Reads an instance of Security |
Boolean |
privileged()
Get the privileged property: The flag to determine if the container permissions is elevated to Privileged. |
Integer |
runAsGroup()
Get the run |
Integer |
runAsUser()
Get the run |
String |
seccompProfile()
Get the seccomp |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Security |
withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation)
Set the allow |
Security |
withCapabilities(SecurityContextCapabilitiesDefinition capabilities)
Set the capabilities property: The capabilities to add or drop from a container. |
Security |
withPrivileged(Boolean privileged)
Set the privileged property: The flag to determine if the container permissions is elevated to Privileged. |
Security |
withRunAsGroup(Integer runAsGroup)
Set the run |
Security |
withRunAsUser(Integer runAsUser)
Set the run |
Security |
withSeccompProfile(String seccompProfile)
Set the seccomp |
Methods inherited from java.lang.Object
Constructor Details
SecurityContextDefinition
public SecurityContextDefinition()
Creates an instance of SecurityContextDefinition class.
Method Details
allowPrivilegeEscalation
public Boolean allowPrivilegeEscalation()
Get the allowPrivilegeEscalation property: A boolean value indicating whether the init process can elevate its privileges.
Returns:
capabilities
public SecurityContextCapabilitiesDefinition capabilities()
Get the capabilities property: The capabilities to add or drop from a container.
Returns:
fromJson
public static SecurityContextDefinition fromJson(JsonReader jsonReader)
Reads an instance of SecurityContextDefinition from the JsonReader.
Parameters:
Returns:
Throws:
privileged
public Boolean privileged()
Get the privileged property: The flag to determine if the container permissions is elevated to Privileged.
Returns:
runAsGroup
public Integer runAsGroup()
Get the runAsGroup property: Sets the User GID for the container.
Returns:
runAsUser
public Integer runAsUser()
Get the runAsUser property: Sets the User UID for the container.
Returns:
seccompProfile
public String seccompProfile()
Get the seccompProfile property: a base64 encoded string containing the contents of the JSON in the seccomp profile.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAllowPrivilegeEscalation
public SecurityContextDefinition withAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation)
Set the allowPrivilegeEscalation property: A boolean value indicating whether the init process can elevate its privileges.
Parameters:
Returns:
withCapabilities
public SecurityContextDefinition withCapabilities(SecurityContextCapabilitiesDefinition capabilities)
Set the capabilities property: The capabilities to add or drop from a container.
Parameters:
Returns:
withPrivileged
public SecurityContextDefinition withPrivileged(Boolean privileged)
Set the privileged property: The flag to determine if the container permissions is elevated to Privileged.
Parameters:
Returns:
withRunAsGroup
public SecurityContextDefinition withRunAsGroup(Integer runAsGroup)
Set the runAsGroup property: Sets the User GID for the container.
Parameters:
Returns:
withRunAsUser
public SecurityContextDefinition withRunAsUser(Integer runAsUser)
Set the runAsUser property: Sets the User UID for the container.
Parameters:
Returns:
withSeccompProfile
public SecurityContextDefinition withSeccompProfile(String seccompProfile)
Set the seccompProfile property: a base64 encoded string containing the contents of the JSON in the seccomp profile.
Parameters:
Returns:
Applies to
Azure SDK for Java