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
- Firewalls
- Floating IPs
- Function as a Service
- GPU Cloud
- IP Ranges
- Images
- Inference Instances
- Instances
- Load Balancers
- Logging
- Managed Kubernetes
- Managed PostgreSQL
- Networks
- GETList networks with subnets details
- GETList networks
- POSTCreate network
- GETGet network
- DELDelete network
- PATCHChange network name
- GETList network tags
- PUTReplace network tags
- POSTCreate or update network tags
- GETGet network tag by key
- DELDelete network tag by key
- GETList of instance ports by network_id
- GETList subnets
- POSTCreate subnet
- GETGet subnet
- DELDelete subnet
- PATCHChange subnet properties
- GETList subnet tags
- PUTReplace subnet tags
- POSTCreate or update subnet tags
- GETGet subnet tag by key
- DELDelete subnet tag by key
- GET
- Placement Groups
- Projects
- Quotas
- Regions
- Registry
- Reservations
- Reserved IPs
- Routers
- SSH Keys
- Secrets
- Service Endpoints
- Snapshot Schedules
- Snapshots
- Tasks
- User Actions
- User Role Assignments
- Volumes
Security
- 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
Web Security
- Billing Statistics
- Resources
Video Streaming
- Streams
- Overlays
- Broadcasts
- Restreams
- Videos
- Subtitles
- Directories
- Playlists
- QualitySets
- Players
- AI
- Streaming Statistics
Object Storage
- Notifications
- Key
- Location
- Storage
- Storage Statistics
Networks
Get subnet
GET
/
cloud
/
v1
/
subnets
/
{project_id}
/
{region_id}
/
{subnet_id}
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
)
subnet = client.cloud.networks.subnets.get(
subnet_id="b39792c3-3160-4356-912e-ba396c95cdcf",
project_id=1,
region_id=1,
)
print(subnet.cidr)
Copy
Ask AI
{
"available_ips": 250,
"cidr": "192.168.13.0/24",
"created_at": "2019-06-13T13:58:12+0000",
"creator_task_id": "5cc890da-d031-4a23-ac31-625edfa22812",
"dns_nameservers": [
"8.8.8.8",
"8.8.4.4"
],
"enable_dhcp": true,
"gateway_ip": "192.168.13.1",
"has_router": false,
"host_routes": [],
"id": "b39792c3-3160-4356-912e-ba396c95cdcf",
"ip_version": 4,
"name": "subnet_3",
"network_id": "b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"total_ips": 253,
"updated_at": "2019-06-13T13:58:12+0000"
}
Authorizations
API key for authentication.
Path Parameters
Project ID
Examples:
1
Region ID
Examples:
1
Subnet ID
Examples:
"b39792c3-3160-4356-912e-ba396c95cdcf"
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
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
)
subnet = client.cloud.networks.subnets.get(
subnet_id="b39792c3-3160-4356-912e-ba396c95cdcf",
project_id=1,
region_id=1,
)
print(subnet.cidr)
Copy
Ask AI
{
"available_ips": 250,
"cidr": "192.168.13.0/24",
"created_at": "2019-06-13T13:58:12+0000",
"creator_task_id": "5cc890da-d031-4a23-ac31-625edfa22812",
"dns_nameservers": [
"8.8.8.8",
"8.8.4.4"
],
"enable_dhcp": true,
"gateway_ip": "192.168.13.1",
"has_router": false,
"host_routes": [],
"id": "b39792c3-3160-4356-912e-ba396c95cdcf",
"ip_version": 4,
"name": "subnet_3",
"network_id": "b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"tags": [
{
"key": "my-tag",
"read_only": false,
"value": "my-tag-value"
}
],
"task_id": null,
"total_ips": 253,
"updated_at": "2019-06-13T13:58:12+0000"
}
Assistant
Responses are generated using AI and may contain mistakes.