Help Center/ Object Storage Service/ SDK Reference/ BrowserJS/ Bucket APIs/ Custom Domain Names/ Obtaining the Custom Domain Names of a Bucket
Updated on 2026-08-14 GMT+08:00

Obtaining the Custom Domain Names of a Bucket

Function

This API obtains the custom domain names of a bucket.

Restrictions

Method

ObsClient.getBucketCustomDomain(params)

Request Parameters

Table 1 List of request parameters

Parameter

Type

Mandatory (Yes/No)

Description

Bucket

String

Yes

Explanation:

Bucket name.

Restrictions:

  • A bucket name must be unique across all accounts and regions.
  • A bucket name:
    • Must be 3 to 63 characters long and start with a digit or letter. Lowercase letters, digits, hyphens (-), and periods (.) are allowed.
    • Cannot be formatted as an IP address.
    • Cannot start or end with a hyphen (-) or period (.).
    • Cannot contain two consecutive periods (..), for example, my..bucket.
    • Cannot contain periods (.) and hyphens (-) adjacent to each other, for example, my-.bucket or my.-bucket.
  • If you repeatedly create buckets with the same name in the same region, no error will be reported and the bucket attributes comply with those set in the first creation request.

Default value:

None

Responses

Table 2 ICommonMsg

Parameter

Type

Description

Status

number

Explanation:

HTTP status code returned by the OBS server.

Value range:

A status code is a group of digits indicating the status of a response. It ranges from 2xx (indicating successes) to 4xx or 5xx (indicating errors). For details, see Status Codes.

Code

string

Explanation:

Error code returned by the OBS server.

Message

string

Explanation:

Error description returned by the OBS server.

HostId

string

Explanation:

Request server ID returned by the OBS server.

RequestId

string

Explanation:

Request ID returned by the OBS server.

Id2

string

Explanation:

Request ID2 returned by the OBS server.

Indicator

string

Explanation:

Error code details returned by the OBS server.

Table 3 ListBucketCustomDomainsResult

Parameter

Type

Description

Domains

Domains

Yes

Explanation:

QoS configuration of the bucket.

Value range:

For details, see Table 4.

Default value:

None

Table 4 Domains

Parameter

Type

Description

DomainName

str

Explanation:

Custom domain name.

Value range:

The value can contain 0 to 256 characters.

Value

str

Explanation:

Time when a custom domain name was created.

Value range:

  • The value must be a UTC time that complies with the ISO 8601 standard. Example: 2018-01-01T00:00:00.000Z
  • The value must contain 24 characters.

CertificateId

str

Explanation:

ID of the certificate bound to the custom domain name.

Value range:

The value must contain 16 characters.

CertName

str

Explanation:

Name of the certificate bound to the custom domain name.

Value range:

The value can contain 3 to 63 characters.

CertificateType

str

Explanation:

Type of the certificate bound to the custom domain name.

Value range:

  • server: server certificate
  • server_sm: server SM certificate
  • client: client CA certificate

ExpiredTime

str

Explanation:

If the certificate type is server or server_sm, the expiration time of the certificate bound to the custom domain name is returned.

Value range:

The value must be a UTC time that complies with the ISO 8601 standard. Example: 2018-01-01T00:00:00.000Z