UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

50 lines 1.67 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.getProjectsOutput = exports.getProjects = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to query the IAM project list within HuaweiCloud. * * > **NOTE:** You *must* have IAM read privileges to use this data source. * * ## Example Usage * ### Obtain project information by name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const test = pulumi.output(huaweicloud.Iam.getProjects({ * name: "cn-north-4_demo", * })); * ``` * ### Obtain special project information by name * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * * const test = pulumi.output(huaweicloud.Iam.getProjects({ * name: "MOS", // The project for OBS Billing * })); * ``` */ function getProjects(args, opts) { args = args || {}; if (!opts) { opts = {}; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("huaweicloud:Iam/getProjects:getProjects", { "name": args.name, }, opts); } exports.getProjects = getProjects; function getProjectsOutput(args, opts) { return pulumi.output(args).apply(a => getProjects(a, opts)); } exports.getProjectsOutput = getProjectsOutput; //# sourceMappingURL=getProjects.js.map