Class ShareAccess


  • public class ShareAccess
    extends com.pulumi.resources.CustomResource
    ## Example Usage ### NFS ```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 com.pulumi.openstack.sharedfilesystem.Share; import com.pulumi.openstack.sharedfilesystem.ShareArgs; import com.pulumi.openstack.sharedfilesystem.ShareAccess; import com.pulumi.openstack.sharedfilesystem.ShareAccessArgs; 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 with security services") .neutronNetId(network1.id()) .neutronSubnetId(subnet1.id()) .build()); var share1 = new Share("share1", ShareArgs.builder() .description("test share description") .shareProto("NFS") .size(1) .shareNetworkId(sharenetwork1.id()) .build()); var shareAccess1 = new ShareAccess("shareAccess1", ShareAccessArgs.builder() .shareId(share1.id()) .accessType("ip") .accessTo("192.168.199.10") .accessLevel("rw") .build()); } } ``` ### CIFS ```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 com.pulumi.openstack.sharedfilesystem.Share; import com.pulumi.openstack.sharedfilesystem.ShareArgs; import com.pulumi.openstack.sharedfilesystem.ShareAccess; import com.pulumi.openstack.sharedfilesystem.ShareAccessArgs; 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("share the secure love") .neutronNetId(network1.id()) .neutronSubnetId(subnet1.id()) .securityServiceIds(securityservice1.id()) .build()); var share1 = new Share("share1", ShareArgs.builder() .shareProto("CIFS") .size(1) .shareNetworkId(sharenetwork1.id()) .build()); var shareAccess1 = new ShareAccess("shareAccess1", ShareAccessArgs.builder() .shareId(share1.id()) .accessType("user") .accessTo("windows") .accessLevel("ro") .build()); var shareAccess2 = new ShareAccess("shareAccess2", ShareAccessArgs.builder() .shareId(share1.id()) .accessType("user") .accessTo("linux") .accessLevel("rw") .build()); ctx.export("exportLocations", share1.exportLocations()); } } ``` ## Import This resource can be imported by specifying the ID of the share and the ID of the share access, separated by a slash, e.g.: ```sh $ pulumi import openstack:sharedfilesystem/shareAccess:ShareAccess share_access_1 share_id/share_access_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> accessKey()  
      com.pulumi.core.Output<java.lang.String> accessLevel()  
      com.pulumi.core.Output<java.lang.String> accessTo()  
      com.pulumi.core.Output<java.lang.String> accessType()  
      static ShareAccess get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ShareAccessState 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> region()  
      com.pulumi.core.Output<java.lang.String> shareId()  
      com.pulumi.core.Output<java.lang.String> state()  
      • 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

      • ShareAccess

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

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

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

      • accessKey

        public com.pulumi.core.Output<java.lang.String> accessKey()
        Returns:
        The access credential of the entity granted access.
      • accessLevel

        public com.pulumi.core.Output<java.lang.String> accessLevel()
        Returns:
        The access level to the share. Can either be `rw` or `ro`.
      • accessTo

        public com.pulumi.core.Output<java.lang.String> accessTo()
        Returns:
        The value that defines the access. Can either be an IP address or a username verified by configured Security Service of the Share Network.
      • accessType

        public com.pulumi.core.Output<java.lang.String> accessType()
        Returns:
        The access rule type. Can either be an ip, user, cert, or cephx. cephx support requires an OpenStack environment that supports Shared Filesystem microversion 2.13 (Mitaka) or later.
      • 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 access. Changing this creates a new share access.
      • shareId

        public com.pulumi.core.Output<java.lang.String> shareId()
        Returns:
        The UUID of the share to which you are granted access.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        The share access state.
      • get

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