class CfnVolumeAttachmentPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.EC2.Mixins.CfnVolumeAttachmentPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsec2/mixins#CfnVolumeAttachmentPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.ec2.mixins.CfnVolumeAttachmentPropsMixin |
Python | aws_cdk.mixins_preview.aws_ec2.mixins.CfnVolumeAttachmentPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_ec2 » mixins » CfnVolumeAttachmentPropsMixin |
Implements
IMixin
Extends
Mixin
Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.
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 also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as ec2_mixins } from '@aws-cdk/mixins-preview/aws-ec2';
const cfnVolumeAttachmentPropsMixin = new ec2_mixins.CfnVolumeAttachmentPropsMixin({
device: 'device',
instanceId: 'instanceId',
volumeId: 'volumeId',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnVolumeAttachmentPropsMixin(props: CfnVolumeAttachmentMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Volume Attachment Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::EC2::VolumeAttachment.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript