Class CfnVolumeAttachment
Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.
Inherited Members
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 |
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, |
| 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
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
Overrides
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
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
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
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
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
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
Overrides
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