@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
52 lines • 1.67 kB
JavaScript
;
// *** 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.getEipsOutput = exports.getEips = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get a list of EIPs.
*
* ## Example Usage
*
* An example filter by name and tag
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const publicIp = config.requireObject("publicIp");
* const eip = huaweicloud.Eip.getEips({
* publicIps: [publicIp],
* tags: {
* foo: "bar",
* },
* });
* export const eipIds = [eip.then(eip => eip.eips)].map(__item => __item?.id);
* ```
*/
function getEips(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("huaweicloud:Eip/getEips:getEips", {
"enterpriseProjectId": args.enterpriseProjectId,
"ids": args.ids,
"ipVersion": args.ipVersion,
"portIds": args.portIds,
"privateIps": args.privateIps,
"publicIps": args.publicIps,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getEips = getEips;
function getEipsOutput(args, opts) {
return pulumi.output(args).apply(a => getEips(a, opts));
}
exports.getEipsOutput = getEipsOutput;
//# sourceMappingURL=getEips.js.map