@pulumi/openstack
Version: 
A Pulumi package for creating and managing OpenStack cloud resources.
233 lines (232 loc) • 7.19 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
 * Use this data source to get a list of Openstack Image IDs matching the
 * specified criteria.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const images = openstack.images.getImageIds({
 *     nameRegex: "^Ubuntu 16\\.04.*-amd64",
 *     sort: "updated_at",
 *     properties: {
 *         key: "value",
 *     },
 * });
 * ```
 */
export declare function getImageIds(args?: GetImageIdsArgs, opts?: pulumi.InvokeOptions): Promise<GetImageIdsResult>;
/**
 * A collection of arguments for invoking getImageIds.
 */
export interface GetImageIdsArgs {
    /**
     * 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;
    /**
     * 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.
     */
    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 getImageIds.
 */
export interface GetImageIdsResult {
    readonly containerFormat?: string;
    readonly diskFormat?: string;
    readonly hidden?: boolean;
    /**
     * The provider-assigned unique ID for this managed resource.
     */
    readonly id: string;
    readonly ids: string[];
    readonly memberStatus?: string;
    readonly name?: string;
    readonly nameRegex?: string;
    readonly owner?: string;
    readonly properties?: {
        [key: string]: string;
    };
    readonly region: string;
    readonly sizeMax?: number;
    readonly sizeMin?: number;
    readonly sort?: string;
    readonly tag?: string;
    readonly tags?: string[];
    readonly visibility?: string;
}
/**
 * Use this data source to get a list of Openstack Image IDs matching the
 * specified criteria.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as openstack from "@pulumi/openstack";
 *
 * const images = openstack.images.getImageIds({
 *     nameRegex: "^Ubuntu 16\\.04.*-amd64",
 *     sort: "updated_at",
 *     properties: {
 *         key: "value",
 *     },
 * });
 * ```
 */
export declare function getImageIdsOutput(args?: GetImageIdsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetImageIdsResult>;
/**
 * A collection of arguments for invoking getImageIds.
 */
export interface GetImageIdsOutputArgs {
    /**
     * 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>;
    /**
     * 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.
     */
    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>;
}