@pulumi/openstack
Version: 
A Pulumi package for creating and managing OpenStack cloud resources.
302 lines (301 loc) • 9.08 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
 * Use this data source to get the ID of an available OpenStack image.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const ubuntu = openstack.images.getImage({
 *     name: "Ubuntu 16.04",
 *     mostRecent: true,
 *     properties: {
 *         key: "value",
 *     },
 * });
 * ```
 */
export declare function getImage(args?: GetImageArgs, opts?: pulumi.InvokeOptions): Promise<GetImageResult>;
/**
 * A collection of arguments for invoking getImage.
 */
export interface GetImageArgs {
    /**
     * The container format of the image.
     */
    containerFormat?: string;
    /**
     * The disk format of the image.
     */
    diskFormat?: string;
    /**
     * Whether or not the image is hidden from public list.
     */
    hidden?: boolean;
    /**
     * The status of the image. Must be one of
     * "accepted", "pending", "rejected", or "all".
     */
    memberStatus?: string;
    /**
     * If more than one result is returned, use the most
     * recent image.
     */
    mostRecent?: boolean;
    /**
     * The name of the image. Cannot be used simultaneously with
     * `nameRegex`.
     */
    name?: string;
    /**
     * The regular expressian of the name of the image.
     * Cannot be used simultaneously with `name`. Unlike filtering by `name` the
     * `nameRegex` filtering does by client on the result of OpenStack search
     * query.
     */
    nameRegex?: string;
    /**
     * The owner (UUID) of the image.
     */
    owner?: string;
    /**
     * a map of key/value pairs to match an image with.
     * All specified properties must be matched. Unlike other options filtering by
     * `properties` does by client on the result of OpenStack search query.
     * Filtering is applied if server responce contains at least 2 images. In case
     * there is only one image the `properties` ignores.
     */
    properties?: {
        [key: string]: string;
    };
    /**
     * The region in which to obtain the V2 Glance client. A
     * Glance client is needed to create an Image that can be used with a compute
     * instance. If omitted, the `region` argument of the provider is used.
     */
    region?: string;
    /**
     * The maximum size (in bytes) of the image to return.
     */
    sizeMax?: number;
    /**
     * The minimum size (in bytes) of the image to return.
     */
    sizeMin?: number;
    /**
     * Sorts the response by one or more attribute and sort
     * direction combinations. You can also set multiple sort keys and directions.
     * Default direction is `desc`. Use the comma (,) character to separate multiple
     * values. For example expression `sort = "name:asc,status"` sorts ascending by
     * name and descending by status.
     */
    sort?: string;
    /**
     * Search for images with a specific tag.
     */
    tag?: string;
    /**
     * A list of tags required to be set on the image (all
     * specified tags must be in the images tag list for it to be matched).
     */
    tags?: string[];
    /**
     * The visibility of the image. Must be one of
     * "public", "private", "community", or "shared". Defaults to "private".
     */
    visibility?: string;
}
/**
 * A collection of values returned by getImage.
 */
export interface GetImageResult {
    /**
     * The checksum of the data associated with the image.
     */
    readonly checksum: string;
    /**
     * The format of the image's container.
     */
    readonly containerFormat?: string;
    /**
     * The date the image was created.
     */
    readonly createdAt: string;
    /**
     * The format of the image's disk.
     */
    readonly diskFormat?: string;
    /**
     * the trailing path after the glance endpoint that represent the
     * location of the image or the path to retrieve it.
     */
    readonly file: string;
    readonly hidden?: boolean;
    /**
     * The provider-assigned unique ID for this managed resource.
     */
    readonly id: string;
    readonly memberStatus?: string;
    /**
     * The metadata associated with the image. Image metadata allow for
     * meaningfully define the image properties and tags. See
     * https://docs.openstack.org/glance/latest/user/metadefs-concepts.html.
     */
    readonly metadata: {
        [key: string]: string;
    };
    /**
     * The minimum amount of disk space required to use the image.
     */
    readonly minDiskGb: number;
    /**
     * The minimum amount of ram required to use the image.
     */
    readonly minRamMb: number;
    readonly mostRecent?: boolean;
    readonly name?: string;
    readonly nameRegex?: string;
    readonly owner?: string;
    /**
     * Freeform information about the image.
     */
    readonly properties?: {
        [key: string]: string;
    };
    /**
     * Whether or not the image is protected.
     */
    readonly protected: boolean;
    readonly region: string;
    /**
     * The path to the JSON-schema that represent the image
     */
    readonly schema: string;
    /**
     * The size of the image (in bytes).
     */
    readonly sizeBytes: number;
    readonly sizeMax?: number;
    readonly sizeMin?: number;
    readonly sort?: string;
    readonly tag?: string;
    /**
     * The tags list of the image.
     */
    readonly tags: string[];
    /**
     * The date the image was last updated.
     */
    readonly updatedAt: string;
    readonly visibility?: string;
}
/**
 * Use this data source to get the ID of an available OpenStack image.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const ubuntu = openstack.images.getImage({
 *     name: "Ubuntu 16.04",
 *     mostRecent: true,
 *     properties: {
 *         key: "value",
 *     },
 * });
 * ```
 */
export declare function getImageOutput(args?: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetImageResult>;
/**
 * A collection of arguments for invoking getImage.
 */
export interface GetImageOutputArgs {
    /**
     * The container format of the image.
     */
    containerFormat?: pulumi.Input<string>;
    /**
     * The disk format of the image.
     */
    diskFormat?: pulumi.Input<string>;
    /**
     * Whether or not the image is hidden from public list.
     */
    hidden?: pulumi.Input<boolean>;
    /**
     * The status of the image. Must be one of
     * "accepted", "pending", "rejected", or "all".
     */
    memberStatus?: pulumi.Input<string>;
    /**
     * If more than one result is returned, use the most
     * recent image.
     */
    mostRecent?: pulumi.Input<boolean>;
    /**
     * The name of the image. Cannot be used simultaneously with
     * `nameRegex`.
     */
    name?: pulumi.Input<string>;
    /**
     * The regular expressian of the name of the image.
     * Cannot be used simultaneously with `name`. Unlike filtering by `name` the
     * `nameRegex` filtering does by client on the result of OpenStack search
     * query.
     */
    nameRegex?: pulumi.Input<string>;
    /**
     * The owner (UUID) of the image.
     */
    owner?: pulumi.Input<string>;
    /**
     * a map of key/value pairs to match an image with.
     * All specified properties must be matched. Unlike other options filtering by
     * `properties` does by client on the result of OpenStack search query.
     * Filtering is applied if server responce contains at least 2 images. In case
     * there is only one image the `properties` ignores.
     */
    properties?: pulumi.Input<{
        [key: string]: pulumi.Input<string>;
    }>;
    /**
     * The region in which to obtain the V2 Glance client. A
     * Glance client is needed to create an Image that can be used with a compute
     * instance. If omitted, the `region` argument of the provider is used.
     */
    region?: pulumi.Input<string>;
    /**
     * The maximum size (in bytes) of the image to return.
     */
    sizeMax?: pulumi.Input<number>;
    /**
     * The minimum size (in bytes) of the image to return.
     */
    sizeMin?: pulumi.Input<number>;
    /**
     * Sorts the response by one or more attribute and sort
     * direction combinations. You can also set multiple sort keys and directions.
     * Default direction is `desc`. Use the comma (,) character to separate multiple
     * values. For example expression `sort = "name:asc,status"` sorts ascending by
     * name and descending by status.
     */
    sort?: pulumi.Input<string>;
    /**
     * Search for images with a specific tag.
     */
    tag?: pulumi.Input<string>;
    /**
     * A list of tags required to be set on the image (all
     * specified tags must be in the images tag list for it to be matched).
     */
    tags?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The visibility of the image. Must be one of
     * "public", "private", "community", or "shared". Defaults to "private".
     */
    visibility?: pulumi.Input<string>;
}