{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-create-daemon-request-schema.json",
  "title": "CreateDaemonRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-daemon-api-openapi.yml#/components/schemas/CreateDaemonRequest",
  "type": "object",
  "properties": {
    "daemonName": {
      "type": "string",
      "description": "The name of the daemon. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed."
    },
    "clusterArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the cluster to create the daemon in."
    },
    "daemonTaskDefinitionArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the daemon task definition to use for the daemon."
    },
    "capacityProviderArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Amazon Resource Names (ARNs) of the capacity providers to associate with the daemon. The daemon deploys tasks on container instances managed by these capacity providers."
    },
    "deploymentConfiguration": {
      "$ref": "#/$defs/DaemonDeploymentConfiguration"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The metadata that you apply to the daemon to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags: Maximum number of tags per resource - 50 For each resource, each tag key must be unique, and each tag key can have only one value. Maximum key length - 128 Unicode characters in UTF-8 Maximum value length - 256 Unicode characters in UTF-8 If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally"
    },
    "propagateTags": {
      "type": "string",
      "enum": [
        "DAEMON",
        "NONE"
      ],
      "description": "Specifies whether to propagate the tags from the daemon to the daemon tasks. If you don't specify a value, the tags aren't propagated. You can only propagate tags to daemon tasks during task creation. To add tags to a task after task creation, use the TagResource API action."
    },
    "enableECSManagedTags": {
      "type": "boolean",
      "description": "Specifies whether to turn on Amazon ECS managed tags for the tasks in the daemon. For more information, see Tagging your Amazon ECS resources in the Amazon Elastic Container Service Developer Guide."
    },
    "enableExecuteCommand": {
      "type": "boolean",
      "description": "Determines whether the execute command functionality is turned on for the daemon. If true, the execute command functionality is turned on for all tasks in the daemon."
    },
    "clientToken": {
      "type": "string",
      "description": "An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 36 ASCII characters in the range of 33-126 (inclusive) are allowed."
    },
    "critical": {
      "type": "boolean",
      "description": "If the critical parameter of a daemon 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 critical parameter is false, the daemon task failure doesn't affect the other tasks on the instance. The default value is true. A non-critical daemon doesn't block instance registration. The container instance becomes active and continues to run your other tasks, whether the daemon task fails during scale-out or during a deployment. Amazon ECS emits an EventBridge event when a daemon task fails to start, "
    }
  },
  "required": [
    "daemonName",
    "daemonTaskDefinitionArn",
    "capacityProviderArns"
  ],
  "$defs": {
    "DaemonAlarmConfiguration": {
      "type": "object",
      "properties": {
        "alarmNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The CloudWatch alarm names to monitor during a daemon deployment."
        },
        "enable": {
          "type": "boolean",
          "description": "Determines whether to use the CloudWatch alarm option in the daemon deployment process. The default value is false."
        }
      }
    },
    "DaemonDeploymentConfiguration": {
      "type": "object",
      "properties": {
        "drainPercent": {
          "type": "number",
          "description": "The percentage of container instances to drain simultaneously during a daemon deployment. Valid values are between 0.0 and 100.0."
        },
        "alarms": {
          "$ref": "#/$defs/DaemonAlarmConfiguration"
        },
        "bakeTimeInMinutes": {
          "type": "integer",
          "description": "The amount of time (in minutes) to wait after a successful deployment step before proceeding. This allows time to monitor for issues before continuing. The default value is 0."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "value": {
          "type": "string",
          "description": "The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key)."
        }
      }
    }
  }
}