securitygroups, sg
Subcommands
- list — List security groups
- get — Get security group details
- create — Create a new security group
- update — Update an existing security group
- delete — Delete a security group
list
List security groups, optionally filtered by organization, project, network, or region.Flags
| Flag | Description |
|---|---|
—org string | Organization ID |
—project string | Project ID |
—network string | Network ID |
—region string | Region ID |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Example
get
Get details for a specific security group.Flags
| Flag | Description |
|---|---|
—id string | Security group ID |
—org string | Organization ID |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
create
Create a new security group. Accepts input from a JSON file or stdin.Flags
| Flag | Description |
|---|---|
—org string | Organization ID |
-f, —file string | Path to a JSON file |
—stdin | Read JSON from standard input |
—dry-run | Preview the request payload without persisting |
-y, —yes | Automatically confirm creation |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Examples
update
Update an existing security group.Flags
| Flag | Description |
|---|---|
—id string | Security group ID |
—org string | Organization ID |
-f, —file string | Path to a JSON file |
—stdin | Read JSON from standard input |
—dry-run | Preview the request payload without persisting |
-y, —yes | Automatically confirm update |
—json | Emit the full JSON payload (mutually exclusive with -q) |
-q, —query stringArray | jq filter for value extraction (see Query output with -q) |
Examples
delete
Delete an existing security group.Flags
| Flag | Description |
|---|---|
--id string | Security group ID |
--org string | Organization ID |
--dry-run | Preview the request payload without persisting |
-y, --yes | Automatically confirm deletion |
Related
Instances (Console)
Security groups are configured during instance creation.