cloudflare
Version:
The official TypeScript library for the Cloudflare API
58 lines • 1.81 kB
TypeScript
import { APIResource } from "../../core/resource.js";
import { APIPromise } from "../../core/api-promise.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class BaseImages extends APIResource {
static readonly _key: readonly ['containers', 'images'];
/**
* Idempotently starts or observes preparation of the runtime artifacts required to
* run one digest-pinned managed container image on Cloudflare's network. Returns
* 202 while durable preparation continues and 200 when the image is ready or
* preparation has reached a terminal error.
*
* @example
* ```ts
* const response = await client.containers.images.prepare({
* account_id: 'account-123',
* image: 'image',
* });
* ```
*/
prepare(params: ImagePrepareParams, options?: RequestOptions): APIPromise<ImagePrepareResponse>;
}
export declare class Images extends BaseImages {
}
/**
* Durable preparation state for a container image.
*/
export interface ImagePrepareResponse {
/**
* Image url.
*/
image: string;
/**
* Current durable preparation state for a container image.
*/
status: 'pending' | 'ready' | 'error';
/**
* Digest of the prepared runtime artifact when status is ready.
*/
artifact_digest?: string;
/**
* Human-readable pending or terminal error detail.
*/
reason?: string;
}
export interface ImagePrepareParams {
/**
* Path param: Account identifier.
*/
account_id: string;
/**
* Body param: Image url.
*/
image: string;
}
export declare namespace Images {
export { type ImagePrepareResponse as ImagePrepareResponse, type ImagePrepareParams as ImagePrepareParams };
}
//# sourceMappingURL=images.d.ts.map