> 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.links

Stub file for links endpoint type hints.

## Classes

| Name                                                       | Description                             |
| ---------------------------------------------------------- | --------------------------------------- |
| [`LinksLabels`](#air_sdkendpointslinkslinkslabels)         | Properties/labels of a link.            |
| [`Link`](#air_sdkendpointslinkslink)                       | Link model representing a network link. |
| [`LinkEndpointAPI`](#air_sdkendpointslinkslinkendpointapi) | API client for link endpoints.          |

## Module Contents

```python
class air_sdk.endpoints.links.LinksLabels
```

**Bases**: `typing.TypedDict`

Properties/labels of a link.

```python
cable_length: str
```

```python
class air_sdk.endpoints.links.Link
```

**Bases**: `air_sdk.bc.BaseCompatMixin`, `air_sdk.air_model.AirModel`

Link model representing a network link.

```python
id: str
```

Unique identifier for the link

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

Timestamp when the link was created

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

Timestamp when the link was last modified

```python
interfaces: list[Interface]
```

The two interfaces connected by this link

```python
labels: LinksLabels | None
```

Optional labels/properties of the link (e.g. cable\_length)

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

```python
model_api: LinkEndpointAPI
```

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

Delete the link.

**Example:**

```python
>>> link.delete()
```

```python
class air_sdk.endpoints.links.LinkEndpointAPI
```

**Bases**: `air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.links.Link]`

API client for link endpoints.

```python
API_PATH: str
```

```python
model: type[Link]
```

```python
create(
    *,
    interfaces: list[Interface | PrimaryKey],
    labels: LinksLabels | None = ...
) -> Link
```

Create a new link between interfaces.

**Parameters:**

* `interfaces` – The two interfaces to connect
* `labels` – Optional labels/properties of the link (e.g. cable\_length)

**Returns:**

The created link

**Example:**

```python
>>> link = api.links.create(interfaces=[interface1, interface2])
>>> link = api.links.create(
...     interfaces=[interface1, interface2],
...     labels={'cable_length': '5m'},
... )
```

```python
list(
    *,
    interface: Interface | PrimaryKey = ...,
    limit: int = ...,
    node: Node | PrimaryKey = ...,
    offset: int = ...,
    search: str = ...,
    ordering: str = ...,
    simulation: Simulation | PrimaryKey = ...
) -> Iterator[Link]
```

List all links.

**Parameters:**

* `interface` – Filter by specific interface
* `limit` – Number of results to return per page
* `node` – Filter by specific node
* `offset` – The initial index from which to return the results
* `ordering` – Order objects by field. Prefix with "-" for desc order
* `search` – Search by interface name or node name of all interfaces in a case-insensitive manner
* `simulation` – Filter by specific simulation

**Returns:**

Iterator of Link instances

**Example:**

```python
>>> # List all links
>>> for link in api.links.list():
...     print(link.id)

>>> # Filter by interface
>>> for link in api.links.list(interface=interface1):
...     print(link.id)

>>> # Order by creation date descending
>>> for link in api.links.list(ordering='-created'):
...     print(link.id)

>>> # Search by node name
>>> for link in api.links.list(search='node-name'):
...     print(link.interfaces[0].node.name, link.interfaces[1].node.name)
```

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

Get a specific link by ID.

**Parameters:**

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

**Returns:**

The Link instance

**Example:**

```python
>>> link = api.links.get('link-id')
```

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

Delete a specific link by ID.

**Parameters:**

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

**Example:**

```python
>>> api.links.delete('link-id')
```