air_sdk.endpoints.user_configs
air_sdk.endpoints.user_configs
Stub file for user_configs endpoint type hints.
Classes
Module Contents
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
Unique identifier for the user config
Human-readable name of the user config
Type of cloud-init config (user-data or meta-data)
The cloud-init script content (lazy-loaded)
Update specific fields of the user config.
Parameters:
name– New name for the user configcontent– New cloud-init script content
Example:
Refresh the user config from the API, loading all fields including content.
Example:
Delete this user config from the system.
Example:
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).
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 returnoffset– Number of results to skipordering– Field to order results by (prefix with ’-’ for descending)search– Search term to filter results
Yields:
UserConfig instances
Example:
Get a specific user config by ID.
Parameters:
user_config– UserConfig instance or ID string
Returns:
UserConfig instance with all fields populated
Example:
Create a new user config.
Parameters:
name– Name for the user configkind– 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:
Update a user config (patch operation).
Parameters:
user_config– UserConfig instance or ID stringname– New name for the user configcontent– New cloud-init script content
Returns:
Updated UserConfig instance
Example:
Patch a user config with partial updates.
Parameters:
pk– UserConfig ID stringname– New name for the user configcontent– New cloud-init script content
Returns:
Updated UserConfig instance
Example:
Delete a user config.
Parameters:
pk– UserConfig ID string
Example: