@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
70 lines • 2.29 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.getFlavorsOutput = exports.getFlavors = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get the list of available flavor details within HuaweiCloud.
*
* ## Example Usage
* ### Query the list of kafka flavors for cluster type
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const test = pulumi.output(huaweicloud.Dms.getFlavors({
* type: "cluster",
* }));
* ```
* ### Query the kafka flavor details of the specified ID
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const test = pulumi.output(huaweicloud.Dms.getFlavors({
* flavorId: "c6.2u4g.cluster",
* }));
* ```
* ### Query list of kafka flavors that available in the availability zone list
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as huaweicloud from "@pulumi/huaweicloud";
*
* const config = new pulumi.Config();
* const az1 = config.requireObject("az1");
* const az2 = config.requireObject("az2");
* const test = huaweicloud.Dms.getFlavors({
* availabilityZones: [
* az1,
* az2,
* ],
* });
* ```
*/
function getFlavors(args, opts) {
args = args || {};
if (!opts) {
opts = {};
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
return pulumi.runtime.invoke("huaweicloud:Dms/getFlavors:getFlavors", {
"archType": args.archType,
"availabilityZones": args.availabilityZones,
"chargingMode": args.chargingMode,
"flavorId": args.flavorId,
"region": args.region,
"storageSpecCode": args.storageSpecCode,
"type": args.type,
}, opts);
}
exports.getFlavors = getFlavors;
function getFlavorsOutput(args, opts) {
return pulumi.output(args).apply(a => getFlavors(a, opts));
}
exports.getFlavorsOutput = getFlavorsOutput;
//# sourceMappingURL=getFlavors.js.map