Add a configuration profile interface

Creates and appends a single interface to the end of the interfaces array for an existing configuration profile. After you add the interface, you need to reboot the target Linode.

  • A successful request triggers a linode_config_update event.

  • Only one interface can be set as primary. Setting primary to true for an interface sets all other interfaces to false.

Permissions and scopes

To call this operation, you need permissions, based on the model you're using:

  • Identity and access permissions. Your user needs a role with these permissions. Learn more.

    • Permissions: create_linode_config_profile_interface
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: linodes:read_write

CLI

linode-cli linodes config-interface-add $linodeId $configId \
  --purpose vpc \
  --primary false \
  --subnet_id 101 \
  --ipv4.vpc "10.0.1.2" \
  --ipv4.nat_1_1 "203.0.113.2"

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

The id of the Linode.

integer
required

The id of the Configuration Profile.

Body Params

The network interface to apply to this Linode's configuration profile.

ip_ranges
array of strings | null

IPv4 CIDR VPC subnet ranges that are routed to this interface.

When included in a request:

  • A range can't include any addresses that are assigned to an active Linode or another VPC subnet.

  • When updating, you need to include any existing ranges to maintain them. If a range is left out, it will be removed.

  • Submit this as an empty array removes all existing values.

  • Omit this object to leave existing values as is.

​​​​​

📘

This is only supported for interfaces with a purpose of vpc.

ip_ranges
string | null

This interface's private IP address in classless inter-domain routing (CIDR) notation.

For interfaces with a purpose of public:

  • If you include this in a request, set it to an empty string ("") or null.

  • Returned as null in a response.

For interfaces with a purpose of vlan:

  • To avoid conflicting addresses, make sure this value is unique for each vlan interface.

  • This should be unique among devices attached to the VLAN to avoid conflict.

  • If Network Helper is enabled, the Linode's interface will be automatically configured to use this address after the Linode is rebooted. If Network Helper is disabled, enable the address using manual static IP configuration.

For interfaces with a purpose of vpc:

  • If you include this in a request, set it to an empty string ("") or null.

  • Returned as null in a response.

ipv4
object | null

IPv4 addresses configured for this interface. This only applies to interfaces with a purpose of vpc. Returned as null if no vpc interface is assigned.

string | null

Filterable The name of this interface.

For interfaces with a purpose of vlan:

  • Required.

  • This needs to be unique among a Linode's interfaces. A Linode can't be attached to the same VLAN multiple times.

  • This can only contain ASCII letters, numbers, and dashes (-). You can't use two consecutive dashes (--).

  • If the VLAN label is new, a VLAN is created. Up to 10 VLANs can be created in each data center region. To view your active VLANs, run the List VLANs operation.

For interfaces with a purpose of public:

  • If you include this in a request, set it to an empty string ("") or null.

  • Returned as null in a response.

For interfaces with a purpose of vpc:

  • If you include this in a request, set it to an empty string ("") or null.

  • Returned as null in a response.

boolean

The default route to the Linode. Each Linode can have one interface set as its primary. If you haven't specifically set a primary, the first non-vlan type interface is automatically treated as the primary.

📘

This needs to be set to false for any interface that uses vlan as its purpose.

string
enum
required

The type of interface. This can be public, vlan, or regular vpc.

For interfaces with a purpose of public:

  • You can only define one public interface per Linode.

  • The Linode's default public IPv4 address is assigned to the public interface.

  • A Linode needs a public interface in the first or eth0 position to be reachable via the public internet, after it boots. If no public interface is configured, you can only access the Linode through LISH, or through another Linode that's connected to the same VLAN or VPC.

For interfaces with a purpose of vlan:

  • Configuring this purpose of interface attaches a Linode to the VLAN with the specified label.

  • If an ipam_address is configured, the Linode uses this address.

For interfaces with a purpose of vpc:

  • Configuring this purpose of interface attaches a Linode to an existing VPC subnet with the specified subnet_id.

  • When the interface is activated, the Linode is configured to use an IP address from the range in the assigned VPC subnet. See ipv4.vpc for more information.

Allowed:
integer | null

The id of the VPC subnet for this interface. Use this value in a request to assign a Linode to a VPC subnet.

  • Required for vpc type interfaces.

  • Returned as null for non-vpc type interfaces.

  • Once you've assigned a VPC subnet to an interface, you can't update it.

  • You need to reboot a Linode using the interface's configuration profile to assign the Linode to a VPC subnet.

Responses

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json