1. Packages
  2. OpenStack
  3. API Docs
  4. loadbalancer
  5. L7RuleV2
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.loadbalancer.L7RuleV2

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Manages a V2 L7 Rule resource within OpenStack.

    Example Usage

    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_URL",
        description: "test description",
        position: 1,
        listenerId: listener1.id,
        redirectUrl: "http://www.example.com",
    });
    const l7rule1 = new openstack.loadbalancer.L7RuleV2("l7rule_1", {
        l7policyId: l7policy1.id,
        type: "PATH",
        compareType: "EQUAL_TO",
        value: "/api",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network_1",
        name="network_1",
        admin_state_up=True)
    subnet1 = openstack.networking.Subnet("subnet_1",
        name="subnet_1",
        cidr="192.168.199.0/24",
        ip_version=4,
        network_id=network1.id)
    loadbalancer1 = openstack.loadbalancer.LoadBalancer("loadbalancer_1",
        name="loadbalancer_1",
        vip_subnet_id=subnet1.id)
    listener1 = openstack.loadbalancer.Listener("listener_1",
        name="listener_1",
        protocol="HTTP",
        protocol_port=8080,
        loadbalancer_id=loadbalancer1.id)
    pool1 = openstack.loadbalancer.Pool("pool_1",
        name="pool_1",
        protocol="HTTP",
        lb_method="ROUND_ROBIN",
        loadbalancer_id=loadbalancer1.id)
    l7policy1 = openstack.loadbalancer.L7PolicyV2("l7policy_1",
        name="test",
        action="REDIRECT_TO_URL",
        description="test description",
        position=1,
        listener_id=listener1.id,
        redirect_url="http://www.example.com")
    l7rule1 = openstack.loadbalancer.L7RuleV2("l7rule_1",
        l7policy_id=l7policy1.id,
        type="PATH",
        compare_type="EQUAL_TO",
        value="/api")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/loadbalancer"
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := networking.NewNetwork(ctx, "network_1", &networking.NetworkArgs{
    			Name:         pulumi.String("network_1"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		subnet1, err := networking.NewSubnet(ctx, "subnet_1", &networking.SubnetArgs{
    			Name:      pulumi.String("subnet_1"),
    			Cidr:      pulumi.String("192.168.199.0/24"),
    			IpVersion: pulumi.Int(4),
    			NetworkId: network1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		loadbalancer1, err := loadbalancer.NewLoadBalancer(ctx, "loadbalancer_1", &loadbalancer.LoadBalancerArgs{
    			Name:        pulumi.String("loadbalancer_1"),
    			VipSubnetId: subnet1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		listener1, err := loadbalancer.NewListener(ctx, "listener_1", &loadbalancer.ListenerArgs{
    			Name:           pulumi.String("listener_1"),
    			Protocol:       pulumi.String("HTTP"),
    			ProtocolPort:   pulumi.Int(8080),
    			LoadbalancerId: loadbalancer1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = loadbalancer.NewPool(ctx, "pool_1", &loadbalancer.PoolArgs{
    			Name:           pulumi.String("pool_1"),
    			Protocol:       pulumi.String("HTTP"),
    			LbMethod:       pulumi.String("ROUND_ROBIN"),
    			LoadbalancerId: loadbalancer1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		l7policy1, err := loadbalancer.NewL7PolicyV2(ctx, "l7policy_1", &loadbalancer.L7PolicyV2Args{
    			Name:        pulumi.String("test"),
    			Action:      pulumi.String("REDIRECT_TO_URL"),
    			Description: pulumi.String("test description"),
    			Position:    pulumi.Int(1),
    			ListenerId:  listener1.ID(),
    			RedirectUrl: pulumi.String("http://www.example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = loadbalancer.NewL7RuleV2(ctx, "l7rule_1", &loadbalancer.L7RuleV2Args{
    			L7policyId:  l7policy1.ID(),
    			Type:        pulumi.String("PATH"),
    			CompareType: pulumi.String("EQUAL_TO"),
    			Value:       pulumi.String("/api"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network_1", new()
        {
            Name = "network_1",
            AdminStateUp = true,
        });
    
        var subnet1 = new OpenStack.Networking.Subnet("subnet_1", new()
        {
            Name = "subnet_1",
            Cidr = "192.168.199.0/24",
            IpVersion = 4,
            NetworkId = network1.Id,
        });
    
        var loadbalancer1 = new OpenStack.LoadBalancer.LoadBalancer("loadbalancer_1", new()
        {
            Name = "loadbalancer_1",
            VipSubnetId = subnet1.Id,
        });
    
        var listener1 = new OpenStack.LoadBalancer.Listener("listener_1", new()
        {
            Name = "listener_1",
            Protocol = "HTTP",
            ProtocolPort = 8080,
            LoadbalancerId = loadbalancer1.Id,
        });
    
        var pool1 = new OpenStack.LoadBalancer.Pool("pool_1", new()
        {
            Name = "pool_1",
            Protocol = "HTTP",
            LbMethod = "ROUND_ROBIN",
            LoadbalancerId = loadbalancer1.Id,
        });
    
        var l7policy1 = new OpenStack.LoadBalancer.L7PolicyV2("l7policy_1", new()
        {
            Name = "test",
            Action = "REDIRECT_TO_URL",
            Description = "test description",
            Position = 1,
            ListenerId = listener1.Id,
            RedirectUrl = "http://www.example.com",
        });
    
        var l7rule1 = new OpenStack.LoadBalancer.L7RuleV2("l7rule_1", new()
        {
            L7policyId = l7policy1.Id,
            Type = "PATH",
            CompareType = "EQUAL_TO",
            Value = "/api",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.networking.Subnet;
    import com.pulumi.openstack.networking.SubnetArgs;
    import com.pulumi.openstack.loadbalancer.LoadBalancer;
    import com.pulumi.openstack.loadbalancer.LoadBalancerArgs;
    import com.pulumi.openstack.loadbalancer.Listener;
    import com.pulumi.openstack.loadbalancer.ListenerArgs;
    import com.pulumi.openstack.loadbalancer.Pool;
    import com.pulumi.openstack.loadbalancer.PoolArgs;
    import com.pulumi.openstack.loadbalancer.L7PolicyV2;
    import com.pulumi.openstack.loadbalancer.L7PolicyV2Args;
    import com.pulumi.openstack.loadbalancer.L7RuleV2;
    import com.pulumi.openstack.loadbalancer.L7RuleV2Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network1 = new Network("network1", NetworkArgs.builder()        
                .name("network_1")
                .adminStateUp("true")
                .build());
    
            var subnet1 = new Subnet("subnet1", SubnetArgs.builder()        
                .name("subnet_1")
                .cidr("192.168.199.0/24")
                .ipVersion(4)
                .networkId(network1.id())
                .build());
    
            var loadbalancer1 = new LoadBalancer("loadbalancer1", LoadBalancerArgs.builder()        
                .name("loadbalancer_1")
                .vipSubnetId(subnet1.id())
                .build());
    
            var listener1 = new Listener("listener1", ListenerArgs.builder()        
                .name("listener_1")
                .protocol("HTTP")
                .protocolPort(8080)
                .loadbalancerId(loadbalancer1.id())
                .build());
    
            var pool1 = new Pool("pool1", PoolArgs.builder()        
                .name("pool_1")
                .protocol("HTTP")
                .lbMethod("ROUND_ROBIN")
                .loadbalancerId(loadbalancer1.id())
                .build());
    
            var l7policy1 = new L7PolicyV2("l7policy1", L7PolicyV2Args.builder()        
                .name("test")
                .action("REDIRECT_TO_URL")
                .description("test description")
                .position(1)
                .listenerId(listener1.id())
                .redirectUrl("http://www.example.com")
                .build());
    
            var l7rule1 = new L7RuleV2("l7rule1", L7RuleV2Args.builder()        
                .l7policyId(l7policy1.id())
                .type("PATH")
                .compareType("EQUAL_TO")
                .value("/api")
                .build());
    
        }
    }
    
    resources:
      network1:
        type: openstack:networking:Network
        name: network_1
        properties:
          name: network_1
          adminStateUp: 'true'
      subnet1:
        type: openstack:networking:Subnet
        name: subnet_1
        properties:
          name: subnet_1
          cidr: 192.168.199.0/24
          ipVersion: 4
          networkId: ${network1.id}
      loadbalancer1:
        type: openstack:loadbalancer:LoadBalancer
        name: loadbalancer_1
        properties:
          name: loadbalancer_1
          vipSubnetId: ${subnet1.id}
      listener1:
        type: openstack:loadbalancer:Listener
        name: listener_1
        properties:
          name: listener_1
          protocol: HTTP
          protocolPort: 8080
          loadbalancerId: ${loadbalancer1.id}
      pool1:
        type: openstack:loadbalancer:Pool
        name: pool_1
        properties:
          name: pool_1
          protocol: HTTP
          lbMethod: ROUND_ROBIN
          loadbalancerId: ${loadbalancer1.id}
      l7policy1:
        type: openstack:loadbalancer:L7PolicyV2
        name: l7policy_1
        properties:
          name: test
          action: REDIRECT_TO_URL
          description: test description
          position: 1
          listenerId: ${listener1.id}
          redirectUrl: http://www.example.com
      l7rule1:
        type: openstack:loadbalancer:L7RuleV2
        name: l7rule_1
        properties:
          l7policyId: ${l7policy1.id}
          type: PATH
          compareType: EQUAL_TO
          value: /api
    

    Create L7RuleV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new L7RuleV2(name: string, args: L7RuleV2Args, opts?: CustomResourceOptions);
    @overload
    def L7RuleV2(resource_name: str,
                 args: L7RuleV2Args,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def L7RuleV2(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 compare_type: Optional[str] = None,
                 l7policy_id: Optional[str] = None,
                 type: Optional[str] = None,
                 value: Optional[str] = None,
                 admin_state_up: Optional[bool] = None,
                 invert: Optional[bool] = None,
                 key: Optional[str] = None,
                 region: Optional[str] = None,
                 tenant_id: Optional[str] = None)
    func NewL7RuleV2(ctx *Context, name string, args L7RuleV2Args, opts ...ResourceOption) (*L7RuleV2, error)
    public L7RuleV2(string name, L7RuleV2Args args, CustomResourceOptions? opts = null)
    public L7RuleV2(String name, L7RuleV2Args args)
    public L7RuleV2(String name, L7RuleV2Args args, CustomResourceOptions options)
    
    type: openstack:loadbalancer:L7RuleV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args L7RuleV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args L7RuleV2Args
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args L7RuleV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args L7RuleV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args L7RuleV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var l7ruleV2Resource = new OpenStack.LoadBalancer.L7RuleV2("l7ruleV2Resource", new()
    {
        CompareType = "string",
        L7policyId = "string",
        Type = "string",
        Value = "string",
        AdminStateUp = false,
        Invert = false,
        Key = "string",
        Region = "string",
        TenantId = "string",
    });
    
    example, err := loadbalancer.NewL7RuleV2(ctx, "l7ruleV2Resource", &loadbalancer.L7RuleV2Args{
    	CompareType:  pulumi.String("string"),
    	L7policyId:   pulumi.String("string"),
    	Type:         pulumi.String("string"),
    	Value:        pulumi.String("string"),
    	AdminStateUp: pulumi.Bool(false),
    	Invert:       pulumi.Bool(false),
    	Key:          pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	TenantId:     pulumi.String("string"),
    })
    
    var l7ruleV2Resource = new L7RuleV2("l7ruleV2Resource", L7RuleV2Args.builder()
        .compareType("string")
        .l7policyId("string")
        .type("string")
        .value("string")
        .adminStateUp(false)
        .invert(false)
        .key("string")
        .region("string")
        .tenantId("string")
        .build());
    
    l7rule_v2_resource = openstack.loadbalancer.L7RuleV2("l7ruleV2Resource",
        compare_type="string",
        l7policy_id="string",
        type="string",
        value="string",
        admin_state_up=False,
        invert=False,
        key="string",
        region="string",
        tenant_id="string")
    
    const l7ruleV2Resource = new openstack.loadbalancer.L7RuleV2("l7ruleV2Resource", {
        compareType: "string",
        l7policyId: "string",
        type: "string",
        value: "string",
        adminStateUp: false,
        invert: false,
        key: "string",
        region: "string",
        tenantId: "string",
    });
    
    type: openstack:loadbalancer:L7RuleV2
    properties:
        adminStateUp: false
        compareType: string
        invert: false
        key: string
        l7policyId: string
        region: string
        tenantId: string
        type: string
        value: string
    

    L7RuleV2 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The L7RuleV2 resource accepts the following input properties:

    CompareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    L7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    Type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    Value string
    The value to use for the comparison. For example, the file type to compare.
    AdminStateUp bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    Invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    Key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    TenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    CompareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    L7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    Type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    Value string
    The value to use for the comparison. For example, the file type to compare.
    AdminStateUp bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    Invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    Key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    TenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    compareType String
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    l7policyId String
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    type String
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value String
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp Boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    invert Boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key String
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId String
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    compareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    l7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value string
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    invert boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    compare_type str
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    l7policy_id str
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    type str
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value str
    The value to use for the comparison. For example, the file type to compare.
    admin_state_up bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key str
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenant_id str
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    compareType String
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    l7policyId String
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    type String
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value String
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp Boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    invert Boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key String
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId String
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the L7RuleV2 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ListenerId string
    The ID of the Listener owning this resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    ListenerId string
    The ID of the Listener owning this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    listenerId String
    The ID of the Listener owning this resource.
    id string
    The provider-assigned unique ID for this managed resource.
    listenerId string
    The ID of the Listener owning this resource.
    id str
    The provider-assigned unique ID for this managed resource.
    listener_id str
    The ID of the Listener owning this resource.
    id String
    The provider-assigned unique ID for this managed resource.
    listenerId String
    The ID of the Listener owning this resource.

    Look up Existing L7RuleV2 Resource

    Get an existing L7RuleV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: L7RuleV2State, opts?: CustomResourceOptions): L7RuleV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin_state_up: Optional[bool] = None,
            compare_type: Optional[str] = None,
            invert: Optional[bool] = None,
            key: Optional[str] = None,
            l7policy_id: Optional[str] = None,
            listener_id: Optional[str] = None,
            region: Optional[str] = None,
            tenant_id: Optional[str] = None,
            type: Optional[str] = None,
            value: Optional[str] = None) -> L7RuleV2
    func GetL7RuleV2(ctx *Context, name string, id IDInput, state *L7RuleV2State, opts ...ResourceOption) (*L7RuleV2, error)
    public static L7RuleV2 Get(string name, Input<string> id, L7RuleV2State? state, CustomResourceOptions? opts = null)
    public static L7RuleV2 get(String name, Output<String> id, L7RuleV2State state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdminStateUp bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    CompareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    Invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    Key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    L7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    ListenerId string
    The ID of the Listener owning this resource.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    TenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    Type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    Value string
    The value to use for the comparison. For example, the file type to compare.
    AdminStateUp bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    CompareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    Invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    Key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    L7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    ListenerId string
    The ID of the Listener owning this resource.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    TenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    Type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    Value string
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp Boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    compareType String
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    invert Boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key String
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    l7policyId String
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    listenerId String
    The ID of the Listener owning this resource.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId String
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    type String
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value String
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    compareType string
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    invert boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key string
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    l7policyId string
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    listenerId string
    The ID of the Listener owning this resource.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId string
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    type string
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value string
    The value to use for the comparison. For example, the file type to compare.
    admin_state_up bool
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    compare_type str
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    invert bool
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key str
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    l7policy_id str
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    listener_id str
    The ID of the Listener owning this resource.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenant_id str
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    type str
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value str
    The value to use for the comparison. For example, the file type to compare.
    adminStateUp Boolean
    The administrative state of the L7 Rule. A valid value is true (UP) or false (DOWN).
    compareType String
    The comparison type for the L7 rule - can either be CONTAINS, STARTS_WITH, ENDS_WITH, EQUAL_TO or REGEX
    invert Boolean
    When true the logic of the rule is inverted. For example, with invert true, equal to would become not equal to. Default is false.
    key String
    The key to use for the comparison. For example, the name of the cookie to evaluate. Valid when type is set to COOKIE or HEADER.
    l7policyId String
    The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
    listenerId String
    The ID of the Listener owning this resource.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create an . If omitted, the region argument of the provider is used. Changing this creates a new L7 Rule.
    tenantId String
    Required for admins. The UUID of the tenant who owns the L7 Rule. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new L7 Rule.
    type String
    The L7 Rule type - can either be COOKIE, FILE_TYPE, HEADER, HOST_NAME or PATH.
    value String
    The value to use for the comparison. For example, the file type to compare.

    Import

    Load Balancer L7 Rule can be imported using the L7 Policy ID and L7 Rule ID separated by a slash, e.g.:

    $ pulumi import openstack:loadbalancer/l7RuleV2:L7RuleV2 l7rule_1 e0bd694a-abbe-450e-b329-0931fd1cc5eb/4086b0c9-b18c-4d1c-b6b8-4c56c3ad2a9e
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi