UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

279 lines (278 loc) • 10.2 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a Load Balancer L7 Policy resource within OpenStack. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const network1 = new openstack.networking.Network("network_1", { * name: "network_1", * adminStateUp: true, * }); * const subnet1 = new openstack.networking.Subnet("subnet_1", { * name: "subnet_1", * cidr: "192.168.199.0/24", * ipVersion: 4, * networkId: network1.id, * }); * const loadbalancer1 = new openstack.loadbalancer.LoadBalancer("loadbalancer_1", { * name: "loadbalancer_1", * vipSubnetId: subnet1.id, * }); * const listener1 = new openstack.loadbalancer.Listener("listener_1", { * name: "listener_1", * protocol: "HTTP", * protocolPort: 8080, * loadbalancerId: loadbalancer1.id, * }); * const pool1 = new openstack.loadbalancer.Pool("pool_1", { * name: "pool_1", * protocol: "HTTP", * lbMethod: "ROUND_ROBIN", * loadbalancerId: loadbalancer1.id, * }); * const l7policy1 = new openstack.loadbalancer.L7PolicyV2("l7policy_1", { * name: "test", * action: "REDIRECT_TO_POOL", * description: "test l7 policy", * position: 1, * listenerId: listener1.id, * redirectPoolId: pool1.id, * }); * ``` * * ## Import * * Load Balancer L7 Policy can be imported using the L7 Policy ID, e.g.: * * ```sh * $ pulumi import openstack:loadbalancer/l7PolicyV2:L7PolicyV2 l7policy_1 8a7a79c2-cf17-4e65-b2ae-ddc8bfcf6c74 * ``` */ export declare class L7PolicyV2 extends pulumi.CustomResource { /** * Get an existing L7PolicyV2 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<pulumi.ID>, state?: L7PolicyV2State, opts?: pulumi.CustomResourceOptions): L7PolicyV2; /** * Returns true if the given object is an instance of L7PolicyV2. 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 L7PolicyV2; /** * The L7 Policy action - can either be REDIRECT\_TO\_POOL, * REDIRECT\_TO\_URL or REJECT. */ readonly action: pulumi.Output<string>; /** * The administrative state of the L7 Policy. * A valid value is true (UP) or false (DOWN). */ readonly adminStateUp: pulumi.Output<boolean | undefined>; /** * Human-readable description for the L7 Policy. */ readonly description: pulumi.Output<string | undefined>; /** * The Listener on which the L7 Policy will be associated with. * Changing this creates a new L7 Policy. */ readonly listenerId: pulumi.Output<string>; /** * Human-readable name for the L7 Policy. Does not have * to be unique. */ readonly name: pulumi.Output<string>; /** * The position of this policy on the listener. Positions start at 1. */ readonly position: pulumi.Output<number>; /** * Integer. Requests matching this policy will be * redirected to the specified URL or Prefix URL with the HTTP response code. * Valid if action is REDIRECT\_TO\_URL or REDIRECT\_PREFIX. Valid options are: * 301, 302, 303, 307, or 308. Default is 302. New in octavia version 2.9 */ readonly redirectHttpCode: pulumi.Output<number>; /** * Requests matching this policy will be redirected to the * pool with this ID. Only valid if action is REDIRECT\_TO\_POOL. */ readonly redirectPoolId: pulumi.Output<string | undefined>; /** * Requests matching this policy will be redirected to * this Prefix URL. Only valid if action is REDIRECT\_PREFIX. */ readonly redirectPrefix: pulumi.Output<string | undefined>; /** * Requests matching this policy will be redirected to this URL. * Only valid if action is REDIRECT\_TO\_URL. */ readonly redirectUrl: pulumi.Output<string | undefined>; /** * The region in which to obtain the V2 Networking client. * A Networking client is needed to create an L7 policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * L7 Policy. */ readonly region: pulumi.Output<string>; /** * Required for admins. The UUID of the tenant who owns * the L7 Policy. Only administrative users can specify a tenant UUID * other than their own. Changing this creates a new L7 Policy. */ readonly tenantId: pulumi.Output<string>; /** * Create a L7PolicyV2 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: L7PolicyV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering L7PolicyV2 resources. */ export interface L7PolicyV2State { /** * The L7 Policy action - can either be REDIRECT\_TO\_POOL, * REDIRECT\_TO\_URL or REJECT. */ action?: pulumi.Input<string>; /** * The administrative state of the L7 Policy. * A valid value is true (UP) or false (DOWN). */ adminStateUp?: pulumi.Input<boolean>; /** * Human-readable description for the L7 Policy. */ description?: pulumi.Input<string>; /** * The Listener on which the L7 Policy will be associated with. * Changing this creates a new L7 Policy. */ listenerId?: pulumi.Input<string>; /** * Human-readable name for the L7 Policy. Does not have * to be unique. */ name?: pulumi.Input<string>; /** * The position of this policy on the listener. Positions start at 1. */ position?: pulumi.Input<number>; /** * Integer. Requests matching this policy will be * redirected to the specified URL or Prefix URL with the HTTP response code. * Valid if action is REDIRECT\_TO\_URL or REDIRECT\_PREFIX. Valid options are: * 301, 302, 303, 307, or 308. Default is 302. New in octavia version 2.9 */ redirectHttpCode?: pulumi.Input<number>; /** * Requests matching this policy will be redirected to the * pool with this ID. Only valid if action is REDIRECT\_TO\_POOL. */ redirectPoolId?: pulumi.Input<string>; /** * Requests matching this policy will be redirected to * this Prefix URL. Only valid if action is REDIRECT\_PREFIX. */ redirectPrefix?: pulumi.Input<string>; /** * Requests matching this policy will be redirected to this URL. * Only valid if action is REDIRECT\_TO\_URL. */ redirectUrl?: pulumi.Input<string>; /** * The region in which to obtain the V2 Networking client. * A Networking client is needed to create an L7 policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * L7 Policy. */ region?: pulumi.Input<string>; /** * Required for admins. The UUID of the tenant who owns * the L7 Policy. Only administrative users can specify a tenant UUID * other than their own. Changing this creates a new L7 Policy. */ tenantId?: pulumi.Input<string>; } /** * The set of arguments for constructing a L7PolicyV2 resource. */ export interface L7PolicyV2Args { /** * The L7 Policy action - can either be REDIRECT\_TO\_POOL, * REDIRECT\_TO\_URL or REJECT. */ action: pulumi.Input<string>; /** * The administrative state of the L7 Policy. * A valid value is true (UP) or false (DOWN). */ adminStateUp?: pulumi.Input<boolean>; /** * Human-readable description for the L7 Policy. */ description?: pulumi.Input<string>; /** * The Listener on which the L7 Policy will be associated with. * Changing this creates a new L7 Policy. */ listenerId: pulumi.Input<string>; /** * Human-readable name for the L7 Policy. Does not have * to be unique. */ name?: pulumi.Input<string>; /** * The position of this policy on the listener. Positions start at 1. */ position?: pulumi.Input<number>; /** * Integer. Requests matching this policy will be * redirected to the specified URL or Prefix URL with the HTTP response code. * Valid if action is REDIRECT\_TO\_URL or REDIRECT\_PREFIX. Valid options are: * 301, 302, 303, 307, or 308. Default is 302. New in octavia version 2.9 */ redirectHttpCode?: pulumi.Input<number>; /** * Requests matching this policy will be redirected to the * pool with this ID. Only valid if action is REDIRECT\_TO\_POOL. */ redirectPoolId?: pulumi.Input<string>; /** * Requests matching this policy will be redirected to * this Prefix URL. Only valid if action is REDIRECT\_PREFIX. */ redirectPrefix?: pulumi.Input<string>; /** * Requests matching this policy will be redirected to this URL. * Only valid if action is REDIRECT\_TO\_URL. */ redirectUrl?: pulumi.Input<string>; /** * The region in which to obtain the V2 Networking client. * A Networking client is needed to create an L7 policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * L7 Policy. */ region?: pulumi.Input<string>; /** * Required for admins. The UUID of the tenant who owns * the L7 Policy. Only administrative users can specify a tenant UUID * other than their own. Changing this creates a new L7 Policy. */ tenantId?: pulumi.Input<string>; }