blob: 6859b590ad711e2f3afaab99f43495911ff5ede0 [file] [log] [blame]
Jian Lid3472bf2018-02-12 15:22:04 +09001{
2 "type": "object",
3 "description": "A security_group object.",
4 "required": [
5 "security_group"
6 ],
7 "properties": {
8 "security_group": {
9 "type": "object",
10 "required": [
11 "id",
12 "tenant_id",
13 "description",
14 "name",
15 "security_group_rules"
16 ],
17 "properties": {
18 "id": {
19 "type": "string",
20 "example": "2076db17-a522-4506-91de-c6dd8e837028",
21 "description": "The ID of the security group."
22 },
23 "tenant_id": {
24 "type": "string",
25 "example": "e4f50856753b4dc6afee5fa6b9b6c550",
26 "description": "The ID of the project."
27 },
28 "description": {
29 "type": "string",
30 "example": "security group for webservers",
31 "description": "A human-readable description for the resource."
32 },
33 "name": {
34 "type": "string",
35 "example": "new-webservers",
36 "description": "Human-readable name of the resource."
37 },
38 "security_group_rules": {
39 "type": "array",
40 "description": "A list of security_group_rule objects.",
41 "items": {
42 "type": "object",
43 "description": "A security group rule object.",
44 "required": [
45 "id",
46 "tenant_id",
47 "security_group_id",
48 "direction",
49 "ethertype",
50 "port_range_max",
51 "port_range_min",
52 "protocol",
53 "remote_ip_prefix",
54 "remote_group_id"
55 ],
56 "properties": {
57 "id": {
58 "type": "string",
59 "example": "2bc0accf-312e-429a-956e-e4407625eb62",
60 "description": "The ID of this security group rule."
61 },
62 "tenant_id": {
63 "type": "string",
64 "example": "e4f50856753b4dc6afee5fa6b9b6c550",
65 "description": "The ID of the project."
66 },
67 "security_group_id": {
68 "type": "string",
69 "example": "a7734e61-b545-452d-a3cd-0189cbd9747a",
70 "description": "The security group ID to associate with this security group rule."
71 },
72 "direction": {
73 "type": "string",
74 "example": "ingress",
75 "description": "Ingress or egress, which is the direction in which the metering rule is applied."
76 },
77 "ethertype": {
78 "type": "string",
79 "example": "IPv4",
80 "description": "Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules."
81 },
82 "port_range_max": {
83 "type": "integer",
84 "format": "int32",
85 "example": 80,
86 "description": "The maximum port number in the range that is matched by the security group rule."
87 },
88 "port_range_min": {
89 "type": "integer",
90 "format": "int32",
91 "example": 80,
92 "description": "The minimum port number in the range that is matched by the security group rule."
93 },
94 "protocol": {
95 "type": "string",
96 "example": "tcp",
97 "description": "The IP protocol can be represented by a string, an integer, or null."
98 },
99 "remote_ip_prefix": {
100 "type": "string",
101 "example": "",
102 "description": "The remote IP prefix to associate with this metering rule packet."
103 },
104 "remote_group_id": {
105 "type": "string",
106 "example": "85cc3048-abc3-43cc-89b3-377341426ac5",
107 "description": "The remote group UUID to associate with this security group rule."
108 }
109 }
110 }
111 }
112 }
113 }
114 }
115}