• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Android SDK)
  4. Versioning Management
  5. Restoring a Versioning Cold Object

Restoring a Versioning Cold Object

You can call ObsClient.restoreObject to pass the version ID (versionId) to restore a versioning Cold object. Sample code is as follows:

String endPoint = "yourdomainname";
String ak = "*** Provide your Access Key ***";
String sk = "*** Provide your Secret Key ***";
// Create an instance of ObsClient.
ObsClient obsClient = new ObsClient(ak, sk, endPoint);

RestoreObjectRequest request = new RestoreObjectRequest("bucketname", "objectkey", 1);

// Close obsClient.