Images
CREATE
Creating a new image.
Create and Upload in One Step
You can also create an image and upload the file content in a single operation by providing the filepath parameter to create():
GET
Retrieve a specific Image
List/Filter/Order/Search an iterable of Images
We can query for images with specific characteristics.
UPDATE
Update specific fields on an individual image.
UPLOAD FILE CONTENT
Upload the file content of the image (e.g. cumulus-vx-1.2.3.iso) to Air.
Reset/clear the file content associated with an Image
If you want to upload different content to the image you must first call clear_upload to clear the uploaded content currently associated with the image. This step is in place to protect currently uploaded images.
Parallel uploads for large files
For large files, you can speed up uploads by using multiple parallel workers. The SDK automatically chunks files into ~100MB parts and uploads them to S3.
Verifying / Checking Image Content
You can verify the content of an uploaded image by comparing the hash of an image with the hash of a local file.
1. Comparing hashes
An Image will have a populated hash when the Image has an associated file upload. This hash is the SHA256 hash of the file calculated using the air_sdk.utils.sha256_file method.
If you have a file locally, you can use this sha256_file method to determine your local hash and can compare this to the hash associated with the Image instance to see if the contents are identical.
DELETE
Delete an image
Image sharing
Share an image you own with another organization. The recipient must claim the share to copy the image into their org.
Pass target_org as the recipient’s NGC org name.
The returned share’s id is what the recipient passes to api.images.claim_image_share(image_share=...).
List shares
api.image_shares lists shares visible to your account.
Get a specific image share
Delete a specific image share (not the image itself)
Deleting an image share only removes that pending share so the target organization can no longer claim a copy, it does not delete the source image or its stored content.
Claim a shared image
If another organization shared an image to yours, claim it to create a copy in your org.