{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-describe-service-deployments-response-schema.json",
  "title": "DescribeServiceDeploymentsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-service-deployment-api-openapi.yml#/components/schemas/DescribeServiceDeploymentsResponse",
  "type": "object",
  "properties": {
    "serviceDeployments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ServiceDeployment"
      },
      "description": "The list of service deployments described."
    },
    "failures": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Failure"
      },
      "description": "Any failures associated with the call. If you decsribe a deployment with a service revision created before October 25, 2024, the call fails. The failure includes the service revision ARN and the reason set to MISSING."
    }
  },
  "$defs": {
    "CanaryConfiguration": {
      "type": "object",
      "properties": {
        "canaryPercent": {
          "type": "number",
          "description": "The percentage of production traffic to shift to the new service revision during the canary phase. Valid values are multiples of 0.1 from 0.1 to 100.0. The default value is 5.0."
        },
        "canaryBakeTimeInMinutes": {
          "type": "integer",
          "description": "The amount of time in minutes to wait during the canary phase before shifting the remaining production traffic to the new service revision. Valid values are 0 to 1440 minutes (24 hours). The default value is 10."
        }
      }
    },
    "DeploymentAlarms": {
      "type": "object",
      "properties": {
        "alarmNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "One or more CloudWatch alarm names. Use a \",\" to separate the alarms."
        },
        "rollback": {
          "type": "boolean",
          "description": "Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully."
        },
        "enable": {
          "type": "boolean",
          "description": "Determines whether to use the CloudWatch alarm option in the service deployment process."
        }
      },
      "required": [
        "alarmNames",
        "rollback",
        "enable"
      ]
    },
    "DeploymentCircuitBreaker": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean",
          "description": "Determines whether to use the deployment circuit breaker logic for the service."
        },
        "rollback": {
          "type": "boolean",
          "description": "Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is on, when a service deployment fails, the service is rolled back to the last deployment that completed successfully."
        },
        "resetOnHealthyTask": {
          "type": "boolean",
          "description": "Specifies whether the deployment circuit breaker resets its failure count when a task reaches a healthy state. When set to true, a task that reaches a healthy state resets the failure count to 0. When set to false, Amazon ECS does not reset the failure count. The default is true."
        },
        "thresholdConfiguration": {
          "$ref": "#/$defs/ThresholdConfiguration"
        }
      },
      "required": [
        "enable",
        "rollback"
      ]
    },
    "DeploymentConfiguration": {
      "type": "object",
      "properties": {
        "deploymentCircuitBreaker": {
          "$ref": "#/$defs/DeploymentCircuitBreaker"
        },
        "maximumPercent": {
          "type": "integer",
          "description": "If a service is using the rolling update (ECS) deployment type, the maximumPercent parameter represents an upper limit on the number of your service's tasks that are allowed in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service is using the REPLICA service scheduler and has a desiredCount of four tasks and a maximumPercent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that th"
        },
        "minimumHealthyPercent": {
          "type": "integer",
          "description": "If a service is using the rolling update (ECS) deployment type, the minimumHealthyPercent represents a lower limit on the number of your service's tasks that must remain in the RUNNING state during a deployment, as a percentage of the desiredCount (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent of 50%, the service scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. If any tasks are unhealthy a"
        },
        "alarms": {
          "$ref": "#/$defs/DeploymentAlarms"
        },
        "strategy": {
          "type": "string",
          "enum": [
            "ROLLING",
            "BLUE_GREEN",
            "LINEAR",
            "CANARY"
          ],
          "description": "The deployment strategy for the service. Choose from these valid values: ROLLING - When you create a service which uses the rolling update (ROLLING) deployment strategy, the Amazon ECS service scheduler replaces the currently running tasks with new tasks. The number of tasks that Amazon ECS adds or removes from the service during a rolling update is controlled by the service deployment configuration. BLUE_GREEN - A blue/green deployment strategy (BLUE_GREEN) is a release methodology that reduces downtime and risk by running two identical production environments called blue and green. With Amaz"
        },
        "bakeTimeInMinutes": {
          "type": "integer",
          "description": "The time period when both blue and green service revisions are running simultaneously after the production traffic has shifted. You must provide this parameter when you use the BLUE_GREEN deployment strategy."
        },
        "lifecycleHooks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeploymentLifecycleHook"
          },
          "description": "An array of deployment lifecycle hook objects to run custom logic or pause the deployment at specific stages of the deployment lifecycle."
        },
        "linearConfiguration": {
          "$ref": "#/$defs/LinearConfiguration"
        },
        "canaryConfiguration": {
          "$ref": "#/$defs/CanaryConfiguration"
        },
        "earlySuccessCriteria": {
          "$ref": "#/$defs/DeploymentEarlySuccessCriteria"
        }
      }
    },
    "DeploymentEarlySuccessCriteria": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean",
          "description": "Specifies whether to use the early success criteria for the service deployment. When set to false, the deployment uses the default behavior, where Amazon ECS considers the deployment successful when the target service revision fully stabilizes and the previous tasks are removed. The default value is false. When set to true, Amazon ECS monitors the deployment to meet early success criteria. You must also specify healthyPercent and sourceServiceRevisionCleanup."
        },
        "healthyPercent": {
          "type": "integer",
          "description": "The percentage of healthy tasks that the target service revision must reach before Amazon ECS considers the deployment successful. This percentage is relative to the service's desiredCount and must be an integer between 0 and 100. This value must be greater than or equal to the minimumHealthyPercent value. After this percentage of tasks is healthy and the bake time elapses, Amazon ECS completes the deployment. Amazon ECS continues to scale the target service revision to 100 percent in the background."
        },
        "sourceServiceRevisionCleanup": {
          "type": "string",
          "enum": [
            "BLOCKING",
            "DEFERRED"
          ],
          "description": "The time when Amazon ECS removes the source revisions' tasks relative to deployment completion. The valid values are: BLOCKING—Amazon ECS removes the previous tasks before it marks the deployment as successful. DEFERRED—Amazon ECS marks the deployment successful, and then removes the previous tasks in the background."
        }
      },
      "required": [
        "enable"
      ]
    },
    "DeploymentLifecycleHook": {
      "type": "object",
      "properties": {
        "targetType": {
          "type": "string",
          "enum": [
            "AWS_LAMBDA",
            "PAUSE"
          ],
          "description": "The type of action the lifecycle hook performs. Valid values are: AWS_LAMBDA - Invokes a Lambda function at the specified lifecycle stage. This is the default value. PAUSE - Pauses the deployment at the specified lifecycle stage until you call ContinueServiceDeployment to continue or roll back. This field is optional. If not specified, the default value is AWS_LAMBDA."
        },
        "hookTargetArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the hook target. For AWS_LAMBDA hooks, this is the Lambda function ARN. This field is not applicable for PAUSE hooks. You must provide this parameter when configuring an AWS_LAMBDA lifecycle hook."
        },
        "roleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf. For more information, see Permissions required for Lambda functions in Amazon ECS blue/green deployments in the Amazon Elastic Container Service Developer Guide."
        },
        "lifecycleStages": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "RECONCILE_SERVICE",
              "PRE_SCALE_UP",
              "POST_SCALE_UP",
              "TEST_TRAFFIC_SHIFT",
              "POST_TEST_TRAFFIC_SHIFT",
              "PRE_PRODUCTION_TRAFFIC_SHIFT",
              "PRODUCTION_TRAFFIC_SHIFT",
              "POST_PRODUCTION_TRAFFIC_SHIFT"
            ]
          },
          "description": "The lifecycle stages at which to run the hook. Choose from these valid values: RECONCILE_SERVICE The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state. You can use a lifecycle hook for this stage. PRE_SCALE_UP The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic. You can use a lifecycle hook for this stage. POST_SCALE_UP The green service revision has started. The blue service revision is handling 100% of the production traffic."
        },
        "hookDetails": {
          "type": "object",
          "description": "Use this field to specify custom parameters that Amazon ECS passes to your Lambda function on each invocation. This field is not used for PAUSE hooks."
        },
        "timeoutConfiguration": {
          "$ref": "#/$defs/DeploymentLifecycleHookTimeoutConfiguration"
        }
      }
    },
    "DeploymentLifecycleHookDetail": {
      "type": "object",
      "properties": {
        "hookId": {
          "type": "string",
          "description": "The ID of the lifecycle hook. Use this value when calling ContinueServiceDeployment to continue or roll back a paused deployment."
        },
        "targetType": {
          "type": "string",
          "enum": [
            "AWS_LAMBDA",
            "PAUSE"
          ],
          "description": "The type of action the lifecycle hook performs, such as AWS_LAMBDA or PAUSE."
        },
        "targetArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the hook target. For AWS_LAMBDA hooks, this is the Lambda function ARN. For PAUSE hooks, this field is not set."
        },
        "status": {
          "type": "string",
          "enum": [
            "AWAITING_ACTION",
            "IN_PROGRESS",
            "SUCCEEDED",
            "FAILED",
            "TIMED_OUT"
          ],
          "description": "The status of the lifecycle hook. Valid values include AWAITING_ACTION, IN_PROGRESS, SUCCEEDED, FAILED, and TIMED_OUT."
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time when the lifecycle hook times out. If the hook has not been completed by this time, Amazon ECS takes the timeout action."
        },
        "timeoutAction": {
          "type": "string",
          "enum": [
            "ROLLBACK",
            "CONTINUE"
          ],
          "description": "The action Amazon ECS takes when the lifecycle hook times out. Valid values are CONTINUE and ROLLBACK."
        }
      }
    },
    "DeploymentLifecycleHookTimeoutConfiguration": {
      "type": "object",
      "properties": {
        "timeoutInMinutes": {
          "type": "integer",
          "description": "The number of minutes Amazon ECS waits for the lifecycle hook to complete before taking the timeout action. Default: 1440 (24 hours)"
        },
        "action": {
          "type": "string",
          "enum": [
            "ROLLBACK",
            "CONTINUE"
          ],
          "description": "The action Amazon ECS takes when the lifecycle hook times out. Valid values are: CONTINUE - Proceeds the deployment to the next lifecycle stage. ROLLBACK - Rolls back the deployment to the previous service revision. Default: ROLLBACK"
        }
      }
    },
    "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."
        }
      }
    },
    "LinearConfiguration": {
      "type": "object",
      "properties": {
        "stepPercent": {
          "type": "number",
          "description": "The percentage of production traffic to shift in each step during a linear deployment. Valid values are multiples of 0.1 from 3.0 to 100.0. The default value is 10.0."
        },
        "stepBakeTimeInMinutes": {
          "type": "integer",
          "description": "The amount of time in minutes to wait between each traffic shifting step during a linear deployment. Valid values are 0 to 1440 minutes (24 hours). The default value is 6. This bake time is not applied after reaching 100 percent traffic."
        }
      }
    },
    "Rollback": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "description": "The reason the rollback happened. For example, the circuit breaker initiated the rollback operation."
        },
        "startedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Time time that the rollback started. The format is yyyy-MM-dd HH:mm:ss.SSSSSS."
        },
        "serviceRevisionArn": {
          "type": "string",
          "description": "The ARN of the service revision deployed as part of the rollback."
        }
      }
    },
    "ServiceDeployment": {
      "type": "object",
      "properties": {
        "serviceDeploymentArn": {
          "type": "string",
          "description": "The ARN of the service deployment."
        },
        "serviceArn": {
          "type": "string",
          "description": "The ARN of the service for this service deployment."
        },
        "clusterArn": {
          "type": "string",
          "description": "The ARN of the cluster that hosts the service."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the service deployment was created. The format is yyyy-MM-dd HH:mm:ss.SSSSSS."
        },
        "startedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the service deployment statred. The format is yyyy-MM-dd HH:mm:ss.SSSSSS."
        },
        "finishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the service deployment finished. The format is yyyy-MM-dd HH:mm:ss.SSSSSS."
        },
        "stoppedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time the service deployment stopped. The format is yyyy-MM-dd HH:mm:ss.SSSSSS. The service deployment stops when any of the following actions happen: A user manually stops the deployment The rollback option is not in use for the failure detection mechanism (the circuit breaker or alarm-based) and the service fails."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The time that the service deployment was last updated. The format is yyyy-MM-dd HH:mm:ss.SSSSSS."
        },
        "sourceServiceRevisions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ServiceRevisionSummary"
          },
          "description": "The currently deployed workload configuration."
        },
        "targetServiceRevision": {
          "$ref": "#/$defs/ServiceRevisionSummary"
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "SUCCESSFUL",
            "STOPPED",
            "STOP_REQUESTED",
            "IN_PROGRESS",
            "ROLLBACK_REQUESTED",
            "ROLLBACK_IN_PROGRESS",
            "ROLLBACK_SUCCESSFUL",
            "ROLLBACK_FAILED"
          ],
          "description": "The service deployment state."
        },
        "statusReason": {
          "type": "string",
          "description": "Information about why the service deployment is in the current status. For example, the circuit breaker detected a failure."
        },
        "lifecycleStage": {
          "type": "string",
          "enum": [
            "RECONCILE_SERVICE",
            "PRE_SCALE_UP",
            "SCALE_UP",
            "POST_SCALE_UP",
            "TEST_TRAFFIC_SHIFT",
            "POST_TEST_TRAFFIC_SHIFT",
            "PRODUCTION_TRAFFIC_SHIFT",
            "POST_PRODUCTION_TRAFFIC_SHIFT",
            "BAKE_TIME",
            "CLEAN_UP"
          ],
          "description": "The current lifecycle stage of the deployment. Possible values include: RECONCILE_SERVICE The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state. PRE_SCALE_UP The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic. SCALE_UP The stage when the green service revision scales up to 100% and launches new tasks. The green service revision is not serving any traffic at this point. POST_SCALE_UP The green service revision has started. The "
        },
        "lifecycleHookDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeploymentLifecycleHookDetail"
          },
          "description": "The details of the lifecycle hooks for the current service deployment."
        },
        "deploymentConfiguration": {
          "$ref": "#/$defs/DeploymentConfiguration"
        },
        "rollback": {
          "$ref": "#/$defs/Rollback"
        },
        "deploymentCircuitBreaker": {
          "$ref": "#/$defs/ServiceDeploymentCircuitBreaker"
        },
        "alarms": {
          "$ref": "#/$defs/ServiceDeploymentAlarms"
        }
      }
    },
    "ServiceDeploymentAlarms": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "TRIGGERED",
            "MONITORING",
            "MONITORING_COMPLETE",
            "DISABLED"
          ],
          "description": "The status of the alarms check. Amazon ECS is not using alarms for service deployment failures when the status is DISABLED."
        },
        "alarmNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The name of the CloudWatch alarms that determine when a service deployment failed. A \",\" separates the alarms."
        },
        "triggeredAlarmNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "One or more CloudWatch alarm names that have been triggered during the service deployment. A \",\" separates the alarm names."
        }
      }
    },
    "ServiceDeploymentCircuitBreaker": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "TRIGGERED",
            "MONITORING",
            "MONITORING_COMPLETE",
            "DISABLED"
          ],
          "description": "The circuit breaker status. Amazon ECS is not using the circuit breaker for service deployment failures when the status is DISABLED."
        },
        "failureCount": {
          "type": "integer",
          "description": "The number of times the circuit breaker detected a service deploymeny failure."
        },
        "threshold": {
          "type": "integer",
          "description": "The threshhold which determines that the service deployment failed. The deployment circuit breaker calculates the threshold value, and then uses the value to determine when to move the deployment to a FAILED state. The deployment circuit breaker has a minimum threshold of 3 and a maximum threshold of 200. and uses the values in the following formula to determine the deployment failure. 0.5 * desired task count"
        }
      }
    },
    "ServiceRevisionSummary": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The ARN of the service revision."
        },
        "requestedTaskCount": {
          "type": "integer",
          "description": "The number of requested tasks for the service revision."
        },
        "runningTaskCount": {
          "type": "integer",
          "description": "The number of running tasks for the service revision."
        },
        "pendingTaskCount": {
          "type": "integer",
          "description": "The number of pending tasks for the service revision."
        },
        "requestedTestTrafficWeight": {
          "type": "number",
          "description": "The percentage of test traffic that is directed to this service revision. This value represents a snapshot of the traffic distribution and may not reflect real-time changes during active deployments. Valid values are 0.0 to 100.0."
        },
        "requestedProductionTrafficWeight": {
          "type": "number",
          "description": "The percentage of production traffic that is directed to this service revision. This value represents a snapshot of the traffic distribution and may not reflect real-time changes during active deployments. Valid values are 0.0 to 100.0."
        }
      }
    },
    "ThresholdConfiguration": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "COUNT",
            "BOUNDED_PERCENT",
            "UNBOUNDED_PERCENT"
          ],
          "description": "Determines how Amazon ECS uses value to calculate the failure threshold. For the percentage types (BOUNDED_PERCENT and UNBOUNDED_PERCENT), Amazon ECS multiplies value by the latest service desired count. For COUNT, Amazon ECS uses value directly as the threshold. The default is BOUNDED_PERCENT."
        },
        "value": {
          "type": "integer",
          "description": "Specifies the integer that Amazon ECS uses to calculate the failure threshold. When type is COUNT, this value is the failure threshold itself. When type is a percentage type, Amazon ECS multiplies this value by the latest service desired count to produce the failure threshold. The default is 50."
        }
      },
      "required": [
        "type",
        "value"
      ]
    }
  }
}