air_sdk.endpoints.images
air_sdk.endpoints.images
Stub file for images endpoint type hints.
Classes
Module Contents
Bases: air_sdk.air_model.AirModel
Bases: air_sdk.air_model.AirModel
Image model representing a network image.
Unique identifier for the image
Human-readable name of the image
Version of the image
Timestamp when the image was created
User who created the image
Timestamp when the image was last modified
Mountpoint of the image
Minimum resources required to run the image
Whether the image includes the Air agent
CPU architecture of the image
Default username for the image
Default password for the image
The types of emulation the image supports
The version of the emulation the image supports
Provider of the image
Whether the image is published
Status of the image upload
Timestamp when the image was last uploaded
Size of the image
Hash of the image
Whether the image is owned by the client
Update the image’s properties.
Example:
Parameters:
name– Name of the imageversion– Version of the imagedefault_username– Default username for the imagedefault_password– Default password for the imagemountpoint– Mountpoint of the imagecpu_arch– CPU architecture of the imageincludes_air_agent– Whether the image includes the Air agentemulation_type– The types of emulation the image supportsemulation_version– The version of the emulation the image supportsprovider– Provider of the image
Upload the image to the Air platform.
All uploads use multipart upload to S3. Parts are ~100MB each, calculated automatically by the API.
Parameters:
filepath– local file path to the imagetimeout– Timeout per part upload (default: DEFAULT_UPLOAD_TIMEOUT).max_workers– number of concurrent workers for parallel uploads (default: 1 for sequential).
Example:
Returns:
the uploaded image instance
Clear the upload status of the image.
Example:
Returns:
the image instance
Publish the image.
Parameters:
name– new name of the imageversion– new version of the image
Example:
Returns:
the published image instance
Unpublish the image.
Parameters:
name– new name of the imageversion– new version of the image
Example:
Returns:
the image instance
Share the image with another organization.
Parameters:
target_org– The NGC org name of the organization receiving the imageexpires_at– The date and time the image share expires
Example:
Returns:
The created share instance
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.images.Image]
API client for image endpoints.
Create a new image.
Parameters:
name– Name of the imageversion– Version of the imagedefault_username– Default username for the imagedefault_password– Default password for the imagemountpoint– Mountpoint of the imagecpu_arch– CPU architecture of the imageincludes_air_agent– Whether the image includes the Air agentemulation_type– The types of emulation the image supportsemulation_version– The version of the emulation the image supportsprovider– Provider of the imagefilepath– Optional path to image file. If provided, uploads the image after creation using upload.timeout– Timeout per part upload (default: DEFAULT_UPLOAD_TIMEOUT). Only used if filepath is provided.max_workers– Number of concurrent workers for parallel uploads (default: 1). Only used if filepath is provided.
Example:
Returns:
The created Image instance
List all images with optional filtering.
Parameters:
name– Name of the imageversion– Version of the imagecpu_arch– CPU architecture of the imagecreator– Creator of the imageincludes_air_agent– Whether the image includes the Air agentemulation_type– The types of emulation the image supportsemulation_version– The version of the emulation the image supportsprovider– Provider of the imagepublished– Whether the image is publishedupload_status– Status of the image uploadlast_uploaded_at– Timestamp when the image was last uploadedhash– Hash of the imageis_owned_by_client– Whether the image is owned by the clientlimit– Maximum number of results to returnoffset– Offset for paginationordering– Ordering of the resultssearch– Search query
Example:
Returns:
Iterator of Image instances
Get a specific image by ID.
Parameters:
pk– The image ID (string or UUID)
Example:
Returns:
The Image instance
Upload the image to the Air platform.
All uploads use multipart upload to S3. Parts are ~100MB each, calculated automatically by the API.
Parameters:
image– Image instance or image IDfilepath– Path to the file to uploadtimeout– Timeout per part upload (default: DEFAULT_UPLOAD_TIMEOUT). This timeout applies to EACH part upload (not total operation).max_workers– Number of concurrent workers for uploads. Default: 1 (sequential uploads). Set > 1 for parallel uploads.
Returns:
Updated Image instance
Example:
Raises:
FileNotFoundError– If the file does not existValueError– If filepath is not a regular file or max_workers < 1PermissionError– If the file is not readableAirUnexpectedResponse– If upload fails or backend returns invalid datarequests.RequestException– For network/HTTP errors
Clear the upload status of the image.
Parameters:
image– image to clear upload
Example:
Returns:
None
Publish the image.
Args:
Required parameters: image: image to publish
Optional Parameters: name: The name of the image version: The version of the image
Returns:
None
Example:
Unpublish the image.
Parameters:
image– image to unpublish (Image instance or image ID)name– new name of the imageversion– new version of the image
Example:
Returns:
the unpublished image instance
Share the image with another organization.
Args:
Required parameters: image: The image to share (Image instance or image ID) target_org: The NGC org name of the organization receiving the image
Optional parameters: expires_at: The date and time the image share expires
Returns:
ImageShare: The created share object
Example:
Claim a shared image into your organization.
Parameters:
image_share– The share ID to claim (string or UUID)name– new name of the imageversion– new version of the image
Example:
Returns:
The claimed image
Access the image shares API.
Returns:
ImageShareEndpointAPI: The API for managing image shares
Example:
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.images.ImageShare]
API client for shared image endpoints.
List all shared images.
Parameters:
limit– Maximum number of results to returnoffset– Offset for paginationordering– Ordering of the resultssearch– Search query
Example:
Returns:
Iterator of ImageShare instances
Create a new image share.
Parameters:
image– The image or image ID to sharetarget_org– The NGC org name of the organization receiving the imageexpires_at– The date and time the image share expires
Example:
Returns:
The created image share instance
Get a specific shared image by ID.
Parameters:
pk– The image share ID (string or UUID)
Example:
Returns:
The ImageShare instance
Delete (unshare) an image share.
Parameters:
pk– The share ID to delete (string or UUID)
Example:
Returns:
None