BlockDeviceMappingProperty Struct
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opsworks as opsworks } from 'aws-cdk-lib';
const blockDeviceMappingProperty: opsworks.CfnInstance.BlockDeviceMappingProperty = {
deviceName: 'deviceName',
ebs: {
deleteOnTermination: false,
iops: 123,
snapshotId: 'snapshotId',
volumeSize: 123,
volumeType: 'volumeType',
},
noDevice: 'noDevice',
virtualName: 'virtualName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opsworks as opsworks
block_device_mapping_property = opsworks.CfnInstance.BlockDeviceMappingProperty(
device_name="deviceName",
ebs=opsworks.CfnInstance.EbsBlockDeviceProperty(
delete_on_termination=False,
iops=123,
snapshot_id="snapshotId",
volume_size=123,
volume_type="volumeType"
),
no_device="noDevice",
virtual_name="virtualName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opsworks.*;
BlockDeviceMappingProperty blockDeviceMappingProperty = BlockDeviceMappingProperty.builder()
.deviceName("deviceName")
.ebs(EbsBlockDeviceProperty.builder()
.deleteOnTermination(false)
.iops(123)
.snapshotId("snapshotId")
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice("noDevice")
.virtualName("virtualName")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpsWorks;
var blockDeviceMappingProperty = new BlockDeviceMappingProperty {
DeviceName = "deviceName",
Ebs = new EbsBlockDeviceProperty {
DeleteOnTermination = false,
Iops = 123,
SnapshotId = "snapshotId",
VolumeSize = 123,
VolumeType = "volumeType"
},
NoDevice = "noDevice",
VirtualName = "virtualName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
blockDeviceMappingProperty := &BlockDeviceMappingProperty{
DeviceName: jsii.String("deviceName"),
Ebs: &EbsBlockDeviceProperty{
DeleteOnTermination: jsii.Boolean(false),
Iops: jsii.Number(123),
SnapshotId: jsii.String("snapshotId"),
VolumeSize: jsii.Number(123),
VolumeType: jsii.String("volumeType"),
},
NoDevice: jsii.String("noDevice"),
VirtualName: jsii.String("virtualName"),
}
Properties
deviceNameoptionalstringdevice_nameoptionalstrdeviceNameoptionalStringDeviceNameoptionalstringDeviceNameoptional*string#The device name that is exposed to the instance, such as `/dev/sdh` .
For the root device, you can use the explicit device name or you can set this parameter to ROOT_DEVICE and OpsWorks Stacks will provide the correct device name.
ebsoptionalIResolvable | CfnInstance.EbsBlockDevicePropertyebsoptionaltyping.Union[IResolvable, EbsBlockDeviceProperty]ebsoptionalIResolvableEbsoptionalIResolvableEbsoptionalinterface{}#An `EBSBlockDevice` that defines how to configure an Amazon EBS volume when the instance is launched.
You can specify either the VirtualName or Ebs , but not both.
noDeviceoptionalstringno_deviceoptionalstrnoDeviceoptionalStringNoDeviceoptionalstringNoDeviceoptional*string#Suppresses the specified device included in the AMI's block device mapping.
virtualNameoptionalstringvirtual_nameoptionalstrvirtualNameoptionalStringVirtualNameoptionalstringVirtualNameoptional*string#The virtual device name.
For more information, see BlockDeviceMapping . You can specify either the VirtualName or Ebs , but not both.