- Documentation
Torch Object Storage
SDK Reference
Python
Bucket interface
Manage bucket configuration
Manage custom domain names (Python SDK)
Manage bucket configuration
Manage custom domain names (Python SDK)
Manage custom domain names (Python SDK)
After you upload a file to TOS, you can access or download it using the file URL automatically generated by TOS. If you want to use your own domain name to access files stored in TOS, you can bind your own domain name to the bucket. After binding, the file can be accessed using the corresponding domain name.
Set up custom domain rules
warning
- A domain name can only be bound to one bucket.
- A single bucket can bind up to 20 domain names.
Sample code
The following code sets custom domain rules for bucket-test.
List custom domain name rules
warning
To enumerate custom domain name rules for buckets, you must be the bucket owner by default.
Sample code
The following code enumerates custom domain rules for bucket examplebucket.
Delete custom domain rules
warning
To remove a custom domain name rule for a bucket, you must be the bucket owner by default.
Sample code
The following code removes custom domain rules for the bucket examplebucket.
Last updated: 2025.09.17 18:22:13