Skip to content

Commit f45c2e1

Browse files
committed
Add POST /networking/ips/assign
1 parent 9757649 commit f45c2e1

File tree

1 file changed

+104
-11
lines changed

1 file changed

+104
-11
lines changed

openapi.yaml

Lines changed: 104 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10185,20 +10185,121 @@ paths:
1018510185
linode-cli networking ip-update \
1018610186
97.107.143.141 \
1018710187
--rdns "test.example.org"
10188-
/networking/ipv4/assign:
10188+
/networking/ips/assign:
1018910189
x-linode-cli-command: networking
1019010190
post:
1019110191
x-linode-grant: read_write
1019210192
tags:
1019310193
- Networking
1019410194
summary: Linodes Assign IPs
10195+
description: |
10196+
Assign multiple IPv4 addresses and/or IPv6 ranges to multiple Linodes in one Region. This allows
10197+
swapping, shuffling, or otherwise reorganizing IPs to your Linodes.
10198+
10199+
The following restrictions apply:
10200+
* All Linodes involved must have at least one public IPv4 address after assignment.
10201+
* Linodes may have no more than one assigned private IPv4 address.
10202+
* Linodes may have no more than one assigned IPv6 range.
10203+
operationId: assignIPs
10204+
x-linode-cli-action: ip-assign
10205+
security:
10206+
- personalAccessToken: []
10207+
- oauth:
10208+
- ips:read_write
10209+
- linodes:read_write
10210+
requestBody:
10211+
description: >
10212+
Information about what IPv4 address or IPv6 range to assign, and to which Linode.
10213+
required: true
10214+
content:
10215+
application/json:
10216+
schema:
10217+
required:
10218+
- region
10219+
- assignments
10220+
properties:
10221+
region:
10222+
type: string
10223+
description: >
10224+
The ID of the Region in which these assignments are to take
10225+
place. All IPs and Linodes must exist in this Region.
10226+
example: us-east
10227+
assignments:
10228+
type: array
10229+
description: >
10230+
The list of assignments to make. You must have read_write
10231+
access to all IPs being assigned and all Linodes being
10232+
assigned to in order for the assignments to succeed.
10233+
items:
10234+
type: object
10235+
properties:
10236+
address:
10237+
type: string
10238+
format: ip
10239+
description: |
10240+
The IPv4 address or IPv6 range for this assignment.
10241+
* Must be an IPv4 address or an IPv6 range you can access in the Region specified.
10242+
* IPv6 ranges must include a subnet prefix and prefix length of `/56` or `/64`, for example: `2001:db8:3c4d:15::/64`.
10243+
* May be a public or private address.
10244+
example: 12.34.56.78
10245+
linode_id:
10246+
type: integer
10247+
description: >
10248+
The ID of the Linode to assign this address to. The IP's
10249+
previous Linode will lose this address, and must end up
10250+
with at least one public address and no more than one
10251+
private address once all assignments have been made.
10252+
example: 123
10253+
responses:
10254+
'200':
10255+
description: All assignments completed successfully.
10256+
content:
10257+
application/json:
10258+
schema:
10259+
type: object
10260+
default:
10261+
$ref: '#/components/responses/ErrorResponse'
10262+
x-code-samples:
10263+
- lang: Shell
10264+
source: >
10265+
curl -H "Content-Type: application/json" \
10266+
-H "Authorization: Bearer $TOKEN" \
10267+
-X POST -d '{
10268+
"region": "us-east",
10269+
"assignments": [
10270+
{
10271+
"address": "12.34.56.100",
10272+
"linode_id": 123
10273+
},
10274+
{
10275+
"address": "2001:db8:3c4d:15::/64",
10276+
"linode_id": 234
10277+
}
10278+
]
10279+
}' \
10280+
https://api.linode.com/v4/networking/ipvs/assign
10281+
- lang: CLI
10282+
source: >
10283+
linode-cli networking ip-assign \
10284+
--region us-east \
10285+
--assignments.address 2001:db8:3c4d:15::/64 \
10286+
--assignments.linode_id 123
10287+
/networking/ipv4/assign:
10288+
x-linode-cli-command: networking
10289+
post:
10290+
x-linode-grant: read_write
10291+
tags:
10292+
- Networking
10293+
summary: Linodes Assign IPv4s
1019510294
description: >
10196-
Assign multiple IPs to multiple Linodes in one Region. This allows
10295+
Assign multiple IPv4s to multiple Linodes in one Region. This allows
1019710296
swapping, shuffling, or otherwise reorganizing IPv4 Addresses to your
1019810297
Linodes. When the assignment is finished, all Linodes must end up with
1019910298
at least one public IPv4 and no more than one private IPv4.
10299+
10300+
To assign IPv6 ranges or to use the CLI, see the Linodes Assign IPs ([POST /networking/ips/assign](/docs/api/networking/#linodes-assign-ips)) endpoint.
1020010301
operationId: assignIPs
10201-
x-linode-cli-action: ip-assign
10302+
x-linode-cli-skip: true
1020210303
security:
1020310304
- personalAccessToken: []
1020410305
- oauth:
@@ -10274,14 +10375,6 @@ paths:
1027410375
]
1027510376
}' \
1027610377
https://api.linode.com/v4/networking/ipv4/assign
10277-
- lang: CLI
10278-
source: >
10279-
linode-cli networking ip-assign \
10280-
--region us-east \
10281-
--assignments \
10282-
'{"address": "12.34.56.100", "linode_id": 123}' \
10283-
--assignments \
10284-
'{"23.45.67.200", "linode_id": 234}'
1028510378
/networking/ipv4/share:
1028610379
x-linode-cli-command: networking
1028710380
post:

0 commit comments

Comments
 (0)