Class L7RuleV2


  • public class L7RuleV2
    extends com.pulumi.resources.CustomResource
    Manages a V2 L7 Rule 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 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() .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_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()); } } ``` ## Import Load Balancer L7 Rule can be imported using the L7 Policy ID and L7 Rule ID separated by a slash, e.g.: ```sh $ pulumi import openstack:loadbalancer/l7RuleV2:L7RuleV2 l7rule_1 e0bd694a-abbe-450e-b329-0931fd1cc5eb/4086b0c9-b18c-4d1c-b6b8-4c56c3ad2a9e ```
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      L7RuleV2​(java.lang.String name)  
      L7RuleV2​(java.lang.String name, L7RuleV2Args args)  
      L7RuleV2​(java.lang.String name, L7RuleV2Args args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> adminStateUp()  
      com.pulumi.core.Output<java.lang.String> compareType()  
      static L7RuleV2 get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, L7RuleV2State 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.util.Optional<java.lang.Boolean>> invert()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> key()  
      com.pulumi.core.Output<java.lang.String> l7policyId()  
      com.pulumi.core.Output<java.lang.String> listenerId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> tenantId()  
      com.pulumi.core.Output<java.lang.String> type()  
      com.pulumi.core.Output<java.lang.String> value()  
      • 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

      • L7RuleV2

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

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

        public L7RuleV2​(java.lang.String name,
                        L7RuleV2Args 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

      • adminStateUp

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

        public com.pulumi.core.Output<java.lang.String> compareType()
        Returns:
        The comparison type for the L7 rule - can either be CONTAINS, STARTS\_WITH, ENDS_WITH, EQUAL_TO or REGEX
      • invert

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> invert()
        Returns:
        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

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> key()
        Returns:
        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

        public com.pulumi.core.Output<java.lang.String> l7policyId()
        Returns:
        The ID of the L7 Policy to query. Changing this creates a new L7 Rule.
      • listenerId

        public com.pulumi.core.Output<java.lang.String> listenerId()
        Returns:
        The ID of the Listener owning this resource.
      • 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 Rule.
      • tenantId

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

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        The L7 Rule type - can either be COOKIE, FILE\_TYPE, HEADER, HOST\_NAME or PATH.
      • value

        public com.pulumi.core.Output<java.lang.String> value()
        Returns:
        The value to use for the comparison. For example, the file type to compare.
      • get

        public static L7RuleV2 get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   L7RuleV2State 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.