// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class LbRule extends pulumi.CustomResource { /** * Get an existing LbRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ public static get(name: string, id: pulumi.Input, state?: LbRuleState, opts?: pulumi.CustomResourceOptions): LbRule { return new LbRule(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/lbRule:LbRule'; /** * Returns true if the given object is an instance of LbRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is LbRule { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === LbRule.__pulumiType; } /** * Balancer incoming traffic TCP port */ declare public readonly balancerPort: pulumi.Output; /** * Balancer incoming traffic protocol */ declare public readonly balancerProto: pulumi.Output; /** * ID of target balancer */ declare public readonly lbId: pulumi.Output; declare public readonly lbRuleId: pulumi.Output; /** * Server incoming traffic TCP port */ declare public readonly serverPort: pulumi.Output; /** * Server incoming traffic protocol */ declare public readonly serverProto: pulumi.Output; /** * Create a LbRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LbRuleArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: LbRuleArgs | LbRuleState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as LbRuleState | undefined; resourceInputs["balancerPort"] = state?.balancerPort; resourceInputs["balancerProto"] = state?.balancerProto; resourceInputs["lbId"] = state?.lbId; resourceInputs["lbRuleId"] = state?.lbRuleId; resourceInputs["serverPort"] = state?.serverPort; resourceInputs["serverProto"] = state?.serverProto; } else { const args = argsOrState as LbRuleArgs | undefined; if (args?.balancerPort === undefined && !opts.urn) { throw new Error("Missing required property 'balancerPort'"); } if (args?.balancerProto === undefined && !opts.urn) { throw new Error("Missing required property 'balancerProto'"); } if (args?.lbId === undefined && !opts.urn) { throw new Error("Missing required property 'lbId'"); } if (args?.serverPort === undefined && !opts.urn) { throw new Error("Missing required property 'serverPort'"); } if (args?.serverProto === undefined && !opts.urn) { throw new Error("Missing required property 'serverProto'"); } resourceInputs["balancerPort"] = args?.balancerPort; resourceInputs["balancerProto"] = args?.balancerProto; resourceInputs["lbId"] = args?.lbId; resourceInputs["lbRuleId"] = args?.lbRuleId; resourceInputs["serverPort"] = args?.serverPort; resourceInputs["serverProto"] = args?.serverProto; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(LbRule.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering LbRule resources. */ export interface LbRuleState { /** * Balancer incoming traffic TCP port */ balancerPort?: pulumi.Input; /** * Balancer incoming traffic protocol */ balancerProto?: pulumi.Input; /** * ID of target balancer */ lbId?: pulumi.Input; lbRuleId?: pulumi.Input; /** * Server incoming traffic TCP port */ serverPort?: pulumi.Input; /** * Server incoming traffic protocol */ serverProto?: pulumi.Input; } /** * The set of arguments for constructing a LbRule resource. */ export interface LbRuleArgs { /** * Balancer incoming traffic TCP port */ balancerPort: pulumi.Input; /** * Balancer incoming traffic protocol */ balancerProto: pulumi.Input; /** * ID of target balancer */ lbId: pulumi.Input; lbRuleId?: pulumi.Input; /** * Server incoming traffic TCP port */ serverPort: pulumi.Input; /** * Server incoming traffic protocol */ serverProto: pulumi.Input; }