snowflake.core.image_repository.ImageRepositoryResourceΒΆ

class snowflake.core.image_repository.ImageRepositoryResource(name: str, collection: ImageRepositoryCollection)ΒΆ

Bases: SchemaObjectReferenceMixin[ImageRepositoryCollection]

Represents a reference to a Snowflake image repository.

With this image repository reference, you can create and fetch information about image repositories, as well as perform certain actions on them.

Attributes

databaseΒΆ
fully_qualified_nameΒΆ
rootΒΆ

Methods

delete() β†’ NoneΒΆ

Delete this image repository.

Examples

Deleting an image repository using its reference:

>>> image_repository_reference.delete()
The `delete` method is deprecated; use `drop` instead.
Copy
drop(if_exists: bool | None = None) β†’ NoneΒΆ

Drop this image repository.

Parameters:

if_exists (bool, optional) – Check the existence of this image repository before dropping it. Default is None, which is equivalent to False.

Examples

Deleting an image repository using its reference:

>>> image_repository_reference.drop()
Copy
fetch() β†’ ImageRepositoryModelΒΆ

Fetch the details of an image repository.

Examples

Fetching a reference to an image repository to print its name and properties:

>>> my_image_repository = image_repository_reference.fetch()
>>> print(my_image_repository.name)
Copy
list_images_in_repository() β†’ Iterator[Image]ΒΆ

List the images in an image repository.

Examples

Listing images in an image repository using an image repository reference:

>>> for image in image_repository_reference.list_images_in_repository():
...     print(image.name)
Copy