{
  "name": "ListDeployments",
  "plane": "control",
  "terraformEligible": false,
  "protocol": {
    "kind": "cloudJson",
    "target": "CloudSites.ListDeployments",
    "service": "sites"
  },
  "requestBody": "typed",
  "responseBody": "typed",
  "requestSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "maxResults": {
        "default": null,
        "format": "uint32",
        "minimum": 0.0,
        "type": [
          "integer",
          "null"
        ]
      },
      "nextToken": {
        "default": null,
        "type": [
          "string",
          "null"
        ]
      },
      "siteId": {
        "type": "string"
      }
    },
    "required": [
      "siteId"
    ],
    "title": "ListDeploymentsRequest",
    "type": "object"
  },
  "responseSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "AsyncEffectState": {
        "enum": [
          "PENDING",
          "LEASED",
          "APPLIED",
          "TERMINAL_FAILED",
          "BLOCKED_PLATFORM"
        ],
        "type": "string"
      },
      "AsyncOperationStatus": {
        "properties": {
          "commandGeneration": {
            "format": "uint64",
            "minimum": 0.0,
            "type": "integer"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "edgePropagation": {
            "$ref": "#/definitions/EdgePropagationStatus"
          },
          "effectId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/definitions/AsyncEffectState"
          }
        },
        "required": [
          "commandGeneration",
          "edgePropagation",
          "effectId",
          "state"
        ],
        "type": "object"
      },
      "DeploymentDescription": {
        "properties": {
          "adapterId": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentDigest": {
            "type": "string"
          },
          "deploymentId": {
            "type": "string"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "frameworkId": {
            "type": [
              "string",
              "null"
            ]
          },
          "operation": {
            "anyOf": [
              {
                "$ref": "#/definitions/AsyncOperationStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "previewHostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "revision": {
            "description": "OCC revision for DeleteDeployment / conditional writes.",
            "format": "uint64",
            "minimum": 0.0,
            "type": "integer"
          },
          "siteId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/definitions/DeploymentStatus"
          },
          "upload": {
            "anyOf": [
              {
                "$ref": "#/definitions/DeploymentUploadSession"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "contentDigest",
          "deploymentId",
          "revision",
          "siteId",
          "status"
        ],
        "type": "object"
      },
      "DeploymentPutUrl": {
        "properties": {
          "contentDigest": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "key": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "contentDigest",
          "headers",
          "key",
          "url"
        ],
        "type": "object"
      },
      "DeploymentStatus": {
        "enum": [
          "UPLOADING",
          "PUBLISHING",
          "READY",
          "FAILED",
          "DELETING",
          "DELETED"
        ],
        "type": "string"
      },
      "DeploymentUploadSession": {
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "putUrls": {
            "items": {
              "$ref": "#/definitions/DeploymentPutUrl"
            },
            "type": "array"
          },
          "uploadId": {
            "type": "string"
          }
        },
        "required": [
          "expiresAt",
          "uploadId"
        ],
        "type": "object"
      },
      "EdgePropagationStatus": {
        "enum": [
          "COMPLETE",
          "PENDING",
          "FAILED"
        ],
        "type": "string"
      }
    },
    "properties": {
      "deployments": {
        "items": {
          "$ref": "#/definitions/DeploymentDescription"
        },
        "type": "array"
      },
      "nextToken": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "deployments"
    ],
    "title": "ListDeploymentsResponse",
    "type": "object"
  }
}
