Class Volume
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.blockstorage.Volume
-
public class Volume extends com.pulumi.resources.CustomResourceManages a V3 volume resource within OpenStack. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.blockstorage.Volume; import com.pulumi.openstack.blockstorage.VolumeArgs; 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 volume1 = new Volume("volume1", VolumeArgs.builder() .description("first test volume") .region("RegionOne") .size(3) .build()); } } ``` ## Import Volumes can be imported using the `id`, e.g. ```sh $ pulumi import openstack:blockstorage/volume:Volume volume_1 ea257959-eeb1-4c10-8d33-26f0409a755d ```
-
-
Constructor Summary
Constructors Constructor Description Volume(java.lang.String name)Volume(java.lang.String name, VolumeArgs args)Volume(java.lang.String name, VolumeArgs 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.List<VolumeAttachment>>attachments()com.pulumi.core.Output<java.lang.String>availabilityZone()com.pulumi.core.Output<java.util.Optional<java.lang.String>>consistencyGroupId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>enableOnlineResize()static Volumeget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VolumeState 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.util.Optional<java.lang.String>>imageId()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>metadata()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>multiattach()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.List<VolumeSchedulerHint>>>schedulerHints()com.pulumi.core.Output<java.lang.Integer>size()com.pulumi.core.Output<java.util.Optional<java.lang.String>>snapshotId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>sourceReplica()com.pulumi.core.Output<java.util.Optional<java.lang.String>>sourceVolId()com.pulumi.core.Output<java.lang.String>volumeType()
-
-
-
Constructor Detail
-
Volume
public Volume(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Volume
public Volume(java.lang.String name, VolumeArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Volume
public Volume(java.lang.String name, VolumeArgs 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
-
attachments
public com.pulumi.core.Output<java.util.List<VolumeAttachment>> attachments()
- Returns:
- If a volume is attached to an instance, this attribute will display the Attachment ID, Instance ID, and the Device as the Instance sees it.
-
availabilityZone
public com.pulumi.core.Output<java.lang.String> availabilityZone()
- Returns:
- The availability zone for the volume. Changing this creates a new volume.
-
consistencyGroupId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> consistencyGroupId()
- Returns:
- The consistency group to place the volume in.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- A description of the volume. Changing this updates the volume's description.
-
enableOnlineResize
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableOnlineResize()
- Returns:
- When this option is set it allows extending attached volumes. Note: updating size of an attached volume requires Cinder support for version 3.42 and a compatible storage driver.
-
imageId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> imageId()
- Returns:
- The image ID from which to create the volume. Changing this creates a new volume.
-
metadata
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> metadata()
- Returns:
- Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.
-
multiattach
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> multiattach()
- Returns:
- Allow the volume to be attached to more than one Compute instance.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A unique name for the volume. Changing this updates the volume's name.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to create the volume. If omitted, the `region` argument of the provider is used. Changing this creates a new volume.
-
schedulerHints
public com.pulumi.core.Output<java.util.Optional<java.util.List<VolumeSchedulerHint>>> schedulerHints()
- Returns:
- Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.
-
size
public com.pulumi.core.Output<java.lang.Integer> size()
- Returns:
- The size of the volume to create (in gigabytes).
-
snapshotId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotId()
- Returns:
- The snapshot ID from which to create the volume. Changing this creates a new volume.
-
sourceReplica
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceReplica()
- Returns:
- The volume ID to replicate with.
-
sourceVolId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sourceVolId()
- Returns:
- The volume ID from which to create the volume. Changing this creates a new volume.
-
volumeType
public com.pulumi.core.Output<java.lang.String> volumeType()
- Returns:
- The type of volume to create. Changing this creates a new volume.
-
get
public static Volume get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VolumeState 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.
-
-