# CfnDaemonTaskDefinitionProps

Properties for defining a `CfnDaemonTaskDefinition`.

Used as props by: [CfnDaemonTaskDefinition](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnDaemonTaskDefinition.html)

- Source: Generated at build time
- Type last changed: v2.260.0 · 16 Jun 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_ecs as ecs } from 'aws-cdk-lib';
const cfnDaemonTaskDefinitionProps: ecs.CfnDaemonTaskDefinitionProps = {
  containerDefinitions: [{
    image: 'image',
    name: 'name',

    // the properties below are optional
    command: ['command'],
    cpu: 123,
    dependsOn: [{
      condition: 'condition',
      containerName: 'containerName',
    }],
    entryPoint: ['entryPoint'],
    environment: [{
      name: 'name',
      value: 'value',
    }],
    environmentFiles: [{
      type: 'type',
      value: 'value',
    }],
    essential: false,
    firelensConfiguration: {
      options: {
        optionsKey: 'options',
      },
      type: 'type',
    },
    healthCheck: {
      command: ['command'],
      interval: 123,
      retries: 123,
      startPeriod: 123,
      timeout: 123,
    },
    interactive: false,
    linuxParameters: {
      capabilities: {
        add: ['add'],
        drop: ['drop'],
      },
      devices: [{
        containerPath: 'containerPath',
        hostPath: 'hostPath',
        permissions: ['permissions'],
      }],
      initProcessEnabled: false,
      tmpfs: [{
        size: 123,

        // the properties below are optional
        containerPath: 'containerPath',
        mountOptions: ['mountOptions'],
      }],
    },
    logConfiguration: {
      logDriver: 'logDriver',

      // the properties below are optional
      options: {
        optionsKey: 'options',
      },
      secretOptions: [{
        name: 'name',
        valueFrom: 'valueFrom',
      }],
    },
    memory: 123,
    memoryReservation: 123,
    mountPoints: [{
      containerPath: 'containerPath',
      readOnly: false,
      sourceVolume: 'sourceVolume',
    }],
    privileged: false,
    pseudoTerminal: false,
    readonlyRootFilesystem: false,
    repositoryCredentials: {
      credentialsParameter: 'credentialsParameter',
    },
    restartPolicy: {
      enabled: false,
      ignoredExitCodes: [123],
      restartAttemptPeriod: 123,
    },
    secrets: [{
      name: 'name',
      valueFrom: 'valueFrom',
    }],
    startTimeout: 123,
    stopTimeout: 123,
    systemControls: [{
      namespace: 'namespace',
      value: 'value',
    }],
    ulimits: [{
      hardLimit: 123,
      name: 'name',
      softLimit: 123,
    }],
    user: 'user',
    workingDirectory: 'workingDirectory',
  }],
  cpu: 'cpu',
  executionRoleArn: 'executionRoleArn',
  family: 'family',
  ipcMode: 'ipcMode',
  memory: 'memory',
  pidMode: 'pidMode',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  taskRoleArn: 'taskRoleArn',
  volumes: [{
    host: {
      sourcePath: 'sourcePath',
    },
    logDriverVolumeConfiguration: {
      driver: 'driver',
    },
    name: 'name',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

cfn_daemon_task_definition_props = ecs.CfnDaemonTaskDefinitionProps(
    container_definitions=[ecs.CfnDaemonTaskDefinition.DaemonContainerDefinitionProperty(
        image="image",
        name="name",

        # the properties below are optional
        command=["command"],
        cpu=123,
        depends_on=[ecs.CfnDaemonTaskDefinition.ContainerDependencyProperty(
            condition="condition",
            container_name="containerName"
        )],
        entry_point=["entryPoint"],
        environment=[ecs.CfnDaemonTaskDefinition.KeyValuePairProperty(
            name="name",
            value="value"
        )],
        environment_files=[ecs.CfnDaemonTaskDefinition.EnvironmentFileProperty(
            type="type",
            value="value"
        )],
        essential=False,
        firelens_configuration=ecs.CfnDaemonTaskDefinition.FirelensConfigurationProperty(
            options={
                "options_key": "options"
            },
            type="type"
        ),
        health_check=ecs.CfnDaemonTaskDefinition.HealthCheckProperty(
            command=["command"],
            interval=123,
            retries=123,
            start_period=123,
            timeout=123
        ),
        interactive=False,
        linux_parameters=ecs.CfnDaemonTaskDefinition.LinuxParametersProperty(
            capabilities=ecs.CfnDaemonTaskDefinition.KernelCapabilitiesProperty(
                add=["add"],
                drop=["drop"]
            ),
            devices=[ecs.CfnDaemonTaskDefinition.DeviceProperty(
                container_path="containerPath",
                host_path="hostPath",
                permissions=["permissions"]
            )],
            init_process_enabled=False,
            tmpfs=[ecs.CfnDaemonTaskDefinition.TmpfsProperty(
                size=123,

                # the properties below are optional
                container_path="containerPath",
                mount_options=["mountOptions"]
            )]
        ),
        log_configuration=ecs.CfnDaemonTaskDefinition.LogConfigurationProperty(
            log_driver="logDriver",

            # the properties below are optional
            options={
                "options_key": "options"
            },
            secret_options=[ecs.CfnDaemonTaskDefinition.SecretProperty(
                name="name",
                value_from="valueFrom"
            )]
        ),
        memory=123,
        memory_reservation=123,
        mount_points=[ecs.CfnDaemonTaskDefinition.MountPointProperty(
            container_path="containerPath",
            read_only=False,
            source_volume="sourceVolume"
        )],
        privileged=False,
        pseudo_terminal=False,
        readonly_root_filesystem=False,
        repository_credentials=ecs.CfnDaemonTaskDefinition.RepositoryCredentialsProperty(
            credentials_parameter="credentialsParameter"
        ),
        restart_policy=ecs.CfnDaemonTaskDefinition.RestartPolicyProperty(
            enabled=False,
            ignored_exit_codes=[123],
            restart_attempt_period=123
        ),
        secrets=[ecs.CfnDaemonTaskDefinition.SecretProperty(
            name="name",
            value_from="valueFrom"
        )],
        start_timeout=123,
        stop_timeout=123,
        system_controls=[ecs.CfnDaemonTaskDefinition.SystemControlProperty(
            namespace="namespace",
            value="value"
        )],
        ulimits=[ecs.CfnDaemonTaskDefinition.UlimitProperty(
            hard_limit=123,
            name="name",
            soft_limit=123
        )],
        user="user",
        working_directory="workingDirectory"
    )],
    cpu="cpu",
    execution_role_arn="executionRoleArn",
    family="family",
    ipc_mode="ipcMode",
    memory="memory",
    pid_mode="pidMode",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    task_role_arn="taskRoleArn",
    volumes=[ecs.CfnDaemonTaskDefinition.VolumeProperty(
        host=ecs.CfnDaemonTaskDefinition.HostVolumePropertiesProperty(
            source_path="sourcePath"
        ),
        log_driver_volume_configuration=ecs.CfnDaemonTaskDefinition.LogDriverVolumeConfigurationProperty(
            driver="driver"
        ),
        name="name"
    )]
)
```

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

CfnDaemonTaskDefinitionProps cfnDaemonTaskDefinitionProps = CfnDaemonTaskDefinitionProps.builder()
        .containerDefinitions(List.of(DaemonContainerDefinitionProperty.builder()
                .image("image")
                .name("name")

                // the properties below are optional
                .command(List.of("command"))
                .cpu(123)
                .dependsOn(List.of(ContainerDependencyProperty.builder()
                        .condition("condition")
                        .containerName("containerName")
                        .build()))
                .entryPoint(List.of("entryPoint"))
                .environment(List.of(KeyValuePairProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .environmentFiles(List.of(EnvironmentFileProperty.builder()
                        .type("type")
                        .value("value")
                        .build()))
                .essential(false)
                .firelensConfiguration(FirelensConfigurationProperty.builder()
                        .options(Map.of(
                                "optionsKey", "options"))
                        .type("type")
                        .build())
                .healthCheck(HealthCheckProperty.builder()
                        .command(List.of("command"))
                        .interval(123)
                        .retries(123)
                        .startPeriod(123)
                        .timeout(123)
                        .build())
                .interactive(false)
                .linuxParameters(LinuxParametersProperty.builder()
                        .capabilities(KernelCapabilitiesProperty.builder()
                                .add(List.of("add"))
                                .drop(List.of("drop"))
                                .build())
                        .devices(List.of(DeviceProperty.builder()
                                .containerPath("containerPath")
                                .hostPath("hostPath")
                                .permissions(List.of("permissions"))
                                .build()))
                        .initProcessEnabled(false)
                        .tmpfs(List.of(TmpfsProperty.builder()
                                .size(123)

                                // the properties below are optional
                                .containerPath("containerPath")
                                .mountOptions(List.of("mountOptions"))
                                .build()))
                        .build())
                .logConfiguration(LogConfigurationProperty.builder()
                        .logDriver("logDriver")

                        // the properties below are optional
                        .options(Map.of(
                                "optionsKey", "options"))
                        .secretOptions(List.of(SecretProperty.builder()
                                .name("name")
                                .valueFrom("valueFrom")
                                .build()))
                        .build())
                .memory(123)
                .memoryReservation(123)
                .mountPoints(List.of(MountPointProperty.builder()
                        .containerPath("containerPath")
                        .readOnly(false)
                        .sourceVolume("sourceVolume")
                        .build()))
                .privileged(false)
                .pseudoTerminal(false)
                .readonlyRootFilesystem(false)
                .repositoryCredentials(RepositoryCredentialsProperty.builder()
                        .credentialsParameter("credentialsParameter")
                        .build())
                .restartPolicy(RestartPolicyProperty.builder()
                        .enabled(false)
                        .ignoredExitCodes(List.of(123))
                        .restartAttemptPeriod(123)
                        .build())
                .secrets(List.of(SecretProperty.builder()
                        .name("name")
                        .valueFrom("valueFrom")
                        .build()))
                .startTimeout(123)
                .stopTimeout(123)
                .systemControls(List.of(SystemControlProperty.builder()
                        .namespace("namespace")
                        .value("value")
                        .build()))
                .ulimits(List.of(UlimitProperty.builder()
                        .hardLimit(123)
                        .name("name")
                        .softLimit(123)
                        .build()))
                .user("user")
                .workingDirectory("workingDirectory")
                .build()))
        .cpu("cpu")
        .executionRoleArn("executionRoleArn")
        .family("family")
        .ipcMode("ipcMode")
        .memory("memory")
        .pidMode("pidMode")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .taskRoleArn("taskRoleArn")
        .volumes(List.of(VolumeProperty.builder()
                .host(HostVolumePropertiesProperty.builder()
                        .sourcePath("sourcePath")
                        .build())
                .logDriverVolumeConfiguration(LogDriverVolumeConfigurationProperty.builder()
                        .driver("driver")
                        .build())
                .name("name")
                .build()))
        .build();
```

C# / .NET:

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

var cfnDaemonTaskDefinitionProps = new CfnDaemonTaskDefinitionProps {
    ContainerDefinitions = new [] { new DaemonContainerDefinitionProperty {
        Image = "image",
        Name = "name",

        // the properties below are optional
        Command = new [] { "command" },
        Cpu = 123,
        DependsOn = new [] { new ContainerDependencyProperty {
            Condition = "condition",
            ContainerName = "containerName"
        } },
        EntryPoint = new [] { "entryPoint" },
        Environment = new [] { new KeyValuePairProperty {
            Name = "name",
            Value = "value"
        } },
        EnvironmentFiles = new [] { new EnvironmentFileProperty {
            Type = "type",
            Value = "value"
        } },
        Essential = false,
        FirelensConfiguration = new FirelensConfigurationProperty {
            Options = new Dictionary<string, string> {
                { "optionsKey", "options" }
            },
            Type = "type"
        },
        HealthCheck = new HealthCheckProperty {
            Command = new [] { "command" },
            Interval = 123,
            Retries = 123,
            StartPeriod = 123,
            Timeout = 123
        },
        Interactive = false,
        LinuxParameters = new LinuxParametersProperty {
            Capabilities = new KernelCapabilitiesProperty {
                Add = new [] { "add" },
                Drop = new [] { "drop" }
            },
            Devices = new [] { new DeviceProperty {
                ContainerPath = "containerPath",
                HostPath = "hostPath",
                Permissions = new [] { "permissions" }
            } },
            InitProcessEnabled = false,
            Tmpfs = new [] { new TmpfsProperty {
                Size = 123,

                // the properties below are optional
                ContainerPath = "containerPath",
                MountOptions = new [] { "mountOptions" }
            } }
        },
        LogConfiguration = new LogConfigurationProperty {
            LogDriver = "logDriver",

            // the properties below are optional
            Options = new Dictionary<string, string> {
                { "optionsKey", "options" }
            },
            SecretOptions = new [] { new SecretProperty {
                Name = "name",
                ValueFrom = "valueFrom"
            } }
        },
        Memory = 123,
        MemoryReservation = 123,
        MountPoints = new [] { new MountPointProperty {
            ContainerPath = "containerPath",
            ReadOnly = false,
            SourceVolume = "sourceVolume"
        } },
        Privileged = false,
        PseudoTerminal = false,
        ReadonlyRootFilesystem = false,
        RepositoryCredentials = new RepositoryCredentialsProperty {
            CredentialsParameter = "credentialsParameter"
        },
        RestartPolicy = new RestartPolicyProperty {
            Enabled = false,
            IgnoredExitCodes = new [] { 123 },
            RestartAttemptPeriod = 123
        },
        Secrets = new [] { new SecretProperty {
            Name = "name",
            ValueFrom = "valueFrom"
        } },
        StartTimeout = 123,
        StopTimeout = 123,
        SystemControls = new [] { new SystemControlProperty {
            Namespace = "namespace",
            Value = "value"
        } },
        Ulimits = new [] { new UlimitProperty {
            HardLimit = 123,
            Name = "name",
            SoftLimit = 123
        } },
        User = "user",
        WorkingDirectory = "workingDirectory"
    } },
    Cpu = "cpu",
    ExecutionRoleArn = "executionRoleArn",
    Family = "family",
    IpcMode = "ipcMode",
    Memory = "memory",
    PidMode = "pidMode",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TaskRoleArn = "taskRoleArn",
    Volumes = new [] { new VolumeProperty {
        Host = new HostVolumePropertiesProperty {
            SourcePath = "sourcePath"
        },
        LogDriverVolumeConfiguration = new LogDriverVolumeConfigurationProperty {
            Driver = "driver"
        },
        Name = "name"
    } }
};
```

Golang:

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

cfnDaemonTaskDefinitionProps := &CfnDaemonTaskDefinitionProps{
	ContainerDefinitions: []interface{}{
		&DaemonContainerDefinitionProperty{
			Image: jsii.String("image"),
			Name: jsii.String("name"),

			// the properties below are optional
			Command: []*string{
				jsii.String("command"),
			},
			Cpu: jsii.Number(123),
			DependsOn: []interface{}{
				&ContainerDependencyProperty{
					Condition: jsii.String("condition"),
					ContainerName: jsii.String("containerName"),
				},
			},
			EntryPoint: []*string{
				jsii.String("entryPoint"),
			},
			Environment: []interface{}{
				&KeyValuePairProperty{
					Name: jsii.String("name"),
					Value: jsii.String("value"),
				},
			},
			EnvironmentFiles: []interface{}{
				&EnvironmentFileProperty{
					Type: jsii.String("type"),
					Value: jsii.String("value"),
				},
			},
			Essential: jsii.Boolean(false),
			FirelensConfiguration: &FirelensConfigurationProperty{
				Options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				Type: jsii.String("type"),
			},
			HealthCheck: &HealthCheckProperty{
				Command: []*string{
					jsii.String("command"),
				},
				Interval: jsii.Number(123),
				Retries: jsii.Number(123),
				StartPeriod: jsii.Number(123),
				Timeout: jsii.Number(123),
			},
			Interactive: jsii.Boolean(false),
			LinuxParameters: &LinuxParametersProperty{
				Capabilities: &KernelCapabilitiesProperty{
					Add: []*string{
						jsii.String("add"),
					},
					Drop: []*string{
						jsii.String("drop"),
					},
				},
				Devices: []interface{}{
					&DeviceProperty{
						ContainerPath: jsii.String("containerPath"),
						HostPath: jsii.String("hostPath"),
						Permissions: []*string{
							jsii.String("permissions"),
						},
					},
				},
				InitProcessEnabled: jsii.Boolean(false),
				Tmpfs: []interface{}{
					&TmpfsProperty{
						Size: jsii.Number(123),

						// the properties below are optional
						ContainerPath: jsii.String("containerPath"),
						MountOptions: []*string{
							jsii.String("mountOptions"),
						},
					},
				},
			},
			LogConfiguration: &LogConfigurationProperty{
				LogDriver: jsii.String("logDriver"),

				// the properties below are optional
				Options: map[string]*string{
					"optionsKey": jsii.String("options"),
				},
				SecretOptions: []interface{}{
					&SecretProperty{
						Name: jsii.String("name"),
						ValueFrom: jsii.String("valueFrom"),
					},
				},
			},
			Memory: jsii.Number(123),
			MemoryReservation: jsii.Number(123),
			MountPoints: []interface{}{
				&MountPointProperty{
					ContainerPath: jsii.String("containerPath"),
					ReadOnly: jsii.Boolean(false),
					SourceVolume: jsii.String("sourceVolume"),
				},
			},
			Privileged: jsii.Boolean(false),
			PseudoTerminal: jsii.Boolean(false),
			ReadonlyRootFilesystem: jsii.Boolean(false),
			RepositoryCredentials: &RepositoryCredentialsProperty{
				CredentialsParameter: jsii.String("credentialsParameter"),
			},
			RestartPolicy: &RestartPolicyProperty{
				Enabled: jsii.Boolean(false),
				IgnoredExitCodes: []interface{}{
					jsii.Number(123),
				},
				RestartAttemptPeriod: jsii.Number(123),
			},
			Secrets: []interface{}{
				&SecretProperty{
					Name: jsii.String("name"),
					ValueFrom: jsii.String("valueFrom"),
				},
			},
			StartTimeout: jsii.Number(123),
			StopTimeout: jsii.Number(123),
			SystemControls: []interface{}{
				&SystemControlProperty{
					Namespace: jsii.String("namespace"),
					Value: jsii.String("value"),
				},
			},
			Ulimits: []interface{}{
				&UlimitProperty{
					HardLimit: jsii.Number(123),
					Name: jsii.String("name"),
					SoftLimit: jsii.Number(123),
				},
			},
			User: jsii.String("user"),
			WorkingDirectory: jsii.String("workingDirectory"),
		},
	},
	Cpu: jsii.String("cpu"),
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	Family: jsii.String("family"),
	IpcMode: jsii.String("ipcMode"),
	Memory: jsii.String("memory"),
	PidMode: jsii.String("pidMode"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TaskRoleArn: jsii.String("taskRoleArn"),
	Volumes: []interface{}{
		&VolumeProperty{
			Host: &HostVolumePropertiesProperty{
				SourcePath: jsii.String("sourcePath"),
			},
			LogDriverVolumeConfiguration: &LogDriverVolumeConfigurationProperty{
				Driver: jsii.String("driver"),
			},
			Name: jsii.String("name"),
		},
	},
}
```

## Properties

- `containerDefinitions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDaemonTaskDefinition.DaemonContainerDefinitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnDaemonTaskDefinition.DaemonContainerDefinitionProperty.html)[] — A list of container definitions in JSON format that describe the containers that make up the daemon task.

- `cpu`: string — The number of CPU units used by the daemon task.

- `executionRoleArn`: string — The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.

- `family`: string — The name of a family that this daemon task definition is registered to.

- `ipcMode`: string — The IPC namespace mode for the daemon.

  The valid values are ``none`` and ``shared``. The default is ``none``.
   If ``none`` is specified or no value is provided, the daemon runs with its own IPC namespace, isolated from other tasks. If ``shared`` is specified, the daemon joins the host IPC namespace, making it accessible to non-daemon tasks that use ``ipcMode: "host"`` or other daemons that use ``ipcMode: "shared"``.

- `memory`: string — The amount of memory (in MiB) used by the daemon task.

- `pidMode`: string — The PID namespace mode for the daemon.

  The valid values are ``none`` and ``shared``. The default is ``none``.
   If ``none`` is specified or no value is provided, the daemon runs with its own PID namespace, isolated from other tasks. If ``shared`` is specified, the daemon joins the host PID namespace, making it accessible to non-daemon tasks that use ``pidMode: "host"`` or other daemons that use ``pidMode: "shared"``.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[]

- `taskRoleArn`: string — The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.

- `volumes`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDaemonTaskDefinition.VolumeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnDaemonTaskDefinition.VolumeProperty.html)[] — The list of data volume definitions for the daemon task.
