Package com.pulumi.openstack.networking
Class SubnetPool
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.networking.SubnetPool
-
public class SubnetPool extends com.pulumi.resources.CustomResourceManages a V2 Neutron subnetpool resource within OpenStack. ## Example Usage ### Create a Subnet Pool ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.networking.SubnetPool; import com.pulumi.openstack.networking.SubnetPoolArgs; 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 subnetpool1 = new SubnetPool("subnetpool1", SubnetPoolArgs.builder() .ipVersion(6) .prefixes( "fdf7:b13d:dead:beef::/64", "fd65:86cc:a334:39b7::/64") .build()); } } ``` ### Create a Subnet from a Subnet Pool ```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.SubnetPool; import com.pulumi.openstack.networking.SubnetPoolArgs; import com.pulumi.openstack.networking.Subnet; import com.pulumi.openstack.networking.SubnetArgs; 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 subnetpool1 = new SubnetPool("subnetpool1", SubnetPoolArgs.builder() .prefixes("10.11.12.0/24") .build()); var subnet1 = new Subnet("subnet1", SubnetArgs.builder() .cidr("10.11.12.0/25") .networkId(network1.id()) .subnetpoolId(subnetpool1.id()) .build()); } } ``` ## Import Subnetpools can be imported using the `id`, e.g. ```sh $ pulumi import openstack:networking/subnetPool:SubnetPool subnetpool_1 832cb7f3-59fe-40cf-8f64-8350ffc03272 ```
-
-
Constructor Summary
Constructors Constructor Description SubnetPool(java.lang.String name)SubnetPool(java.lang.String name, SubnetPoolArgs args)SubnetPool(java.lang.String name, SubnetPoolArgs 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.String>>addressScopeId()com.pulumi.core.Output<java.util.List<java.lang.String>>allTags()com.pulumi.core.Output<java.lang.String>createdAt()com.pulumi.core.Output<java.lang.Integer>defaultPrefixlen()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>defaultQuota()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()static SubnetPoolget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SubnetPoolState 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.Integer>ipVersion()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>isDefault()com.pulumi.core.Output<java.lang.Integer>maxPrefixlen()com.pulumi.core.Output<java.lang.Integer>minPrefixlen()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.List<java.lang.String>>prefixes()com.pulumi.core.Output<java.lang.String>projectId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.Integer>revisionNumber()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>shared()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>tags()com.pulumi.core.Output<java.lang.String>updatedAt()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>valueSpecs()
-
-
-
Constructor Detail
-
SubnetPool
public SubnetPool(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
SubnetPool
public SubnetPool(java.lang.String name, SubnetPoolArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
SubnetPool
public SubnetPool(java.lang.String name, SubnetPoolArgs 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
-
addressScopeId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> addressScopeId()
- Returns:
- The Neutron address scope to assign to the subnetpool. Changing this updates the address scope id of the existing subnetpool.
-
allTags
public com.pulumi.core.Output<java.util.List<java.lang.String>> allTags()
- Returns:
- The collection of tags assigned on the subnetpool, which have been explicitly and implicitly added.
-
createdAt
public com.pulumi.core.Output<java.lang.String> createdAt()
- Returns:
- The time at which subnetpool was created.
-
defaultPrefixlen
public com.pulumi.core.Output<java.lang.Integer> defaultPrefixlen()
- Returns:
- The size of the prefix to allocate when the cidr or prefixlen attributes are omitted when you create the subnet. Defaults to the MinPrefixLen. Changing this updates the default prefixlen of the existing subnetpool.
-
defaultQuota
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> defaultQuota()
- Returns:
- The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets. Changing this updates the default quota of the existing subnetpool.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- The human-readable description for the subnetpool. Changing this updates the description of the existing subnetpool.
-
ipVersion
public com.pulumi.core.Output<java.lang.Integer> ipVersion()
- Returns:
- The IP protocol version.
-
isDefault
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> isDefault()
- Returns:
- Indicates whether the subnetpool is default subnetpool or not. Changing this updates the default status of the existing subnetpool.
-
maxPrefixlen
public com.pulumi.core.Output<java.lang.Integer> maxPrefixlen()
- Returns:
- The maximum prefix size that can be allocated from the subnetpool. For IPv4 subnetpools, default is 32. For IPv6 subnetpools, default is 128. Changing this updates the max prefixlen of the existing subnetpool.
-
minPrefixlen
public com.pulumi.core.Output<java.lang.Integer> minPrefixlen()
- Returns:
- The smallest prefix that can be allocated from a subnetpool. For IPv4 subnetpools, default is 8. For IPv6 subnetpools, default is 64. Changing this updates the min prefixlen of the existing subnetpool.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the subnetpool. Changing this updates the name of the existing subnetpool.
-
prefixes
public com.pulumi.core.Output<java.util.List<java.lang.String>> prefixes()
- Returns:
- A list of subnet prefixes to assign to the subnetpool. Neutron API merges adjacent prefixes and treats them as a single prefix. Each subnet prefix must be unique among all subnet prefixes in all subnetpools that are associated with the address scope. Changing this updates the prefixes list of the existing subnetpool.
-
projectId
public com.pulumi.core.Output<java.lang.String> projectId()
- Returns:
- The owner of the subnetpool. Required if admin wants to create a subnetpool for another project. Changing this creates a new subnetpool.
-
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 Neutron subnetpool. If omitted, the `region` argument of the provider is used. Changing this creates a new subnetpool.
-
revisionNumber
public com.pulumi.core.Output<java.lang.Integer> revisionNumber()
- Returns:
- The revision number of the subnetpool.
-
shared
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> shared()
- Returns:
- Indicates whether this subnetpool is shared across all projects. Changing this updates the shared status of the existing subnetpool.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()
- Returns:
- A set of string tags for the subnetpool.
-
updatedAt
public com.pulumi.core.Output<java.lang.String> updatedAt()
- Returns:
- The time at which subnetpool was created.
-
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 SubnetPool get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SubnetPoolState 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.
-
-