Creating a Space Quota Definition
POST /v2/space_quota_definitions
Request
Route
POST /v2/space_quota_definitions
Body
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. (-1 represents an unlimited amount)
|
|
|
|
total_routes
|
How many routes a space can have. (-1 represents an unlimited amount)
|
|
|
|
memory_limit
|
How much memory in megabytes a space can have.
|
|
|
|
total_service_keys
|
How many service keys an organization can have. (-1 represents an unlimited amount)
|
-1
|
|
|
instance_memory_limit
|
The maximum amount of memory in megabytes an application instance can have. (-1 represents an unlimited amount)
|
-1
|
|
|
app_instance_limit
|
How many app instances a space can create. (-1 represents an unlimited amount)
|
-1
|
|
|
organization_guid
|
The owning organization of the space quota
|
|
|
- guid-7da28b9e-fb7e-4eda-9888-fbf6c18cd8ed
|
app_task_limit
|
The number of tasks that can be run per app. (-1 represents an unlimited amount)
|
5
|
|
|
{
"name": "gold_quota",
"non_basic_services_allowed": true,
"total_services": -1,
"total_routes": -1,
"memory_limit": 5120,
"organization_guid": "7248a391-d881-4101-a0d6-eadd40b93d85"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/space_quota_definitions" -d '{
"name": "gold_quota",
"non_basic_services_allowed": true,
"total_services": -1,
"total_routes": -1,
"memory_limit": 5120,
"organization_guid": "7248a391-d881-4101-a0d6-eadd40b93d85"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExIiwiZW1haWwiOiJlbWFpbC0xMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU4ODU1NjY0fQ.XdB2o1C30J0sna1K47U6XLQ4gLqiT8KSP6K_vj1_ABU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "237e23ce-6f29-4b02-89c0-8f65367c02cb",
"url": "/v2/space_quota_definitions/237e23ce-6f29-4b02-89c0-8f65367c02cb",
"created_at": "2016-03-17T21:41:04Z",
"updated_at": null
},
"entity": {
"name": "gold_quota",
"organization_guid": "7248a391-d881-4101-a0d6-eadd40b93d85",
"non_basic_services_allowed": true,
"total_services": -1,
"total_routes": -1,
"memory_limit": 5120,
"instance_memory_limit": -1,
"app_instance_limit": -1,
"app_task_limit": 5,
"total_service_keys": -1,
"organization_url": "/v2/organizations/7248a391-d881-4101-a0d6-eadd40b93d85",
"spaces_url": "/v2/space_quota_definitions/237e23ce-6f29-4b02-89c0-8f65367c02cb/spaces"
}
}
Headers