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

Stub file for user\_configs endpoint type hints.

## Classes

| Name                                                                          | Description                                              |
| ----------------------------------------------------------------------------- | -------------------------------------------------------- |
| [`UserConfig`](#air_sdkendpointsuser_configsuserconfig)                       | UserConfig model representing cloud-init configurations. |
| [`UserConfigEndpointAPI`](#air_sdkendpointsuser_configsuserconfigendpointapi) | API interface for managing UserConfig resources.         |

## Module Contents

```python
class air_sdk.endpoints.user_configs.UserConfig
```

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

UserConfig model representing cloud-init configurations.

The string representation shows: id, name, kind

Constants:
KIND\_CLOUD\_INIT\_USER\_DATA: Constant for user-data kind
KIND\_CLOUD\_INIT\_META\_DATA: Constant for meta-data kind

```python
id: str
```

Unique identifier for the user config

```python
name: str
```

Human-readable name of the user config

```python
kind: str
```

Type of cloud-init config (user-data or meta-data)

```python
content: str | None
```

The cloud-init script content (lazy-loaded)

```python
KIND_CLOUD_INIT_USER_DATA: str
```

```python
KIND_CLOUD_INIT_META_DATA: str
```

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

```python
model_api: UserConfigEndpointAPI
```

```python
update(
    *,
    name: str | None = ...,
    content: str | None = ...
) -> None
```

Update specific fields of the user config.

**Parameters:**

* `name` – New name for the user config
* `content` – New cloud-init script content

**Example:**

```python
>>> user_config = api.user_configs.get('config-id')
>>> user_config.update(name='Updated Config')
>>> user_config.update(content='#cloud-config\n...')
```

```python
refresh() -> None
```

Refresh the user config from the API, loading all fields including content.

**Example:**

```python
>>> user_config.refresh()
>>> print(user_config.content)
```

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

Delete this user config from the system.

**Example:**

```python
>>> user_config.delete()
```

```python
class air_sdk.endpoints.user_configs.UserConfigEndpointAPI
```

**Bases**: `air_sdk.bc.UserConfigEndpointAPICompatMixin`, `air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.user_configs.UserConfig]`

API interface for managing UserConfig resources.

Provides methods for CRUD operations on user configs (cloud-init configurations).

```python
API_PATH: str
```

```python
model: type[UserConfig]
```

```python
list(
    *,
    kind: str | None = ...,
    limit: int | None = ...,
    offset: int | None = ...,
    ordering: str | None = ...,
    search: str | None = ...
) -> Iterator[UserConfig]
```

List user configs with optional filtering and pagination.

**Parameters:**

* `kind` – Filter by config kind (user-data or meta-data)
* `limit` – Maximum number of results to return
* `offset` – Number of results to skip
* `ordering` – Field to order results by (prefix with '-' for descending)
* `search` – Search term to filter results

**Yields:**

UserConfig instances

**Example:**

```python
>>> # List all user configs
>>> for config in api.user_configs.list():
...     print(config.name)
>>>
>>> # Filter by kind
>>> for config in api.user_configs.list(
...     kind=api.user_configs.model.KIND_CLOUD_INIT_USER_DATA
... ):
...     print(config.name)
>>>
>>> # Search with pagination
>>> for config in api.user_configs.list(search='my-config', limit=10):
...     print(config.name)
```

```python
get(user_config: UserConfig | PrimaryKey) -> UserConfig
```

Get a specific user config by ID.

**Parameters:**

* `user_config` – UserConfig instance or ID string

**Returns:**

UserConfig instance with all fields populated

**Example:**

```python
>>> config = api.user_configs.get('config-id-here')
>>> print(config.content)
```

```python
create(
    *,
    name: str,
    kind: str,
    content: str | pathlib.Path | io.TextIOBase
) -> UserConfig
```

Create a new user config.

**Parameters:**

* `name` – Name for the user config
* `kind` – Type of config (use KIND\_CLOUD\_INIT\_USER\_DATA or KIND\_CLOUD\_INIT\_META\_DATA constants)
* `content` – Cloud-init script content. Can be provided as: - str: Raw content or file path - Path: Path object to a file - TextIOBase: Open file handle

User configs are automatically associated with your default organization.
The 'organization' parameter from v1/v2 has been removed in v3.

**Returns:**

Newly created UserConfig instance

**Example:**

```python
>>> # String content
>>> config = api.user_configs.create(
...     name='my-user-data',
...     kind=api.user_configs.model.KIND_CLOUD_INIT_USER_DATA,
...     content='#cloud-config\npackages:\n  - vim\n',
... )
>>>
>>> # File path
>>> config = api.user_configs.create(
...     name='my-user-data',
...     kind='cloud-init-user-data',
...     content='/path/to/file.txt',
... )
>>>
>>> # Path object
>>> from pathlib import Path
>>> config = api.user_configs.create(
...     name='my-user-data',
...     kind='cloud-init-user-data',
...     content=Path('/path/to/file.txt'),
... )
```

```python
update(
    *,
    user_config: UserConfig | PrimaryKey,
    name: str | None = ...,
    content: str | pathlib.Path | io.TextIOBase | None = ...
) -> UserConfig
```

Update a user config (patch operation).

**Parameters:**

* `user_config` – UserConfig instance or ID string
* `name` – New name for the user config
* `content` – New cloud-init script content

**Returns:**

Updated UserConfig instance

**Example:**

```python
>>> config = api.user_configs.update(
...     user_config='config-id',
...     name='New Name',
...     content='#cloud-config\n...',
... )
```

```python
patch(
    pk: PrimaryKey,
    *,
    name: str | None = ...,
    content: str | pathlib.Path | io.TextIOBase | None = ...
) -> UserConfig
```

Patch a user config with partial updates.

**Parameters:**

* `pk` – UserConfig ID string
* `name` – New name for the user config
* `content` – New cloud-init script content

**Returns:**

Updated UserConfig instance

**Example:**

```python
>>> config = api.user_configs.patch(
...     pk='config-id',
...     name='Updated Name',
... )
```

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

Delete a user config.

**Parameters:**

* `pk` – UserConfig ID string

**Example:**

```python
>>> api.user_configs.delete('config-id')
```