Creating a Space Quota Definition
POST /v2/space_quota_definitions
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
The name for the Space Quota Definition.
|
|
|
|
non_basic_services_allowed
|
If a space can have non basic services
|
|
|
|
total_services
|
How many services a space can have.
|
|
|
|
total_routes
|
How many routes a space can have.
|
|
|
|
memory_limit
|
How much memory in megabytes a space can have.
|
|
|
|
instance_memory_limit
|
The maximum amount of memory in megabytes an application instance can have. (-1 represents an unlimited amount)
|
-1
|
|
|
organization_guid
|
The owning organization of the space quota
|
|
|
- guid-86be55e7-d088-4671-985b-e1b3d36bd0c6
|
Request
Headers
Route
POST /v2/space_quota_definitions
Body
{
"name": "gold_quota",
"non_basic_services_allowed": true,
"total_services": 5,
"total_routes": 10,
"memory_limit": 5120,
"organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e"
}
cURL
curl "https://api.[your-domain.com]/v2/space_quota_definitions" -d '{
"name": "gold_quota",
"non_basic_services_allowed": true,
"total_services": 5,
"total_routes": 10,
"memory_limit": 5120,
"organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzIiwiZW1haWwiOiJlbWFpbC0yM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTMwfQ.ZRFWtq7oXgeqbb5ScIOfG4ZTY7VL748ngC9f6xx8SMs" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "3bc6b272-3e5a-4d0a-bc66-47e160042819",
"url": "/v2/space_quota_definitions/3bc6b272-3e5a-4d0a-bc66-47e160042819",
"created_at": "2014-11-05T01:02:10+00:00",
"updated_at": null
},
"entity": {
"name": "gold_quota",
"organization_guid": "8f3e0743-7c2a-43ce-9398-f89ad12f881e",
"non_basic_services_allowed": true,
"total_services": 5,
"total_routes": 10,
"memory_limit": 5120,
"instance_memory_limit": -1,
"organization_url": "/v2/organizations/8f3e0743-7c2a-43ce-9398-f89ad12f881e",
"spaces_url": "/v2/space_quota_definitions/3bc6b272-3e5a-4d0a-bc66-47e160042819/spaces"
}
}