Class Share
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.sharedfilesystem.Share
-
public class Share extends com.pulumi.resources.CustomResourceUse this resource to configure a share. ## Example Usage ```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 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()); } } ``` ## Import This resource can be imported by specifying the ID of the share: ```sh $ pulumi import openstack:sharedfilesystem/share:Share share_1 id ```
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>allMetadata()com.pulumi.core.Output<java.lang.String>availabilityZone()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.List<ShareExportLocation>>exportLocations()static Shareget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ShareState 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.Boolean>hasReplicas()com.pulumi.core.Output<java.lang.String>host()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>isPublic()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>metadata()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>projectId()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>replicationType()com.pulumi.core.Output<java.lang.String>shareNetworkId()com.pulumi.core.Output<java.lang.String>shareProto()com.pulumi.core.Output<java.lang.String>shareServerId()com.pulumi.core.Output<java.lang.String>shareType()com.pulumi.core.Output<java.lang.Integer>size()com.pulumi.core.Output<java.util.Optional<java.lang.String>>snapshotId()
-
-
-
Constructor Detail
-
Share
public Share(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Share
public Share(java.lang.String name, ShareArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Share
public Share(java.lang.String name, ShareArgs 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
-
allMetadata
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> allMetadata()
- Returns:
- The map of metadata, assigned on the share, which has been explicitly and implicitly added.
-
availabilityZone
public com.pulumi.core.Output<java.lang.String> availabilityZone()
- Returns:
- The share availability zone. Changing this creates a new share.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- The human-readable description for the share. Changing this updates the description of the existing share.
-
exportLocations
public com.pulumi.core.Output<java.util.List<ShareExportLocation>> exportLocations()
- Returns:
- A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
-
hasReplicas
public com.pulumi.core.Output<java.lang.Boolean> hasReplicas()
- Returns:
- Indicates whether a share has replicas or not.
-
host
public com.pulumi.core.Output<java.lang.String> host()
- Returns:
- The share host name.
-
isPublic
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> isPublic()
- Returns:
- The level of visibility for the share. Set to true to make share public. Set to false to make it private. Default value is false. Changing this updates the existing share.
-
metadata
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>> metadata()
- Returns:
- One or more metadata key and value pairs as a dictionary of strings.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the share. Changing this updates the name of the existing share.
-
projectId
public com.pulumi.core.Output<java.lang.String> projectId()
- Returns:
- The owner of the Share.
-
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. Changing this creates a new share.
-
replicationType
public com.pulumi.core.Output<java.lang.String> replicationType()
- Returns:
- The share replication type.
-
shareNetworkId
public com.pulumi.core.Output<java.lang.String> shareNetworkId()
- Returns:
- The UUID of a share network where the share server exists or will be created. If `share_network_id` is not set and you provide a `snapshot_id`, the share_network_id value from the snapshot is used. Changing this creates a new share.
-
shareProto
public com.pulumi.core.Output<java.lang.String> shareProto()
- Returns:
- The share protocol - can either be NFS, CIFS, CEPHFS, GLUSTERFS, HDFS or MAPRFS. Changing this creates a new share.
-
shareServerId
public com.pulumi.core.Output<java.lang.String> shareServerId()
- Returns:
- The UUID of the share server.
-
shareType
public com.pulumi.core.Output<java.lang.String> shareType()
- Returns:
- The share type name. If you omit this parameter, the default share type is used.
-
size
public com.pulumi.core.Output<java.lang.Integer> size()
- Returns:
- The share size, in GBs. The requested share size cannot be greater than the allowed GB quota. Changing this resizes the existing share.
-
snapshotId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotId()
- Returns:
- The UUID of the share's base snapshot. Changing this creates a new share.
-
get
public static Share get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ShareState 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.
-
-