Class L7PolicyV2


  • public class L7PolicyV2
    extends com.pulumi.resources.CustomResource
    Manages a Load Balancer L7 Policy resource within OpenStack. ## Example Usage ```java 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 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() .adminStateUp("true") .build()); var subnet1 = new Subnet("subnet1", SubnetArgs.builder() .cidr("192.168.199.0/24") .ipVersion(4) .networkId(network1.id()) .build()); var loadbalancer1 = new LoadBalancer("loadbalancer1", LoadBalancerArgs.builder() .vipSubnetId(subnet1.id()) .build()); var listener1 = new Listener("listener1", ListenerArgs.builder() .protocol("HTTP") .protocolPort(8080) .loadbalancerId(loadbalancer1.id()) .build()); var pool1 = new Pool("pool1", PoolArgs.builder() .protocol("HTTP") .lbMethod("ROUND_ROBIN") .loadbalancerId(loadbalancer1.id()) .build()); var l7policy1 = new L7PolicyV2("l7policy1", L7PolicyV2Args.builder() .action("REDIRECT_TO_POOL") .description("test l7 policy") .position(1) .listenerId(listener1.id()) .redirectPoolId(pool1.id()) .build()); } } ``` ## 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 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> action()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> adminStateUp()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      static L7PolicyV2 get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, L7PolicyV2State state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> listenerId()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.Integer> position()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> redirectPoolId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> redirectUrl()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> tenantId()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • L7PolicyV2

        public L7PolicyV2​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • L7PolicyV2

        public L7PolicyV2​(java.lang.String name,
                          L7PolicyV2Args args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • L7PolicyV2

        public L7PolicyV2​(java.lang.String name,
                          L7PolicyV2Args args,
                          @Nullable
                          com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • action

        public com.pulumi.core.Output<java.lang.String> action()
        Returns:
        The L7 Policy action - can either be REDIRECT\_TO\_POOL, REDIRECT\_TO\_URL or REJECT.
      • adminStateUp

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> adminStateUp()
        Returns:
        The administrative state of the L7 Policy. A valid value is true (UP) or false (DOWN).
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Human-readable description for the L7 Policy.
      • listenerId

        public com.pulumi.core.Output<java.lang.String> listenerId()
        Returns:
        The Listener on which the L7 Policy will be associated with. Changing this creates a new L7 Policy.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Human-readable name for the L7 Policy. Does not have to be unique.
      • position

        public com.pulumi.core.Output<java.lang.Integer> position()
        Returns:
        The position of this policy on the listener. Positions start at 1.
      • redirectPoolId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> redirectPoolId()
        Returns:
        Requests matching this policy will be redirected to the pool with this ID. Only valid if action is REDIRECT\_TO\_POOL.
      • redirectUrl

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> redirectUrl()
        Returns:
        Requests matching this policy will be redirected to this URL. Only valid if action is REDIRECT\_TO\_URL.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        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.
      • tenantId

        public com.pulumi.core.Output<java.lang.String> tenantId()
        Returns:
        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.
      • get

        public static L7PolicyV2 get​(java.lang.String name,
                                     com.pulumi.core.Output<java.lang.String> id,
                                     @Nullable
                                     L7PolicyV2State state,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.