Show / Hide Table of Contents

Class Volume

Manages a V3 volume resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var volume1 = new OpenStack.BlockStorage.Volume("volume1", new OpenStack.BlockStorage.VolumeArgs
    {
        Description = "first test volume",
        Region = "RegionOne",
        Size = 3,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Volume
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.BlockStorage
Assembly: Pulumi.OpenStack.dll
Syntax
public class Volume : CustomResource

Constructors

View Source

Volume(String, VolumeArgs, CustomResourceOptions)

Create a Volume resource with the given unique name, arguments, and options.

Declaration
public Volume(string name, VolumeArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

VolumeArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Attachments

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<VolumeAttachment>> Attachments { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<VolumeAttachment>>
View Source

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>
View Source

ConsistencyGroupId

The consistency group to place the volume in.

Declaration
public Output<string> ConsistencyGroupId { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

EnableOnlineResize

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.

Declaration
public Output<bool?> EnableOnlineResize { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

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>
View Source

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>>
View Source

Multiattach

Allow the volume to be attached to more than one Compute instance.

Declaration
public Output<bool?> Multiattach { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

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>
View Source

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>
View Source

SchedulerHints

Provide the Cinder scheduler with hints on where to instantiate a volume in the OpenStack cloud. The available hints are described below.

Declaration
public Output<ImmutableArray<VolumeSchedulerHint>> SchedulerHints { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<VolumeSchedulerHint>>
View Source

Size

The size of the volume to create (in gigabytes).

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

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>
View Source

SourceReplica

The volume ID to replicate with.

Declaration
public Output<string> SourceReplica { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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 Source

Get(String, Input<String>, VolumeState, CustomResourceOptions)

Get an existing Volume resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Volume Get(string name, Input<string> id, VolumeState 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.

VolumeState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Volume
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.