SDK Common Result Objects

API Description

Each time an ObsClient related API is called (excluding ObsClient.createSignedUrl and ObsClient.createPostSignature), an SDK common result object will be returned. You can obtain the HTTP status code from this object to check whether the operation is successful.

Parameter Description

Field

Type

Description

status

int

HTTP status code. If the value is smaller than 300, the operation succeeds. Otherwise, the operation fails.

reason

str

Reason description

errorCode

str

Error code returned by the OBS server. If the value of status is smaller than 300, this parameter value is null.

errorMessage

str

Error description returned by the OBS server. If the value of status is smaller than 300, this parameter value is null.

requestId

str

Request ID returned by the OBS server.

indicator

str

Error indicator returned by the OBS server

hostId

str

Requested server ID. If the value of status is smaller than 300, this parameter value is null.

resource

str

Error source (a bucket or an object). If the value of status is smaller than 300, this parameter value is null.

header

list

Response header list, composed of tuples. Each tuple consists of two elements, respectively corresponding to the key and value of a response header.

body

object

Result content returned after the operation is successful. If the value of status is larger than 300, this parameter value is null. The value varies with the API being called. For details, see the sections "Bucket-Related APIs" and "Object-Related APIs."