UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

107 lines 3.87 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.getServerGroupsOutput = exports.getServerGroups = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to query detailed information of alb server groups * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooServerGroup: volcengine.alb.ServerGroup[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooServerGroup.push(new volcengine.alb.ServerGroup(`fooServerGroup-${range.value}`, { * vpcId: fooVpc.id, * serverGroupName: `acc-test-server-group-${range.value}`, * description: "acc-test", * serverGroupType: "instance", * scheduler: "sh", * projectName: "default", * healthCheck: { * enabled: "on", * interval: 3, * timeout: 3, * method: "GET", * }, * stickySessionConfig: { * stickySessionEnabled: "on", * stickySessionType: "insert", * cookieTimeout: 1100, * }, * })); * } * const fooServerGroups = volcengine.alb.getServerGroupsOutput({ * ids: fooServerGroup.map(__item => __item.id), * }); * ``` */ function getServerGroups(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("volcengine:alb/getServerGroups:getServerGroups", { "ids": args.ids, "nameRegex": args.nameRegex, "outputFile": args.outputFile, "projectName": args.projectName, "serverGroupNames": args.serverGroupNames, "serverGroupType": args.serverGroupType, "tags": args.tags, "vpcId": args.vpcId, }, opts); } exports.getServerGroups = getServerGroups; /** * Use this data source to query detailed information of alb server groups * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooServerGroup: volcengine.alb.ServerGroup[] = []; * for (const range = {value: 0}; range.value < 3; range.value++) { * fooServerGroup.push(new volcengine.alb.ServerGroup(`fooServerGroup-${range.value}`, { * vpcId: fooVpc.id, * serverGroupName: `acc-test-server-group-${range.value}`, * description: "acc-test", * serverGroupType: "instance", * scheduler: "sh", * projectName: "default", * healthCheck: { * enabled: "on", * interval: 3, * timeout: 3, * method: "GET", * }, * stickySessionConfig: { * stickySessionEnabled: "on", * stickySessionType: "insert", * cookieTimeout: 1100, * }, * })); * } * const fooServerGroups = volcengine.alb.getServerGroupsOutput({ * ids: fooServerGroup.map(__item => __item.id), * }); * ``` */ function getServerGroupsOutput(args, opts) { return pulumi.output(args).apply((a) => getServerGroups(a, opts)); } exports.getServerGroupsOutput = getServerGroupsOutput; //# sourceMappingURL=getServerGroups.js.map