Configuring an Instance of ObsClient
If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference
You can set the following initialization parameters to configure an instance of ObsClient:
|
Parameter |
Description |
Recommended Value |
|---|---|---|
|
key |
AK |
N/A |
|
secret |
SK |
N/A |
|
endpoint |
Endpoint for accessing OBS, which contains the protocol type, domain name (or IP address), and port name. For example, https://your-endpoint:443. For security purposes, you are advised to use HTTPS. |
N/A |
|
ssl_verify |
Whether to verify server-side certificates. Possible values are:
The default value is false. |
N/A |
|
max_retry_count |
Maximum number of retries when an HTTP/HTTPS connection is abnormal. The default value is 3. |
[1, 5] |
|
socket_timeout |
Timeout duration for transmitting data at the socket layer, in seconds. The default value is 60. |
[10, 60] |
|
connect_timeout |
Timeout period for establishing an HTTP/HTTPS connection, in seconds. The default value is 60. |
[10, 60] |
|
chunk_size |
Block size for reading socket streams, in bytes. The default value is 65536. |
Default value |
- Parameters whose recommended value is N/A need to be set according to the actual conditions.
- If the network is unstable, you are advised to set larger values for socket_timeout and connect_timeout.
- If the value of endpoint does not contain any protocol, HTTPS is used by default.
- After using an instance of ObsClient, you can call ObsClient -> close to close the instance explicitly to reclaim connection resources.
- If you do not call ObsClient -> close, it will be called by the destructor of ObsClient to reclaim connection resources.
- For the sake of high DNS resolution performance and OBS reliability, you can set endpoint only to the domain name of OBS, instead of the IP address.
Last Article: Creating an Instance of ObsClient
Next Article: Configuring SDK Logging
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.