Aller au contenu
NimbusNexus

Quotas

Les quotas sont des limites par projet qui bornent la quantité de chaque ressource qu’un projet peut détenir. Ils évitent les dépenses incontrôlées dues à des boucles accidentelles, et ils garantissent que la consommation d’un projet ne peut pas épuiser la capacité d’une région.

Ce qui est soumis à quota

Les endpoints de quota couvrent quatre services. Chacun répond avec ses propres noms de quota, par exemple :

ServiceCe qu’il limiteExemples de noms de quota
novaVMinstances, cores, ram (en MB)
cinderStockage en blocvolumes, gigabytes, snapshots, backups
neutronRéseaunetwork, subnet, port, router, floatingip, security_group
projectsProjets de votre espace de travailmax_projects

Lisez les valeurs par défaut avec GET /api/v1/quota/{service}?defaults=true. max_projects vaut -1, c’est-à-dire aucune limite, sauf si une limite a été définie pour votre espace de travail.

Quota et consommation

Les endpoints exposent les deux :

  • GET /api/v1/quota/{service} — les limites, sous forme de dictionnaire qui associe un nombre à chaque nom de quota.
  • GET /api/v1/quota/{service}/usage — la consommation actuelle : used, reserved et limit pour chaque nom de quota.

{service} vaut nova, cinder, neutron ou projects.

Vérifiez toujours la consommation avant une création en masse ; une requête qui vous ferait dépasser le quota échoue (comme le quota n’est pas limité dans le temps, réessayer ne sert à rien — vous devez supprimer quelque chose ou augmenter le quota).

Augmenter un quota

Demandez une augmentation avec POST /api/v1/quota-request/ : indiquez le service_name, le quota_name et la new_value, et expliquez pourquoi dans reason. La demande porte sur votre projet actuel, ou sur votre espace de travail quand le service est projects. Elle exige le rôle manager ou admin, et chaque quota ne peut avoir qu’une seule demande ouverte à la fois.

Un administrateur NimbusNexus examine chaque demande à la main. Son approbation applique la nouvelle limite ; une demande peut aussi être rejetée ou vous être renvoyée pour modification. Dans tous les cas, la réponse arrive sous forme de notification. GET /api/v1/quota-request/list liste vos demandes, et PATCH ou DELETE /api/v1/quota-request/ modifie ou retire une demande ouverte.

Quotas et régions

Les chiffres de nova, cinder et neutron portent sur la région de votre session ; changez de région avec GET /api/v1/account/rescope?region=<region_name>. Le quota projects compte les projets de tout votre espace de travail. Les réponses sont de simples dictionnaires qui associent des nombres aux noms de quota, sans champ de région ni de portée.

Étapes suivantes

  • Projets — le conteneur auquel s’appliquent les quotas.
  • Authentification — comment appeler ces endpoints.
  • Notifications — là où arrive la réponse à une demande de quota.

Reference

GET/api/v1/quota-request/

Get Quota Request

Retrieve a single quota change request by ID within the caller's project.

Parameters

NameInTypeDescription
id*querystring—

Responses

  • 200Successful Response
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/quota-request/?id=example" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/quota-request/

Create Quota Request

Submit a new quota change request for the caller's project or domain.

Request body

FieldTypeDescription
reasonstring | null—
service_name*ServiceNameEnum—
quota_name*string—
new_value*integer—
project_idstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/quota-request/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service_name": "nova",
    "quota_name": "example",
    "new_value": 1
  }'
PATCH/api/v1/quota-request/

Update Quota Request

Update an existing quota change request; non-admin callers may only edit their own request payload.

Request body

FieldTypeDescription
id*string—
new_valueinteger | null—
stateQuotaRequestStateEnum | null—
admin_user_idstring | null—
messagestring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/quota-request/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
DELETE/api/v1/quota-request/

Delete Quota Request

Delete a quota change request owned by the caller's project.

Parameters

NameInTypeDescription
id*querystring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/quota-request/?id=example" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/quota-request/approve

Admin Approve Quota Request

Admin endpoint that approves a pending quota change request and applies the new limits.

Request body

FieldTypeDescription
id*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/quota-request/approve" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
GET/api/v1/quota-request/list

Get Quota Request List

List quota change requests for the caller's project, optionally filtered by request state.

Parameters

NameInTypeDescription
statesqueryarray of QuotaRequestStateEnum | null—
project_idquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/quota-request/list" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/quota-request/reject

Admin Reject Quota Request

Admin endpoint that rejects a quota change request with an explanatory message.

Request body

FieldTypeDescription
id*string—
messagestring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/quota-request/reject" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
POST/api/v1/quota-request/update

Admin Mark Quota Request For Update

Admin endpoint that flags a quota change request as needing further updates from the requester.

Request body

FieldTypeDescription
id*string—
messagestring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/quota-request/update" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "example"
  }'
GET/api/v1/quota/{service}

Get Quotas

Return current quota limits (or defaults) for the given service in the caller's scope.

Parameters

NameInTypeDescription
service*pathQuotaServiceEnum—
admin_domainquerystring | null—
admin_projectquerystring | null—
defaultsqueryboolean | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/quota/<service>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/quota/{service}

Update Quotas

Update quota limits for the given service in the caller's scope (admin only).

Parameters

NameInTypeDescription
service*pathQuotaServiceEnum—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
quotas*object—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/quota/<service>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "quotas": {}
  }'
POST/api/v1/quota/{service}/reset

Reset Quotas

Reset quota limits for the given service back to their default values (admin only).

Parameters

NameInTypeDescription
service*pathQuotaServiceEnum—

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
quotasarray of string | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/quota/<service>/reset" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
GET/api/v1/quota/{service}/usage

Get Quota Usage

Return current resource usage for the given service in the caller's scope.

Parameters

NameInTypeDescription
service*pathQuotaServiceEnum—
admin_domainquerystring | null—
admin_projectquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 422Validation error
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/quota/<service>/usage" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →