Class VolumeV1
Manages a V1 volume resource within OpenStack.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var volume1 = new OpenStack.BlockStorage.VolumeV1("volume1", new OpenStack.BlockStorage.VolumeV1Args
{
Description = "first test volume",
Region = "RegionOne",
Size = 3,
});
}
}
Inherited Members
Namespace: Pulumi.OpenStack.BlockStorage
Assembly: Pulumi.OpenStack.dll
Syntax
public class VolumeV1 : CustomResource
Constructors
View SourceVolumeV1(String, VolumeV1Args, CustomResourceOptions)
Create a VolumeV1 resource with the given unique name, arguments, and options.
Declaration
public VolumeV1(string name, VolumeV1Args args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VolumeV1Args | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAttachments
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.
Declaration
public Output<ImmutableArray<VolumeV1Attachment>> Attachments { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<VolumeV1Attachment>> |
AvailabilityZone
The availability zone for the volume. Changing this creates a new volume.
Declaration
public Output<string> AvailabilityZone { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
A description of the volume. Changing this updates the volume's description.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ImageId
The image ID from which to create the volume. Changing this creates a new volume.
Declaration
public Output<string> ImageId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Metadata
Metadata key/value pairs to associate with the volume. Changing this updates the existing volume metadata.
Declaration
public Output<ImmutableDictionary<string, object>> Metadata { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Name
A unique name for the volume. Changing this updates the volume's name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Region
The region in which to create the volume. If
omitted, the region argument of the provider is used. Changing this
creates a new volume.
Declaration
public Output<string> Region { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
The size of the volume to create (in gigabytes). Changing this creates a new volume.
Declaration
public Output<int> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
SnapshotId
The snapshot ID from which to create the volume. Changing this creates a new volume.
Declaration
public Output<string> SnapshotId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceVolId
The volume ID from which to create the volume. Changing this creates a new volume.
Declaration
public Output<string> SourceVolId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VolumeType
The type of volume to create. Changing this creates a new volume.
Declaration
public Output<string> VolumeType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, VolumeV1State, CustomResourceOptions)
Get an existing VolumeV1 resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static VolumeV1 Get(string name, Input<string> id, VolumeV1State state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VolumeV1State | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| VolumeV1 |