Package com.pulumi.openstack.firewall
Class Firewall
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.firewall.Firewall
-
public class Firewall extends com.pulumi.resources.CustomResourceManages a v1 firewall 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 com.pulumi.openstack.firewall.Policy; import com.pulumi.openstack.firewall.PolicyArgs; import com.pulumi.openstack.firewall.Firewall; import com.pulumi.openstack.firewall.FirewallArgs; 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() .description("drop TELNET traffic") .action("deny") .protocol("tcp") .destinationPort("23") .enabled("true") .build()); var rule2 = new Rule("rule2", RuleArgs.builder() .description("drop NTP traffic") .action("deny") .protocol("udp") .destinationPort("123") .enabled("false") .build()); var policy1 = new Policy("policy1", PolicyArgs.builder() .rules( rule1.id(), rule2.id()) .build()); var firewall1 = new Firewall("firewall1", FirewallArgs.builder() .policyId(policy1.id()) .build()); } } ``` ## Import Firewalls can be imported using the `id`, e.g. ```sh $ pulumi import openstack:firewall/firewall:Firewall firewall_1 c9e39fb2-ce20-46c8-a964-25f3898c7a97 ```
-
-
Constructor Summary
Constructors Constructor Description Firewall(java.lang.String name)Firewall(java.lang.String name, FirewallArgs args)Firewall(java.lang.String name, FirewallArgs 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.util.List<java.lang.String>>associatedRouters()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static Firewallget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FirewallState 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>name()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>noRouters()com.pulumi.core.Output<java.lang.String>policyId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>tenantId()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>valueSpecs()
-
-
-
Constructor Detail
-
Firewall
public Firewall(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Firewall
public Firewall(java.lang.String name, FirewallArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Firewall
public Firewall(java.lang.String name, FirewallArgs 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:
- Administrative up/down status for the firewall (must be "true" or "false" if provided - defaults to "true"). Changing this updates the `admin_state_up` of an existing firewall.
-
associatedRouters
public com.pulumi.core.Output<java.util.List<java.lang.String>> associatedRouters()
- Returns:
- Router(s) to associate this firewall instance with. Must be a list of strings. Changing this updates the associated routers of an existing firewall. Conflicts with `no_routers`.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description for the firewall. Changing this updates the `description` of an existing firewall.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A name for the firewall. Changing this updates the `name` of an existing firewall.
-
noRouters
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> noRouters()
- Returns:
- Should this firewall not be associated with any routers (must be "true" or "false" if provide - defaults to "false"). Conflicts with `associated_routers`.
-
policyId
public com.pulumi.core.Output<java.lang.String> policyId()
- Returns:
- The policy resource id for the firewall. Changing this updates the `policy_id` of an existing firewall.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to obtain the v1 networking client. A networking client is needed to create a firewall. If omitted, the `region` argument of the provider is used. Changing this creates a new firewall.
-
tenantId
public com.pulumi.core.Output<java.lang.String> tenantId()
- Returns:
- The owner of the floating IP. Required if admin wants to create a firewall for another tenant. Changing this creates a new firewall.
-
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 Firewall get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable FirewallState 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.
-
-