---
title: EnsuredImage
description: "What Sandbox.ensure_image returns: the ready image and how this call got it."
---

```python
@final
class EnsuredImage
```

What `Sandbox.ensure_image` returns: the ready image and how this call got it.

## Constructor

`EnsuredImage` declares no `__new__` or `__init__`, so it is not constructed directly: an instance comes back from another call in this package.

## Properties

### `artifact_uri`

```python
artifact_uri: str
```

`s3://<bucket>/<prefix>/<name>/artifact.zip`, whether or not this call uploaded it.

### `image`

```python
image: Image
```

The ready image; pass `image.identifier` to `run`.

### `reused`

```python
reused: bool
```

True when this call's own create did not build the image: it was ready, a build
already running was waited out, or a concurrent caller won the create race.

### `uploaded`

```python
uploaded: bool
```

Whether this call uploaded the artifact.

### `warnings`

```python
warnings: list[str]
```

What reading the build context skipped (symlinks, special files), one line each.

## Special methods

### `__repr__`

```python
def __repr__() -> str
```

## Provenance

This page is generated from `bindings/microvms-py/microvms.pyi` by Griffe 2.3.0, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run stubs`. `mise run stubs:check` fails when the committed file no longer matches the source.