Deployment Service

Update a deployment

PATCH
/projects/{projectId}/endpoints/{endpointId}/deployments/{id}

Updates mutable deployment fields such as its model, configuration, autoscaling bounds, or LoRA support. Changes that affect serving may trigger asynchronous reprovisioning.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Project identifier.

endpointId*string

Endpoint identifier.

id*string

Deployment identifier.

Query Parameters

updateMask?string

Fields to update. If not set, the fields populated on deployment are updated.

Request Body

application/json

Mutable deployment settings. Use the resource-name fields or their deprecated ID alternatives for a model or config change, but not both.

name?string

Updated endpoint string.

autoscaling?

Updated autoscaling configuration.

inactiveTimeout?integer

Updated inactive timeout in minutes. Use 0 to disable automatic stopping; otherwise accepted values are 30 through 1440.

maxConcurrentRequestsPerReplica?string

Updated maximum number of inference requests that may be in flight to a single replica. Values above the deployment config's per-replica concurrency limit minus one are reduced on update; 0 means unlimited when the config limit is 1 or less. Changes take effect without restarting replicas.

etag?string

Current deployment version. The update is rejected if this value no longer matches.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/projects/string/endpoints/string/deployments/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "projectId": "string",  "endpointId": "string",  "name": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "modelId": "string",  "modelRevisionId": "string",  "model": "string",  "autoscaling": {    "minReplicas": 0,    "maxReplicas": 0,    "scaleDownWindow": "string",    "scaleUpWindow": "string",    "scaleToZeroWindow": "string",    "scalingMetrics": [      {        "name": "active_sessions",        "type": "METRIC_TARGET_TYPE_VALUE",        "target": 0,        "percentile": "string"      }    ],    "scaleUp": {      "policies": [        {          "type": "SCALING_POLICY_TYPE_PODS",          "value": 1,          "periodSeconds": 1        }      ],      "selectPolicy": "SCALING_POLICY_SELECT_MAX"    },    "scaleDown": {      "policies": [        {          "type": "SCALING_POLICY_TYPE_PODS",          "value": 1,          "periodSeconds": 1        }      ],      "selectPolicy": "SCALING_POLICY_SELECT_MAX"    }  },  "configId": "string",  "config": "string",  "speculatorId": "string",  "speculatorRevisionId": "string",  "speculator": "string",  "estimatedEffectiveTrafficShare": 0.1,  "maxConcurrentRequestsPerReplica": "string",  "inactiveTimeout": 0,  "etag": "string",  "hardware": "string",  "trafficMode": "TRAFFIC_MODE_LIVE",  "runtimeInfo": {    "engineType": "string",    "engineVersion": "string",    "functionCallingSupported": true,    "structuredOutputSupported": true  },  "desiredReplicas": 0,  "status": {    "state": "DEPLOYMENT_STATE_PROVISIONING",    "readyReplicas": 0,    "message": "string",    "scheduledReplicas": 0,    "details": {      "region": [        {          "region": "string",          "scheduledReplicas": 0,          "readyReplicas": 0        }      ]    }  },  "placement": {    "inline": {      "regions": [        "string"      ],      "constraint": "ENFORCEMENT_REQUIRED",      "compliancePolicy": {        "hipaa": true      }    }  }}