UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

286 lines (285 loc) 9.26 kB
import * as pulumi from "@pulumi/pulumi"; import { output as outputs } from "../types"; /** * Use this data source to get available IMS images within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const config = new pulumi.Config(); * const imageId = config.requireObject("imageId"); * const test = huaweicloud.Ims.getImage({ * imageId: imageId, * }); * const ubuntu = huaweicloud.Ims.getImages({ * name: "Ubuntu 18.04 server 64bit", * visibility: "public", * }); * const centos-1 = huaweicloud.Ims.getImages({ * architecture: "x86", * os: "CentOS", * visibility: "public", * }); * const centos-2 = huaweicloud.Ims.getImages({ * architecture: "x86", * nameRegex: "^CentOS 7.4", * visibility: "public", * }); * const bmsImage = huaweicloud.Ims.getImages({ * architecture: "x86", * imageType: "Ironic", * visibility: "public", * }); * ``` */ export declare function getImages(args?: GetImagesArgs, opts?: pulumi.InvokeOptions): Promise<GetImagesResult>; /** * A collection of arguments for invoking getImages. */ export interface GetImagesArgs { /** * Specifies whether the image supports host security or host monitoring. * The valid values are as follows: * + **hss**: Host security. * + **ces**: Host monitoring. * + **hss,ces**: Both support. */ __supportAgentList?: string; /** * Specifies the image architecture type. The value can be **x86** or **arm**. */ architecture?: string; /** * Specifies the enterprise project ID of the image. * For enterprise users, if omitted, will query the images under all enterprise projects. */ enterpriseProjectId?: string; /** * Specifies the ECS flavor ID used to filter out available images. * You can specify only one flavor ID and only ECS flavor ID is valid, BMS flavor is not supported. */ flavorId?: string; /** * Specifies the ID of the image. */ imageId?: string; /** * Specifies the environment where the image is used. * The valid values are as follows: * + **FusionCompute**: Cloud server image, also known as system disk image. * + **DataImage**: Data disk image. * + **Ironic**: Bare metal server image. * + **IsoImage**: ISO image. */ imageType?: string; /** * Specifies whether it is a whole image. The valid value is **true** or **false**. * Defaults to **false**. */ isWholeImage?: boolean; /** * Specifies the name of the image. Cannot be used simultaneously with `nameRegex`. */ name?: string; /** * Specifies the regular expression of the name of the image. * Cannot be used simultaneously with `name`. */ nameRegex?: string; /** * Specifies the image OS type. The value can be **Windows**, **Ubuntu**, **RedHat**, **SUSE**, * **CentOS**, **Debian**, **OpenSUSE**, **Oracle Linux**, **Fedora**, **Other**, **CoreOS**, or **EulerOS**. */ os?: string; /** * The operating system version of the image. */ osVersion?: string; /** * Specifies the owner (UUID) of the image. */ owner?: string; /** * Specifies the region in which to obtain the images. * If omitted, the provider-level region will be used. */ region?: string; /** * Specifies whether to sort the query results in ascending or descending order. * The valid values are as follows: * + **asc**: Ascending order. * + **desc**: Descending order. */ sortDirection?: string; /** * Specifies which field to use for sorting. The valid values are **name**, * **container_format**, **disk_format**, **status**, **id**, **size**, and **created_at**. Defaults to **name**. */ sortKey?: string; /** * Specifies the image tag in **Key=Value** format. */ tag?: string; /** * Specifies the visibility of the image. Must be one of **public**, **private**, * **market** or **shared**. */ visibility?: string; } /** * A collection of values returned by getImages. */ export interface GetImagesResult { /** * Does the image support host security or host monitoring. * The valid value is **hss**, **ces**, or **hss,ces**. If it is empty, it means that the image does not support host * security or host monitoring. */ readonly __supportAgentList?: string; /** * The image architecture type. */ readonly architecture?: string; /** * The enterprise project ID of the image. */ readonly enterpriseProjectId?: string; readonly flavorId?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly imageId?: string; /** * The environment where the image is used. */ readonly imageType?: string; /** * All images that match the filter parameters. * The images structure is documented below. */ readonly images: outputs.Ims.GetImagesImage[]; readonly isWholeImage?: boolean; /** * The name of the image. */ readonly name?: string; readonly nameRegex?: string; /** * The image OS type. */ readonly os?: string; /** * The operating system version of the image. */ readonly osVersion?: string; /** * The owner (UUID) of the image. */ readonly owner?: string; readonly region: string; readonly sortDirection?: string; readonly sortKey?: string; readonly tag?: string; /** * The visibility of the image. */ readonly visibility?: string; } export declare function getImagesOutput(args?: GetImagesOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetImagesResult>; /** * A collection of arguments for invoking getImages. */ export interface GetImagesOutputArgs { /** * Specifies whether the image supports host security or host monitoring. * The valid values are as follows: * + **hss**: Host security. * + **ces**: Host monitoring. * + **hss,ces**: Both support. */ __supportAgentList?: pulumi.Input<string>; /** * Specifies the image architecture type. The value can be **x86** or **arm**. */ architecture?: pulumi.Input<string>; /** * Specifies the enterprise project ID of the image. * For enterprise users, if omitted, will query the images under all enterprise projects. */ enterpriseProjectId?: pulumi.Input<string>; /** * Specifies the ECS flavor ID used to filter out available images. * You can specify only one flavor ID and only ECS flavor ID is valid, BMS flavor is not supported. */ flavorId?: pulumi.Input<string>; /** * Specifies the ID of the image. */ imageId?: pulumi.Input<string>; /** * Specifies the environment where the image is used. * The valid values are as follows: * + **FusionCompute**: Cloud server image, also known as system disk image. * + **DataImage**: Data disk image. * + **Ironic**: Bare metal server image. * + **IsoImage**: ISO image. */ imageType?: pulumi.Input<string>; /** * Specifies whether it is a whole image. The valid value is **true** or **false**. * Defaults to **false**. */ isWholeImage?: pulumi.Input<boolean>; /** * Specifies the name of the image. Cannot be used simultaneously with `nameRegex`. */ name?: pulumi.Input<string>; /** * Specifies the regular expression of the name of the image. * Cannot be used simultaneously with `name`. */ nameRegex?: pulumi.Input<string>; /** * Specifies the image OS type. The value can be **Windows**, **Ubuntu**, **RedHat**, **SUSE**, * **CentOS**, **Debian**, **OpenSUSE**, **Oracle Linux**, **Fedora**, **Other**, **CoreOS**, or **EulerOS**. */ os?: pulumi.Input<string>; /** * The operating system version of the image. */ osVersion?: pulumi.Input<string>; /** * Specifies the owner (UUID) of the image. */ owner?: pulumi.Input<string>; /** * Specifies the region in which to obtain the images. * If omitted, the provider-level region will be used. */ region?: pulumi.Input<string>; /** * Specifies whether to sort the query results in ascending or descending order. * The valid values are as follows: * + **asc**: Ascending order. * + **desc**: Descending order. */ sortDirection?: pulumi.Input<string>; /** * Specifies which field to use for sorting. The valid values are **name**, * **container_format**, **disk_format**, **status**, **id**, **size**, and **created_at**. Defaults to **name**. */ sortKey?: pulumi.Input<string>; /** * Specifies the image tag in **Key=Value** format. */ tag?: pulumi.Input<string>; /** * Specifies the visibility of the image. Must be one of **public**, **private**, * **market** or **shared**. */ visibility?: pulumi.Input<string>; }