Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

On this page

Show all

Configuring option

Updated on 2023-03-27 GMT+08:00
NOTICE:

If you have any questions during development, post them on the Issues page of GitHub.

When the function of C SDK is called, obs_options must be input. You can use function init_obs_options to initialize configurations for obs_options, and configure AK, SK, endpoint, bucket, timeout period, and temporary authentication by using obs_options. obs_options consists of obs_bucket_context and obs_http_request_option. The following table describes the parameters that can be set.

Table 1 obs_options.obs_bucket_context parameters

Parameter

Description

Default Value

Recommended Value

host_name

The requested host name, which is the domain name (the endpoint) of the server where the requested resource is stored.

NULL

-

bucket_name

Name of the bucket where the operation is performed

NULL

-

protocol

The protocol used for sending requests. Possible values include HTTP and HTTPS. For security purposes, you are advised to use HTTPS.

HTTPS protocol: OBS_PROTOCOL_HTTPS

OBS_PROTOCOL_HTTPS

access_key

AK of OBS

NULL

-

secret_access_key

SK used for authentication. It can be used to sign a character string.

NULL

-

obs_storage_class

Set this parameter when the storage class needs to be configured in the PUT or POST request.

OBS Standard: OBS_STORAGE_CLASS_STANDARD

Default value

token

Security token of the temporary access key

NULL

-

Table 2 obs_options.obs_http_request_option parameters

Parameter

Description

Default Value

Recommended Value

connect_time

Timeout period for establishing an HTTP/HTTPS connection, in ms. The default value is 60,000.

60000

10000 to 60000

max_connected_time

Timeout period (in seconds) of an HTTP/HTTPS request. The value 0 indicates that the link is never disconnected.

0

0

proxy_auth

Proxy authentication information, in the format of Username:Password

NULL

-

proxy_host

Proxy server

NULL

-

NOTE:

If the network is unstable, you are advised to set larger values for connect_time and max_connected_time.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback