Class Rule


  • public class Rule
    extends com.pulumi.resources.CustomResource
    Manages a v1 firewall 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.firewall.Rule; import com.pulumi.openstack.firewall.RuleArgs; 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 rule1 = new Rule("rule1", RuleArgs.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/rule:Rule 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
      Rule​(java.lang.String name)  
      Rule​(java.lang.String name, RuleArgs args)  
      Rule​(java.lang.String name, RuleArgs 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.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 Rule get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RuleState 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> protocol()  
      com.pulumi.core.Output<java.lang.String> region()  
      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.util.Optional<java.lang.String>> tenantId()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.Object>>> valueSpecs()  
      • 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

      • Rule

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

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

        public Rule​(java.lang.String name,
                    RuleArgs 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:
        Action to be taken ( must be "allow" or "deny") when the firewall rule matches. Changing this updates the `action` of an existing firewall rule.
      • 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.
      • 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 (default) or 6. Changing this updates the `ip_version` of an existing firewall rule.
      • 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.
      • protocol

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

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        The region in which to obtain the v1 Compute client. A Compute 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.
      • 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.
      • tenantId

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

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.Object>>> valueSpecs()
        Returns:
        Map of additional options.
      • get

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