# CfnDaemonProps

Properties for defining a `CfnDaemon`.

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

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 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 cfnDaemonProps: ecs.CfnDaemonProps = {
  capacityProviderArns: ['capacityProviderArns'],
  clusterArn: 'clusterArn',
  critical: false,
  daemonName: 'daemonName',
  daemonTaskDefinitionArn: 'daemonTaskDefinitionArn',
  deploymentConfiguration: {
    alarms: {
      alarmNames: ['alarmNames'],
      enable: false,
    },
    bakeTimeInMinutes: 123,
    drainPercent: 123,
  },
  enableEcsManagedTags: false,
  enableExecuteCommand: false,
  propagateTags: 'propagateTags',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

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_props = ecs.CfnDaemonProps(
    capacity_provider_arns=["capacityProviderArns"],
    cluster_arn="clusterArn",
    critical=False,
    daemon_name="daemonName",
    daemon_task_definition_arn="daemonTaskDefinitionArn",
    deployment_configuration=ecs.CfnDaemon.DaemonDeploymentConfigurationProperty(
        alarms=ecs.CfnDaemon.DaemonAlarmConfigurationProperty(
            alarm_names=["alarmNames"],
            enable=False
        ),
        bake_time_in_minutes=123,
        drain_percent=123
    ),
    enable_ecs_managed_tags=False,
    enable_execute_command=False,
    propagate_tags="propagateTags",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnDaemonProps cfnDaemonProps = CfnDaemonProps.builder()
        .capacityProviderArns(List.of("capacityProviderArns"))
        .clusterArn("clusterArn")
        .critical(false)
        .daemonName("daemonName")
        .daemonTaskDefinitionArn("daemonTaskDefinitionArn")
        .deploymentConfiguration(DaemonDeploymentConfigurationProperty.builder()
                .alarms(DaemonAlarmConfigurationProperty.builder()
                        .alarmNames(List.of("alarmNames"))
                        .enable(false)
                        .build())
                .bakeTimeInMinutes(123)
                .drainPercent(123)
                .build())
        .enableEcsManagedTags(false)
        .enableExecuteCommand(false)
        .propagateTags("propagateTags")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .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 cfnDaemonProps = new CfnDaemonProps {
    CapacityProviderArns = new [] { "capacityProviderArns" },
    ClusterArn = "clusterArn",
    Critical = false,
    DaemonName = "daemonName",
    DaemonTaskDefinitionArn = "daemonTaskDefinitionArn",
    DeploymentConfiguration = new DaemonDeploymentConfigurationProperty {
        Alarms = new DaemonAlarmConfigurationProperty {
            AlarmNames = new [] { "alarmNames" },
            Enable = false
        },
        BakeTimeInMinutes = 123,
        DrainPercent = 123
    },
    EnableEcsManagedTags = false,
    EnableExecuteCommand = false,
    PropagateTags = "propagateTags",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnDaemonProps := &CfnDaemonProps{
	CapacityProviderArns: []*string{
		jsii.String("capacityProviderArns"),
	},
	ClusterArn: jsii.String("clusterArn"),
	Critical: jsii.Boolean(false),
	DaemonName: jsii.String("daemonName"),
	DaemonTaskDefinitionArn: jsii.String("daemonTaskDefinitionArn"),
	DeploymentConfiguration: &DaemonDeploymentConfigurationProperty{
		Alarms: &DaemonAlarmConfigurationProperty{
			AlarmNames: []*string{
				jsii.String("alarmNames"),
			},
			Enable: jsii.Boolean(false),
		},
		BakeTimeInMinutes: jsii.Number(123),
		DrainPercent: jsii.Number(123),
	},
	EnableEcsManagedTags: jsii.Boolean(false),
	EnableExecuteCommand: jsii.Boolean(false),
	PropagateTags: jsii.String("propagateTags"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `capacityProviderArns`: string[] — The Amazon Resource Names (ARNs) of the capacity providers associated with the daemon.

- `clusterArn`: string — The Amazon Resource Name (ARN) of the cluster that the daemon is running in.

- `critical`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — If the ``critical`` parameter of this daemon revision is ``true``, and the daemon task fails, stops, or becomes unhealthy, Amazon ECS drains the container instance and stops the other tasks running on it.

  If the parameter is ``false``, the daemon task failure doesn't affect the other tasks on the instance, and doesn't block instance registration. The default value is ``true``.

- `daemonName`: string

- `daemonTaskDefinitionArn`: string — The Amazon Resource Name (ARN) of the daemon task definition used by this revision.

- `deploymentConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDaemon.DaemonDeploymentConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnDaemon.DaemonDeploymentConfigurationProperty.html) — Optional deployment parameters that control how a daemon rolls out updates across container instances.

- `enableEcsManagedTags`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether Amazon ECS managed tags are turned on for the daemon tasks.

- `enableExecuteCommand`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether the execute command functionality is turned on for the daemon tasks.

- `propagateTags`: string — Specifies whether tags are propagated from the daemon to the daemon tasks.

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