Class Router


  • public class Router
    extends com.pulumi.resources.CustomResource
    Manages a V2 router 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.Router; import com.pulumi.openstack.networking.RouterArgs; 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 router1 = new Router("router1", RouterArgs.builder() .adminStateUp(true) .externalNetworkId("f67f0d72-0ddf-11e4-9d95-e1f29f417e2f") .build()); } } ``` ## Import Routers can be imported using the `id`, e.g. ```sh $ pulumi import openstack:networking/router:Router router_1 014395cd-89fc-4c9b-96b7-13d1ee79dad2 ```
    • 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
      Router​(java.lang.String name)  
      Router​(java.lang.String name, RouterArgs args)  
      Router​(java.lang.String name, RouterArgs 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.Boolean> adminStateUp()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> allTags()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> availabilityZoneHints()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.Boolean> distributed()  
      com.pulumi.core.Output<java.lang.Boolean> enableSnat()  
      com.pulumi.core.Output<java.util.List<RouterExternalFixedIp>> externalFixedIps()  
      com.pulumi.core.Output<java.lang.String> externalGateway()  
      com.pulumi.core.Output<java.lang.String> externalNetworkId()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> externalSubnetIds()  
      static Router get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RouterState 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.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()  
      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()  
      com.pulumi.core.Output<java.util.Optional<RouterVendorOptions>> vendorOptions()  
      • 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

      • Router

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

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

        public Router​(java.lang.String name,
                      @Nullable
                      RouterArgs 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.lang.Boolean> adminStateUp()
        Returns:
        Administrative up/down status for the router (must be "true" or "false" if provided). Changing this updates the `admin_state_up` of an existing router.
      • allTags

        public com.pulumi.core.Output<java.util.List<java.lang.String>> allTags()
        Returns:
        The collection of tags assigned on the router, which have been explicitly and implicitly added.
      • availabilityZoneHints

        public com.pulumi.core.Output<java.util.List<java.lang.String>> availabilityZoneHints()
        Returns:
        An availability zone is used to make network resources highly available. Used for resources with high availability so that they are scheduled on different availability zones. Changing this creates a new router.
      • description

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

        public com.pulumi.core.Output<java.lang.Boolean> distributed()
        Returns:
        Indicates whether or not to create a distributed router. The default policy setting in Neutron restricts usage of this property to administrative users only.
      • enableSnat

        public com.pulumi.core.Output<java.lang.Boolean> enableSnat()
        Returns:
        Enable Source NAT for the router. Valid values are "true" or "false". An `external_network_id` has to be set in order to set this property. Changing this updates the `enable_snat` of the router. Setting this value **requires** an **ext-gw-mode** extension to be enabled in OpenStack Neutron.
      • externalFixedIps

        public com.pulumi.core.Output<java.util.List<RouterExternalFixedIp>> externalFixedIps()
        Returns:
        An external fixed IP for the router. This can be repeated. The structure is described below. An `external_network_id` has to be set in order to set this property. Changing this updates the external fixed IPs of the router.
      • externalGateway

        public com.pulumi.core.Output<java.lang.String> externalGateway()
        Returns:
        The network UUID of an external gateway for the router. A router with an external gateway is required if any compute instances or load balancers will be using floating IPs. Changing this updates the external gateway of an existing router.
      • externalNetworkId

        public com.pulumi.core.Output<java.lang.String> externalNetworkId()
        Returns:
        The network UUID of an external gateway for the router. A router with an external gateway is required if any compute instances or load balancers will be using floating IPs. Changing this updates the external gateway of the router.
      • externalSubnetIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> externalSubnetIds()
        Returns:
        A list of external subnet IDs to try over each to obtain a fixed IP for the router. If a subnet ID in a list has exhausted floating IP pool, the next subnet ID will be tried. This argument is used only during the router creation and allows to set only one external fixed IP. Conflicts with an `external_fixed_ip` argument.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        A unique name for the router. Changing this updates the `name` of an existing router.
      • 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 router. If omitted, the `region` argument of the provider is used. Changing this creates a new router.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()
        Returns:
        A set of string tags for the router.
      • tenantId

        public com.pulumi.core.Output<java.lang.String> tenantId()
        Returns:
        The owner of the floating IP. Required if admin wants to create a router for another tenant. Changing this creates a new router.
      • valueSpecs

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

        public com.pulumi.core.Output<java.util.Optional<RouterVendorOptions>> vendorOptions()
        Returns:
        Map of additional vendor-specific options. Supported options are described below.
      • get

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