Updated on 2024-02-18 GMT+08:00

Modifying an Object

Functions

This operation can modify an object from a specified position.

This API is supported only by parallel file systems. For details about how to create a parallel file system, see Sample Request: Creating a Parallel File System.

Request Syntax

PUT /ObjectName?modify&position=Position HTTP/1.1
Host: bucketname.obs.region.myhuaweicloud.com 
Content-Type: type
Content-Length: length
Authorization: authorization
Date: date
<object Content>

Request Parameters

The request needs to specify parameters in the message, indicating that the upload is for modification, and specifying the position in the object to be modified. Table 1 describes the parameters.

Table 1 Request parameters

Parameter

Description

Mandatory

modify

Indicates that the file is uploaded for modification.

Type: string

Yes

position

Position in the object where the modification starts

Type: integer

Yes

Request headers

This request uses common request headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

1
2
3
4
5
6
7
HTTP/1.1 status_code
Date: Date
ETag: etag
Content-Length: length
Server: OBS
x-obs-request-id: request-id
x-obs-id-2: id

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains no elements.

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

Sample Request

PUT /ObjectName?modify&position=Position HTTP/1.1
Host: examplebucket.obs.region.myhuaweicloud.com
Date: Wed, 08 Jul 2015 06:57:01 GMT
Content-Type: image/jpg
Content-Length: 1458
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:kZoYNv66bsmc10+dcGKw5x2PRrk=

[1458 bytes of object data]

Sample Response

1
2
3
4
5
6
7
HTTP/1.1 200
Date: Wed, 08 Jul 2015 06:57:02 GMT
ETag: "d41d8cd98f00b204e9800998ecf8427e"
Content-Length: 0
Server: OBS
x-obs-request-id: 8DF400000163D3F0FD2A03D2D30B0542
x-obs-id-2: 32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTjCqTmsA1XRpIrmrJdvcEWvZyjbztd