Class ShareNetwork


  • public class ShareNetwork
    extends com.pulumi.resources.CustomResource
    Use this resource to configure a share network. A share network stores network information that share servers can use when shares are created. ## Example Usage ### Basic share network ```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.sharedfilesystem.ShareNetwork; import com.pulumi.openstack.sharedfilesystem.ShareNetworkArgs; 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() .cidr("192.168.199.0/24") .ipVersion(4) .networkId(network1.id()) .build()); var sharenetwork1 = new ShareNetwork("sharenetwork1", ShareNetworkArgs.builder() .description("test share network") .neutronNetId(network1.id()) .neutronSubnetId(subnet1.id()) .build()); } } ``` ### Share network with associated security services ```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.sharedfilesystem.SecurityService; import com.pulumi.openstack.sharedfilesystem.SecurityServiceArgs; import com.pulumi.openstack.sharedfilesystem.ShareNetwork; import com.pulumi.openstack.sharedfilesystem.ShareNetworkArgs; 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() .cidr("192.168.199.0/24") .ipVersion(4) .networkId(network1.id()) .build()); var securityservice1 = new SecurityService("securityservice1", SecurityServiceArgs.builder() .description("created by terraform") .type("active_directory") .server("192.168.199.10") .dnsIp("192.168.199.10") .domain("example.com") .ou("CN=Computers,DC=example,DC=com") .user("joinDomainUser") .password("s8cret") .build()); var sharenetwork1 = new ShareNetwork("sharenetwork1", ShareNetworkArgs.builder() .description("test share network with security services") .neutronNetId(network1.id()) .neutronSubnetId(subnet1.id()) .securityServiceIds(securityservice1.id()) .build()); } } ``` ## Import This resource can be imported by specifying the ID of the share network: ```sh $ pulumi import openstack:sharedfilesystem/shareNetwork:ShareNetwork sharenetwork_1 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.lang.String> cidr()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      static ShareNetwork get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ShareNetworkState 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.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> networkType()  
      com.pulumi.core.Output<java.lang.String> neutronNetId()  
      com.pulumi.core.Output<java.lang.String> neutronSubnetId()  
      com.pulumi.core.Output<java.lang.String> projectId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityServiceIds()  
      com.pulumi.core.Output<java.lang.Integer> segmentationId()  
      • 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

      • ShareNetwork

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

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

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

      • cidr

        public com.pulumi.core.Output<java.lang.String> cidr()
        Returns:
        The share network CIDR.
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        The human-readable description for the share network. Changing this updates the description of the existing share network.
      • ipVersion

        public com.pulumi.core.Output<java.lang.Integer> ipVersion()
        Returns:
        The IP version of the share network. Can either be 4 or 6.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The name for the share network. Changing this updates the name of the existing share network.
      • networkType

        public com.pulumi.core.Output<java.lang.String> networkType()
        Returns:
        The share network type. Can either be VLAN, VXLAN, GRE, or flat.
      • neutronNetId

        public com.pulumi.core.Output<java.lang.String> neutronNetId()
        Returns:
        The UUID of a neutron network when setting up or updating a share network. Changing this updates the existing share network if it's not used by shares.
      • neutronSubnetId

        public com.pulumi.core.Output<java.lang.String> neutronSubnetId()
        Returns:
        The UUID of the neutron subnet when setting up or updating a share network. Changing this updates the existing share network if it's not used by shares.
      • projectId

        public com.pulumi.core.Output<java.lang.String> projectId()
        Returns:
        The owner of the Share Network.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        The region in which to obtain the V2 Shared File System client. A Shared File System client is needed to create a share network. If omitted, the `region` argument of the provider is used. Changing this creates a new share network.
      • securityServiceIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityServiceIds()
        Returns:
        The list of security service IDs to associate with the share network. The security service must be specified by ID and not name.
      • segmentationId

        public com.pulumi.core.Output<java.lang.Integer> segmentationId()
        Returns:
        The share network segmentation ID.
      • get

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