SecurityContextProperty Struct
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const securityContextProperty: batch.CfnJobDefinition.SecurityContextProperty = {
allowPrivilegeEscalation: false,
capabilities: {
add: ['add'],
drop: ['drop'],
},
privileged: false,
readOnlyRootFilesystem: false,
runAsGroup: 123,
runAsNonRoot: false,
runAsUser: 123,
seccompProfile: {
type: 'type',
// the properties below are optional
localhostProfile: 'localhostProfile',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_batch as batch
security_context_property = batch.CfnJobDefinition.SecurityContextProperty(
allow_privilege_escalation=False,
capabilities=batch.CfnJobDefinition.EksContainerLinuxCapabilitiesProperty(
add=["add"],
drop=["drop"]
),
privileged=False,
read_only_root_filesystem=False,
run_as_group=123,
run_as_non_root=False,
run_as_user=123,
seccomp_profile=batch.CfnJobDefinition.EksSeccompProfileProperty(
type="type",
# the properties below are optional
localhost_profile="localhostProfile"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;
SecurityContextProperty securityContextProperty = SecurityContextProperty.builder()
.allowPrivilegeEscalation(false)
.capabilities(EksContainerLinuxCapabilitiesProperty.builder()
.add(List.of("add"))
.drop(List.of("drop"))
.build())
.privileged(false)
.readOnlyRootFilesystem(false)
.runAsGroup(123)
.runAsNonRoot(false)
.runAsUser(123)
.seccompProfile(EksSeccompProfileProperty.builder()
.type("type")
// the properties below are optional
.localhostProfile("localhostProfile")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Batch;
var securityContextProperty = new SecurityContextProperty {
AllowPrivilegeEscalation = false,
Capabilities = new EksContainerLinuxCapabilitiesProperty {
Add = new [] { "add" },
Drop = new [] { "drop" }
},
Privileged = false,
ReadOnlyRootFilesystem = false,
RunAsGroup = 123,
RunAsNonRoot = false,
RunAsUser = 123,
SeccompProfile = new EksSeccompProfileProperty {
Type = "type",
// the properties below are optional
LocalhostProfile = "localhostProfile"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
securityContextProperty := &SecurityContextProperty{
AllowPrivilegeEscalation: jsii.Boolean(false),
Capabilities: &EksContainerLinuxCapabilitiesProperty{
Add: []*string{
jsii.String("add"),
},
Drop: []*string{
jsii.String("drop"),
},
},
Privileged: jsii.Boolean(false),
ReadOnlyRootFilesystem: jsii.Boolean(false),
RunAsGroup: jsii.Number(123),
RunAsNonRoot: jsii.Boolean(false),
RunAsUser: jsii.Number(123),
SeccompProfile: &EksSeccompProfileProperty{
Type: jsii.String("type"),
// the properties below are optional
LocalhostProfile: jsii.String("localhostProfile"),
},
}
Properties
allowPrivilegeEscalationoptionalboolean | IResolvableallow_privilege_escalationoptionaltyping.Union[bool, IResolvable]allowPrivilegeEscalationoptionalBooleanAllowPrivilegeEscalationoptionalboolAllowPrivilegeEscalationoptionalinterface{}#capabilitiesoptionalIResolvable | CfnJobDefinition.EksContainerLinuxCapabilitiesPropertycapabilitiesoptionaltyping.Union[IResolvable, EksContainerLinuxCapabilitiesProperty]capabilitiesoptionalIResolvableCapabilitiesoptionalIResolvableCapabilitiesoptionalinterface{}#privilegedoptionalboolean | IResolvableprivilegedoptionaltyping.Union[bool, IResolvable]privilegedoptionalBooleanPrivilegedoptionalboolPrivilegedoptionalinterface{}#readOnlyRootFilesystemoptionalboolean | IResolvableread_only_root_filesystemoptionaltyping.Union[bool, IResolvable]readOnlyRootFilesystemoptionalBooleanReadOnlyRootFilesystemoptionalboolReadOnlyRootFilesystemoptionalinterface{}#runAsGroupoptionalnumberrun_as_groupoptionalint | floatrunAsGroupoptionalNumberRunAsGroupoptionaldoubleRunAsGroupoptional*float64#runAsNonRootoptionalboolean | IResolvablerun_as_non_rootoptionaltyping.Union[bool, IResolvable]runAsNonRootoptionalBooleanRunAsNonRootoptionalboolRunAsNonRootoptionalinterface{}#runAsUseroptionalnumberrun_as_useroptionalint | floatrunAsUseroptionalNumberRunAsUseroptionaldoubleRunAsUseroptional*float64#seccompProfileoptionalIResolvable | CfnJobDefinition.EksSeccompProfilePropertyseccomp_profileoptionaltyping.Union[IResolvable, EksSeccompProfileProperty]seccompProfileoptionalIResolvableSeccompProfileoptionalIResolvableSeccompProfileoptionalinterface{}#