{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-describe-task-sets-response-schema.json",
  "title": "DescribeTaskSetsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-task-set-api-openapi.yml#/components/schemas/DescribeTaskSetsResponse",
  "type": "object",
  "properties": {
    "taskSets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TaskSet"
      },
      "description": "The list of task sets described."
    },
    "failures": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Failure"
      },
      "description": "Any failures associated with the call."
    }
  },
  "$defs": {
    "AdvancedConfiguration": {
      "type": "object",
      "properties": {
        "alternateTargetGroupArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the alternate target group for Amazon ECS blue/green deployments."
        },
        "productionListenerRule": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) that that identifies the production listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing production traffic."
        },
        "testListenerRule": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) that identifies ) that identifies the test listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing test traffic."
        },
        "roleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call the Elastic Load Balancing APIs for you."
        }
      }
    },
    "AwsVpcConfiguration": {
      "type": "object",
      "properties": {
        "subnets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified. All specified subnets must be from the same VPC."
        },
        "securityGroups": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified. All specified security groups must be from the same VPC."
        },
        "assignPublicIp": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Whether the task's elastic network interface receives a public IP address. Consider the following when you set this value: When you use create-service or update-service, the default is DISABLED. When the service deploymentController is ECS, the value must be DISABLED."
        }
      },
      "required": [
        "subnets"
      ]
    },
    "CapacityProviderStrategyItem": {
      "type": "object",
      "properties": {
        "capacityProvider": {
          "type": "string",
          "description": "The short name of the capacity provider."
        },
        "weight": {
          "type": "integer",
          "description": "The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied. If no weight value is specified, the default value of 0 is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0 can't be used to place tasks. If you specify multiple capacity providers in a strategy that"
        },
        "base": {
          "type": "integer",
          "description": "The base value designates how many tasks, at a minimum, to run on the specified capacity provider for each service. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used. Base value characteristics: Only one capacity provider in a strategy can have a base defined The default value is 0 if not specified The valid range is 0 to 100,000 Base requirements are satisfied first before weight distribution"
        }
      },
      "required": [
        "capacityProvider"
      ]
    },
    "DeploymentEphemeralStorage": {
      "type": "object",
      "properties": {
        "kmsKeyId": {
          "type": "string",
          "description": "Specify an Key Management Service key ID to encrypt the ephemeral storage for deployment."
        }
      }
    },
    "Failure": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the failed resource."
        },
        "reason": {
          "type": "string",
          "description": "The reason for the failure."
        },
        "detail": {
          "type": "string",
          "description": "The details of the failure."
        }
      }
    },
    "LoadBalancer": {
      "type": "object",
      "properties": {
        "targetGroupArn": {
          "type": "string",
          "description": "The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set. A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer. For services using the ECS deployment controller, you can specify one or multiple target groups. For more information, see Registering multiple target groups with a service in the Amazon Elastic Container Service Developer Guide. For services using the CODE_DEPLOY deployment controller, you're required to define two target groups for the load balancer. For more infor"
        },
        "loadBalancerName": {
          "type": "string",
          "description": "The name of the load balancer to associate with the Amazon ECS service or task set. If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted."
        },
        "containerName": {
          "type": "string",
          "description": "The name of the container (as it appears in a container definition) to associate with the load balancer. You need to specify the container name when configuring the target group for an Amazon ECS load balancer."
        },
        "containerPort": {
          "type": "integer",
          "description": "The port on the container to associate with the load balancer. This port must correspond to a containerPort in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the hostPort of the port mapping."
        },
        "advancedConfiguration": {
          "$ref": "#/$defs/AdvancedConfiguration"
        }
      }
    },
    "NetworkConfiguration": {
      "type": "object",
      "properties": {
        "awsvpcConfiguration": {
          "$ref": "#/$defs/AwsVpcConfiguration"
        }
      }
    },
    "Scale": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "The value, specified as a percent total of a service's desiredCount, to scale the task set. Accepted values are numbers between 0 and 100."
        },
        "unit": {
          "type": "string",
          "enum": [
            "PERCENT"
          ],
          "description": "The unit of measure for the scale value."
        }
      }
    },
    "ServiceRegistry": {
      "type": "object",
      "properties": {
        "registryArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is Cloud Map. For more information, see CreateService."
        },
        "port": {
          "type": "integer",
          "description": "The port value used if your service discovery service specified an SRV record. This field might be used if both the awsvpc network mode and SRV records are used."
        },
        "containerName": {
          "type": "string",
          "description": "The container name value to be used for your service discovery service. It's already specified in the task definition. If the task definition that your service task specifies uses the bridge or host network mode, you must specify a containerName and containerPort combination from the task definition. If the task definition that your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a containerName and containerPort combination or a port value. However, you can't specify both."
        },
        "containerPort": {
          "type": "integer",
          "description": "The port value to be used for your service discovery service. It's already specified in the task definition. If the task definition your service task specifies uses the bridge or host network mode, you must specify a containerName and containerPort combination from the task definition. If the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must specify either a containerName and containerPort combination or a port value. However, you can't specify both."
        }
      }
    },
    "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)."
        }
      }
    },
    "TaskSet": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the task set."
        },
        "taskSetArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the task set."
        },
        "serviceArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the service the task set exists in."
        },
        "clusterArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in."
        },
        "startedBy": {
          "type": "string",
          "description": "The tag specified when a task set is started. If an CodeDeploy deployment created the task set, the startedBy parameter is CODE_DEPLOY. If an external deployment created the task set, the startedBy field isn't used."
        },
        "externalId": {
          "type": "string",
          "description": "The external ID associated with the task set. If an CodeDeploy deployment created a task set, the externalId parameter contains the CodeDeploy deployment ID. If a task set is created for an external deployment and is associated with a service discovery registry, the externalId parameter contains the ECS_TASK_SET_EXTERNAL_ID Cloud Map attribute."
        },
        "status": {
          "type": "string",
          "description": "The status of the task set. The following describes each state. PRIMARY The task set is serving production traffic. ACTIVE The task set isn't serving production traffic. DRAINING The tasks in the task set are being stopped, and their corresponding targets are being deregistered from their target group."
        },
        "taskDefinition": {
          "type": "string",
          "description": "The task definition that the task set is using."
        },
        "computedDesiredCount": {
          "type": "integer",
          "description": "The computed desired count for the task set. This is calculated by multiplying the service's desiredCount by the task set's scale percentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks."
        },
        "pendingCount": {
          "type": "integer",
          "description": "The number of tasks in the task set that are in the PENDING status during a deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time or when it's restarted after being in the STOPPED state."
        },
        "runningCount": {
          "type": "integer",
          "description": "The number of tasks in the task set that are in the RUNNING status during a deployment. A task in the RUNNING state is running and ready for use."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The Unix timestamp for the time when the task set was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The Unix timestamp for the time when the task set was last updated."
        },
        "launchType": {
          "type": "string",
          "enum": [
            "EC2",
            "FARGATE",
            "EXTERNAL",
            "MANAGED_INSTANCES"
          ],
          "description": "The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide."
        },
        "capacityProviderStrategy": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CapacityProviderStrategyItem"
          },
          "description": "The capacity provider strategy that are associated with the task set."
        },
        "platformVersion": {
          "type": "string",
          "description": "The Fargate platform version where the tasks in the task set are running. A platform version is only specified for tasks run on Fargate. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide."
        },
        "platformFamily": {
          "type": "string",
          "description": "The operating system that your tasks in the set are running on. A platform family is specified only for tasks that use the Fargate launch type. All tasks in the set must have the same value."
        },
        "networkConfiguration": {
          "$ref": "#/$defs/NetworkConfiguration"
        },
        "loadBalancers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LoadBalancer"
          },
          "description": "Details on a load balancer that are used with a task set."
        },
        "serviceRegistries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ServiceRegistry"
          },
          "description": "The details for the service discovery registries to assign to this task set. For more information, see Service discovery."
        },
        "scale": {
          "$ref": "#/$defs/Scale"
        },
        "stabilityStatus": {
          "type": "string",
          "enum": [
            "STEADY_STATE",
            "STABILIZING"
          ],
          "description": "The stability status. This indicates whether the task set has reached a steady state. If the following conditions are met, the task set are in STEADY_STATE: The task runningCount is equal to the computedDesiredCount. The pendingCount is 0. There are no tasks that are running on container instances in the DRAINING status. All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks. If any of those conditions aren't met, the stability status returns STABILIZING."
        },
        "stabilityStatusAt": {
          "type": "string",
          "format": "date-time",
          "description": "The Unix timestamp for the time when the task set stability status was retrieved."
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Tag"
          },
          "description": "The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. 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 allow"
        },
        "fargateEphemeralStorage": {
          "$ref": "#/$defs/DeploymentEphemeralStorage"
        }
      }
    }
  }
}