UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

79 lines 2.55 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.getImageOutput = exports.getImage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get an available IMS image 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.getImage({ * name: "Ubuntu 18.04 server 64bit", * visibility: "public", * mostRecent: true, * }); * const centos-1 = huaweicloud.Ims.getImage({ * architecture: "x86", * visibility: "public", * mostRecent: true, * }); * const centos-2 = huaweicloud.Ims.getImage({ * architecture: "x86", * nameRegex: "^CentOS 7.4", * visibility: "public", * mostRecent: true, * }); * const bmsImage = huaweicloud.Ims.getImage({ * architecture: "x86", * imageType: "Ironic", * visibility: "public", * mostRecent: true, * }); * ``` */ function getImage(args, opts) { args = args || {}; if (!opts) { opts = {}; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("huaweicloud:Ims/getImage:getImage", { "architecture": args.architecture, "enterpriseProjectId": args.enterpriseProjectId, "flavorId": args.flavorId, "imageId": args.imageId, "imageType": args.imageType, "isWholeImage": args.isWholeImage, "mostRecent": args.mostRecent, "name": args.name, "nameRegex": args.nameRegex, "os": args.os, "osVersion": args.osVersion, "owner": args.owner, "region": args.region, "sizeMax": args.sizeMax, "sizeMin": args.sizeMin, "sortDirection": args.sortDirection, "sortKey": args.sortKey, "tag": args.tag, "visibility": args.visibility, }, opts); } exports.getImage = getImage; function getImageOutput(args, opts) { return pulumi.output(args).apply(a => getImage(a, opts)); } exports.getImageOutput = getImageOutput; //# sourceMappingURL=getImage.js.map