Overview
IAM
- Account
- Users
- API Tokens
CDN
- IP addresses list
- CDN service
- Origins
- CDN resources
- CDN activity logs
- Log forwarding
- Log viewer
- Logs uploader
- Tools
- Rules
- Rule templates
- Purge history
- SSL certificates
- CA certificates
- CDN Statistics
- Advanced analytics
- Origin shielding
- Let's Encrypt certificates
Managed DNS
- Analyze
- Locations
- Lookup
- Metrics
- Pickers
- DNS Clients
- Zones
- DNSSEC
- RRsets
Cloud
- Bare Metal
- Container as a Service
- Cost Reports
- DDOS Protection
- File Shares
- Floating IPs
- Function as a Service
- GPU Cloud
- IP Ranges
- Images
- Inference Instances
- Instances
- Load Balancers
- Logging
- Managed Kubernetes
- Managed PostgreSQL
- Networks
- Placement Groups
- Projects
- Quotas
- Regions
- Registry
- Reservations
- Reserved IPs
- Routers
- SSH Keys
- Secrets
- Security Groups
- PUTUpdate security group rule
- DELDelete security group rule
- GETList security groups
- POSTCreate security group
- GETGet security group
- DELDelete security group
- PATCHUpdate security group
- POSTCopy security group
- POSTRevert security group
- POSTAdd security group rule
- GETList security group tagsdeprecated
- PUTReplace security group tagsdeprecated
- POSTCreate or update security group tagsdeprecated
- GETGet security group tagdeprecated
- DELDelete security group tagdeprecated
- PUT
- Snapshot Schedules
- Snapshots
- Tasks
- User Actions
- User Role Assignments
- Volumes
DDoS Protection
- Event Logs
- BGP announces
- Security Templates
- Profiles
FastEdge
- Apps
- Binaries
- FastEdge Clients
- FastEdge Secrets
- Stats
- FastEdge Templates
WAAP
- WAAP Service
- Domains
- Policies
- Analytics
- Custom Page Sets
- Custom Rules
- Firewall Rules
- Advanced Rules
- Tags
- Network Organizations
- API Discovery
- IP Spotlight
- Security Insights
Streaming
- Streams
- Overlays
- Broadcasts
- Restreams
- Videos
- Subtitles
- Directories
- Playlists
- QualitySets
- Players
- AI
- Streaming Statistics
Object Storage
- Notifications
- Key
- Location
- Storage
- Storage Statistics
Security Groups
List security groups
List all security groups in the specified project and region.
GET
/
cloud
/
v1
/
securitygroups
/
{project_id}
/
{region_id}
Python
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.security_groups.list(
project_id=0,
region_id=0,
)
page = page.results[0]
print(page.id)
Copy
Ask AI
{
"count": 1,
"results": [
{
"created_at": "2019-06-18T11:56:16+0000",
"description": "Some description",
"id": "00000000-0000-4000-8000-000000000000",
"name": "my_security_group",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"revision_number": 1,
"security_group_rules": [
{
"created_at": "2019-06-18T11:56:16+0000",
"description": "Some description",
"direction": "egress",
"ethertype": "IPv4",
"id": "00000000-0000-4000-8000-000000000000",
"port_range_max": 80,
"port_range_min": 80,
"protocol": "tcp",
"remote_group_id": [
"00000000-0000-4000-8000-000000000000"
],
"remote_ip_prefix": "10.0.0.0/8",
"revision_number": 0,
"security_group_id": "00000000-0000-4000-8000-000000000000",
"updated_at": "2019-06-18T11:57:00+0000"
}
],
"tags_v2": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2019-06-18T11:57:00+0000"
}
]
}
Authorizations
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
Query Parameters
Limit the number of returned security groups
Offset value is used to exclude the first set of records from the result
Filter by tag keys.
Filter by tag key-value pairs. Must be a valid JSON string.
Response
200 - application/json
List of security groups
The response is of type object
.
Was this page helpful?
Python
Copy
Ask AI
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
page = client.cloud.security_groups.list(
project_id=0,
region_id=0,
)
page = page.results[0]
print(page.id)
Copy
Ask AI
{
"count": 1,
"results": [
{
"created_at": "2019-06-18T11:56:16+0000",
"description": "Some description",
"id": "00000000-0000-4000-8000-000000000000",
"name": "my_security_group",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"revision_number": 1,
"security_group_rules": [
{
"created_at": "2019-06-18T11:56:16+0000",
"description": "Some description",
"direction": "egress",
"ethertype": "IPv4",
"id": "00000000-0000-4000-8000-000000000000",
"port_range_max": 80,
"port_range_min": 80,
"protocol": "tcp",
"remote_group_id": [
"00000000-0000-4000-8000-000000000000"
],
"remote_ip_prefix": "10.0.0.0/8",
"revision_number": 0,
"security_group_id": "00000000-0000-4000-8000-000000000000",
"updated_at": "2019-06-18T11:57:00+0000"
}
],
"tags_v2": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"updated_at": "2019-06-18T11:57:00+0000"
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.