import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This resource represents load balancer frontend rule. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as upcloud from "@upcloud/pulumi-upcloud"; * * const config = new pulumi.Config(); * const lbZone = config.get("lbZone") || "fi-hel2"; * const lbNetwork = new upcloud.Network("lb_network", { * name: "lb-test-net", * zone: lbZone, * ipNetwork: { * address: "10.0.0.0/24", * dhcp: true, * family: "IPv4", * }, * }); * const lbFe1R1 = new upcloud.LoadbalancerFrontendRule("lb_fe_1_r1", { * frontend: upcloudLoadbalancerFrontend.lbFe1.id, * name: "lb-fe-1-r1-test", * priority: 10, * matchers: { * srcIps: [{ * value: "192.168.0.0/24", * }], * }, * actions: { * httpRewritePaths: [{ * matchPattern: "^/old/(.*)$", * rewriteTo: "/new/\\1", * }], * useBackends: [{ * backendName: upcloudLoadbalancerBackend.lbBe1.name, * }], * }, * }); * const lbFe1 = new upcloud.LoadbalancerFrontend("lb_fe_1", { * loadbalancer: upcloudLoadbalancer.lb.id, * name: "lb-fe-1-test", * mode: "http", * port: 8080, * defaultBackendName: upcloudLoadbalancerBackend.lbBe1.name, * }); * const lb = new upcloud.Loadbalancer("lb", { * configuredStatus: "started", * name: "lb-test", * plan: "development", * zone: lbZone, * networks: [ * { * type: "public", * family: "IPv4", * name: "public", * }, * { * type: "private", * family: "IPv4", * name: "private", * network: upcloudNetwork.lbNetwork.id, * }, * ], * }); * const lbBe1 = new upcloud.LoadbalancerBackend("lb_be_1", { * loadbalancer: upcloudLoadbalancer.lb.id, * name: "lb-be-1-test", * }); * ``` */ export declare class LoadbalancerFrontendRule extends pulumi.CustomResource { /** * Get an existing LoadbalancerFrontendRule 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. */ static get(name: string, id: pulumi.Input, state?: LoadbalancerFrontendRuleState, opts?: pulumi.CustomResourceOptions): LoadbalancerFrontendRule; /** * Returns true if the given object is an instance of LoadbalancerFrontendRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LoadbalancerFrontendRule; /** * Rule actions. */ readonly actions: pulumi.Output; /** * ID of the load balancer frontend to which the frontend rule is connected. */ readonly frontend: pulumi.Output; /** * Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. */ readonly matchers: pulumi.Output; /** * Defines boolean operator used to combine multiple matchers. Defaults to `and`. */ readonly matchingCondition: pulumi.Output; /** * The name of the frontend rule. Must be unique within the frontend. */ readonly name: pulumi.Output; /** * Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. */ readonly priority: pulumi.Output; /** * Create a LoadbalancerFrontendRule 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: LoadbalancerFrontendRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LoadbalancerFrontendRule resources. */ export interface LoadbalancerFrontendRuleState { /** * Rule actions. */ actions?: pulumi.Input; /** * ID of the load balancer frontend to which the frontend rule is connected. */ frontend?: pulumi.Input; /** * Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. */ matchers?: pulumi.Input; /** * Defines boolean operator used to combine multiple matchers. Defaults to `and`. */ matchingCondition?: pulumi.Input; /** * The name of the frontend rule. Must be unique within the frontend. */ name?: pulumi.Input; /** * Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. */ priority?: pulumi.Input; } /** * The set of arguments for constructing a LoadbalancerFrontendRule resource. */ export interface LoadbalancerFrontendRuleArgs { /** * Rule actions. */ actions?: pulumi.Input; /** * ID of the load balancer frontend to which the frontend rule is connected. */ frontend: pulumi.Input; /** * Set of rule matchers. If rule doesn't have matchers, then action applies to all incoming requests. */ matchers?: pulumi.Input; /** * Defines boolean operator used to combine multiple matchers. Defaults to `and`. */ matchingCondition?: pulumi.Input; /** * The name of the frontend rule. Must be unique within the frontend. */ name?: pulumi.Input; /** * Rule with the higher priority goes first. Rules with the same priority processed in alphabetical order. */ priority: pulumi.Input; }