2018-02-26 10:00:46 +08:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
===============
|
|
|
|
Quota class set
|
|
|
|
===============
|
|
|
|
|
|
|
|
Quota classes can be shown and updated for a project.
|
|
|
|
|
2020-04-15 19:59:41 +00:00
|
|
|
.. important::
|
|
|
|
Share replicas and replica gigabytes were added to quota management
|
|
|
|
APIs in API version 2.53.
|
2021-04-10 07:15:26 +02:00
|
|
|
Per share gigabytes was added to quota management APIs in API
|
|
|
|
version 2.62.
|
2020-04-15 19:59:41 +00:00
|
|
|
|
|
|
|
|
2018-02-26 10:00:46 +08:00
|
|
|
Show quota classes for a project
|
|
|
|
================================
|
|
|
|
|
2021-02-03 11:16:51 -08:00
|
|
|
.. rest_method:: GET /v2/quota-class-sets/{quota_class_name}
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Shows quota class set for a project. If no specific value for the quota class
|
|
|
|
resource exists, then the default value will be reported.
|
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
Response codes
|
|
|
|
--------------
|
2018-02-26 10:00:46 +08:00
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
.. rest_status_code:: success status.yaml
|
2018-02-26 10:00:46 +08:00
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
- 200
|
|
|
|
|
|
|
|
.. rest_status_code:: error status.yaml
|
|
|
|
|
|
|
|
- 403
|
|
|
|
- 404
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2018-12-07 19:55:30 +01:00
|
|
|
- project_id: project_id_path
|
2018-02-26 10:00:46 +08:00
|
|
|
- quota_class_name: quota_class_name
|
|
|
|
|
|
|
|
|
|
|
|
Response Parameters
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- quota_class_set: quota_class_set
|
|
|
|
- share_groups: maxTotalShareGroups
|
|
|
|
- gigabytes: maxTotalShareGigabytes
|
|
|
|
- share_group_snapshots: maxTotalShareGroupSnapshots
|
|
|
|
- snapshots: maxTotalShareSnapshots
|
|
|
|
- snapshot_gigabytes: maxTotalSnapshotGigabytes
|
|
|
|
- shares: maxTotalShares
|
|
|
|
- id: quota_class_id
|
|
|
|
- share_networks: maxTotalShareNetworks
|
2020-04-15 19:59:41 +00:00
|
|
|
- share_replicas: maxTotalShareReplicas
|
|
|
|
- replica_gigabytes: maxTotalReplicaGigabytes
|
2021-04-10 07:15:26 +02:00
|
|
|
- per_share_gigabytes: perShareGigabytes
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Response Example
|
|
|
|
----------------
|
|
|
|
|
|
|
|
.. literalinclude:: ./samples/quota-classes-show-response.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
|
|
|
|
Update quota classes for a project
|
|
|
|
==================================
|
|
|
|
|
2021-02-03 11:16:51 -08:00
|
|
|
.. rest_method:: PUT /v2/quota-class-sets/{quota_class_name}
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Updates quota class set for a project. If the ``quota_class_name`` key does not
|
|
|
|
exist, then the API will create one.
|
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
Response codes
|
|
|
|
--------------
|
|
|
|
|
|
|
|
.. rest_status_code:: success status.yaml
|
|
|
|
|
|
|
|
- 200
|
2018-02-26 10:00:46 +08:00
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
.. rest_status_code:: error status.yaml
|
2018-02-26 10:00:46 +08:00
|
|
|
|
2018-03-22 18:38:36 +08:00
|
|
|
- 400
|
|
|
|
- 403
|
|
|
|
- 404
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2018-12-07 19:55:30 +01:00
|
|
|
- project_id: project_id_path
|
2018-02-26 10:00:46 +08:00
|
|
|
- quota_class_name: quota_class_name
|
|
|
|
- shares: maxTotalSharesOptional
|
|
|
|
- snapshots: maxTotalShareSnapshotsOptional
|
|
|
|
- gigabytes: maxTotalShareGigabytesOptional
|
|
|
|
- snapshot-gigabytes: maxTotalSnapshotGigabytesOptional
|
|
|
|
- share-networks: maxTotalShareNetworksOptional
|
2020-04-15 19:59:41 +00:00
|
|
|
- share-replicas: maxTotalShareReplicasOptional
|
|
|
|
- replica-gigabytes: maxTotalReplicaGigabytesOptional
|
2021-04-10 07:15:26 +02:00
|
|
|
- per-share-gigabytes: perShareGigabytesOptional
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Request Example
|
|
|
|
---------------
|
|
|
|
|
|
|
|
.. literalinclude:: ./samples/quota-classes-update-request.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
|
|
|
|
Response Parameters
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- quota_class_set: quota_class_set
|
|
|
|
- share_groups: maxTotalShareGroups
|
|
|
|
- gigabytes: maxTotalShareGigabytes
|
|
|
|
- share_group_snapshots: maxTotalShareGroupSnapshots
|
|
|
|
- snapshots: maxTotalShareSnapshots
|
|
|
|
- snapshot_gigabytes: maxTotalSnapshotGigabytes
|
|
|
|
- shares: maxTotalShares
|
|
|
|
- share_networks: maxTotalShareNetworks
|
2020-04-15 19:59:41 +00:00
|
|
|
- share_replicas: maxTotalShareReplicas
|
|
|
|
- replica_gigabytes: maxTotalReplicaGigabytes
|
2021-04-10 07:15:26 +02:00
|
|
|
- per_share_gigabytes: perShareGigabytes
|
2018-02-26 10:00:46 +08:00
|
|
|
|
|
|
|
Response Example
|
|
|
|
----------------
|
|
|
|
|
|
|
|
.. literalinclude:: ./samples/quota-classes-update-response.json
|
|
|
|
:language: javascript
|