Package com.pulumi.openstack.networking
Class SubnetRoute
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.networking.SubnetRoute
-
public class SubnetRoute extends com.pulumi.resources.CustomResourceCreates 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 ```
-
-
Constructor Summary
Constructors Constructor Description SubnetRoute(java.lang.String name)SubnetRoute(java.lang.String name, SubnetRouteArgs args)SubnetRoute(java.lang.String name, SubnetRouteArgs 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>destinationCidr()static SubnetRouteget(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()
-
-
-
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.
-
-