Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPC IP address GET updates #923

Merged
merged 9 commits into from
Apr 17, 2024
206 changes: 198 additions & 8 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6613,7 +6613,7 @@ paths:
"subnet_id": 101,
"ipv4": {
"vpc": "10.0.1.2",
"nat_1_1": "203.0.113.2"
"nat_1_1": "add"
}
}
],
Expand Down Expand Up @@ -8550,8 +8550,10 @@ paths:
tags:
- Linode Instances
summary: Networking Information List
description: >
description: |
Returns networking information for a single Linode.

**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.
operationId: getLinodeIPs
x-linode-cli-action: ips-list
security:
Expand Down Expand Up @@ -8593,20 +8595,27 @@ paths:
description: >
A list of private IP Address objects belonging to this Linode.
readOnly: true
shared:
vpc:
type: array
readOnly: true
items:
$ref: '#/components/schemas/IPAddress'
$ref: '#/components/schemas/IPAddressesVPCListResponse'
description: >
A list of shared IP Address objects assigned to this Linode.
A list of Virtual Private Cloud (VPC)-specific addresses or ranges for the Linode.
reserved:
type: array
readOnly: true
items:
$ref: '#/components/schemas/IPAddress'
description: >
A list of reserved IP Address objects belonging to this Linode.
shared:
type: array
readOnly: true
items:
$ref: '#/components/schemas/IPAddress'
description: >
A list of shared IP Address objects assigned to this Linode.
ipv6:
type: object
description: >
Expand Down Expand Up @@ -19902,6 +19911,85 @@ paths:
linode-cli vpcs update $vpcId \
--description "A description of my VPC."
--label cool-vpc
/vpcs/ips:
get:
x-linode-grant: read_only
tags:
- VPCs
summary: VPC IP Addresses List
servers:
- url: https://api.linode.com/v4
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
description: |
Returns a paginated list of all VPC IP addresses and address ranges on your account.

**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.
operationId: getAllVPCIPs
x-linode-cli-action:
- ip-list
- ip-ls
security:
- personalAccessToken: []
- oauth:
- ips:read_only
responses:
'200':
description: A paginated list of VPC interface IP addresses.
content:
application/json:
schema:
$ref: '#/components/schemas/IPAddressesVPCListResponse'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/networking/vpcs/ips
- lang: CLI
source: >
linode-cli vpcs ip list
/vpcs/{vpcId}/ips:
parameters:
- $ref: '#/components/parameters/vpcId'
get:
tags:
- VPCs
summary: VPC IP Addresses View
servers:
- url: https://api.linode.com/v4
parameters:
- $ref: '#/components/parameters/pageOffset'
- $ref: '#/components/parameters/pageSize'
description: |
Returns a paginated list of IP addresses for a single VPC.
operationId: getVPCIPs
x-linode-cli-action:
- ip-list
- ip-ls
security:
- personalAccessToken: []
- oauth:
- ips:read_only
responses:
'200':
description: The IP addresses for the requested VPC.
content:
application/json:
schema:
$ref: '#/components/schemas/IPAddressesVPCListResponse'
default:
$ref: '#/components/responses/ErrorResponse'
x-code-samples:
- lang: Shell
source: >
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/vpcs/123/ips
- lang: CLI
source: >
linode-cli vpcs ip-list 123
/vpcs/{vpcId}/subnets:
x-linode-cli-command: vpcs
parameters:
Expand Down Expand Up @@ -23454,7 +23542,6 @@ components:
format: ipv4
description: |
The IPv4 address that is configured as a 1:1 NAT for this VPC interface.
example: 192.0.2.1
IPAddressesShareRequest:
type: object
description: A request object IP Addresses Share (POST /networking/ips/share)
Expand All @@ -23481,6 +23568,107 @@ components:
* Can include both private and public IPv4 addresses.
* You must have access to all of these addresses and they must be in the same Region as the primary Linode.
* Enter an empty array to remove all shared IP addresses.
IPAddressesVPCListResponse:
description: The response data for the VPC IP Addresses List and View operations.
allOf:
- $ref: '#/components/schemas/PaginationEnvelope'
- type: object
properties:
data:
type: array
items:
type: object
description: >
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.
properties:
active:
type: boolean
description: >
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`.
example: true
readOnly: true
x-linode-filterable: true
address:
type: string
format: ip
description: >
An IPv4 address configured for this VPC interface. Displayed as `null` if an `address_range`.
example: 192.0.2.141
nullable: true
readOnly: true
x-linode-cli-display: 1
address_range:
type: string
description: >
A range of IPv4 addresses configured for this VPC interface. Displayed as `null` if a single `address`.
nullable: true
readOnly: true
config_id:
type: integer
description: >
The globally general entity identifier for the Linode configuration profile where the VPC is included.
example: 4567
readOnly: true
x-linode-filterable: true
gateway:
type: string
format: ip
description: >
The default gateway for the VPC subnet that the IP or IP range belongs to.
example: 192.0.2.1
nullable: true
readOnly: true
interface_id:
type: integer
description: >
The globally general API entity identifier for the Linode interface.
example: 2435
readOnly: true
linode_id:
type: integer
description: >
The identifier for the Linode the VPC interface currently belongs to.
example: 123
readOnly: true
x-linode-cli-display: 6
x-linode-filterable: true
nat_1_1:
type: string
format: ip
description: >
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.
example: null
nullable: true
readOnly: true
prefix:
type: integer
description: >
The number of bits set in the `subnet_mask`.
example: 24
nullable: true
readOnly: true
region:
type: string
description: >
The region of the VPC.
example: us-east
readOnly: true
x-linode-filterable: true
x-linode-cli-display: 5
subnet_mask:
type: string
format: ip
description: >
The mask that separates host bits from network bits for the `address` or `address_range`.
example: 255.255.255.0
readOnly: true
vpc_id:
type: integer
description: >
The unique globally general API entity identifier for the VPC.
example: 7654
readOnly: true
x-linode-filterable: true
IPAddressPrivate:
type: object
description: >
Expand Down Expand Up @@ -23551,7 +23739,7 @@ components:
IPAddressV6LinkLocal:
type: object
description: >
A link-local IPv6 address that exists in Linode's system,.
A link-local IPv6 address that exists in Linode's system.
properties:
address:
type: string
Expand Down Expand Up @@ -24445,6 +24633,8 @@ components:
* 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.
* The public IPv4 address can't be shared with another Linode.
* If omitted, set to `null`, or set to an empty string (`""`), no 1:1 NAT is established.

**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.
example: '203.0.113.2'
# ipv6:
# type: object
Expand Down Expand Up @@ -24474,7 +24664,7 @@ components:
type: array
nullable: true
description: |
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.**
An array of IPv4 CIDR VPC Subnet ranges that are routed to this Interface.

* Array items are only allowed for `vpc` type Interfaces.
* This must be empty for non-`vpc` type Interfaces.
Expand Down
Loading