@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
275 lines (274 loc) • 10.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages an IMS data image resource created from external image file in the OBS bucket within HuaweiCloud.
*
* ## Example Usage
* ### Creating an IMS data image from an external image file in the OBS bucket
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const name = config.requireObject("name");
* const imageUrl = config.requireObject("imageUrl");
* const minDisk = config.requireObject("minDisk");
* const test = new huaweicloud.ims.ObsDataImage("test", {
* imageUrl: imageUrl,
* minDisk: minDisk,
* });
* ```
*
* ## Import
*
* The IMS OBS data image resource can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Ims/obsDataImage:ObsDataImage test <id>
* ```
*/
export declare class ObsDataImage extends pulumi.CustomResource {
/**
* Get an existing ObsDataImage resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ObsDataImageState, opts?: pulumi.CustomResourceOptions): ObsDataImage;
/**
* Returns true if the given object is an instance of ObsDataImage. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ObsDataImage;
/**
* The time when the image status changes to active, in RFC3339 format.
*/
readonly activeAt: pulumi.Output<string>;
/**
* Specifies the custom key for creating encrypted image.
* Changing this parameter will create a new resource.
*/
readonly cmkId: pulumi.Output<string>;
/**
* The creation time of the image, in RFC3339 format.
*/
readonly createdAt: pulumi.Output<string>;
/**
* The image source. The format is **file,image_url**.
*/
readonly dataOrigin: pulumi.Output<string>;
/**
* Specifies the description of the image.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The image format. The value can be **zvhd2**, **vhd**, **zvhd**, **raw**, **qcow2**, or **iso**.
*/
readonly diskFormat: pulumi.Output<string>;
/**
* Specifies the enterprise project ID to which the IMS image belongs.
* For enterprise users, if omitted, default enterprise project will be used.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* The size of the image file, in bytes unit.
*/
readonly imageSize: pulumi.Output<string>;
/**
* Specifies the URL of the external image file in the OBS bucket, the format
* is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard
* storage. Changing this parameter will create a new resource.
*/
readonly imageUrl: pulumi.Output<string>;
/**
* Specifies the minimum size of the system disk, in GB unit. The value ranges
* from `40` to `2,048`. Changing this parameter will create a new resource.
*/
readonly minDisk: pulumi.Output<number>;
/**
* Specifies the name of the image.
* The valid length is limited from `1` to `128` characters.
* The first and last letters of the name cannot be spaces.
* The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._).
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the operating system type of the image. The value can be
* **Windows** or **Linux**. Defaults to **Linux**. Changing this parameter will create a new resource.
*/
readonly osType: pulumi.Output<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* The status of the image. The value can be **active**, **queued**, **saving**, **deleted**, or **killed*,
* only image with a status of **active** can be used.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the key/value pairs to associate with the image.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The last update time of the image, in RFC3339 format.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* Whether the image is visible to other tenants.
*/
readonly visibility: pulumi.Output<string>;
/**
* Create a ObsDataImage resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ObsDataImageArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ObsDataImage resources.
*/
export interface ObsDataImageState {
/**
* The time when the image status changes to active, in RFC3339 format.
*/
activeAt?: pulumi.Input<string>;
/**
* Specifies the custom key for creating encrypted image.
* Changing this parameter will create a new resource.
*/
cmkId?: pulumi.Input<string>;
/**
* The creation time of the image, in RFC3339 format.
*/
createdAt?: pulumi.Input<string>;
/**
* The image source. The format is **file,image_url**.
*/
dataOrigin?: pulumi.Input<string>;
/**
* Specifies the description of the image.
*/
description?: pulumi.Input<string>;
/**
* The image format. The value can be **zvhd2**, **vhd**, **zvhd**, **raw**, **qcow2**, or **iso**.
*/
diskFormat?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID to which the IMS image belongs.
* For enterprise users, if omitted, default enterprise project will be used.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* The size of the image file, in bytes unit.
*/
imageSize?: pulumi.Input<string>;
/**
* Specifies the URL of the external image file in the OBS bucket, the format
* is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard
* storage. Changing this parameter will create a new resource.
*/
imageUrl?: pulumi.Input<string>;
/**
* Specifies the minimum size of the system disk, in GB unit. The value ranges
* from `40` to `2,048`. Changing this parameter will create a new resource.
*/
minDisk?: pulumi.Input<number>;
/**
* Specifies the name of the image.
* The valid length is limited from `1` to `128` characters.
* The first and last letters of the name cannot be spaces.
* The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._).
*/
name?: pulumi.Input<string>;
/**
* Specifies the operating system type of the image. The value can be
* **Windows** or **Linux**. Defaults to **Linux**. Changing this parameter will create a new resource.
*/
osType?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* The status of the image. The value can be **active**, **queued**, **saving**, **deleted**, or **killed*,
* only image with a status of **active** can be used.
*/
status?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the image.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The last update time of the image, in RFC3339 format.
*/
updatedAt?: pulumi.Input<string>;
/**
* Whether the image is visible to other tenants.
*/
visibility?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ObsDataImage resource.
*/
export interface ObsDataImageArgs {
/**
* Specifies the custom key for creating encrypted image.
* Changing this parameter will create a new resource.
*/
cmkId?: pulumi.Input<string>;
/**
* Specifies the description of the image.
*/
description?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID to which the IMS image belongs.
* For enterprise users, if omitted, default enterprise project will be used.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* Specifies the URL of the external image file in the OBS bucket, the format
* is **OBS bucket name:image file name**. The storage category for OBS bucket and image file must be OBS standard
* storage. Changing this parameter will create a new resource.
*/
imageUrl: pulumi.Input<string>;
/**
* Specifies the minimum size of the system disk, in GB unit. The value ranges
* from `40` to `2,048`. Changing this parameter will create a new resource.
*/
minDisk: pulumi.Input<number>;
/**
* Specifies the name of the image.
* The valid length is limited from `1` to `128` characters.
* The first and last letters of the name cannot be spaces.
* The name can contain uppercase letters, lowercase letters, numbers, spaces, chinese, and special characters (-._).
*/
name?: pulumi.Input<string>;
/**
* Specifies the operating system type of the image. The value can be
* **Windows** or **Linux**. Defaults to **Linux**. Changing this parameter will create a new resource.
*/
osType?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource.
* If omitted, the provider-level region will be used. Changing this parameter will create a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the key/value pairs to associate with the image.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}