Show / Hide Table of Contents

Class CfnVolumeAttachment

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnVolumeAttachment
Implements
IInspectable
IVolumeAttachmentRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnVolumeAttachment : CfnResource, IInspectable, IVolumeAttachmentRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnVolumeAttachment Inherits CfnResource Implements IInspectable, IVolumeAttachmentRef, IConstruct, IDependable, IEnvironmentAware
Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             var cfnVolumeAttachment = new CfnVolumeAttachment(this, "MyCfnVolumeAttachment", new CfnVolumeAttachmentProps {
                 InstanceId = "instanceId",
                 VolumeId = "volumeId",

                 // the properties below are optional
                 Device = "device"
             });

Synopsis

Constructors

CfnVolumeAttachment(Construct, string, ICfnVolumeAttachmentProps)

Create a new AWS::EC2::VolumeAttachment.

Properties

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

Device

The device name (for example, /dev/sdh or xvdh ).

InstanceId

The ID of the instance to which the volume attaches.

VolumeAttachmentRef

A reference to a VolumeAttachment resource.

VolumeId

The ID of the Amazon EBS volume.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

IsCfnVolumeAttachment(object)

Checks whether the given object is a CfnVolumeAttachment.

RenderProperties(IDictionary<string, object>)

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

Constructors

CfnVolumeAttachment(Construct, string, ICfnVolumeAttachmentProps)

Create a new AWS::EC2::VolumeAttachment.

public CfnVolumeAttachment(Construct scope, string id, ICfnVolumeAttachmentProps props)
Parameters
scope Construct

Scope in which this resource is defined.

id string

Construct identifier for this resource (unique in its scope).

props ICfnVolumeAttachmentProps

Resource properties.

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

Properties

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

CfnProperties

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

Device

The device name (for example, /dev/sdh or xvdh ).

public virtual string? Device { get; set; }
Property Value

string

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

InstanceId

The ID of the instance to which the volume attaches.

public virtual string InstanceId { get; set; }
Property Value

string

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

VolumeAttachmentRef

A reference to a VolumeAttachment resource.

public virtual IVolumeAttachmentReference VolumeAttachmentRef { get; }
Property Value

IVolumeAttachmentReference

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

VolumeId

The ID of the Amazon EBS volume.

public virtual string VolumeId { get; set; }
Property Value

string

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)
Parameters
inspector TreeInspector

tree inspector to collect and process attributes.

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

IsCfnVolumeAttachment(object)

Checks whether the given object is a CfnVolumeAttachment.

public static bool IsCfnVolumeAttachment(object x)
Parameters
x object
Returns

bool

Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the "running" state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource: AWS::EC2::VolumeAttachment

ExampleMetadata: fixture=_generated

Implements

IInspectable
IVolumeAttachmentRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX