Show / Hide Table of Contents

Class L7PolicyV2

Manages a Load Balancer L7 Policy resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
    {
        AdminStateUp = "true",
    });
    var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
    {
        Cidr = "192.168.199.0/24",
        IpVersion = 4,
        NetworkId = network1.Id,
    });
    var loadbalancer1 = new OpenStack.LoadBalancer.LoadBalancer("loadbalancer1", new OpenStack.LoadBalancer.LoadBalancerArgs
    {
        VipSubnetId = subnet1.Id,
    });
    var listener1 = new OpenStack.LoadBalancer.Listener("listener1", new OpenStack.LoadBalancer.ListenerArgs
    {
        LoadbalancerId = loadbalancer1.Id,
        Protocol = "HTTP",
        ProtocolPort = 8080,
    });
    var pool1 = new OpenStack.LoadBalancer.Pool("pool1", new OpenStack.LoadBalancer.PoolArgs
    {
        LbMethod = "ROUND_ROBIN",
        LoadbalancerId = loadbalancer1.Id,
        Protocol = "HTTP",
    });
    var l7policy1 = new OpenStack.LoadBalancer.L7PolicyV2("l7policy1", new OpenStack.LoadBalancer.L7PolicyV2Args
    {
        Action = "REDIRECT_TO_POOL",
        Description = "test l7 policy",
        ListenerId = listener1.Id,
        Position = 1,
        RedirectPoolId = pool1.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
L7PolicyV2
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.LoadBalancer
Assembly: Pulumi.OpenStack.dll
Syntax
public class L7PolicyV2 : CustomResource

Constructors

View Source

L7PolicyV2(String, L7PolicyV2Args, CustomResourceOptions)

Create a L7PolicyV2 resource with the given unique name, arguments, and options.

Declaration
public L7PolicyV2(string name, L7PolicyV2Args args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

L7PolicyV2Args args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Action

The L7 Policy action - can either be REDIRECT_TO_POOL, REDIRECT_TO_URL or REJECT.

Declaration
public Output<string> Action { get; }
Property Value
Type Description
Output<System.String>
View Source

AdminStateUp

The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).

Declaration
public Output<bool?> AdminStateUp { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Description

Human-readable description for the L7 Policy.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

ListenerId

The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.

Declaration
public Output<string> ListenerId { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Human-readable name for the L7 Policy. Does not have to be unique.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Position

The position of this policy on the listener. Positions start at 1.

Declaration
public Output<int> Position { get; }
Property Value
Type Description
Output<System.Int32>
View Source

RedirectPoolId

Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT_TO_POOL.

Declaration
public Output<string> RedirectPoolId { get; }
Property Value
Type Description
Output<System.String>
View Source

RedirectUrl

Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT_TO_URL.

Declaration
public Output<string> RedirectUrl { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

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 Policy.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

TenantId

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.

Declaration
public Output<string> TenantId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, L7PolicyV2State, CustomResourceOptions)

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

Declaration
public static L7PolicyV2 Get(string name, Input<string> id, L7PolicyV2State state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

L7PolicyV2State state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
L7PolicyV2
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.