UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

204 lines (203 loc) 5.97 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Use this data source to query detailed information of listeners * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooClb = new volcengine.clb.Clb("fooClb", { * type: "public", * subnetId: fooSubnet.id, * loadBalancerSpec: "small_1", * description: "acc0Demo", * loadBalancerName: "acc-test-create", * eipBillingConfig: { * isp: "BGP", * eipBillingType: "PostPaidByBandwidth", * bandwidth: 1, * }, * }); * const fooServerGroup = new volcengine.clb.ServerGroup("fooServerGroup", { * loadBalancerId: fooClb.id, * serverGroupName: "acc-test-create", * description: "hello demo11", * }); * const fooListener = new volcengine.clb.Listener("fooListener", { * loadBalancerId: fooClb.id, * listenerName: "acc-test-listener", * protocol: "HTTP", * port: 90, * serverGroupId: fooServerGroup.id, * healthCheck: { * enabled: "on", * interval: 10, * timeout: 3, * healthyThreshold: 5, * unHealthyThreshold: 2, * domain: "volcengine.com", * httpCode: "http_2xx", * method: "GET", * uri: "/", * }, * enabled: "on", * }); * const fooListeners = volcengine.clb.getListenersOutput({ * ids: [fooListener.id], * }); * ``` */ /** @deprecated volcengine.clb.Listeners has been deprecated in favor of volcengine.clb.getListeners */ export declare function listeners(args?: ListenersArgs, opts?: pulumi.InvokeOptions): Promise<ListenersResult>; /** * A collection of arguments for invoking Listeners. */ export interface ListenersArgs { /** * A list of Listener IDs. */ ids?: string[]; /** * The name of the Listener. */ listenerName?: string; /** * The id of the Clb. */ loadBalancerId?: string; /** * A Name Regex of Listener. */ nameRegex?: string; /** * File name where to save data source results. */ outputFile?: string; } /** * A collection of values returned by Listeners. */ export interface ListenersResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly ids?: string[]; /** * The name of the Listener. */ readonly listenerName?: string; /** * The collection of Listener query. */ readonly listeners: outputs.clb.ListenersListener[]; readonly loadBalancerId?: string; readonly nameRegex?: string; readonly outputFile?: string; /** * The total count of Listener query. */ readonly totalCount: number; } /** * Use this data source to query detailed information of listeners * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * vpcId: fooVpc.id, * }); * const fooClb = new volcengine.clb.Clb("fooClb", { * type: "public", * subnetId: fooSubnet.id, * loadBalancerSpec: "small_1", * description: "acc0Demo", * loadBalancerName: "acc-test-create", * eipBillingConfig: { * isp: "BGP", * eipBillingType: "PostPaidByBandwidth", * bandwidth: 1, * }, * }); * const fooServerGroup = new volcengine.clb.ServerGroup("fooServerGroup", { * loadBalancerId: fooClb.id, * serverGroupName: "acc-test-create", * description: "hello demo11", * }); * const fooListener = new volcengine.clb.Listener("fooListener", { * loadBalancerId: fooClb.id, * listenerName: "acc-test-listener", * protocol: "HTTP", * port: 90, * serverGroupId: fooServerGroup.id, * healthCheck: { * enabled: "on", * interval: 10, * timeout: 3, * healthyThreshold: 5, * unHealthyThreshold: 2, * domain: "volcengine.com", * httpCode: "http_2xx", * method: "GET", * uri: "/", * }, * enabled: "on", * }); * const fooListeners = volcengine.clb.getListenersOutput({ * ids: [fooListener.id], * }); * ``` */ /** @deprecated volcengine.clb.Listeners has been deprecated in favor of volcengine.clb.getListeners */ export declare function listenersOutput(args?: ListenersOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<ListenersResult>; /** * A collection of arguments for invoking Listeners. */ export interface ListenersOutputArgs { /** * A list of Listener IDs. */ ids?: pulumi.Input<pulumi.Input<string>[]>; /** * The name of the Listener. */ listenerName?: pulumi.Input<string>; /** * The id of the Clb. */ loadBalancerId?: pulumi.Input<string>; /** * A Name Regex of Listener. */ nameRegex?: pulumi.Input<string>; /** * File name where to save data source results. */ outputFile?: pulumi.Input<string>; }