此操作用来修改QoS策略。
请求语法
PUT /rest/v1/system/qos/qosName HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Content-Length: length
Host: ip:port
Authorization: authorization
{
"newName": qosName,
"description": description,
"IOPS": IPOS,
"readIOPS": readIOPS,
"writeIOPS": writeIOPS,
"Bps": Bps,
"readBps": readBps,
"writeBps": writeBps,
"IOPSBurst": IOPSBurst,
"readIOPSBurst": readIOPSBurst,
"writeIOPSBurst": writeIOPSBurst,
"BpsBurst": BpsBurst,
"readBpsBurst": readBpsBurst,
"writeBpsBurst": writeBpsBurst,
"IOPSBurstSecs": IOPSBurstSecs,
"readIOPSBurstSecs": readIOPSBurstSecs,
"writeIOPSBurstSecs": writeIOPSBurstSecs,
"BpsBurstSecs": BpsBurstSecs,
"readBpsBurstSecs": readBpsBurstSecs,
"writeBpsBurstSecs": writeBpsBurstSecs,
"reclaimPolicy": reclaimPolicy
}
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
qosName | String | 指定要修改的QoS策略名称。 | 是 |
newName | String | 指定QoS策略的新名称。 取值:长度范围1~64,只能由字母、数字和短横线(-)组成,区分大小写,且仅支持以字母或数字开头。 | 否 |
description | String | QoS策略的描述信息。 取值:1~256位字符串。 | 否 |
IOPS | Long | 每秒能够进行读写操作次数的最大值。 取值:取值范围为[-1, 999999999]。-1表示不限制。 | 否 |
readIOPS | Long | 每秒能够进行读操作次数的最大值。 取值:取值范围为[-1, 999999999]。-1表示不限制。 | 否 |
writeIOPS | Long | 每秒能够进行写操作次数的最大值。 取值:取值范围为[-1, 999999999]。-1表示不限制。 | 否 |
Bps | Long | 每秒可传输数据量的最大值。 取值:取值范围为[-1, 4096000000000],单位是Bytes/s。-1表示不限制。 | 否 |
readBps | Long | 读带宽上限。 取值:取值范围为[-1, 4096000000000],单位是Bytes/s。-1表示不限制。 | 否 |
writeBps | Long | 写带宽上限。 取值:取值范围为[-1, 4096000000000],单位是Bytes/s。-1表示不限制。 | 否 |
IOPSBurst | Long | 使用Burst功能时,每秒能够进行读写操作次数的最大值。 取值:只有当IOPS大于等于1时,此项设置为-1或(IOPS, 999999999]内的正整数方可生效。-1表示不限制。 | 否 |
readIOPSBurst | Long | 使用Burst功能时,每秒能够进行读操作次数的最大值。 取值:只有当readIOPS大于等于1时,此项设置为-1或(readIOPS, 999999999]内的正整数方可生效。-1表示不限制。 | 否 |
writeIOPSBurst | Long | 使用Burst功能时,每秒能够进行写操作次数的最大值。 取值:只有当writeIOPS大于等于1时,此项设置为-1或(writeIOPS, 999999999]内的正整数方可生效。-1表示不限制。 | 否 |
BpsBurst | Long | 使用Burst功能时,每秒可传输的数据量最大值。 取值:只有当Bps大于等于1时,此项设置为-1或(Bps, 4096000000000]内的正整数方可生效,单位是Bytes/s。-1表示不限制。 | 否 |
readBpsBurst | Long | 使用Burst功能时,读带宽上限。 取值:只有当readBps大于等于1时,此项设置为-1或(readBps, 4096000000000]内的正整数方可生效,单位是Bytes/s。-1表示不限制。 | 否 |
writeBpsBurst | Long | 使用Burst功能时,写带宽上限。 取值:只有当writeBps大于等于1时,此项设置为-1或(writeBps, 4096000000000]内的正整数方可生效,单位是Bytes/s。-1表示不限制。 | 否 |
IOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读写操作所能持续的时间。 注意 只有在IOPS Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
readIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行读操作所能持续的时间。 注意 只有在read IOPS Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
writeIOPSBurstSecs | Long | 使用Burst功能时,按照Burst上限的能力进行写操作所能持续的时间。 注意 只有在write IOPS Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
BpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的流量能力所能持续的时间。 注意 只有在Bps Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
readBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的读流量能力所能持续的时间,单位是秒。 注意 只有在read Bps Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
writeBpsBurstSecs | Long | 使用Burst功能时,按照Burst上限的写流量能力所能持续的时间。 注意 只有在write Bps Burst功能启用时,此配置才生效。 取值:取值范围为[1, 999999999],单位是秒。 | 否 |
reclaimPolicy | String | QoS策略的回收策略。 取值:
| 否 |
请求示例
修改QoS策略QoStest6。
PUT /rest/v1/system/qos/QoStest6 HTTP/1.1
Date: Tue, 01 Jul 2025 10:11:31 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Content-Length: 612
Host: 192.168.0.64:1443
{
"newName": "QoS6",
"description": "It is Qos6",
"IOPS": 5000000,
"readIOPS": 5000000,
"writeIOPS": 6000000,
"Bps": 40960000000,
"readBps": 40960000000,
"writeBps": 40960000000,
"IOPSBurst": -1,
"readIOPSBurst": -1,
"writeIOPSBurst": -1,
"BpsBurst": -1,
"readBpsBurst": -1,
"writeBpsBurst": -1,
"IOPSBurstSecs": 999999999,
"readIOPSBurstSecs": 999999999,
"writeIOPSBurstSecs": 999999999,
"BpsBurstSecs": 99999999,
"readBpsBurstSecs": 99999999,
"writeBpsBurstSecs": 99999999,
"reclaimPolicy": "Delete"
}
响应示例
HTTP/1.1 204 No Content
x-hblock-request-id: 5416bb143c504e95986f9489c1d86272
Connection: keep-alive
Date: Tue, 01 Jul 2025 10:11:31 GMT
Server: HBlock