The instance might be automatically recreated based on the scaling settings of the version. For more information, see "How Instances are Managed" (standard environment | flexible environment).
To ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to STOPPED with the apps.services.versions.patch method.
[[["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-06-16 UTC."],[[["\u003cp\u003eThis page details how to stop a running instance, which may be automatically recreated based on version scaling settings.\u003c/p\u003e\n"],["\u003cp\u003eStopping all instances in a version can be achieved by changing the version's serving status to \u003ccode\u003eSTOPPED\u003c/code\u003e using the \u003ccode\u003eapps.services.versions.patch\u003c/code\u003e method, ensuring instances are not recreated.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to stop an instance is a \u003ccode\u003eDELETE\u003c/code\u003e operation using a specific URL structure defined by gRPC Transcoding, targeting the resource name.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a resource name as a path parameter and the \u003ccode\u003eappengine.instances.delete\u003c/code\u003e IAM permission, while the request body itself must remain empty.\u003c/p\u003e\n"],["\u003cp\u003eA successful request will return an instance of an \u003ccode\u003eOperation\u003c/code\u003e and needs \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope authorization.\u003c/p\u003e\n"]]],[],null,["# Method: apps.services.versions.instances.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [Try it!](#try-it)\n\nStops a running instance.\n\nThe instance might be automatically recreated based on the scaling settings of the version. For more information, see \"How Instances are Managed\" ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) \\| [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).\n\nTo ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to `STOPPED` with the [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) method.\n\n### HTTP request\n\n`DELETE https://appengine.googleapis.com/v1beta/{name=apps/*/services/*/versions/*/instances/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/appengine/docs/admin-api/reference/rest/Shared.Types/ListOperationsResponse#Operation).\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](https://cloud.google.com/docs/authentication/)."]]