tencent cloud

Cloud Object Storage

Put Space Quota

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-29 17:18:34
Diterjemahkan oleh AI

Overview

Set the storage quota for a specified Space.

Request

Request Syntax

PUT /<SpaceId>/?space-quota HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Content-Type: application/xml
Content-Length: Content Length
Authorization: Auth String

[Request Body]
Note:
SpaceId: It corresponds to the first-level directory of an ObjectKey. To create the corresponding SpaceId, you must first upload an empty first-level directory object using the PUT Object API.
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com. Here, <BucketName-APPID> is the bucket name with the APPID suffix, for example, smhxxxxxxxxxxxxx-1250000000. <Region> is the available region. For details, see Product Overview.
Authorization: Auth String (For details, see Request Signature).

Request Parameters

This API has no request parameters.

Request Body

Submit a request with application/xml data that contains the storage quota information to configure for the Space.
<SpaceQuota>
<Capacity>1099511627776</Capacity>
</SpaceQuota>
The detailed node descriptions are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required
SpaceQuota
None
Contains all request information for the Put Space Quota operation
Container
Yes
The content of the Container node SpaceQuota:
Node Name (Keyword)
Parent Node
Description
Type
Required
Capacity
SpaceQuota
Quota size, in bytes (string). Must be a valid non-negative integer and not exceed 9223372036854775807 (the maximum value of int64).
number
Yes

Response

Response Headers

This API only returns common response headers. For details, see Common Response Headers.

Response Body

If the request succeeds, application/xml data is returned, containing the space's quota information.
<SpaceQuota>
<QuotaId>12345</QuotaId>
<Capacity>102400</Capacity>
</SpaceQuota>
The detailed node descriptions are as follows:
Node Name (Keyword)
Parent Node
Description
Type
SpaceQuota
None
Contains all information for the Put Space Quota result.
Container
The content of the Container node SpaceQuota:
Node Name (Keyword)
Parent Node
Description
Type
QuotaId
SpaceQuota
The unique identifier of a quota
string
Capacity
SpaceQuota
Quota capacity, in bytes
number

Examples

Request

PUT /test-space/?space-quota HTTP/1.1
Host: smhxxx-1250000000.cos.ap-chengdu.myqcloud.com
Content-Type: application/xml
Content-Length: 64
Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1566302375;1566309575&q-key-time=1566302375;1566309575&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=****************************************

<SpaceQuota>
<Capacity>102400</Capacity>
</SpaceQuota>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 118
Date: Tue, 20 Aug 2019 11:59:35 GMT
x-cos-request-id: NWQ1YmUwYTdfM2FiMDJhMDlfYzczN18zMGM1****

<SpaceQuota>
<QuotaId>1</QuotaId>
<Capacity>102400</Capacity>
</SpaceQuota>



Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan