tencent cloud

Cloud Block Storage

User Guide
Announcements
Announcement of the Commercial Charges of Tencent Cloud CBS Snapshot
Announcement of the Commercial Charges of Tencent Cloud CBS Snapshot Cross-Region Replication
Product Introduction
Overview
Strengths
Scenarios
Regions and AZs
Cloud Disk Instances
Cloud Disk Snapshots
Access Management
Related Products
Predecessor
Service Regions and Service Providers
Billing
Billing Overview
Price Overview
Purchase Instructions
Renewal Guide
Overdue Payment
Getting Started
Step 1. Creating Cloud Disks
Step 2. Attaching Cloud Disks
Step 3. Initializing Cloud Disks
User Guide
Operation Overview
Usage Limits
Creating Cloud Disks
Attaching Cloud Disks
Initializing Cloud Disks
Expanding Cloud Disks
Detaching Cloud Disks
Terminating Cloud Disks
Viewing Cloud Disk Information
Adjusting Cloud Disk Types
Adjusting Cloud Disk Performance
Cloud Disk Data Protection Configuration
Cloud Disk Data Backup Point
Managing Snapshots
Monitoring and Alarms
Use Cases
Measuring Cloud Disk Performance
Building LVM Logic Volumes with Multiple Elastic Cloud Disks
Expanding MBR Cloud Disks to Greater Than 2 TB
Troubleshooting
Failed to Unmount Cloud Disks from Windows CVM Instances
Disk Not Mount upon Linux CVM Restart
API Documentation
History
Introduction
API Category
Making API Requests
Snapshot APIs
Cloud Disk APIs
Data Types
Error Codes
FAQs
Features
Billing
Performance FAQs
Snapshot
Usage
Cross-region Replication
CBS Service Level Agreement
Contact Us
Glossary

ApplySnapshot

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-02-04 10:34:33

1. API Description

Domain name for API request: cbs.intl.tencentcloudapi.com.

This API (ApplySnapshot) is used to roll back a snapshot to the original cloud disk.

  • The snapshot can only be rolled back to the original cloud disk. For data disk snapshots, if you need to copy the snapshot data to other cloud disks, use the API CreateDisks to create an elastic cloud disk and then copy the snapshot data to the created cloud disk.
  • The snapshot for rollback must be in NORMAL status. The snapshot status can be queried in the SnapshotState field in the output parameters through the API DescribeSnapshots.
  • For elastic cloud disks, the cloud disk must be in UNMOUNTED status. The cloud disk status can be queried in the Attached field returned by the API DescribeDisks. For non-elastic cloud disks purchased together with instances, the instance must be in SHUTDOWN status. The instance status can be queried through the API DescribeInstancesStatus.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ApplySnapshot.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
SnapshotId Yes String Snapshot ID, which can be queried via DescribeSnapshots.
DiskId Yes String ID of the original cloud disk corresponding to the snapshot, which can be queried via the API DescribeDisks.
AutoStopInstance No Boolean Specifies whether to perform automatic shutdown before rolling back. only supports rolling back snapshots to mounted cbs.
Specifies whether AutoStartInstance can be set to true when this parameter is true.
AutoStartInstance No Boolean Specifies whether to automatically start after completion. only supports rolling back snapshots to mounted cbs. this parameter requires simultaneous parameter passing of AutoStopInstance.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Rolling back a snapshot

This example shows you how to roll back a cloud disk to the specified snapshot point in time.

Input Example

https://cbs.intl.tencentcloudapi.com/?Action=ApplySnapshot
&DiskId=disk-lzrg2pwi
&SnapshotId=snap-gybrif0z
&<common request parameters>

Output Example

{
    "Response": {
        "RequestId": "cc96242e-566c-ae6a-b74a-5a1f823683b2"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidDisk.Busy The cloud disk is busy. Try again later.
InvalidDisk.NotSupported Indicates that the operation is not supported for the cloud disk.
InvalidDisk.SnapshotCreating A snapshot is being created for the cloud disk. Try again later.
InvalidDiskId.NotFound The ‘DiskId’ entered does not exist.
InvalidInstance.NotSupported Cloud Virtual Machine does not support mounting cloud disk.
InvalidInstanceId.NotFound The ‘InstanceId’ entered does not exist.
InvalidParameter.DiskSizeNotMatch The size of the cloud disk does not match the snapshot size.
InvalidParameter.ShouldConvertSnapshotToImage You need to convert the snapshot into an image first.
InvalidParameterValue Invalid parameter value.
InvalidSnapshot.NotSupported Indicates that the operation is not supported for the snapshot.
InvalidSnapshotId.NotFound The ‘SnapshotId’ entered does not exist.
MissingParameter Missing parameter.
ResourceBusy The resource is busy. Try again later.
ResourceInUse.DiskRollbacking The cloud disk is being rolled back. Please try again later.
ResourceInsufficient Insufficient resources.
ResourceNotFound.NotFound The resource is not found.
ResourceUnavailable.NotSupported The resource does not support this operation.
ResourceUnavailable.SnapshotCreating Unable to use: the snapshot is being created
UnauthorizedOperation.MFAExpired Multi-factor authentication (MFA) has expired. Please try again.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック