import * as pulumi from "@pulumi/pulumi"; /** * Manage rules for HTTP route. * * ## Example Usage * * Route which redirect all URL to HTTPs for example.com (Vhost). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const httpsRedirect = new ovh.iploadbalancing.HttpRoute("https_redirect", { * serviceName: "loadbalancer-xxxxxxxxxxxxxxxxxx", * displayName: "Redirect to HTTPS", * weight: 1, * frontendId: 11111, * action: { * status: 302, * target: "https://${host}${path}${arguments}", * type: "redirect", * }, * }); * const exampleRule = new ovh.iploadbalancing.HttpRouteRule("example_rule", { * serviceName: "loadbalancer-xxxxxxxxxxxxxxxxxx", * routeId: httpsRedirect.id, * displayName: "Match example.com host", * field: "host", * match: "is", * negate: false, * pattern: "example.com", * }); * ``` * * Rule which match a specific header (same effect as the host match above). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const exampleRule = new ovh.iploadbalancing.HttpRouteRule("example_rule", { * serviceName: "loadbalancer-xxxxxxxxxxxxxxxxxx", * routeId: httpsRedirect.id, * displayName: "Match example.com Host header", * field: "headers", * match: "is", * negate: false, * pattern: "example.com", * subField: "Host", * }); * ``` * * ## Import * * HTTP route rule can be imported using the following format `service_name`, the `id` of the route and the `id` of the rule separated by "/" e.g. * * bash * * ```sh * $ pulumi import ovh:IpLoadBalancing/httpRouteRule:HttpRouteRule examplerule service_name/route_id/rule_id * ``` */ export declare class HttpRouteRule extends pulumi.CustomResource { /** * Get an existing HttpRouteRule 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?: HttpRouteRuleState, opts?: pulumi.CustomResourceOptions): HttpRouteRule; /** * Returns true if the given object is an instance of HttpRouteRule. 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 HttpRouteRule; /** * Human readable name for your rule, this field is for you */ readonly displayName: pulumi.Output; /** * Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules */ readonly field: pulumi.Output; /** * Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" */ readonly match: pulumi.Output; /** * Invert the matching operator effect */ readonly negate: pulumi.Output; /** * Value to match against this match. Interpretation if this field depends on the match and field */ readonly pattern: pulumi.Output; /** * The route to apply this rule */ readonly routeId: pulumi.Output; /** * The internal name of your IP load balancing */ readonly serviceName: pulumi.Output; /** * Name of sub-field, if applicable. This may be a Cookie or Header name for instance */ readonly subField: pulumi.Output; /** * Create a HttpRouteRule 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: HttpRouteRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering HttpRouteRule resources. */ export interface HttpRouteRuleState { /** * Human readable name for your rule, this field is for you */ displayName?: pulumi.Input; /** * Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules */ field?: pulumi.Input; /** * Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" */ match?: pulumi.Input; /** * Invert the matching operator effect */ negate?: pulumi.Input; /** * Value to match against this match. Interpretation if this field depends on the match and field */ pattern?: pulumi.Input; /** * The route to apply this rule */ routeId?: pulumi.Input; /** * The internal name of your IP load balancing */ serviceName?: pulumi.Input; /** * Name of sub-field, if applicable. This may be a Cookie or Header name for instance */ subField?: pulumi.Input; } /** * The set of arguments for constructing a HttpRouteRule resource. */ export interface HttpRouteRuleArgs { /** * Human readable name for your rule, this field is for you */ displayName?: pulumi.Input; /** * Name of the field to match like "protocol" or "host". See "/ipLoadbalancing/{serviceName}/availableRouteRules" for a list of available rules */ field: pulumi.Input; /** * Matching operator. Not all operators are available for all fields. See "/ipLoadbalancing/{serviceName}/availableRouteRules" */ match: pulumi.Input; /** * Invert the matching operator effect */ negate?: pulumi.Input; /** * Value to match against this match. Interpretation if this field depends on the match and field */ pattern?: pulumi.Input; /** * The route to apply this rule */ routeId: pulumi.Input; /** * The internal name of your IP load balancing */ serviceName: pulumi.Input; /** * Name of sub-field, if applicable. This may be a Cookie or Header name for instance */ subField?: pulumi.Input; }