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.
|
|
|
|
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-84c50b7f-b902-4944-a39c-931040c90e13
|
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": "494a965e-c9a2-420f-87ff-63c8be23e49d"
}
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": "494a965e-c9a2-420f-87ff-63c8be23e49d"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0OSIsImVtYWlsIjoiZW1haWwtMTgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTY0NTIyMzh9.842qcvuf9j02U4dQPJVDE1ZgmIJkRAmhS-I-hCn89kc" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "55e033f5-db22-4f6b-a8be-7bd80b15bee9",
"url": "/v2/space_quota_definitions/55e033f5-db22-4f6b-a8be-7bd80b15bee9",
"created_at": "2016-02-19T02:03:58Z",
"updated_at": null
},
"entity": {
"name": "gold_quota",
"organization_guid": "494a965e-c9a2-420f-87ff-63c8be23e49d",
"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,
"organization_url": "/v2/organizations/494a965e-c9a2-420f-87ff-63c8be23e49d",
"spaces_url": "/v2/space_quota_definitions/55e033f5-db22-4f6b-a8be-7bd80b15bee9/spaces"
}
}
Headers