Updating a Security Group
PUT /v2/security_groups/:guid
Request
Route
PUT /v2/security_groups/d9ef013b-c531-4b16-8c71-56292635d715
Parameters
Name |
Description |
Valid Values |
Example Values |
guid
|
The guid of the Security Group
|
|
|
Body
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
The name of the security group.
|
|
|
|
rules
|
The egress rules for apps that belong to this security group.
A rule consists of a protocol (tcp,icmp,udp,all), destination CIDR or destination range,
port or port range (tcp,udp,all), type (control signal for icmp), code (control signal for icmp),
log (enables logging for the egress rule)
|
|
|
[
{
"protocol": "icmp",
"destination": "0.0.0.0/0",
"type": 0,
"code": 1
},
{
"protocol": "tcp",
"destination": "0.0.0.0/0",
"ports": "2048-3000",
"log": true
},
{
"protocol": "udp",
"destination": "0.0.0.0/0",
"ports": "53, 5353"
},
{
"protocol": "all",
"destination": "0.0.0.0/0"
}
]
|
space_guids
|
The list of associated spaces.
|
|
|
|
{
"name": "new_name",
"rules": [
]
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/security_groups/d9ef013b-c531-4b16-8c71-56292635d715" -d '{
"name": "new_name",
"rules": [
]
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2IiwiZW1haWwiOiJlbWFpbC0zNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODQ2fQ.GGa9A4LAYtSwJB6FWkX0m1BcDR4DLCT3G8aNGoCUXeY" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "d9ef013b-c531-4b16-8c71-56292635d715",
"url": "/v2/security_groups/d9ef013b-c531-4b16-8c71-56292635d715",
"created_at": "2015-06-16T23:40:41Z",
"updated_at": "2015-06-16T23:40:46Z"
},
"entity": {
"name": "new_name",
"rules": [
],
"running_default": false,
"staging_default": false,
"spaces_url": "/v2/security_groups/d9ef013b-c531-4b16-8c71-56292635d715/spaces"
}
}
Headers