Class RouterInterface


  • public class RouterInterface
    extends com.pulumi.resources.CustomResource
    Manages a V2 router interface 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.networking.Router; import com.pulumi.openstack.networking.RouterArgs; import com.pulumi.openstack.networking.RouterInterface; import com.pulumi.openstack.networking.RouterInterfaceArgs; 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() .networkId(network1.id()) .cidr("192.168.199.0/24") .ipVersion(4) .build()); var router1 = new Router("router1", RouterArgs.builder() .externalNetworkId("f67f0d72-0ddf-11e4-9d95-e1f29f417e2f") .build()); var routerInterface1 = new RouterInterface("routerInterface1", RouterInterfaceArgs.builder() .routerId(router1.id()) .subnetId(subnet1.id()) .build()); } } ``` ## Import Router Interfaces can be imported using the port `id`, e.g. $ openstack port list --router <router name or id> ```sh $ pulumi import openstack:networking/routerInterface:RouterInterface int_1 port_id ```
    • 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
    • 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>> forceDestroy()  
      static RouterInterface get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RouterInterfaceState 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> portId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> routerId()  
      com.pulumi.core.Output<java.lang.String> subnetId()  
      • 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

      • RouterInterface

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

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

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

      • forceDestroy

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> forceDestroy()
        Returns:
        A boolean indicating whether the routes from the corresponding router ID should be deleted so that the router interface can be destroyed without any errors. The default value is `false`.
      • portId

        public com.pulumi.core.Output<java.lang.String> portId()
        Returns:
        ID of the port this interface connects to. Changing this creates a new router interface.
      • 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 interface.
      • routerId

        public com.pulumi.core.Output<java.lang.String> routerId()
        Returns:
        ID of the router this interface belongs to. Changing this creates a new router interface.
      • subnetId

        public com.pulumi.core.Output<java.lang.String> subnetId()
        Returns:
        ID of the subnet this interface connects to. Changing this creates a new router interface.
      • get

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