Struct aws_sdk_batch::types::EksContainerSecurityContext
source · #[non_exhaustive]pub struct EksContainerSecurityContext {
pub run_as_user: Option<i64>,
pub run_as_group: Option<i64>,
pub privileged: Option<bool>,
pub allow_privilege_escalation: Option<bool>,
pub read_only_root_filesystem: Option<bool>,
pub run_as_non_root: Option<bool>,
}
Expand description
The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.run_as_user: Option<i64>
When this parameter is specified, the container is run as the specified user ID (uid
). If this parameter isn't specified, the default is the user that's specified in the image metadata. This parameter maps to RunAsUser
and MustRanAs
policy in the Users and groups pod security policies in the Kubernetes documentation.
run_as_group: Option<i64>
When this parameter is specified, the container is run as the specified group ID (gid
). If this parameter isn't specified, the default is the group that's specified in the image metadata. This parameter maps to RunAsGroup
and MustRunAs
policy in the Users and groups pod security policies in the Kubernetes documentation.
privileged: Option<bool>
When this parameter is true
, the container is given elevated permissions on the host container instance. The level of permissions are similar to the root
user permissions. The default value is false
. This parameter maps to privileged
policy in the Privileged pod security policies in the Kubernetes documentation.
allow_privilege_escalation: Option<bool>
Whether or not a container or a Kubernetes pod is allowed to gain more privileges than its parent process. The default value is false
.
read_only_root_filesystem: Option<bool>
When this parameter is true
, the container is given read-only access to its root file system. The default value is false
. This parameter maps to ReadOnlyRootFilesystem
policy in the Volumes and file systems pod security policies in the Kubernetes documentation.
run_as_non_root: Option<bool>
When this parameter is specified, the container is run as a user with a uid
other than 0. If this parameter isn't specified, so such rule is enforced. This parameter maps to RunAsUser
and MustRunAsNonRoot
policy in the Users and groups pod security policies in the Kubernetes documentation.
Implementations§
source§impl EksContainerSecurityContext
impl EksContainerSecurityContext
sourcepub fn run_as_user(&self) -> Option<i64>
pub fn run_as_user(&self) -> Option<i64>
When this parameter is specified, the container is run as the specified user ID (uid
). If this parameter isn't specified, the default is the user that's specified in the image metadata. This parameter maps to RunAsUser
and MustRanAs
policy in the Users and groups pod security policies in the Kubernetes documentation.
sourcepub fn run_as_group(&self) -> Option<i64>
pub fn run_as_group(&self) -> Option<i64>
When this parameter is specified, the container is run as the specified group ID (gid
). If this parameter isn't specified, the default is the group that's specified in the image metadata. This parameter maps to RunAsGroup
and MustRunAs
policy in the Users and groups pod security policies in the Kubernetes documentation.
sourcepub fn privileged(&self) -> Option<bool>
pub fn privileged(&self) -> Option<bool>
When this parameter is true
, the container is given elevated permissions on the host container instance. The level of permissions are similar to the root
user permissions. The default value is false
. This parameter maps to privileged
policy in the Privileged pod security policies in the Kubernetes documentation.
sourcepub fn allow_privilege_escalation(&self) -> Option<bool>
pub fn allow_privilege_escalation(&self) -> Option<bool>
Whether or not a container or a Kubernetes pod is allowed to gain more privileges than its parent process. The default value is false
.
sourcepub fn read_only_root_filesystem(&self) -> Option<bool>
pub fn read_only_root_filesystem(&self) -> Option<bool>
When this parameter is true
, the container is given read-only access to its root file system. The default value is false
. This parameter maps to ReadOnlyRootFilesystem
policy in the Volumes and file systems pod security policies in the Kubernetes documentation.
sourcepub fn run_as_non_root(&self) -> Option<bool>
pub fn run_as_non_root(&self) -> Option<bool>
When this parameter is specified, the container is run as a user with a uid
other than 0. If this parameter isn't specified, so such rule is enforced. This parameter maps to RunAsUser
and MustRunAsNonRoot
policy in the Users and groups pod security policies in the Kubernetes documentation.
source§impl EksContainerSecurityContext
impl EksContainerSecurityContext
sourcepub fn builder() -> EksContainerSecurityContextBuilder
pub fn builder() -> EksContainerSecurityContextBuilder
Creates a new builder-style object to manufacture EksContainerSecurityContext
.
Trait Implementations§
source§impl Clone for EksContainerSecurityContext
impl Clone for EksContainerSecurityContext
source§fn clone(&self) -> EksContainerSecurityContext
fn clone(&self) -> EksContainerSecurityContext
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EksContainerSecurityContext
impl Debug for EksContainerSecurityContext
source§impl PartialEq for EksContainerSecurityContext
impl PartialEq for EksContainerSecurityContext
source§fn eq(&self, other: &EksContainerSecurityContext) -> bool
fn eq(&self, other: &EksContainerSecurityContext) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for EksContainerSecurityContext
Auto Trait Implementations§
impl Freeze for EksContainerSecurityContext
impl RefUnwindSafe for EksContainerSecurityContext
impl Send for EksContainerSecurityContext
impl Sync for EksContainerSecurityContext
impl Unpin for EksContainerSecurityContext
impl UnwindSafe for EksContainerSecurityContext
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more