All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

ARCHIVE

Last updated:2021-04-28 10:59:27

Interface Description

KS3 archive storage (ACHIVE) is suitable for archive data that needs to be stored for a long time (more than 3 months is recommended), which is rarely accessed in the storage cycle, and it takes 1 minute to 10 minutes for data to enter the readable state. It is suitable for archival data, medical images, scientific data, film and television materials that need to be preserved for a long time.

If you want to take the archive storage class to store files, you can do so in the following ways:

  1. Using the upload interface, specify the request header x-kss-storage-class as ARCHIVE
  2. Create an archive type Bucket, which can be stored according to the default archive class without specifying the storage class.
  3. Set storage class conversion rules through life cycle conversion, and automatically convert to archive storage class according to the rules

Upload Interface

Put Object (Upload Archive)

When uploading files, if the request header x-kss-storage-class is not specified, if the bucket is the archive class, the object will be the archive class automatically. If the bucket is the non archive class, the object will be the standard class automatically. If the x-kss-storageClass of the object is specified, the user specified will prevail. For example, in the non archive bucket, the object specified. When the x-kss-storageClass of is ARCHIVE, the file is of archive storage class.

Bucket Type x-kss-storage-class Request Header File Type
Archive Storage Class No Upload Archived Class
Archive Storage Class ARCHIVE Archived Class
Archive Storage Class STANDAND Standard Class
Archive Storage Class STANDARD_IA Infrequent Access Class
Non Archive Storage Class No Upload Standard Class
Non Archive Storage Class STANDAND Standard Class
Non Archive Storage Class STANDARD_IA Infrequent Access Class
Non Archive Storage Class ARCHIVE Archived Class

Request Syntax:

PUT /{ObjectKey} HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}
x-kss-storage-class: {StorageClass}

Attention:

Post Object (Upload files)

Users can specify the storage class by setting the x-kss-storage-class field in the form field. The rules are consistent with the upload file of Put Object.

Initiate Multipart Upload (Initialize Block Upload)

The user can set the storage class of the file through the x-kss-storage-class request header when initializing block upload. Valid values are: STANDARDSTANDARD_IAARCHIVE. The rules are consistent with the upload file of Put Object. KS3 rejects this request for an invalid storage class.

Request Syntax:

POST /{ObjectKey}?uploads HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {date}
Authorization: {SignatureValue}
x-kss-storage-class: {StorageClass}

Attention:

All subsequent block upload operations (Upload Part、Complete、Abort) will no longer accept the x-kss-storage-class request header.

Put Object Copy (Copy File)

For replicated files, KS3 supports the reassignment of storage classes. If the copy source file is an archive storage file, the precondition for successful copy is that the source file must be unfrozen and in a readable state.

Upload Part Copy (Replication Block)

For replication chunking, KS3 does not currently support reassigning storage classes. The storage class of the destination file must be the same as the storage class of the source file. For replication chunking, KS3 ignores the x-kss-storage-class request header. If the storage class of the source file is inconsistent with the storage class of the destination file, an error will be reported. Prompt InvalidStorageClass.

Restore Interface

Detailed explanation Restore Object

Download Interface

Note The archive file must be unfrozen before it can be downloaded normally.

Get Object (Download File)

GetObjectRequest request = new GetObjectRequest(bucketName, key);
GetObjectResult result = client.getObject(request);
Ks3Object object = result.getObject();
object.getObjectContent();

Head Object (View File Meta Information)

In the Java SDK, you can view the storage class by obtaining the meta information. The example code is as follows:

HeadObjectRequest request = new HeadObjectRequest(bucketName, key);
HeadObjectResult result =client.headObject(request);
String storageClass = result.getObjectMetadata().getStorageClass();

For standard storage files,getStorageClass returns null.
For standard infrequent access storage files,getStorageClass returns STANDARD_IA.
For archive storage files,getStorageClass returns ARCHIVE.

Enumeration Interface

Get Bucket (Enumerate All Files under Bucket)

When a user obtains a file under a Bucket, KS3 returns its storage class for each file.

SDK Sample Code:

ListObjectsRequest request = new ListObjectsRequest(bucketName);
ObjectListing listing = client.listObjects(request);
for (Ks3ObjectSummary summary : listing.getObjectSummaries()) {
    String storageClas = summary.getStorageClass();
}

For standard storage files,getStorageClass returns STANDARD.
For standard infrequent acccess storage files,getStorageClass returns STANDARD_IA.
For archive storage files,getStorageClass returns ARCHIVE.

List Multipart Uploads (View Block Upload under Bucket)

When users view all the block upload requests under the current bucket, KS3 will return its storage class for each block upload.

SDK Sample Code:

ListMultipartUploadsRequest request = new ListMultipartUploadsRequest(bucketName);
ListMultipartUploadsResult result = client.listMultipartUploads(request);
for (MultiPartUploadInfo uploadInfo : result.getUploads()) {
    String storageClass = uploadInfo.getStorageClass();
}

For standard storage files,getStorageClass returns STANDARD.
For standard infrequent access storage files,getStorageClass returns STANDARD_IA.
For archive storage files,getStorageClass returns ARCHIVE.

List Parts (View Uploaded Blocks)

When the user lists the uploaded blocks of a block upload, KS3 will return the storage class of the current block upload.

SDK Sample Code:

ListPartsRequest reqest = new ListPartsRequest(bucketName, key, result.getUploadId());
ListPartsResult result = client.listParts(reqest);
String storageClass = result.getStorageClass();

For standard storage files,getStorageClass returns STANDARD.
For standard infrequent access storage files,getStorageClass returns STANDARD_IA.
For archive storage files,getStorageClass returns ARCHIVE.

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback