obs_options
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| bucket_options | Yes | Explanation: Bucket settings. Restrictions: None Value range: None Default value: None | |
| request_options | Yes | Explanation: Request-related settings. Restrictions: None Value range: None Default value: None | |
| temp_auth | No | Explanation: The structure used to calculate a temporary signature. Set it to NULL if it is not used. Restrictions: None Value range: None Default value: None |
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| host_name | char * | Yes | Explanation: The requested host name, used as an address for connecting to OBS. It is the domain name (the endpoint) of the server where the requested resource is stored. Example: host_name = "obs.ap-southeast-1.myhuaweicloud.com"; To view the endpoints available for OBS, see Regions and Endpoints. Restrictions: The value does not need to contain http:// or https:// as a prefix, which is controlled using obs_protocol. Default value: None |
| bucket_name | char * | Yes | Explanation: Bucket name. Restrictions:
Default value: None |
| useCname | bool | No | Explanation: Whether to use a custom domain name to access OBS. Restrictions: None Value range: true: A custom domain name is used. false: A custom domain name is not used. Default value: false |
| protocol | No | Explanation: Whether to use the HTTP or HTTPS protocol. Restrictions: None Default value: OBS_PROTOCOL_HTTPS (HTTPS is used by default.) | |
| access_key | char * | Yes | Explanation: Access key ID (AK). Restrictions: None Value range: None Default value: None |
| secret_access_key | char * | Yes | Explanation: Secret access key (SK). Restrictions: None Value range: None Default value: None |
| storage_class | No | Explanation: Bucket storage class that can be specified at bucket creation. Value range: See obs_storage_class. Default value: OBS_STORAGE_CLASS_STANDARD (Standard storage class) | |
| token | char * | No | Explanation: The security token in temporary credentials. Restrictions: None Value range: None Default value: None |
| epid | char * | No | Explanation: Enterprise project ID that can be specified during bucket creation. Users who have enabled the enterprise project function can obtain the ID from the enterprise project service. Restrictions: The value needs to be represented as a UUID. This parameter is not required if EPS is not enabled. Example: 9892d768-2d13-450f-aac7-ed0e44c2585f Default value: None |
| bucket_type | No | Explanation: Whether a bucket is an object bucket or a parallel file system. Restrictions: None Default value: OBS_BUCKET_OBJECT (object bucket) | |
| bucket_list_type | No | Explanation: Whether to list all buckets, object buckets, or parallel file systems. Restrictions: None |
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| connect_time | int | Yes | Explanation: Timeout period for establishing an HTTP/HTTPS connection, in ms. Restrictions: None Value range: [10000, 60000] Default value: 60000 |
| max_connected_time | int | Yes | Explanation: Timeout period (in seconds) of a request. Restrictions: None Value range: None Default value: 0 (There is never automatic disconnection.) |
| proxy_auth | char* | No | Explanation: Proxy authentication information, in the format username:password Restrictions: None Value range: None Default value: None |
| proxy_host | char* | No | Explanation: IP address or host name of the proxy server. Restrictions: None Value range: None Default value: None |
| Constant | Original Value | Description |
|---|---|---|
| OBS_PROTOCOL_HTTPS | https | HTTPS is used for access. |
| OBS_PROTOCOL_HTTP | http | HTTP is used for access. |
| Constant | Original Value | Description |
|---|---|---|
| OBS_BUCKET_OBJECT | OBJECT | Object buckets. |
| OBS_BUCKET_PFS | POSIX | Parallel file systems. |
| Constant | Original Value | Description |
|---|---|---|
| OBS_BUCKET_LIST_ALL | No header is sent. | Lists all buckets. |
| OBS_BUCKET_LIST_OBJECT | OBJECT | Lists all object buckets. |
| OBS_BUCKET_LIST_PFS | POSIX | Lists all parallel file systems. |
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| expires | long long int | Yes | Explanation: Validity period of the temporary credentials, in seconds. Restrictions: None Value range: [0-630720000] Default value: None |
| temp_auth_callback | void (*temp_auth_callback)(char *, uint64_t, char *, uint64_t, void *) | Yes | Explanation: The pointer to the custom callback function, which is used to record the temporary URL and involved signature header to the custom callback data. Restrictions: None Value range: None Default value: None |
| callback_data | void * | Yes | Explanation: Custom callback data. Restrictions: None Value range: None Default value: None |
| Parameter | Type | Mandatory (Yes/No) | Description |
|---|---|---|---|
| temp_auth_url | char * | Yes | Explanation: Temporary URL. OBS allows you to construct a URL for a specific operation. In such a URL, you use Query parameters to provide authentication information including the user AK, signature, and validity period. Anyone who has the URL can perform the specified operation. After receiving a request made using such a URL, OBS treats the requester as the user who issued the URL and processes the request. For example, if you construct a pre-signed URL for downloading an object and provide it to various users, they can use the URL to download the object without authentication, but they must do so within the validity period specified by the Expires parameter. Restrictions: None Value range: None Default value: None |
| temp_auth_url_len | uint64_t | Yes | Explanation: Length of the temporary URL. Restrictions: None Value range: None Default value: None |
| temp_auth_headers | char * | Yes | Explanation: Headers for temporary authentication. Restrictions: None Value range: None Default value: None |
| temp_auth_headers_len | uint64_t | Yes | Explanation: Length of the buffer for temporary authentication headers, in bytes. Restrictions: None Value range: None Default value: None |
| callback_data | void * | Yes | Explanation: Custom callback data. Restrictions: None Value range: None Default value: None |
Feedback
Was this page helpful?
Provide feedbackThank 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