Skip to content

Commit d5d7c35

Browse files
Add docs examples
1 parent b1a8215 commit d5d7c35

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

linode_api4/objects/linode.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,11 +1911,33 @@ def interface_create(
19111911
interface = instance.interface_create(
19121912
default_route=LinodeInterfaceDefaultRouteOptions(
19131913
ipv4=True,
1914-
ipv6
1914+
ipv6=True
19151915
),
19161916
public=LinodeInterfacePublicOptions()
19171917
)
19181918
1919+
Example: Creating a simple VPC interface for this Linode::
1920+
1921+
interface = instance.interface_create(
1922+
default_route=LinodeInterfaceDefaultRouteOptions(
1923+
ipv4=True
1924+
),
1925+
vpc=LinodeInterfaceVPCOptions(
1926+
subnet_id=12345
1927+
)
1928+
)
1929+
1930+
Example: Creating a simple VLAN interface for this Linode::
1931+
1932+
interface = instance.interface_create(
1933+
default_route=LinodeInterfaceDefaultRouteOptions(
1934+
ipv4=True
1935+
),
1936+
vlan=LinodeInterfaceVLANOptions(
1937+
vlan_label="my-vlan"
1938+
)
1939+
)
1940+
19191941
:param firewall: The firewall this interface should be assigned to.
19201942
:param default_route: The desired default route configuration of the new interface.
19211943
:param public: The public-specific configuration of the new interface.

0 commit comments

Comments
 (0)