Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'.
May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.
HTTP request
PUT https://run.googleapis.com/apis/serving.knative.dev/v1/{name}
Path parameters
Parameters
name
string
Required. The fully qualified name of the service to replace. It can be any of the following forms:
namespaces/{project_id_or_number}/services/{serviceName} (only when the endpoint is regional)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[],null,["# Method: namespaces.services.replaceService\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nReplaces a service.\n\nOnly the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'.\n\nMay provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.\n\n### HTTP request\n\n`PUT https://run.googleapis.com/apis/serving.knative.dev/v1/{name}`\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Service](/run/docs/reference/rest/v1/namespaces.services#Service).\n\n### Response body\n\nIf successful, the response body contains an instance of [Service](/run/docs/reference/rest/v1/namespaces.services#Service).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]