UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

108 lines 5.17 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.EvsDataImage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an IMS data image resource created from EVS volume within HuaweiCloud. * * > The volume must be bound to the ECS instance. * * ## Example Usage * ### Creating an IMS data image from EVS volume * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const name = config.requireObject("name"); * const volumeId = config.requireObject("volumeId"); * const test = new huaweicloud.ims.EvsDataImage("test", {volumeId: volumeId}); * ``` * * ## Import * * The IMS EVS data image resource can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Ims/evsDataImage:EvsDataImage test <id> * ``` */ class EvsDataImage extends pulumi.CustomResource { /** * Get an existing EvsDataImage 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, id, state, opts) { return new EvsDataImage(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of EvsDataImage. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === EvsDataImage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["activeAt"] = state ? state.activeAt : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dataOrigin"] = state ? state.dataOrigin : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["diskFormat"] = state ? state.diskFormat : undefined; resourceInputs["enterpriseProjectId"] = state ? state.enterpriseProjectId : undefined; resourceInputs["imageSize"] = state ? state.imageSize : undefined; resourceInputs["minDisk"] = state ? state.minDisk : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["osType"] = state ? state.osType : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["visibility"] = state ? state.visibility : undefined; resourceInputs["volumeId"] = state ? state.volumeId : undefined; } else { const args = argsOrState; if ((!args || args.volumeId === undefined) && !opts.urn) { throw new Error("Missing required property 'volumeId'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enterpriseProjectId"] = args ? args.enterpriseProjectId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["volumeId"] = args ? args.volumeId : undefined; resourceInputs["activeAt"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["dataOrigin"] = undefined /*out*/; resourceInputs["diskFormat"] = undefined /*out*/; resourceInputs["imageSize"] = undefined /*out*/; resourceInputs["minDisk"] = undefined /*out*/; resourceInputs["osType"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["visibility"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EvsDataImage.__pulumiType, name, resourceInputs, opts); } } exports.EvsDataImage = EvsDataImage; /** @internal */ EvsDataImage.__pulumiType = 'huaweicloud:Ims/evsDataImage:EvsDataImage'; //# sourceMappingURL=evsDataImage.js.map