# SecurityContextProperty

- Source: Generated code
- Type last changed: v2.277.0 · 13 Nov 2026

## 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',
  },
};
```

## Properties

- `allowPrivilegeEscalation`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `capabilities`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnJobDefinition.EksContainerLinuxCapabilitiesProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksContainerLinuxCapabilitiesProperty.html)

- `privileged`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `readOnlyRootFilesystem`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `runAsGroup`: number

- `runAsNonRoot`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html)

- `runAsUser`: number

- `seccompProfile`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnJobDefinition.EksSeccompProfileProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_batch.CfnJobDefinition.EksSeccompProfileProperty.html)
