# Replace the volumes of a deployment Source: https://docs.orchard.hackclub.com/api/operations/deployments_volumes_set/ `PUT /apiv1/deployments/{id}/volumes` Operation ID: `deployments_volumes_set` Auth: authenticated (scope: deploy) ## Parameters | Name | In | Required | Description | | --- | --- | --- | --- | | `id` | path | Yes | | ## Request body ```json { "properties": { "volumes": { "items": { "properties": { "hostPath": { "type": "string" }, "mountPath": { "type": "string" }, "name": { "type": "string" }, "pvcName": { "type": "string" }, "readOnly": { "type": "boolean" }, "storageSize": { "type": "string" }, "type": { "enum": [ "pvc", "hostPath", "emptyDir" ], "type": "string" } }, "required": [ "name", "type", "mountPath" ], "type": "object" }, "type": "array" } }, "required": [ "volumes" ], "type": "object" } ``` ## Responses ### 200: OK ```json { "additionalProperties": {}, "properties": { "autoDeployBranch": { "type": [ "string", "null" ] }, "autoDeployEnabled": { "type": "boolean" }, "autoDeployPaths": { "items": { "type": "string" }, "type": "array" }, "buildCommand": { "type": [ "string", "null" ] }, "builderOverride": { "enum": [ "firecracker", "kubernetes", null ], "type": [ "string", "null" ] }, "buildError": { "type": [ "string", "null" ] }, "buildFromRoot": { "type": "boolean" }, "buildLogs": { "type": [ "string", "null" ] }, "buildStatus": { "type": "string" }, "buildStep": { "type": [ "string", "null" ] }, "buildStepTimestamps": { "additionalProperties": {}, "type": [ "object", "null" ] }, "buildType": { "enum": [ "dockerfile", "railpack" ], "type": "string" }, "buildWithDepot": { "type": "boolean" }, "composeServiceName": { "type": [ "string", "null" ] }, "composeStackId": { "type": [ "string", "null" ] }, "cpuRequestMilli": { "type": [ "number", "null" ] }, "createdAt": { "type": "string" }, "createdBy": { "type": [ "string", "null" ] }, "deployStrategy": { "enum": [ "rollingUpdate", "recreate", "blueGreen" ], "type": "string" }, "detectedConfig": { "additionalProperties": {}, "type": [ "object", "null" ] }, "dockerfileHealthCheck": { "properties": { "command": { "items": { "type": "string" }, "type": "array" }, "interval": { "type": "number" }, "retries": { "type": "number" }, "startPeriod": { "type": "number" }, "timeout": { "type": "number" } }, "required": [ "command" ], "type": [ "object", "null" ] }, "dockerfilePath": { "type": [ "string", "null" ] }, "dockerfileTarget": { "type": [ "string", "null" ] }, "effectiveImagePullPolicy": { "description": "What the cluster is actually doing, after deriving. Render this.", "enum": [ "Always", "IfNotPresent" ], "type": "string" }, "environmentId": { "type": [ "string", "null" ] }, "envVars": { "items": { "additionalProperties": {}, "properties": { "createdAt": { "type": "string" }, "deploymentId": { "type": "string" }, "id": { "type": "string" }, "key": { "type": "string" }, "secret": { "type": "boolean" }, "updatedAt": { "type": "string" }, "value": { "type": [ "string", "null" ] } }, "required": [ "id", "deploymentId", "key", "value", "secret", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "framework": { "type": [ "string", "null" ] }, "githubBranch": { "type": [ "string", "null" ] }, "githubInstallationId": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "githubRepo": { "type": [ "string", "null" ] }, "healthCheckCommand": { "type": [ "string", "null" ] }, "healthCheckEnabled": { "type": "boolean" }, "healthCheckInterval": { "type": "number" }, "healthCheckOverride": { "type": "boolean" }, "healthCheckPath": { "type": [ "string", "null" ] }, "healthCheckPort": { "type": [ "number", "null" ] }, "healthCheckRetries": { "type": "number" }, "healthCheckTimeout": { "type": "number" }, "healthCheckType": { "type": "string" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string" }, "image": { "type": [ "string", "null" ] }, "imagePullPolicy": { "description": "The override. null means it is derived from the image tag.", "enum": [ "Always", "IfNotPresent", null ], "type": [ "string", "null" ] }, "ingresses": { "items": { "additionalProperties": {}, "properties": { "annotations": { "additionalProperties": {}, "type": [ "object", "null" ] }, "clusterIssuer": { "type": [ "string", "null" ] }, "createdAt": { "type": "string" }, "deploymentId": { "type": [ "string", "null" ] }, "entrypoints": { "items": { "type": "string" }, "type": "array" }, "environmentId": { "type": [ "string", "null" ] }, "host": { "type": "string" }, "id": { "type": "string" }, "ingressClass": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "namespace": { "type": "string" }, "path": { "type": "string" }, "pathType": { "type": "string" }, "projectId": { "type": "string" }, "protectionBypassSecret": { "type": [ "string", "null" ] }, "protectionMode": { "enum": [ "none", "password", "orchard" ], "type": "string" }, "redirectStatus": { "anyOf": [ { "enum": [ 301 ], "type": "number" }, { "enum": [ 302 ], "type": "number" }, { "enum": [ 307 ], "type": "number" }, { "enum": [ 308 ], "type": "number" }, { "type": "null" } ] }, "redirectTarget": { "type": [ "string", "null" ] }, "routes": { "items": { "additionalProperties": {}, "properties": { "path": { "type": "string" }, "serviceName": { "type": "string" }, "servicePort": { "type": "number" } }, "required": [ "path", "serviceName", "servicePort" ], "type": "object" }, "type": "array" }, "service": { "additionalProperties": {}, "properties": { "createdAt": { "type": "string" }, "deploymentId": { "type": "string" }, "domain": { "type": [ "string", "null" ] }, "externalIp": { "type": [ "string", "null" ] }, "id": { "type": "string" }, "internalUrl": { "type": "string" }, "internalUrls": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" }, "nodePort": { "type": [ "number", "null" ] }, "port": { "type": "number" }, "ports": { "items": { "additionalProperties": {}, "properties": { "id": { "type": "string" }, "name": { "type": [ "string", "null" ] }, "nodePort": { "type": [ "number", "null" ] }, "port": { "type": "number" }, "protocol": { "type": "string" }, "publicAddress": { "type": [ "string", "null" ] }, "publicEnabled": { "type": "boolean" }, "publicPort": { "type": [ "number", "null" ] }, "publicStatus": { "properties": { "addresses": { "items": { "type": "string" }, "type": "array" }, "reason": { "type": [ "string", "null" ] }, "state": { "enum": [ "ready", "pending", "failed", "unknown" ], "type": "string" } }, "required": [ "state", "addresses", "reason" ], "type": "object" }, "serviceId": { "type": "string" }, "targetPort": { "type": "number" } }, "required": [ "id", "serviceId", "port", "targetPort", "protocol" ], "type": "object" }, "type": "array" }, "protocol": { "type": "string" }, "targetPort": { "type": "number" }, "type": { "enum": [ "internal", "external", "ingress" ], "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "deploymentId", "name", "type", "port", "targetPort", "protocol", "createdAt", "updatedAt" ], "type": [ "object", "null" ] }, "serviceId": { "type": [ "string", "null" ] }, "statusAddress": { "type": [ "string", "null" ] }, "templateInstanceId": { "type": [ "string", "null" ] }, "tlsEnabled": { "type": "boolean" }, "tlsHosts": { "items": { "type": "string" }, "type": "array" }, "tlsSecretName": { "type": [ "string", "null" ] }, "updatedAt": { "type": "string" }, "url": { "type": "string" } }, "required": [ "id", "name", "host", "path" ], "type": "object" }, "type": "array" }, "installCommand": { "type": [ "string", "null" ] }, "livenessEnabled": { "type": "boolean" }, "memoryRequestBytes": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "name": { "type": "string" }, "namespace": { "type": "string" }, "outputDirectory": { "type": [ "string", "null" ] }, "persistentBuildCache": { "type": "boolean" }, "pods": { "items": { "additionalProperties": {}, "properties": { "containers": { "items": { "additionalProperties": {}, "properties": { "image": { "type": [ "string", "null" ] }, "init": { "type": "boolean" }, "lastTermination": { "additionalProperties": {}, "properties": { "exitCode": { "type": [ "number", "null" ] }, "finishedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "reason" ], "type": [ "object", "null" ] }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "ready": { "type": "boolean" }, "reason": { "type": [ "string", "null" ] }, "restartCount": { "type": "number" }, "startedAt": { "type": [ "string", "null" ] }, "state": { "enum": [ "running", "waiting", "terminated", "unknown" ], "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": "array" }, "cpuUsage": { "type": [ "number", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "deletingAt": { "type": [ "string", "null" ] }, "disruption": { "type": [ "string", "null" ] }, "graceSeconds": { "type": [ "number", "null" ] }, "id": { "type": "string" }, "ip": { "type": [ "string", "null" ] }, "memoryUsage": { "type": [ "number", "null" ] }, "name": { "type": "string" }, "nodeName": { "type": [ "string", "null" ] }, "notReadySince": { "type": [ "string", "null" ] }, "phase": { "type": [ "string", "null" ] }, "podIp": { "type": [ "string", "null" ] }, "probes": { "properties": { "liveness": { "type": "boolean" }, "readiness": { "type": "boolean" }, "startup": { "type": "boolean" } }, "required": [ "liveness", "readiness", "startup" ], "type": "object" }, "readySince": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] }, "restartCount": { "type": "number" }, "revision": { "type": [ "string", "null" ] }, "scheduled": { "type": "boolean" }, "schedulingMessage": { "type": [ "string", "null" ] }, "slot": { "type": [ "string", "null" ] }, "startTime": { "type": [ "string", "null" ] }, "status": { "type": "string" }, "unschedulableSince": { "type": [ "string", "null" ] } }, "required": [ "name", "status" ], "type": "object" }, "type": "array" }, "project": { "additionalProperties": {}, "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "organizationId": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "id", "name" ], "type": "object" }, "projectId": { "type": "string" }, "readinessEnabled": { "type": "boolean" }, "replicas": { "type": "number" }, "rollout": { "properties": { "available": { "type": "number" }, "currentRevision": { "type": [ "string", "null" ] }, "desired": { "type": "number" }, "previous": { "properties": { "createdAt": { "type": [ "string", "null" ] }, "hash": { "type": "string" }, "image": { "type": [ "string", "null" ] }, "number": { "type": "number" }, "ready": { "type": "number" }, "replicas": { "type": "number" } }, "required": [ "hash", "number", "image", "createdAt", "replicas", "ready" ], "type": [ "object", "null" ] }, "ready": { "type": "number" }, "reason": { "type": [ "string", "null" ] }, "revisions": { "items": { "properties": { "createdAt": { "type": [ "string", "null" ] }, "hash": { "type": "string" }, "image": { "type": [ "string", "null" ] }, "number": { "type": "number" }, "ready": { "type": "number" }, "replicas": { "type": "number" } }, "required": [ "hash", "number", "image", "createdAt", "replicas", "ready" ], "type": "object" }, "type": "array" }, "state": { "enum": [ "stable", "progressing", "failed" ], "type": "string" }, "updated": { "type": "number" } }, "required": [ "currentRevision", "revisions", "desired", "updated", "ready", "available", "state", "reason" ], "type": [ "object", "null" ] }, "rootDirectory": { "type": [ "string", "null" ] }, "services": { "items": { "additionalProperties": {}, "properties": { "createdAt": { "type": "string" }, "deploymentId": { "type": "string" }, "domain": { "type": [ "string", "null" ] }, "externalIp": { "type": [ "string", "null" ] }, "id": { "type": "string" }, "internalUrl": { "type": "string" }, "internalUrls": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" }, "nodePort": { "type": [ "number", "null" ] }, "port": { "type": "number" }, "ports": { "items": { "additionalProperties": {}, "properties": { "id": { "type": "string" }, "name": { "type": [ "string", "null" ] }, "nodePort": { "type": [ "number", "null" ] }, "port": { "type": "number" }, "protocol": { "type": "string" }, "publicAddress": { "type": [ "string", "null" ] }, "publicEnabled": { "type": "boolean" }, "publicPort": { "type": [ "number", "null" ] }, "publicStatus": { "properties": { "addresses": { "items": { "type": "string" }, "type": "array" }, "reason": { "type": [ "string", "null" ] }, "state": { "enum": [ "ready", "pending", "failed", "unknown" ], "type": "string" } }, "required": [ "state", "addresses", "reason" ], "type": "object" }, "serviceId": { "type": "string" }, "targetPort": { "type": "number" } }, "required": [ "id", "serviceId", "port", "targetPort", "protocol" ], "type": "object" }, "type": "array" }, "protocol": { "type": "string" }, "targetPort": { "type": "number" }, "type": { "enum": [ "internal", "external", "ingress" ], "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "deploymentId", "name", "type", "port", "targetPort", "protocol", "createdAt", "updatedAt" ], "type": "object" }, "type": "array" }, "startCommand": { "type": [ "string", "null" ] }, "startupEnabled": { "type": "boolean" }, "startupFailureThreshold": { "type": "number" }, "status": { "type": "string" }, "stopped": { "type": "boolean" }, "tailscaleExposed": { "type": "boolean" }, "tailscaleHostname": { "type": [ "string", "null" ] }, "templateInstanceId": { "type": [ "string", "null" ] }, "updatedAt": { "type": "string" }, "volumes": { "items": { "additionalProperties": {}, "properties": { "createdAt": { "type": "string" }, "deploymentId": { "type": "string" }, "hostPath": { "type": [ "string", "null" ] }, "id": { "type": "string" }, "mountPath": { "type": "string" }, "name": { "type": "string" }, "pvcName": { "type": [ "string", "null" ] }, "readOnly": { "type": "boolean" }, "storageSize": { "type": [ "string", "null" ] }, "type": { "enum": [ "pvc", "hostPath", "emptyDir" ], "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "name", "type", "mountPath", "readOnly" ], "type": "object" }, "type": "array" }, "warnings": { "items": { "additionalProperties": {}, "properties": { "message": { "type": "string" }, "podName": { "type": "string" }, "timestamp": { "type": "string" } }, "type": "object" }, "type": "array" } }, "required": [ "id", "projectId", "name", "namespace", "replicas", "stopped", "status", "buildStatus", "createdAt", "updatedAt" ], "type": "object" } ```