All Products
Search
Document Center

Function Compute:ListSnapshots

Last Updated:Aug 20, 2026

Lists snapshot information.

Operation description

  • This API operation lists MicroSandbox snapshots visible to the current account.

  • Only unexpired snapshots in the Available state are returned.

  • Four filtering methods are supported: account-level listing, filtering by function, filtering by function and source session ID, and filtering by function, source session ID, and qualifier at creation time.

  • Results are paginated in stable descending order by creation time and snapshot ID.

  • ListSnapshots uses a search index for queries, so eventual consistency delays may occur within a short period. GetSnapshot and creating a session from a snapshot use strongly consistent reads from the primary table.

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

GET /2023-03-30/snapshots HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

functionName

string

No

The function name.

my-func

sessionId

string

No

The source session ID from which the snapshot was created. When specified, functionName must also be specified.

test-session-id-1

qualifier

string

No

The function alias.

alias

limit

integer

No

The maximum number of snapshots to return. Valid values: 1 to 100. Default value: 20.

20

nextToken

string

No

The pagination token used to retrieve more results.

caeba0be03****f84eb48b699f0a4883

Response elements

Element

Type

Description

Example

ListSnapshotsOutput

The list of snapshot information returned.

Examples

Success response

JSON format

{
  "nextToken": "",
  "snapshots": [
    {
      "snapshotId": "550e8400-e29b-41d4-a716-446655440000",
      "status": "Available",
      "createdTime": "2026-07-30T10:00:00Z",
      "expiredTime": "2026-08-29T10:00:00Z",
      "description": "Snapshot for production environment",
      "sourceSessionId": "custom-test-session-id",
      "functionName": "my-function",
      "qualifier": "production",
      "resolvedVersion": "1",
      "imageRepository": "registry-vpc.cn-hangzhou.aliyuncs.com/example/function",
      "imageDigest": "sha256:0123456789abcdef",
      "osType": "linux",
      "memoryMB": 3072,
      "cpu": 2,
      "diskSizeMB": 10240,
      "artifactMemUsedSizeInB": 1073741824,
      "artifactDiskUsedSizeInB": 2147483648,
      "startCommand": "/code/start.sh",
      "readyCommand": "/code/ready.sh",
      "envs": {
        "key": ""
      }
    }
  ]
}

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.