Create Firewall Group
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) |
||
Line 1: | Line 1: | ||
A Security/Firewall Group defines firewall rules for your Server. You have the ability to configure your firewall connections and secure your network as required. You may have one or multiple servers behind a firewall group. Hostway provides a default firewall group, and typical firewall rules are already configured. You can create multiple firewall groups as needed. | A Security/Firewall Group defines firewall rules for your Server. You have the ability to configure your firewall connections and secure your network as required. You may have one or multiple servers behind a firewall group. Hostway provides a default firewall group, and typical firewall rules are already configured. You can create multiple firewall groups as needed. | ||
− | + | ='''POST''' /os-security-groups= | |
This operation will create a new firewall group. | This operation will create a new firewall group. | ||
− | + | == Request == | |
− | + | === JSON === | |
<nowiki> | <nowiki> | ||
{ | { | ||
Line 14: | Line 14: | ||
}</nowiki> | }</nowiki> | ||
− | + | ====security_group==== | |
; display_name - ''string'' | ; display_name - ''string'' | ||
: Display name for this firewall group. | : Display name for this firewall group. | ||
Line 21: | Line 21: | ||
: Descriptive information for this firewall group. | : Descriptive information for this firewall group. | ||
− | + | == Response == | |
− | + | === JSON === | |
<nowiki> | <nowiki> | ||
{ | { | ||
Line 42: | Line 42: | ||
</nowiki> | </nowiki> | ||
− | + | ====security_group==== | |
; display_name - ''string'' | ; display_name - ''string'' | ||
: Display name for this firewall group. | : Display name for this firewall group. | ||
Line 64: | Line 64: | ||
: List of server IDs this security group is assigned to. | : List of server IDs this security group is assigned to. | ||
− | + | == Response Codes == | |
; Success | ; Success | ||
: ''HTTP/1.1 201 Created'' | : ''HTTP/1.1 201 Created'' | ||
Line 72: | Line 72: | ||
: ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | : ''HTTP/1.1 401 Unauthorized'' : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | ||
− | + | == Examples == | |
'''Successfully create a new firewall group''' | '''Successfully create a new firewall group''' | ||
:'''POST''' http(s)://{api_server}/os-security-groups | :'''POST''' http(s)://{api_server}/os-security-groups | ||
Line 135: | Line 135: | ||
"message": "Invalid", | "message": "Invalid", | ||
"code": 400, | "code": 400, | ||
− | "details": "" | + | "details": "", |
+ | "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" | ||
} | } | ||
}</nowiki> | }</nowiki> | ||
Line 165: | Line 166: | ||
"message": "GroupNameError", | "message": "GroupNameError", | ||
"code": 400, | "code": 400, | ||
− | "details": "Display name in use" | + | "details": "Display name in use", |
+ | "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" | ||
} | } | ||
}</nowiki> | }</nowiki> | ||
Line 186: | Line 188: | ||
wrong credentials (e.g., bad password), or your browser | wrong credentials (e.g., bad password), or your browser | ||
does not understand how to supply the credentials required. | does not understand how to supply the credentials required. | ||
− | |||
[[Category:Hostway API]] | [[Category:Hostway API]] | ||
[[Category:FlexCloud Server API]] | [[Category:FlexCloud Server API]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 07:20, 20 May 2013
A Security/Firewall Group defines firewall rules for your Server. You have the ability to configure your firewall connections and secure your network as required. You may have one or multiple servers behind a firewall group. Hostway provides a default firewall group, and typical firewall rules are already configured. You can create multiple firewall groups as needed.
Contents |
POST /os-security-groups
This operation will create a new firewall group.
Request
JSON
{ "security_group" : { "display_name" : "{firewall_group_display_name}", "description" : "{firewall_group_description}" } }
security_group
- display_name - string
- Display name for this firewall group.
- description - string
- Descriptive information for this firewall group.
Response
JSON
{ "security_group" : { "display_name": "{firewall_group_display_name}", "description": "{firewall_group_description}", "links": [ { "href": "http://{api_server}/os-security-groups/{firewall_group_name}/", "rel": "self" } ], "rules": [], "name": "{firewall_group_name}", "account_number": "{user_account_number}", "servers": [] } }
security_group
- display_name - string
- Display name for this firewall group.
- description - string
- Descriptive information for this firewall group.
- links - list
- Hypermedia for this resource.
- rules - list
- List of all defined security rules for the group.
- name - string
- The name of the firewall group.*(Unique identifier for this firewall group.)
- account_number - string
- The account number this firewall group resource belongs to.
- servers - list
- List of server IDs this security group is assigned to.
Response Codes
- Success
- HTTP/1.1 201 Created
- Failure
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized : This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Examples
Successfully create a new firewall group
- POST http(s)://{api_server}/os-security-groups
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Request Body:
{ "security_group" : { "display_name" : "Test Firewall Group", "description" : "Test firewall group description." } }
Response Code:
HTTP/1.1 201 Created
Response Body:
{ "security_group" : { "display_name": "Test Firewall Group", "description": "Test firewall group description.", "links": [ { "href": "http://{api_server}/os-security-groups/group2012May11_OK30Zs7Ju/", "rel": "self" } ], "rules": [], "name": "group2012May11_OK30Zs7Ju", "account_number": "test_account_120761", "servers": [] } }
Failure while trying to create a new firewall group with invalid data
- POST http(s)://{api_server}/os-security-groups
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Request Body:
{
Empty
}
Response Code:
HTTP/1.1 400 Bad Request
Response Body:
{ "badRequest" : { "message": "Invalid", "code": 400, "details": "", "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }
Failure while trying to create a new firewall group with an already existing firewall group display name
- POST http(s)://{api_server}/os-security-groups
Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
Request Body:
{ "security_group" : { "display_name" : "Test Firewall Group", "description" : "Test firewall group description." } }
Response Code:
HTTP/1.1 400 Bad Request
Response Body:
{ "computeFault" : { "message": "GroupNameError", "code": 400, "details": "Display name in use", "errorid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }
Failure while trying to make unauthorized access
- POST http(s)://{api_server}/os-security-groups
Request Headers:
Content-Type:application/json
Charset=UTF-8
Authorization:Base64-encoded fake_authentication_string
Response Code:
HTTP/1.1 401 Unauthorized
Response Body:
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.