Accounts-account-dedicatedServers-server-ipAddresses-ipaddress-os-security-group:PUT
From Hostway API Documentation
Revision as of 13:36, 30 May 2016 by Corinne.chui (Talk | contribs)
PUT /accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}/os-security-group
Assign security group to a specific IP address of a dedicated server
Contents |
Request
PUT /accounts/{accountId}/dedicatedServers/{serverId}/ipAddresses/{ipAddress}/os-security-group
URI Parameters
- accountId - string
- The user account owning the dedicated server
- serverId - string
- The specified dedicated server Id
- groupId - string
- The specified security group id
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
- Content-Type
- Required. Set this header to
application/json; charset=UTF-8
Request Body
{ "securityGroup": { "id": "{id}", "status": "{status}" } }
Parameters
- id - string (Required)
- This is the id of the security group, which is to be added
- status - string (Required) - one of "enabled" or "disabled"
- This is the status of the security group
Response
Status Code
- 204 No Content
- Success
- 400 Bad Request
- The format of the request body is invalid.
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 404 Not Found
- The domain name does not exist.
- 409 Conflict
- The feature already exists(on create) or domain is disabled(on update).
Examples
Successfully assigning security group to a given IP address
Request
PUT /accounts/test-acount/dedicatedServers/test-acount-123/ipAddresses/1.1.1.1/os-security-group { "securityGroup": {"id": "sgroup_id123", "status": "enabled"} }
Response
204 No Content