Updated on 2026-01-16 GMT+08:00

Configuring an Instance of ObsClient

You can set the following initialization parameters to configure an instance of ObsClient:

Parameter

Description

Recommended Value

access_key_id

AK

N/A

secret_access_key

SK

N/A

server

Endpoint for accessing OBS, which contains the protocol type, domain name (or IP address), and port number. For example, https://your-endpoint:443. For security purposes, you are advised to use HTTPS.

N/A

timeout

The total timeout period (in seconds) of an HTTP/HTTPS request. The default value is 300.

[10,300]

is_cname

Whether to use self-defined domain name to access OBS. The default value is false.

NOTE:

To protect your services from being affected by the takeover of Huawei Cloud public domain names by relevant organizations, you are advised to use a user-defined domain name to access a bucket.

N/A

useRawXhr

Whether to use the native XHR to send Ajax requests. The default value is false.

N/A

  • Parameters whose recommended value is N/A need to be set according to the actual conditions.
  • If the network is unstable or the size of the file to be uploaded is large, you are advised to set a larger value for timeout.