All Products
Search
Document Center

Function Compute:DeleteSnapshot

Last Updated:Aug 18, 2026

Deletes a user MicroSandbox snapshot.

Operation description

  • This API operation deletes a user MicroSandbox snapshot under the specified function.

  • After successful deletion, the snapshot enters an asynchronous deletion process. The operation returns 202 Accepted to indicate that the deletion request has been accepted, without waiting for the cleanup of underlying physical resources such as templates and artifacts to complete.

  • Repeated deletion of a snapshot that is already being deleted still returns 202 Accepted.

  • If the specified snapshot does not exist under the current function scope, 204 No Content is returned to support idempotent deletion.

  • If the snapshot is still being used by a resumed session, or there are consumer relations that have not been confirmed as clearable, 409 SnapshotInUse is returned and the snapshot is not deleted.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

DELETE /2023-03-30/functions/{functionName}/snapshots/{snapshotId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

functionName

string

Yes

The function name.

my-func

snapshotId

string

Yes

The ID of the snapshot to delete.

8e7d6c5b-4a3f-4c1a-9b8e-1f2a3b4c5d6e

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

None defined.

Examples

Success response

JSON format

{}

Error codes

HTTP status code

Error code

Error message

Description

400 IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.