# EksPodSecurityContextProperty

Struct · External

- Source: Generated at build time
- Type last changed: v2.277.0 · 13 Nov 2026

## Example

TypeScript:

```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 eksPodSecurityContextProperty: batch.CfnJobDefinition.EksPodSecurityContextProperty = {
  fsGroup: 123,
  runAsGroup: 123,
  runAsNonRoot: false,
  runAsUser: 123,
  seccompProfile: {
    type: 'type',

    // the properties below are optional
    localhostProfile: 'localhostProfile',
  },
};
```

Python:

```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

eks_pod_security_context_property = batch.CfnJobDefinition.EksPodSecurityContextProperty(
    fs_group=123,
    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:

```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.*;

EksPodSecurityContextProperty eksPodSecurityContextProperty = EksPodSecurityContextProperty.builder()
        .fsGroup(123)
        .runAsGroup(123)
        .runAsNonRoot(false)
        .runAsUser(123)
        .seccompProfile(EksSeccompProfileProperty.builder()
                .type("type")

                // the properties below are optional
                .localhostProfile("localhostProfile")
                .build())
        .build();
```

C#:

```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 eksPodSecurityContextProperty = new EksPodSecurityContextProperty {
    FsGroup = 123,
    RunAsGroup = 123,
    RunAsNonRoot = false,
    RunAsUser = 123,
    SeccompProfile = new EksSeccompProfileProperty {
        Type = "type",

        // the properties below are optional
        LocalhostProfile = "localhostProfile"
    }
};
```

Go:

```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"

eksPodSecurityContextProperty := &EksPodSecurityContextProperty{
	FsGroup: jsii.Number(123),
	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

- `fsGroup`: number

- `runAsGroup`: number

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

- `runAsUser`: number

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