Overview of OSS on CloudBox

Updated at:

Object Storage Service (OSS) on CloudBox provides local storage, access, and processing of unstructured data within CloudBox. You can create buckets and use the same APIs and SDKs as public cloud OSS.

Benefits

CloudBox is a fully managed cloud service from Alibaba Cloud that deploys an integrated hardware and software stack from the public cloud into your on-premises data center. It delivers the same experience as the public cloud while meeting requirements for data security, local data processing, and low latency. As an out-of-the-box solution, CloudBox lets you focus on business logic and reduces hardware and cloud platform O&M. For more information, see What is CloudBox?.

Compared to the public cloud, CloudBox offers benefits of local deployment: improved data security, local data processing, and low latency.

  • Data security: Data is stored in data centers under your control, meeting regulatory requirements for data residency.

  • Local data processing: Data is processed locally instead of being sent to the cloud, reducing data transfer costs.

  • Low latency: CloudBox is physically close to your on-premises devices, enabling near real-time interaction with local devices and applications.

  • Exclusive resources: Storage is not shared with other public cloud customers, allowing you to securely store sensitive data.

Scenarios

  • Create an image from an on-premises server environment and save it to OSS on CloudBox

    You can use Server Migration Center (SMC) to create a custom image from an on-premises server environment for batch deployments or server backups in CloudBox. SMC migrates your on-premises server to CloudBox. The image created during the migration is saved to OSS on CloudBox to keep your data local. For more information, see Create an image from an on-premises server environment and save it to OSS on CloudBox.

  • Save an ECS snapshot to OSS on CloudBox

    A snapshot is a point-in-time backup of a disk. You can use snapshots for data backup or to create images. You can create a snapshot from an ECS instance in CloudBox and save it to OSS on CloudBox. This keeps your business data local. For more information, see Save an ECS snapshot to OSS on CloudBox.

Billing

For information about billing methods, scale-out rules, and billing examples for OSS on CloudBox, see Object Storage Service billing.

Limits

  • Each Alibaba Cloud account can create a maximum of 100 region-specific buckets in OSS on CloudBox.

  • You cannot create buckets that are not region-specific in OSS on CloudBox.

  • All buckets in OSS on CloudBox and the objects in them support only the Standard storage class.

  • For server-side encryption, OSS on CloudBox supports only SSE-OSS. SSE-KMS is not supported.

  • OSS on CloudBox provides only internal endpoints. To transfer data between CloudBox and public cloud OSS resources, establish a network connection and use ossimport.

CloudBox endpoints

OSS on CloudBox buckets are accessed through a CloudBox VPC using two types of endpoints: control endpoints and data endpoints.

  • Control endpoint

    Control endpoints handle only bucket-level operations in OSS on CloudBox. For supported API operations, see API operations supported by control endpoints.

    The format is <Cloudbox-Id>.<Region>.oss-cloudbox-control.aliyuncs.com. An example is cb-f8z7yvzgwfkl9q0h****.cn-shenzhen.oss-cloudbox-control.aliyuncs.com.

  • Data endpoint

    Data endpoints handle operations on OSS on CloudBox buckets and their data. For supported API operations, see API operations supported by data endpoints.

    The format is <Cloudbox-Id>.<Region>.oss-cloudbox.aliyuncs.com. An example is cb-f8z7yvzgwfkl9q0h****.cn-shenzhen.oss-cloudbox.aliyuncs.com.

If you create a VPC in CloudBox and need to use OSS within the VPC, contact technical support to enable the domain names.

SDK support

OSS on CloudBox can be accessed by using the OSS SDK for Java, Python, or Go. For OSS on CloudBox, SDK operations are called in the same way as they are in public cloud OSS. The only difference is that when you create a client, you must use V4 signatures, specify the region and the cloud box ID of the CloudBox, and set the endpoint to the CloudBox data domain name. The following table lists the minimum version that supports OSS on CloudBox for each SDK:

SDK

Minimum version that supports CloudBox

Key configuration for creating a client

Java SDK

3.15.0 or later

SignVersion.V4, region, cloudBoxId

Python SDK V2 (alibabacloud-oss-python-sdk-v2)

1.1.1 or later

region, cloud_box_id (or enable_auto_detect_cloud_box_id); V4 signatures are used by default

Go SDK V2 (alibabacloud-oss-go-sdk-v2)

v1.2.1 or later

WithRegion, WithCloudBoxId (or WithEnableAutoDetectCloudBoxId); V4 signatures are used by default

Note

The earlier Go SDK (aliyun-oss-go-sdk) also supports CloudBox starting from v2.2.3. When you create a client, you must explicitly set oss.AuthVersion(oss.AuthV4) and use it together with oss.CloudBoxId. For new projects, we recommend that you use the next-generation Go SDK V2 (alibabacloud-oss-go-sdk-v2).

The following examples show how to create a client that accesses CloudBox. The endpoint is the CloudBox data domain name, in the format <Cloudbox-Id>.<Region>.oss-cloudbox.aliyuncs.com:

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.ClientBuilderConfiguration;
import com.aliyun.oss.common.auth.CredentialsProviderFactory;
import com.aliyun.oss.common.auth.DefaultCredentialProvider;
import com.aliyun.oss.common.auth.EnvironmentVariableCredentialsProvider;
import com.aliyun.oss.common.comm.SignVersion;

// The CloudBox data domain name, in the format Cloudbox-Id.Region.oss-cloudbox.aliyuncs.com.
String endpoint = "https://cb-f8z7yvzgwfkl9q0h****.cn-hangzhou.oss-cloudbox.aliyuncs.com";
// The region where the CloudBox is located.
String region = "cn-hangzhou";
// The CloudBox ID.
String cloudBoxId = "cb-f8z7yvzgwfkl9q0h****";
// Obtain access credentials from environment variables. Make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are set.
EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider();
ClientBuilderConfiguration conf = new ClientBuilderConfiguration();
// CloudBox requires V4 signatures.
conf.setSignatureVersion(SignVersion.V4);
OSS ossClient = OSSClientBuilder.create()
        .endpoint(endpoint)
        .credentialsProvider(new DefaultCredentialProvider(credentialsProvider.getCredentials()))
        .clientConfiguration(conf)
        .region(region)
        .cloudBoxId(cloudBoxId)
        .build();
// After the client is created, bucket and object operations are called in the same way as in public cloud OSS.
import alibabacloud_oss_v2 as oss

# Load the default configuration. V4 signatures are used by default.
cfg = oss.config.load_default()
# Obtain access credentials from environment variables. Make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are set.
cfg.credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider()
# The region where the CloudBox is located.
cfg.region = "cn-hangzhou"
# The CloudBox ID. This is equivalent to .cloudBoxId() in the Java SDK and sets the signing product to oss-cloudbox.
cfg.cloud_box_id = "cb-f8z7yvzgwfkl9q0h****"
# The CloudBox data domain name, in the format Cloudbox-Id.Region.oss-cloudbox.aliyuncs.com.
cfg.endpoint = "cb-f8z7yvzgwfkl9q0h****.cn-hangzhou.oss-cloudbox.aliyuncs.com"
client = oss.Client(cfg)
# After the client is created, bucket and object operations are called in the same way as in public cloud OSS.
package main

import (
	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
	"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)

func main() {
	cfg := oss.LoadDefaultConfig().
		// Obtain access credentials from environment variables. Make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are set.
		WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()).
		// The region where the CloudBox is located.
		WithRegion("cn-hangzhou").
		// V4 signatures are used by default. This line sets it explicitly.
		WithSignatureVersion(oss.SignatureVersionV4).
		// The CloudBox data domain name, in the format Cloudbox-Id.Region.oss-cloudbox.aliyuncs.com.
		WithEndpoint("cb-f8z7yvzgwfkl9q0h****.cn-hangzhou.oss-cloudbox.aliyuncs.com").
		// The CloudBox ID. This is equivalent to .cloudBoxId() in the Java SDK and sets the signing product to oss-cloudbox.
		WithCloudBoxId("cb-f8z7yvzgwfkl9q0h****")
	client := oss.NewClient(cfg)
	_ = client
	// After the client is created, bucket and object operations are called in the same way as in public cloud OSS.
}

API operations supported by control endpoints

The following table lists the bucket-level API operations supported by control endpoints of OSS on CloudBox.

Category

API

Description

Basic operations

PutBucket

Creates an OSS on CloudBox bucket.

DeleteBucket

Deletes an OSS on CloudBox bucket.

GetBucketInfo

Retrieves information about an OSS on CloudBox bucket.

GetBucketLocation

Queries the location of an OSS on CloudBox bucket.

Access control (ACL)

PutBucketAcl

Configures the access permissions for an OSS on CloudBox bucket.

GetBucketAcl

Queries the access permissions of an OSS on CloudBox bucket.

Lifecycle

PutBucketLifecycle

Configures a lifecycle rule for an OSS on CloudBox bucket.

GetBucketLifecycle

Queries the lifecycle rules of an OSS on CloudBox bucket.

DeleteBucketLifecycle

Deletes the lifecycle rules of an OSS on CloudBox bucket.

Versioning

PutBucketVersioning

Configures the versioning state of an OSS on CloudBox bucket.

GetBucketVersioning

Queries the versioning state of an OSS on CloudBox bucket.

Authorization policy

PutBucketPolicy

Configures an authorization policy for an OSS on CloudBox bucket.

GetBucketPolicy

Queries the authorization policy of an OSS on CloudBox bucket.

DeleteBucketPolicy

Deletes the authorization policy of an OSS on CloudBox bucket.

Log Management

PutBucketLogging

Enables the log storage feature for an OSS on CloudBox bucket.

GetBucketLogging

Queries the log storage configuration of an OSS on CloudBox bucket.

DeleteBucketLogging

Disables the log storage feature for an OSS on CloudBox bucket.

Static Website

PutBucketWebsite

Configures an OSS on CloudBox bucket for static website hosting.

GetBucketWebsite

Retrieves the static website hosting configuration for an OSS on CloudBox bucket.

DeleteBucketWebsite

Disables static website hosting for an OSS on CloudBox bucket.

Hotlink protection (Referer)

PutBucketReferer

Configures a hotlink protection rule for an OSS on CloudBox bucket.

GetBucketReferer

Queries the hotlink protection rule of an OSS on CloudBox bucket.

Encryption

PutBucketEncryption

Configures an encryption rule for an OSS on CloudBox bucket.

GetBucketEncryption

Queries the encryption rule of an OSS on CloudBox bucket.

DeleteBucketEncryption

Deletes the encryption rule of an OSS on CloudBox bucket.

API operations supported by data endpoints

The following tables list the API operations supported by data endpoints of OSS on CloudBox.

Service operations

API

Description

ListBuckets (GetService)

Returns all OSS on CloudBox buckets that are owned by the requester.

Bucket operations

Category

API

Description

Basic operations

PutBucket

Creates an OSS on CloudBox bucket.

DeleteBucket

Deletes an OSS on CloudBox bucket.

GetBucket (ListObjects)

Lists information about all objects in an OSS on CloudBox bucket.

ListObjectsV2 (GetBucketV2)

Lists information about all objects in an OSS on CloudBox bucket.

GetBucketInfo

Queries information about an OSS on CloudBox bucket.

GetBucketLocation

Queries the location of an OSS on CloudBox bucket.

Access control (ACL)

PutBucketAcl

Configures the access permissions for an OSS on CloudBox bucket.

GetBucketAcl

Queries the access permissions of an OSS on CloudBox bucket.

Lifecycle

PutBucketLifecycle

Configures a lifecycle rule for an OSS on CloudBox bucket.

GetBucketLifecycle

Queries the lifecycle rule of an OSS on CloudBox bucket.

DeleteBucketLifecycle

Deletes the lifecycle rule of an OSS on CloudBox bucket.

Versioning

PutBucketVersioning

Configures the versioning state of an OSS on CloudBox bucket.

GetBucketVersioning

Queries the versioning state of an OSS on CloudBox bucket.

ListObjectVersions (GetBucketVersions)

Lists the versions of all objects in an OSS on CloudBox bucket.

Authorization policy

PutBucketPolicy

Configures an authorization policy for an OSS on CloudBox bucket.

GetBucketPolicy

Queries the authorization policy of an OSS on CloudBox bucket.

DeleteBucketPolicy

Deletes the authorization policy of an OSS on CloudBox bucket.

Log Management

PutBucketLogging

Enables the log storage feature for an OSS on CloudBox bucket.

GetBucketLogging

Queries the log storage configuration of an OSS on CloudBox bucket.

DeleteBucketLogging

Disables the log storage feature for an OSS on CloudBox bucket.

Static website

PutBucketWebsite

Configures an OSS on CloudBox bucket for static website hosting.

GetBucketWebsite

Queries the static website hosting configuration of an OSS on CloudBox bucket.

DeleteBucketWebsite

Disables static website hosting for an OSS on CloudBox bucket.

Hotlink protection (Referer)

PutBucketReferer

Configures a hotlink protection rule for an OSS on CloudBox bucket.

GetBucketReferer

Queries the hotlink protection rule of an OSS on CloudBox bucket.

Encryption

PutBucketEncryption

Configures an encryption rule for an OSS on CloudBox bucket.

GetBucketEncryption

Queries the encryption rule of an OSS on CloudBox bucket.

DeleteBucketEncryption

Deletes the encryption rule of an OSS on CloudBox bucket.

Object operations

Category

API

Description

Basic operations

PutObject

Uploads an object.

GetObject

Retrieves an object.

CopyObject

Copies an object.

AppendObject

Uploads an object using append upload.

DeleteObject

Deletes a single object.

DeleteMultipleObjects

Deletes multiple objects.

HeadObject

Returns only the metadata of an object, not the content.

GetObjectMeta

Returns the basic metadata of an object, including ETag, size, and Last-Modified time, without the content.

Multipart upload

InitiateMultipartUpload

Initiates a multipart upload event.

UploadPart

Uploads data in parts based on a specified object name and upload ID.

UploadPartCopy

Copies data from an existing object to upload a part. This is done by adding the x-oss-copy-source request header to an UploadPart request.

CompleteMultipartUpload

Completes a multipart upload after all parts are uploaded.

AbortMultipartUpload

Aborts a multipart upload event and deletes the corresponding parts.

ListMultipartUploads

Lists all in-progress multipart upload events that have been initiated but not completed or aborted.

ListParts

Lists all successfully uploaded parts that belong to a specified upload ID.

Access control (ACL)

PutObjectACL

Modifies the access permissions of an object.

GetObjectACL

Queries the access permissions of an object.

Symbolic link

PutSymlink

Creates a symbolic link.

GetSymlink

Retrieves a symbolic link.

Tagging

PutObjectTagging

Sets or updates the tags of an object.

GetObjectTagging

Retrieves the tags of an object.

DeleteObjectTagging

Deletes the specified tags of an object.

References