Class SubnetRoute


  • public class SubnetRoute
    extends com.pulumi.resources.CustomResource
    Creates a routing entry on a OpenStack V2 subnet. ## 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 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.SubnetRoute; import com.pulumi.openstack.networking.SubnetRouteArgs; 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") .build()); 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 subnetRoute1 = new SubnetRoute("subnetRoute1", SubnetRouteArgs.builder() .subnetId(subnet1.id()) .destinationCidr("10.0.1.0/24") .nextHop("192.168.199.254") .build()); } } ``` ## Import Routing entries can be imported using a combined ID using the following format`<subnet_id>-route-<destination_cidr>-<next_hop>` ```sh $ pulumi import openstack:networking/subnetRoute:SubnetRoute subnet_route_1 686fe248-386c-4f70-9f6c-281607dad079-route-10.0.1.0/24-192.168.199.25 ```
    • 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.lang.String> destinationCidr()  
      static SubnetRoute get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SubnetRouteState 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> nextHop()  
      com.pulumi.core.Output<java.lang.String> region()  
      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

      • SubnetRoute

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

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

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

      • destinationCidr

        public com.pulumi.core.Output<java.lang.String> destinationCidr()
        Returns:
        CIDR block to match on the packet’s destination IP. Changing this creates a new routing entry.
      • nextHop

        public com.pulumi.core.Output<java.lang.String> nextHop()
        Returns:
        IP address of the next hop gateway. Changing this creates a new routing entry.
      • 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 configure a routing entry on a subnet. If omitted, the `region` argument of the provider is used. Changing this creates a new routing entry.
      • subnetId

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

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