Skip to content

Commit 3671092

Browse files
authored
VPC IP address GET updates (#923)
* VPC IP address GET updates * Updated filterable params for vpcs/ips * Corrected endpoint to get a specific VPC's IP addresses * Updates for nat_1_1 support with new Linode * Removed IPv6 support for VPCs when creating a Linode * Updates per initial review. * updated operation Ids * Fix for region description * Added missing subnet_id object
1 parent 20825f6 commit 3671092

File tree

1 file changed

+204
-8
lines changed

1 file changed

+204
-8
lines changed

openapi.yaml

Lines changed: 204 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6613,7 +6613,7 @@ paths:
66136613
"subnet_id": 101,
66146614
"ipv4": {
66156615
"vpc": "10.0.1.2",
6616-
"nat_1_1": "203.0.113.2"
6616+
"nat_1_1": "add"
66176617
}
66186618
}
66196619
],
@@ -8550,8 +8550,10 @@ paths:
85508550
tags:
85518551
- Linode Instances
85528552
summary: Networking Information List
8553-
description: >
8553+
description: |
85548554
Returns networking information for a single Linode.
8555+
8556+
**Note:** If the target Linode has several configuration profiles that include a Virtual Private Cloud (VPC) interface, address information for all of VPCs will be listed in the response.
85558557
operationId: getLinodeIPs
85568558
x-linode-cli-action: ips-list
85578559
security:
@@ -8593,20 +8595,27 @@ paths:
85938595
description: >
85948596
A list of private IP Address objects belonging to this Linode.
85958597
readOnly: true
8596-
shared:
8598+
vpc:
85978599
type: array
85988600
readOnly: true
85998601
items:
8600-
$ref: '#/components/schemas/IPAddress'
8602+
$ref: '#/components/schemas/IPAddressesVPCListResponse'
86018603
description: >
8602-
A list of shared IP Address objects assigned to this Linode.
8604+
A list of Virtual Private Cloud (VPC)-specific addresses or ranges for the Linode.
86038605
reserved:
86048606
type: array
86058607
readOnly: true
86068608
items:
86078609
$ref: '#/components/schemas/IPAddress'
86088610
description: >
86098611
A list of reserved IP Address objects belonging to this Linode.
8612+
shared:
8613+
type: array
8614+
readOnly: true
8615+
items:
8616+
$ref: '#/components/schemas/IPAddress'
8617+
description: >
8618+
A list of shared IP Address objects assigned to this Linode.
86108619
ipv6:
86118620
type: object
86128621
description: >
@@ -19902,6 +19911,85 @@ paths:
1990219911
linode-cli vpcs update $vpcId \
1990319912
--description "A description of my VPC."
1990419913
--label cool-vpc
19914+
/vpcs/ips:
19915+
get:
19916+
x-linode-grant: read_only
19917+
tags:
19918+
- VPCs
19919+
summary: VPC IP Addresses List
19920+
servers:
19921+
- url: https://api.linode.com/v4
19922+
parameters:
19923+
- $ref: '#/components/parameters/pageOffset'
19924+
- $ref: '#/components/parameters/pageSize'
19925+
description: |
19926+
Returns a paginated list of all VPC IP addresses and address ranges on your account.
19927+
19928+
**Note**: If a Linode has several configuration profiles that include a VPC interface, address information for all of them is listed in the response. Since VPCs can use the same address space, you may see duplicate IP addresses.
19929+
operationId: getAllVPCIPs
19930+
x-linode-cli-action:
19931+
- ip-list
19932+
- ip-ls
19933+
security:
19934+
- personalAccessToken: []
19935+
- oauth:
19936+
- ips:read_only
19937+
responses:
19938+
'200':
19939+
description: A paginated list of VPC interface IP addresses.
19940+
content:
19941+
application/json:
19942+
schema:
19943+
$ref: '#/components/schemas/IPAddressesVPCListResponse'
19944+
default:
19945+
$ref: '#/components/responses/ErrorResponse'
19946+
x-code-samples:
19947+
- lang: Shell
19948+
source: >
19949+
curl -H "Authorization: Bearer $TOKEN" \
19950+
https://api.linode.com/v4/networking/vpcs/ips
19951+
- lang: CLI
19952+
source: >
19953+
linode-cli vpcs ip list
19954+
/vpcs/{vpcId}/ips:
19955+
parameters:
19956+
- $ref: '#/components/parameters/vpcId'
19957+
get:
19958+
tags:
19959+
- VPCs
19960+
summary: VPC IP Addresses View
19961+
servers:
19962+
- url: https://api.linode.com/v4
19963+
parameters:
19964+
- $ref: '#/components/parameters/pageOffset'
19965+
- $ref: '#/components/parameters/pageSize'
19966+
description: |
19967+
Returns a paginated list of IP addresses for a single VPC.
19968+
operationId: getVPCIPs
19969+
x-linode-cli-action:
19970+
- ip-list
19971+
- ip-ls
19972+
security:
19973+
- personalAccessToken: []
19974+
- oauth:
19975+
- ips:read_only
19976+
responses:
19977+
'200':
19978+
description: The IP addresses for the requested VPC.
19979+
content:
19980+
application/json:
19981+
schema:
19982+
$ref: '#/components/schemas/IPAddressesVPCListResponse'
19983+
default:
19984+
$ref: '#/components/responses/ErrorResponse'
19985+
x-code-samples:
19986+
- lang: Shell
19987+
source: >
19988+
curl -H "Authorization: Bearer $TOKEN" \
19989+
https://api.linode.com/v4/vpcs/123/ips
19990+
- lang: CLI
19991+
source: >
19992+
linode-cli vpcs ip-list 123
1990519993
/vpcs/{vpcId}/subnets:
1990619994
x-linode-cli-command: vpcs
1990719995
parameters:
@@ -23454,7 +23542,6 @@ components:
2345423542
format: ipv4
2345523543
description: |
2345623544
The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
23457-
example: 192.0.2.1
2345823545
IPAddressesShareRequest:
2345923546
type: object
2346023547
description: A request object IP Addresses Share (POST /networking/ips/share)
@@ -23481,6 +23568,113 @@ components:
2348123568
* Can include both private and public IPv4 addresses.
2348223569
* You must have access to all of these addresses and they must be in the same Region as the primary Linode.
2348323570
* Enter an empty array to remove all shared IP addresses.
23571+
IPAddressesVPCListResponse:
23572+
description: The response data for the VPC IP Addresses List and View operations.
23573+
allOf:
23574+
- $ref: '#/components/schemas/PaginationEnvelope'
23575+
- type: object
23576+
properties:
23577+
data:
23578+
type: array
23579+
items:
23580+
type: object
23581+
description: >
23582+
A VPC IP address that exists in Linode's system, specific to the response for the VPC IP Addresses List command. Returned as an empty set for Linodes that are not part of a VPC.
23583+
properties:
23584+
active:
23585+
type: boolean
23586+
description: >
23587+
Returns `true` if the VPC interface is in use, meaning that the Linode was powered on using the `config_id` to which the interface belongs. Otherwise returns `false`.
23588+
example: true
23589+
readOnly: true
23590+
x-linode-filterable: true
23591+
address:
23592+
type: string
23593+
format: ip
23594+
description: >
23595+
An IPv4 address configured for this VPC interface. Displayed as `null` if an `address_range`.
23596+
example: 192.0.2.141
23597+
nullable: true
23598+
readOnly: true
23599+
x-linode-cli-display: 1
23600+
address_range:
23601+
type: string
23602+
description: >
23603+
A range of IPv4 addresses configured for this VPC interface. Displayed as `null` if a single `address`.
23604+
nullable: true
23605+
readOnly: true
23606+
config_id:
23607+
type: integer
23608+
description: >
23609+
The globally general entity identifier for the Linode configuration profile where the VPC is included.
23610+
example: 4567
23611+
readOnly: true
23612+
x-linode-filterable: true
23613+
gateway:
23614+
type: string
23615+
format: ip
23616+
description: >
23617+
The default gateway for the VPC subnet that the IP or IP range belongs to.
23618+
example: 192.0.2.1
23619+
nullable: true
23620+
readOnly: true
23621+
interface_id:
23622+
type: integer
23623+
description: >
23624+
The globally general API entity identifier for the Linode interface.
23625+
example: 2435
23626+
readOnly: true
23627+
linode_id:
23628+
type: integer
23629+
description: >
23630+
The identifier for the Linode the VPC interface currently belongs to.
23631+
example: 123
23632+
readOnly: true
23633+
x-linode-cli-display: 6
23634+
x-linode-filterable: true
23635+
nat_1_1:
23636+
type: string
23637+
format: ip
23638+
description: >
23639+
The public IP address used for NAT 1:1 with the VPC. This is `null` if the VPC interface uses an `address_range` or NAT 1:1 isn't used.
23640+
example: null
23641+
nullable: true
23642+
readOnly: true
23643+
prefix:
23644+
type: integer
23645+
description: >
23646+
The number of bits set in the `subnet_mask`.
23647+
example: 24
23648+
nullable: true
23649+
readOnly: true
23650+
region:
23651+
type: string
23652+
description: >
23653+
The region of the VPC.
23654+
example: us-east
23655+
readOnly: true
23656+
x-linode-filterable: true
23657+
x-linode-cli-display: 5
23658+
subnet_id:
23659+
type: integer
23660+
nullable: false
23661+
description: |
23662+
The `id` of the VPC Subnet for this interface.
23663+
example: 101
23664+
subnet_mask:
23665+
type: string
23666+
format: ip
23667+
description: >
23668+
The mask that separates host bits from network bits for the `address` or `address_range`.
23669+
example: 255.255.255.0
23670+
readOnly: true
23671+
vpc_id:
23672+
type: integer
23673+
description: >
23674+
The unique globally general API entity identifier for the VPC.
23675+
example: 7654
23676+
readOnly: true
23677+
x-linode-filterable: true
2348423678
IPAddressPrivate:
2348523679
type: object
2348623680
description: >
@@ -23551,7 +23745,7 @@ components:
2355123745
IPAddressV6LinkLocal:
2355223746
type: object
2355323747
description: >
23554-
A link-local IPv6 address that exists in Linode's system,.
23748+
A link-local IPv6 address that exists in Linode's system.
2355523749
properties:
2355623750
address:
2355723751
type: string
@@ -24445,6 +24639,8 @@ components:
2444524639
* Setting the value to a specific public IPv4 address that is assigned to the Linode enables a 1:1 NAT between that address and the VPC Subnet IPv4 address.
2444624640
* The public IPv4 address can't be shared with another Linode.
2444724641
* If omitted, set to `null`, or set to an empty string (`""`), no 1:1 NAT is established.
24642+
24643+
**Note**: When creating a new compute-instance, you can't set this to a specific IPv4 address. When a new compute instance is created, the network establishes a public IPv4 address for it. Since this address doesn't exist yet, you can't include a custom IPv4 address to change it. Once your compute instances is created, you can [update your configuration profile interface](https://www.linode.com/docs/api/linode-instances/#configuration-profile-interface-update) to change the `nat_1_1` address.
2444824644
example: '203.0.113.2'
2444924645
# ipv6:
2445024646
# type: object
@@ -24474,7 +24670,7 @@ components:
2447424670
type: array
2447524671
nullable: true
2447624672
description: |
24477-
An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface. **IPv6 ranges are also available to select participants in the Beta program.**
24673+
An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.
2447824674

2447924675
* Array items are only allowed for `vpc` type Interfaces.
2448024676
* This must be empty for non-`vpc` type Interfaces.

0 commit comments

Comments
 (0)