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
- 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
Routers
Attach subnet to router
POST
/
cloud
/
v1
/
routers
/
{project_id}
/
{region_id}
/
{router_id}
/
attach
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
)
router = client.cloud.networks.routers.attach_subnet(
router_id="ccd5b925-e35c-4611-a511-67ab503104c8",
project_id=1,
region_id=1,
subnet_id="subnet_id",
)
print(router.id)
Copy
Ask AI
{
"created_at": "2023-11-07T05:31:56Z",
"creator_task_id": "<string>",
"distributed": true,
"external_gateway_info": {
"enable_snat": true,
"external_fixed_ips": [
{
"ip_address": "172.24.4.6",
"subnet_id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf"
}
],
"network_id": "ae34051f-aa6c-4c75-abf5-50dc9ac99ef3"
},
"id": "<string>",
"interfaces": [
{
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
},
{
"ip_address": "192.168.120.16",
"subnet_id": "0a641ef8-62dc-4146-91e5-6ab4b464df6d"
}
],
"mac_address": "00:16:3e:f2:87:16",
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097"
}
],
"name": "<string>",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"routes": [
{
"destination": "10.0.3.0/24",
"nexthop": "10.0.0.13"
}
],
"status": "<string>",
"task_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Authorizations
API key for authentication.
Path Parameters
Project ID
Examples:
1
Region ID
Examples:
1
Router ID
Examples:
"ccd5b925-e35c-4611-a511-67ab503104c8"
Body
application/json
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
)
router = client.cloud.networks.routers.attach_subnet(
router_id="ccd5b925-e35c-4611-a511-67ab503104c8",
project_id=1,
region_id=1,
subnet_id="subnet_id",
)
print(router.id)
Copy
Ask AI
{
"created_at": "2023-11-07T05:31:56Z",
"creator_task_id": "<string>",
"distributed": true,
"external_gateway_info": {
"enable_snat": true,
"external_fixed_ips": [
{
"ip_address": "172.24.4.6",
"subnet_id": "b930d7f6-ceb7-40a0-8b81-a425dd994ccf"
}
],
"network_id": "ae34051f-aa6c-4c75-abf5-50dc9ac99ef3"
},
"id": "<string>",
"interfaces": [
{
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
},
{
"ip_address": "192.168.120.16",
"subnet_id": "0a641ef8-62dc-4146-91e5-6ab4b464df6d"
}
],
"mac_address": "00:16:3e:f2:87:16",
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_id": "1f0ca628-a73b-42c0-bdac-7b10d023e097"
}
],
"name": "<string>",
"project_id": 1337,
"region": "Luxembourg 1",
"region_id": 7,
"routes": [
{
"destination": "10.0.3.0/24",
"nexthop": "10.0.0.13"
}
],
"status": "<string>",
"task_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
Assistant
Responses are generated using AI and may contain mistakes.