Obtaining the User-Defined Domain Name of a Bucket
Function
You can use this command to obtain the user-defined domain name of a bucket.
Constraints
- To obtain the user-defined domain name of a bucket, you must be the bucket owner or have the required permission (obs:bucket:GetBucketCustomDomainConfiguration granted using IAM or GetBucketCustomDomainConfiguration granted using a bucket policy). For details, see Differences Between OBS Permissions Control Methods, Using IAM Roles or Policies to Grant Access to OBS, and Creating a Custom Bucket Policy.
Command Line Structure
- Windows
obsutil custom-domain obs://bucket -method=get [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- macOS or Linux
./obsutil custom-domain obs://bucket -method=get [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
Examples
- In Windows, run obsutil custom-domain obs://test-bucket -method=get to obtain the user-defined domain name of bucket test-bucket.
obsutil custom-domain obs://test-bucket -method=get Start at 2024-09-30 07:59:28.8675681 +0000 UTC DomainName CreateTime CertificateId www.obs-example.com 2025-09-23T11:25:26.860Z Get customDomain configuration succeed for bucket [test-bucket], requestId is [000001997656E4194011552ACBF0DDDB], count is 1
Parameter Description
| Parameter | Optional or Mandatory | Description |
|---|---|---|
| bucket | Mandatory | The bucket name |
| method | Mandatory | The method. Set it to get when you obtain the user-defined domain name of a bucket. |
| config | Optional (additional parameter) | The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters. |
| e | Optional (additional parameter) | The endpoint |
| i | Optional (additional parameter) | The user's AK |
| k | Optional (additional parameter) | The user's SK |
| t | Optional (additional parameter) | The user's security token |
Helpful Links
- For details about the API for obtaining the user-defined domain name of a bucket, see Obtaining the Custom Domain Name of a Bucket.
- For details about the meanings, causes, and handling methods of error codes that may be returned during the operation, see OBS Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot