Class RuleV2


  • public class RuleV2
    extends com.pulumi.resources.CustomResource
    Manages a v2 firewall rule resource within OpenStack. > **Note:** Firewall v2 has no support for OVN currently. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.firewall.RuleV2; import com.pulumi.openstack.firewall.RuleV2Args; 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 rule2 = new RuleV2("rule2", RuleV2Args.builder() .action("deny") .description("drop TELNET traffic") .destinationPort("23") .enabled("true") .protocol("tcp") .build()); } } ``` ## Import Firewall Rules can be imported using the `id`, e.g. ```sh $ pulumi import openstack:firewall/ruleV2:RuleV2 rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327 ```
    • 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
      RuleV2​(java.lang.String name)  
      RuleV2​(java.lang.String name, RuleV2Args args)  
      RuleV2​(java.lang.String name, RuleV2Args 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.String>> action()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> destinationIpAddress()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> destinationPort()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()  
      static RuleV2 get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RuleV2State 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.Integer>> ipVersion()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> projectId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> protocol()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> shared()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceIpAddress()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourcePort()  
      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

      • RuleV2

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

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

        public RuleV2​(java.lang.String name,
                      @Nullable
                      RuleV2Args 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.util.Optional<java.lang.String>> action()
        Returns:
        Action to be taken (must be "allow", "deny" or "reject") when the firewall rule matches. Changing this updates the `action` of an existing firewall rule. Default is `deny`.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        A description for the firewall rule. Changing this updates the `description` of an existing firewall rule.
      • destinationIpAddress

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> destinationIpAddress()
        Returns:
        The destination IP address on which the firewall rule operates. Changing this updates the `destination_ip_address` of an existing firewall rule.
      • destinationPort

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> destinationPort()
        Returns:
        The destination port on which the firewall rule operates. Changing this updates the `destination_port` of an existing firewall rule. Require not `any` or empty protocol.
      • enabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
        Returns:
        Enabled status for the firewall rule (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `enabled` status of an existing firewall rule.
      • ipVersion

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> ipVersion()
        Returns:
        IP version, either 4 or 6. Changing this updates the `ip_version` of an existing firewall rule. Default is `4`.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        A unique name for the firewall rule. Changing this updates the `name` of an existing firewall rule.
      • projectId

        public com.pulumi.core.Output<java.lang.String> projectId()
        Returns:
        This argument conflicts and is interchangeable with `tenant_id`. The owner of the firewall rule. Required if admin wants to create a firewall rule for another project. Changing this creates a new firewall rule.
      • protocol

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> protocol()
        Returns:
        (Optional; Required if `source_port` or `destination_port` is not empty) The protocol type on which the firewall rule operates. Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the `protocol` of an existing firewall rule. Default is `any`.
      • 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 a firewall rule. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall rule.
      • shared

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> shared()
        Returns:
        Sharing status of the firewall rule (must be "true" or "false" if provided). If this is "true" the policy is visible to, and can be used in, firewalls in other tenants. Changing this updates the `shared` status of an existing firewall policy. On
      • sourceIpAddress

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceIpAddress()
        Returns:
        The source IP address on which the firewall rule operates. Changing this updates the `source_ip_address` of an existing firewall rule.
      • sourcePort

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourcePort()
        Returns:
        The source port on which the firewall rule operates. Changing this updates the `source_port` of an existing firewall rule. Require not `any` or empty protocol.
      • tenantId

        public com.pulumi.core.Output<java.lang.String> tenantId()
        Returns:
        This argument conflicts and is interchangeable with `project_id`. The owner of the firewall rule. Required if admin wants to create a firewall rule for another tenant. Changing this creates a new firewall rule.
      • get

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