Updated on 2026-08-03 GMT+08:00

other_response_handlers

Table 1 obs_list_service_obs_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

listServiceCallback

obs_list_service_obs_callback *

Yes

Explanation:

The pointer to the callback function, where the callback parameters can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 2 obs_list_service_obs_callback

Parameter

Type

Mandatory (Yes/No)

Description

owner_id

const char *

Yes

Explanation:

Account (domain) ID of the bucket owner.

Restrictions:

None

Value range:

For details about how to obtain the account ID of the bucket owner, see How Do I Get My Account ID and User ID?

Default value:

None

bucket_name

const char *

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 a period (.) and a hyphen (-) 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

creation_date_seconds

int64_t

Yes

Explanation:

Time when the bucket was created.

Restrictions:

None

Value range:

None

Default value:

None

location

const char *

Yes

Explanation:

Where a bucket is located.

Restrictions:

If the used endpoint is obs.myhuaweicloud.com, this parameter is not required. If any other endpoint is used, this parameter is required.

Value range:

To learn about valid regions and endpoints, see Regions and Endpoints. An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. To obtain the regions and endpoints, contact the enterprise administrator.

Default value:

If obs.myhuaweicloud.com is used as the endpoint and no region is specified, cn-north-1 (the CN North-Beijing1 region) is used by default.

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 3 obs_get_bucket_storage_class_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_bucket_storage_class_callback

obs_get_bucket_storage_policy_callback *

Yes

Explanation:

The pointer to the callback function, where the callback parameters can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 4 obs_get_bucket_storage_policy_callback

Parameter

Type

Mandatory (Yes/No)

Description

storage_class_policy

const char *

Yes

Explanation:

Storage class of the bucket.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 5 obs_put_object_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

put_object_data_callback

obs_put_object_data_callback *

Yes

Explanation:

Callback function pointer, which is used to copy the data to be uploaded to the data upload buffer.

Restrictions:

None

Value range:

None

Default value:

None

progress_callback

obs_progress_callback_internal *

Yes

Explanation:

Pointer to the progress callback function.

Restrictions:

None

Value range:

None

Default value:

None

Table 6 obs_put_object_data_callback

Parameter

Type

Mandatory (Yes/No)

Description

buffer_size

int

Yes

Explanation:

Length of the buffer.

Restrictions:

None

Value range:

None

Default value:

None

buffer

char *

Yes

Explanation:

Buffer for storing the data to be uploaded. The data to be uploaded is copied to this buffer.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 7 obs_progress_callback_internal

Parameter

Type

Mandatory (Yes/No)

Description

now

uint64_t

Yes

Explanation:

Number of bytes that have been uploaded.

Restrictions:

None

Value range:

None

Default value:

None

total

uint64_t

Yes

Explanation:

Total number of bytes to be uploaded.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 8 obs_upload_file_response_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

upload_file_callback

obs_upload_file_callback *

Yes

Explanation:

The pointer to the callback function, where the callback parameters can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

progress_callback

obs_progress_callback *

Yes

Explanation:

Pointer to the progress callback function.

Restrictions:

None

Value range:

None

Default value:

None

Table 9 obs_upload_file_callback

Parameter

Type

Mandatory (Yes/No)

Description

status

obs_status

Yes

Explanation:

Request status

Restrictions:

None

Value range:

None

Default value:

None

result_message

char *

Yes

Explanation:

Upload result

Restrictions:

None

Value range:

None

Default value:

None

part_count_return

int

Yes

Explanation:

Number of parts.

Restrictions:

None

Value range:

None

Default value:

None

upload_info_list

obs_upload_file_part_info *

Yes

Explanation:

Part information.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 10 obs_upload_file_part_info

Parameter

Type

Mandatory (Yes/No)

Description

part_num

obs_response_handler *

Yes

Explanation:

Part number

Restrictions:

None

Value range:

None

Default value:

None

start_byte

uint64_t

Yes

Explanation:

Start position of part creation.

Restrictions:

None

Value range:

None

Default value:

None

part_size

uint64_t

Yes

Explanation:

Part size.

Restrictions:

None

Value range:

None

Default value:

None

status_return

part_upload_status

Yes

Explanation:

Part status.

Restrictions:

None

Value range:

None

Default value:

None

Table 11 part_upload_status

Constant

Original Value

Description

UPLOAD_NOTSTART

0

The upload has not started.

UPLOADING

1

Uploading.

UPLOAD_FAILED

2

The upload fails.

UPLOAD_SUCCESS

3

The upload is successful.

STATUS_BUTT

4

Default status.

Table 12 obs_progress_callback

Parameter

Type

Mandatory (Yes/No)

Description

progress

double

Yes

Explanation:

Progress percentage.

Restrictions:

None

Value range:

None

Default value:

None

uploadedSize

uint64_t

Yes

Explanation:

Number of bytes that have been uploaded.

Restrictions:

None

Value range:

None

Default value:

None

fileTotalSize

uint64_t

Yes

Explanation:

Total number of bytes to be uploaded.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 13 obs_append_object_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

append_object_data_callback

obs_append_object_data_callback *

Yes

Explanation:

Callback function pointer, which is used to copy the data to be uploaded to the data upload buffer.

Restrictions:

None

Value range:

None

Default value:

None

Table 14 obs_append_object_data_callback

Parameter

Type

Mandatory (Yes/No)

Description

buffer_size

int

Yes

Explanation:

Length of the buffer.

Restrictions:

None

Value range:

None

Default value:

None

buffer

char *

Yes

Explanation:

Buffer for storing the data to be uploaded. The data to be uploaded is copied to this buffer.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 15 obs_modify_object_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

modify_object_data_callback

obs_modify_object_data_callback *

Yes

Explanation:

Callback function pointer, which is used to copy the data to be uploaded to the data upload buffer.

Restrictions:

None

Value range:

None

Default value:

None

Table 16 obs_modify_object_data_callback

Parameter

Type

Mandatory (Yes/No)

Description

buffer_size

int

Yes

Explanation:

Length of the buffer.

Restrictions:

None

Value range:

None

Default value:

None

buffer

char *

Yes

Explanation:

Buffer for storing the data to be uploaded. The data to be uploaded is copied to this buffer.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 17 obs_list_objects_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

list_Objects_callback

obs_list_objects_callback *

Yes

Explanation:

Callback function pointer, which is used to copy the data to be uploaded to the data upload buffer.

Restrictions:

None

Value range:

None

Default value:

None

Table 18 obs_list_objects_callback

Parameter

Type

Mandatory (Yes/No)

Description

is_truncated

int

Yes

Explanation:

Whether the result is truncated.

Restrictions:

None

Value range:

  • 0 (indicating that all results have been returned)
  • 1 (indicating that not all results have been returned)

Default value:

None

next_marker

const char *

Yes

Explanation:

Where in the bucket the next listing begins. This element is returned when not all the objects are listed. You can set key_marker to this value in the next request to list the remaining multipart uploads.

Restrictions:

This parameter is only available for listing objects with multiple versions.

Value range:

The value can contain 1 to 1,024 characters.

Default value:

None

contents_count

const char *

Yes

Explanation:

Start position for the next request for listing objects. It must be used together with next_key_marker. This parameter is returned if some listing results were not returned. You can set version_id_marker of the next request to the returned value to list the remaining results.

Restrictions:

This parameter is only available for listing objects with multiple versions.

Value range:

The value must contain 32 characters.

Default value:

None

contents

const obs_list_objects_content *

Yes

Explanation:

Information about the listed objects.

Restrictions:

None

Value range:

None

Default value:

None

common_prefixes_count

int

Yes

Explanation:

Number of common prefixes.

Restrictions:

None

Value range:

None

Default value:

None

common_prefixes

const char **

Yes

Explanation:

List of object name prefixes grouped according to the delimiter parameter (if specified)

Restrictions:

None

Value range:

The value can contain 1 to 1,024 characters.

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 19 obs_list_objects_content

Parameter

Type

Mandatory (Yes/No)

Description

key

const char *

No

Explanation:

Object name. An object is uniquely identified by an object name in a bucket. An object name is a complete path that does not contain the bucket name.

For example, if the access path is examplebucket.obs.ap-southeast-1.myhuaweicloud.com/folder/test.txt, the object name is folder/test.txt.

Restrictions:

None

Value range:

The value can contain 1 to 1,024 characters.

Default value:

None

last_modified

int64_t

No

Explanation:

Time when the object was last modified, in UTC.

Restrictions:

None

Value range:

The value can contain 1 to 1,024 characters.

Default value:

None

etag

const char *

No

Explanation:

Base64-encoded, 128-bit MD5 value of an object. It uniquely identifies the content of an object and can be used to check the object integrity. For example, if the ETag is A when an object is uploaded and is B when the object is downloaded, it indicates that the object content has been changed. The ETag value is a hash of the object. The ETag reflects changes to the contents of the object, not its metadata. An object created by an upload or copy operation has a unique ETag after MD5 encryption.

Restrictions:

None

Value range:

The value must contain 32 characters.

Default value:

None

size

uint64_t

No

Explanation:

Object size in bytes.

Restrictions:

None

Value range:

None

Default value:

None

owner_id

const char *

No

Explanation:

Domain ID (account ID) of the object owner.

Restrictions:

None

Value range:

None

Default value:

None

storage_class

const char *

No

Explanation:

Object storage class.

Restrictions:

None

Value range:

None

Default value:

None

type

const char *

No

Explanation:

Object type. This parameter is returned when the object type is not Normal.

Restrictions:

None

Value range:

None

Default value:

None

Table 20 get_access_label_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_access_label_callback_impl

get_access_label_callback*

Yes

Explanation:

The pointer to the callback function, where the callback parameters can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 21 get_access_label_callback

Parameter

Type

Mandatory (Yes/No)

Description

buffer_size

int

Yes

Explanation:

Length of the buffer.

Restrictions:

None

Value range:

None

Default value:

None

buffer

char *

Yes

Explanation:

Buffer for storing the data to be uploaded. The data to be uploaded is copied to this buffer.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 22 obs_get_bucket_websiteconf_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_bucket_website_conf_callback

obs_get_bucket_websiteconf_callback *

Yes

Explanation:

The pointer to the callback function, where the callback parameters can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 23 obs_get_bucket_websiteconf_callback

Parameter

Type

Mandatory (Yes/No)

Description

hostname

const char *

Yes

Explanation:

Indicates the name of the host where requests will be redirected.

Restrictions:

None

Value range:

None

Default value:

None

protocol

const char *

Yes

Explanation:

The HTTP or HTTPS protocol used in redirecting requests. The default protocol is HTTP.

Restrictions:

None

Value range:

None

Default value:

None

suffix

const char *

Yes

Explanation:

The suffix that is appended to the requested directory. For example, if the suffix is index.html and samplebucket/images/ is requested, the data that is returned will be the content under the object name images/index.html in the samplebucket bucket.

Restrictions:

The suffix cannot be empty or contain slashes (/).

Value range:

None

Default value:

None

key

const char *

Yes

Explanation:

Indicates the object name that is used when a 4XX error occurs. This element identifies the page that is returned when an error occurs.

Restrictions:

None

Value range:

None

Default value:

None

routingrule

const bucket_website_routingrule *

Yes

Explanation:

Description of the redirection rule.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 24 obs_get_bucket_tagging_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_bucket_tagging_callback

obs_get_bucket_tagging_callback *

Yes

Explanation:

The callback function pointer tag. The content of tagging_count and tagging_list in the callback can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 25 obs_get_bucket_tagging_callback

Parameter

Type

Mandatory (Yes/No)

Description

tagging_count

int

Yes

Explanation:

Number of tags in the tag list.

Restrictions:

None

Value range:

None

Default value:

None

tagging_list

obs_name_value *

Yes

Explanation:

Tag list.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 26 obs_cors_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_cors_callback

get_cors_configuration_callback *

Yes

Explanation:

The callback function pointer tag. The CORS rule content in the callback can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 27 get_cors_configuration_callback

Parameter

Type

Mandatory (Yes/No)

Description

bucket_cors_conf

obs_bucket_cors_conf *

Yes

Explanation:

CORS rule content.

Restrictions:

None

Value range:

None

Default value:

None

bcc_number

unsigned int

Yes

Explanation:

The number specified in bucket_cors_conf

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 28 obs_lifecycle_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

get_lifecycle_callback

get_lifecycle_configuration_callback *

Yes

Explanation:

Pointer to the callback function. The details of the bucket lifecycle rule can be recorded in callback_data (user-defined callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 29 get_lifecycle_configuration_callback

Parameter

Type

Mandatory (Yes/No)

Description

bucket_lifecycle_conf

obs_lifecycle_conf *

Yes

Explanation:

Content of the bucket lifecycle rule.

Restrictions:

None

Value range:

None

Default value:

None

blcc_number

unsigned int

Yes

Explanation:

The number specified in bucket_lifecycle_conf

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None

Table 30 obs_list_versions_handler

Parameter

Type

Mandatory (Yes/No)

Description

response_handler

obs_response_handler *

Yes

Explanation:

Response callback function structure.

Restrictions:

None

Value range:

None

Default value:

None

list_versions_callback

obs_list_versions_callback *

Yes

Explanation:

The callback function pointer tag. The listed results in the callback can be recorded in callback_data (custom callback data).

Restrictions:

None

Value range:

None

Default value:

None

Table 31 obs_list_versions_callback

Parameter

Type

Mandatory (Yes/No)

Description

is_truncated

int

Yes

Explanation:

Indicates whether the returned result list is truncated.

Restrictions:

None

Value range:

None

Default value:

None

next_key_marker

const char *

Yes

Explanation:

Object name to start with in the next request for listing object versions. This element is returned when not all the objects are listed. You can set key_marker to this value in the next request to list the remaining multipart uploads.

Restrictions:

This parameter is only available for listing objects with multiple versions.

Value range:

The value can contain 1 to 1,024 characters.

Default value:

None

next_versionid_marker

const char *

Yes

Explanation:

Version ID to start with in the next request for listing object versions. It must be used together with next_key_marker. This parameter is returned if some listing results were not returned. You can set version_id_marker of the next request to the returned value to list the remaining results.

Restrictions:

This parameter is only available for listing objects with multiple versions.

Value range:

The value must contain 32 characters.

Default value:

None

versions

const obs_list_versions *

Yes

Explanation:

Listed information about versions.

Restrictions:

None

Value range:

None

Default value:

None

callback_data

void *

Yes

Explanation:

The pointer to the custom callback data.

Restrictions:

None

Value range:

None

Default value:

None