Show / Hide Table of Contents

Class Volume

Creates a new EBS Volume in AWS EC2.

Inheritance
object
Resource
Volume
Implements
IVolume
IResource
IVolumeRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyCrossStackReferenceStrength(ReferenceStrength)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.With(params IMixin[])
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Volume : Resource, IVolume, IResource, IVolumeRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class Volume Inherits Resource Implements IVolume, IResource, IVolumeRef, IConstruct, IDependable, IEnvironmentAware
Remarks

ExampleMetadata: infused

Examples
new Volume(this, "Volume", new VolumeProps {
                AvailabilityZone = "us-east-1a",
                Size = Size.Gibibytes(125),
                VolumeType = EbsDeviceVolumeType.GP3,
                Throughput = 125
            });

Synopsis

Constructors

Volume(Construct, string, IVolumeProps)

Creates a new EBS Volume in AWS EC2.

Properties

AvailabilityZone

The availability zone that the EBS Volume is contained within (ex: us-west-2a).

EncryptionKey

The customer-managed encryption key that is used to encrypt the Volume.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

VolumeId

The EBS Volume's ID.

VolumeRef

A reference to a Volume resource.

Methods

FromVolumeAttributes(Construct, string, IVolumeAttributes)

Import an existing EBS Volume into the Stack.

GrantAttachVolume(IGrantable, IInstanceRef[]?)

[disable-awslint:no-grants].

GrantAttachVolumeByResourceTag(IGrantable, Construct[], string?)

[disable-awslint:no-grants].

GrantDetachVolume(IGrantable, IInstanceRef[]?)

[disable-awslint:no-grants].

GrantDetachVolumeByResourceTag(IGrantable, Construct[], string?)

[disable-awslint:no-grants].

ValidateProps(IVolumeProps)

Creates a new EBS Volume in AWS EC2.

Constructors

Volume(Construct, string, IVolumeProps)

Creates a new EBS Volume in AWS EC2.

public Volume(Construct scope, string id, IVolumeProps props)
Parameters
scope Construct
id string
props IVolumeProps
Remarks

ExampleMetadata: infused

Examples
new Volume(this, "Volume", new VolumeProps {
                AvailabilityZone = "us-east-1a",
                Size = Size.Gibibytes(125),
                VolumeType = EbsDeviceVolumeType.GP3,
                Throughput = 125
            });

Properties

AvailabilityZone

The availability zone that the EBS Volume is contained within (ex: us-west-2a).

public virtual string AvailabilityZone { get; }
Property Value

string

Remarks

ExampleMetadata: infused

EncryptionKey

The customer-managed encryption key that is used to encrypt the Volume.

public virtual IKey? EncryptionKey { get; }
Property Value

IKey

Remarks

ExampleMetadata: infused

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

ExampleMetadata: infused

VolumeId

The EBS Volume's ID.

public virtual string VolumeId { get; }
Property Value

string

Remarks

ExampleMetadata: infused

VolumeRef

A reference to a Volume resource.

public virtual IVolumeReference VolumeRef { get; }
Property Value

IVolumeReference

Remarks

ExampleMetadata: infused

Methods

FromVolumeAttributes(Construct, string, IVolumeAttributes)

Import an existing EBS Volume into the Stack.

public static IVolume FromVolumeAttributes(Construct scope, string id, IVolumeAttributes attrs)
Parameters
scope Construct

the scope of the import.

id string

the ID of the imported Volume in the construct tree.

attrs IVolumeAttributes

the attributes of the imported Volume.

Returns

IVolume

Remarks

ExampleMetadata: infused

GrantAttachVolume(IGrantable, IInstanceRef[]?)

[disable-awslint:no-grants].

public virtual Grant GrantAttachVolume(IGrantable grantee, IInstanceRef[]? instances = null)
Parameters
grantee IGrantable
instances IInstanceRef[]
Returns

Grant

Remarks

ExampleMetadata: infused

GrantAttachVolumeByResourceTag(IGrantable, Construct[], string?)

[disable-awslint:no-grants].

public virtual Grant GrantAttachVolumeByResourceTag(IGrantable grantee, Construct[] constructs, string? tagKeySuffix = null)
Parameters
grantee IGrantable
constructs Construct[]
tagKeySuffix string
Returns

Grant

Remarks

ExampleMetadata: infused

GrantDetachVolume(IGrantable, IInstanceRef[]?)

[disable-awslint:no-grants].

public virtual Grant GrantDetachVolume(IGrantable grantee, IInstanceRef[]? instances = null)
Parameters
grantee IGrantable
instances IInstanceRef[]
Returns

Grant

Remarks

ExampleMetadata: infused

GrantDetachVolumeByResourceTag(IGrantable, Construct[], string?)

[disable-awslint:no-grants].

public virtual Grant GrantDetachVolumeByResourceTag(IGrantable grantee, Construct[] constructs, string? tagKeySuffix = null)
Parameters
grantee IGrantable
constructs Construct[]
tagKeySuffix string
Returns

Grant

Remarks

ExampleMetadata: infused

ValidateProps(IVolumeProps)

Creates a new EBS Volume in AWS EC2.

protected virtual void ValidateProps(IVolumeProps props)
Parameters
props IVolumeProps
Remarks

ExampleMetadata: infused

Examples
new Volume(this, "Volume", new VolumeProps {
                AvailabilityZone = "us-east-1a",
                Size = Size.Gibibytes(125),
                VolumeType = EbsDeviceVolumeType.GP3,
                Throughput = 125
            });

Implements

IVolume
IResource
IVolumeRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX