Security groups¶
Firewall rules for instances and load balancers.
Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.
Request and response examples are generated from the schema; the tables under Schemas are the reference.
Create a security group¶
POST /
Creates a security group, with optional rules, in one location. Its name must be unused by the organization's other security groups in every project and location, ignoring case and surrounding spaces (409 security_group_name_taken). Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Delete a security group¶
DELETE /
Deletes the group. Refused while an instance or load balancer still uses it. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
group_id |
path | string | No | ||
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Responses
Rename a security group¶
PATCH /
Changes the group's name or description. A new name must be unused by the organization's other security groups, as for a create (409 security_group_name_taken). Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
group_id |
path | string | No | ||
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Add a security group rule¶
POST /
Adds one rule to the group. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
group_id |
path | string | No | ||
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Remove a security group rule¶
POST /
Removes one rule from the group. Accepted at once: follow the returned operation until it finishes.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
Authorization |
header | string | N/A | No | Bearer followed by a service account's API key. The console uses your signed-in session instead. |
group_id |
path | string | No | ||
idempotency-key |
header | string | Yes | ||
org_id |
path | string | No | ||
project_id |
path | string | No |
Request body
Schemas¶
Accepted¶
| Name | Type | Description |
|---|---|---|
operation |
OperationLink |
GroupCreateBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null | |
location |
string | |
template |
string | null |
GroupRenameBody¶
| Name | Type | Description |
|---|---|---|
display_name |
string | |
execute_before |
string(date-time) | null |
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
OperationLink¶
| Name | Type | Description |
|---|---|---|
href |
string | Where to read the operation; also the Location header. |
id |
string | The operation's ID (op_…). |
state |
string | null | Its state when accepted, normally queued. |
RuleBody¶
| Name | Type | Description |
|---|---|---|
direction |
string | |
ethertype |
string | |
execute_before |
string(date-time) | null | |
icmp_code |
integer | null | |
icmp_type |
integer | null | |
port_max |
integer | null | |
port_min |
integer | null | |
protocol |
string | null | |
remote_group_id |
string | null | |
remote_ip_prefix |
string | null |
ValidationError¶
| Name | Type | Description |
|---|---|---|
ctx |
||
input |
||
loc |
Array<> | |
msg |
string | |
type |
string |