> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/dsx-air/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/dsx-air/_mcp/server.

# air_sdk.endpoints.interfaces

Stub file for interfaces endpoint type hints.

## Classes

| Name                                                                      | Description                                       |
| ------------------------------------------------------------------------- | ------------------------------------------------- |
| [`InterfaceAttributes`](#air_sdkendpointsinterfacesinterfaceattributes)   | None                                              |
| [`Interface`](#air_sdkendpointsinterfacesinterface)                       | Interface model representing a network interface. |
| [`InterfaceEndpointAPI`](#air_sdkendpointsinterfacesinterfaceendpointapi) | API client for interface endpoints.               |

## Module Contents

```python
class air_sdk.endpoints.interfaces.InterfaceAttributes
```

```python
interface_role: str | None
```

```python
scalable_unit: int | None
```

```python
class air_sdk.endpoints.interfaces.Interface
```

**Bases**: `air_sdk.air_model.AirModel`

Interface model representing a network interface.

```python
id: str
```

Unique identifier for the interface

```python
name: str
```

Human-readable name of the interface

```python
created: datetime.datetime
```

Timestamp when the interface was created

```python
modified: datetime.datetime
```

Timestamp when the interface was last modified

```python
node: Node
```

Node that the interface is related to

```python
interface_type: str
```

Type of the interface

```python
mac_address: str
```

MAC address of the interface

```python
connection: Interface | None
```

Interface that the interface is connected to

```python
outbound: bool
```

Whether the interface is outbound

```python
attributes: InterfaceAttributes | None
```

Attributes of the interface

```python
get_model_api() -> type[InterfaceEndpointAPI]
```

```python
model_api: InterfaceEndpointAPI
```

```python
update(
    *,
    name: str | dataclasses._MISSING_TYPE = ...,
    interface_type: Literal[DATA_PLANE_INTF, PCIE_INTF, OOB_INTF] | dataclasses._MISSING_TYPE = ...,
    outbound: bool | dataclasses._MISSING_TYPE = ...,
    attributes: InterfaceAttributes | None | dataclasses._MISSING_TYPE = ...
) -> None
```

Update the interface's properties.

**Parameters:**

* `name` – New name for the interface
* `interface_type` – New type for the interface
* `outbound` – New outbound status for the interface
* `attributes` – New attributes for the interface

**Example:**

```python
>>> interface.update(name='New Name')
```

```python
delete() -> None
```

Delete the interface.

**Example:**

```python
>>> interface.delete()
```

```python
connect(
    *,
    target: Interface | PrimaryKey
) -> Interface
```

Connect the interface to another interface.

**Parameters:**

* `target` – Interface or primary key of the interface to connect to

**Example:**

```python
>>> interface.connect(interface)
>>> interface.connect('interface-id')
```

```python
disconnect() -> Interface
```

Disconnect the interface from its connection.

**Example:**

```python
>>> interface.disconnect()
```

```python
services: ServiceEndpointAPI
```

Query for the related services of the interface.

**Returns:**

ServiceEndpointAPI instance filtered for this interface's services

**Example:**

```python
>>> for service in interface.services.list():
...     print(f'{service.name}: {service.worker_fqdn}:{service.worker_port}')
>>>
>>> # Create service on this interface
>>> service = interface.services.create(
...     name='SSH', node_port=22, service_type='ssh'
... )
```

```python
class air_sdk.endpoints.interfaces.InterfaceEndpointAPI
```

**Bases**: `air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.interfaces.Interface]`

API client for interface endpoints.

```python
API_PATH: str
```

```python
model: type[Interface]
```

```python
create(
    *,
    name: str,
    node: Node | PrimaryKey,
    interface_type: Literal[DATA_PLANE_INTF, PCIE_INTF, OOB_INTF] | dataclasses._MISSING_TYPE = ...,
    mac_address: str | dataclasses._MISSING_TYPE = ...,
    outbound: bool | dataclasses._MISSING_TYPE = ...,
    attributes: InterfaceAttributes | None | dataclasses._MISSING_TYPE = ...
) -> Interface
```

Create a new interface.

**Parameters:**

* `name` – Name of the interface
* `node` – Node to create the interface on

**Returns:**

The created Interface instance

**Example:**

```python
>>> interface = api.interfaces.create(name='eth0', node=node)
>>> interface = node.interfaces.create(name='eth0', node=node.id)
```

```python
list(
    *,
    interface_type: Literal[DATA_PLANE_INTF, PCIE_INTF, OOB_INTF] | dataclasses._MISSING_TYPE = ...,
    mac_address: str | dataclasses._MISSING_TYPE = ...,
    name: str | dataclasses._MISSING_TYPE = ...,
    node: Node | PrimaryKey | dataclasses._MISSING_TYPE = ...,
    outbound: bool | dataclasses._MISSING_TYPE = ...,
    simulation: str | dataclasses._MISSING_TYPE = ...,
    limit: int | dataclasses._MISSING_TYPE = ...,
    offset: int | dataclasses._MISSING_TYPE = ...,
    search: str | dataclasses._MISSING_TYPE = ...,
    ordering: str | dataclasses._MISSING_TYPE = ...
) -> Iterator[Interface]
```

List all interfaces with optional filtering.

**Parameters:**

* `interface_type` – Filter by interface type
* `mac_address` – Filter by MAC address
* `name` – Filter by name
* `node` – Filter by node
* `outbound` – Filter by outbound status
* `simulation` – Filter by simulation
* `limit` – Number of results to return per page
* `offset` – The initial index from which to return the results
* `search` – Search by name
* `ordering` – Order by field

**Returns:**

Iterator of Interface instances

**Example:**

```python
>>> # List all interfaces
>>> for interface in api.interfaces.list():
...     print(interface.name)

>>> # Filter by interface type
>>> for interface in api.interfaces.list(interface_type='DATA_PLANE_INTF'):
...     print(interface.name)

>>> # Search by name
>>> for interface in api.interfaces.list(search='eth0'):
...     print(interface.name)

>>> # Order by name descending
>>> for interface in api.interfaces.list(ordering='-name'):
...     print(interface.name)
```

```python
update(
    *,
    interface: Interface | PrimaryKey,
    name: str | dataclasses._MISSING_TYPE = ...,
    interface_type: Literal[DATA_PLANE_INTF, PCIE_INTF, OOB_INTF] | dataclasses._MISSING_TYPE = ...,
    outbound: bool | dataclasses._MISSING_TYPE = ...,
    attributes: InterfaceAttributes | None | dataclasses._MISSING_TYPE = ...
) -> Interface
```

Update the interface's properties.

**Parameters:**

* `interface` – Interface or primary key of the interface to update
* `name` – New name for the interface
* `interface_type` – New type for the interface
* `outbound` – New outbound status for the interface
* `attributes` – New attributes for the interface

**Returns:**

The updated Interface instance

**Example:**

```python
>>> # Using Interface object
>>> updated_interface = api.interfaces.update(
...     interface=interface, name='New Name'
... )
>>> # Using interface ID
>>> updated_interface = api.interfaces.update(
...     interface='interface-id',
...     name='New Name',
...     interface_type='DATA_PLANE_INTF',
... )
```

```python
get(pk: PrimaryKey) -> Interface
```

Get a specific interface by ID.

**Parameters:**

* `pk` – The interface ID (string or UUID)

**Returns:**

The Interface instance

**Example:**

```python
>>> interface = api.interfaces.get('interface-id')
```

```python
delete(pk: PrimaryKey) -> None
```

Delete a specific interface by ID.

**Parameters:**

* `pk` – The interface ID (string or UUID)

**Example:**

```python
>>> api.interfaces.delete('interface-id')
```

```python
connect(
    *,
    interface: Interface | PrimaryKey,
    target: Interface | PrimaryKey
) -> Interface
```

Connect the interface to another interface.

**Parameters:**

* `interface` – Interface or primary key of the interface to connect
* `target` – Interface or primary key of the interface to connect to

**Returns:**

The source interface instance

**Example:**

```python
>>> api.interfaces.connect(interface=interface, target=target)
>>> api.interfaces.connect(interface='interface-id', target='target-id')
```

```python
disconnect(
    *,
    interface: Interface | PrimaryKey
) -> Interface
```

Disconnect the interface from its connection.

**Parameters:**

* `interface` – Interface or primary key of the interface to disconnect

**Returns:**

The source interface instance

**Example:**

```python
>>> api.interfaces.disconnect(interface=interface)
>>> api.interfaces.disconnect(interface='interface-id')
```