{
  "tagging" : {
    "permissions" : [ "ecs:TagResource", "ecs:UntagResource", "ecs:ListTagsForResource" ],
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "tagProperty" : "/properties/Tags",
    "cloudFormationSystemTags" : true
  },
  "propertyTransform" : {
    "/properties/ExecutionRoleArn" : "ExecutionRoleArn $OR $join([\"arn:(aws)[-]{0,1}[a-z]{0,3}[-]{0,1}[a-z]{0,3}:iam::[0-9]{12}[:]role/\", ExecutionRoleArn])",
    "/properties/TaskRoleArn" : "TaskRoleArn $OR $split(TaskRoleArn, \"role/\")[-1] $OR $join([\"arn:(aws)[-]{0,1}[a-z]{0,3}[-]{0,1}[a-z]{0,3}:iam::[0-9]{12}[:]role/\", TaskRoleArn])"
  },
  "handlers" : {
    "read" : {
      "permissions" : [ "ecs:DescribeDaemonTaskDefinition", "ecs:ListTagsForResource" ]
    },
    "create" : {
      "permissions" : [ "ecs:RegisterDaemonTaskDefinition", "ecs:DescribeDaemonTaskDefinition", "ecs:TagResource", "iam:PassRole" ]
    },
    "update" : {
      "permissions" : [ "ecs:TagResource", "ecs:UntagResource", "ecs:ListTagsForResource", "ecs:DescribeDaemonTaskDefinition", "iam:PassRole" ]
    },
    "list" : {
      "permissions" : [ "ecs:ListDaemonTaskDefinitions", "ecs:DescribeDaemonTaskDefinition" ]
    },
    "delete" : {
      "permissions" : [ "ecs:DeleteDaemonTaskDefinition", "ecs:DescribeDaemonTaskDefinition", "iam:PassRole" ]
    }
  },
  "typeName" : "AWS::ECS::DaemonTaskDefinition",
  "readOnlyProperties" : [ "/properties/DaemonTaskDefinitionArn" ],
  "description" : "Resource Schema describing various properties for ECS DaemonTaskDefinition",
  "createOnlyProperties" : [ "/properties/Family", "/properties/ContainerDefinitions", "/properties/Cpu", "/properties/Memory", "/properties/ExecutionRoleArn", "/properties/TaskRoleArn", "/properties/Volumes" ],
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/DaemonTaskDefinitionArn" ],
  "definitions" : {
    "RepositoryCredentials" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "CredentialsParameter" : {
          "type" : "string"
        }
      }
    },
    "KeyValuePair" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Name" : {
          "type" : "string"
        }
      }
    },
    "Device" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "HostPath" : {
          "type" : "string"
        },
        "Permissions" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "ContainerPath" : {
          "type" : "string"
        }
      }
    },
    "LinuxParameters" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Capabilities" : {
          "$ref" : "#/definitions/KernelCapabilities"
        },
        "Tmpfs" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Tmpfs"
          }
        },
        "Devices" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Device"
          }
        },
        "InitProcessEnabled" : {
          "type" : "boolean"
        }
      }
    },
    "ContainerDependency" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Condition" : {
          "type" : "string"
        },
        "ContainerName" : {
          "type" : "string"
        }
      }
    },
    "HealthCheck" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Command" : {
          "insertionOrder" : true,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "Timeout" : {
          "type" : "integer"
        },
        "Retries" : {
          "type" : "integer"
        },
        "Interval" : {
          "type" : "integer"
        },
        "StartPeriod" : {
          "type" : "integer"
        }
      }
    },
    "Ulimit" : {
      "additionalProperties" : false,
      "type" : "object",
      "required" : [ "HardLimit", "Name", "SoftLimit" ],
      "properties" : {
        "SoftLimit" : {
          "type" : "integer"
        },
        "HardLimit" : {
          "type" : "integer"
        },
        "Name" : {
          "type" : "string"
        }
      }
    },
    "RestartPolicy" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "IgnoredExitCodes" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "type" : "integer"
          }
        },
        "RestartAttemptPeriod" : {
          "type" : "integer"
        },
        "Enabled" : {
          "type" : "boolean"
        }
      }
    },
    "SystemControl" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Namespace" : {
          "type" : "string"
        }
      }
    },
    "HostVolumeProperties" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "SourcePath" : {
          "type" : "string"
        }
      }
    },
    "LogConfiguration" : {
      "additionalProperties" : false,
      "type" : "object",
      "required" : [ "LogDriver" ],
      "properties" : {
        "SecretOptions" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Secret"
          }
        },
        "Options" : {
          "patternProperties" : {
            ".{1,}" : {
              "type" : "string"
            }
          },
          "additionalProperties" : false,
          "type" : "object"
        },
        "LogDriver" : {
          "type" : "string"
        }
      }
    },
    "Secret" : {
      "additionalProperties" : false,
      "type" : "object",
      "required" : [ "Name", "ValueFrom" ],
      "properties" : {
        "ValueFrom" : {
          "type" : "string"
        },
        "Name" : {
          "type" : "string"
        }
      }
    },
    "MountPoint" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "ReadOnly" : {
          "type" : "boolean"
        },
        "SourceVolume" : {
          "type" : "string"
        },
        "ContainerPath" : {
          "type" : "string"
        }
      }
    },
    "FirelensConfiguration" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Options" : {
          "patternProperties" : {
            ".{1,}" : {
              "type" : "string"
            }
          },
          "additionalProperties" : false,
          "type" : "object"
        },
        "Type" : {
          "type" : "string"
        }
      }
    },
    "Volume" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Host" : {
          "$ref" : "#/definitions/HostVolumeProperties"
        },
        "Name" : {
          "type" : "string"
        }
      }
    },
    "KernelCapabilities" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Add" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "Drop" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "Tmpfs" : {
      "additionalProperties" : false,
      "type" : "object",
      "required" : [ "Size" ],
      "properties" : {
        "Size" : {
          "type" : "integer"
        },
        "ContainerPath" : {
          "type" : "string"
        },
        "MountOptions" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        }
      }
    },
    "EnvironmentFile" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Type" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      }
    },
    "DaemonContainerDefinition" : {
      "description" : "Container definition for daemon task definition",
      "additionalProperties" : false,
      "type" : "object",
      "required" : [ "Name", "Image" ],
      "properties" : {
        "User" : {
          "type" : "string"
        },
        "Secrets" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Secret"
          }
        },
        "Memory" : {
          "type" : "integer"
        },
        "Privileged" : {
          "type" : "boolean"
        },
        "StartTimeout" : {
          "type" : "integer"
        },
        "HealthCheck" : {
          "$ref" : "#/definitions/HealthCheck"
        },
        "Cpu" : {
          "type" : "integer"
        },
        "EntryPoint" : {
          "insertionOrder" : true,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "ReadonlyRootFilesystem" : {
          "type" : "boolean"
        },
        "Image" : {
          "type" : "string"
        },
        "Essential" : {
          "type" : "boolean"
        },
        "LogConfiguration" : {
          "$ref" : "#/definitions/LogConfiguration"
        },
        "EnvironmentFiles" : {
          "insertionOrder" : true,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/EnvironmentFile"
          }
        },
        "Name" : {
          "type" : "string"
        },
        "FirelensConfiguration" : {
          "$ref" : "#/definitions/FirelensConfiguration"
        },
        "SystemControls" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/SystemControl"
          }
        },
        "Interactive" : {
          "type" : "boolean"
        },
        "Ulimits" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Ulimit"
          }
        },
        "StopTimeout" : {
          "type" : "integer"
        },
        "WorkingDirectory" : {
          "type" : "string"
        },
        "MemoryReservation" : {
          "type" : "integer"
        },
        "RepositoryCredentials" : {
          "$ref" : "#/definitions/RepositoryCredentials"
        },
        "LinuxParameters" : {
          "$ref" : "#/definitions/LinuxParameters"
        },
        "RestartPolicy" : {
          "$ref" : "#/definitions/RestartPolicy"
        },
        "PseudoTerminal" : {
          "type" : "boolean"
        },
        "MountPoints" : {
          "insertionOrder" : true,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/MountPoint"
          }
        },
        "DependsOn" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/ContainerDependency"
          }
        },
        "Command" : {
          "insertionOrder" : true,
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "Environment" : {
          "insertionOrder" : false,
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/KeyValuePair"
          }
        }
      }
    },
    "Tag" : {
      "additionalProperties" : false,
      "type" : "object",
      "properties" : {
        "Value" : {
          "type" : "string"
        },
        "Key" : {
          "type" : "string"
        }
      }
    }
  },
  "properties" : {
    "ExecutionRoleArn" : {
      "type" : "string"
    },
    "TaskRoleArn" : {
      "type" : "string"
    },
    "DaemonTaskDefinitionArn" : {
      "description" : "The Amazon Resource Name (ARN) of the Amazon ECS daemon task definition",
      "type" : "string"
    },
    "Volumes" : {
      "uniqueItems" : true,
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Volume"
      }
    },
    "Memory" : {
      "type" : "string"
    },
    "ContainerDefinitions" : {
      "uniqueItems" : true,
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/DaemonContainerDefinition"
      }
    },
    "Family" : {
      "type" : "string"
    },
    "Cpu" : {
      "type" : "string"
    },
    "Tags" : {
      "insertionOrder" : false,
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  }
}