# InstanceConfigurationProperty

Defines a custom base AMI and block device mapping configurations of an instance used for building and testing container images.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const instanceConfigurationProperty: imagebuilder.CfnContainerRecipe.InstanceConfigurationProperty = {
  blockDeviceMappings: [{
    deviceName: 'deviceName',
    ebs: {
      deleteOnTermination: false,
      encrypted: false,
      iops: 123,
      kmsKeyId: 'kmsKeyId',
      snapshotId: 'snapshotId',
      throughput: 123,
      volumeSize: 123,
      volumeType: 'volumeType',
    },
    noDevice: 'noDevice',
    virtualName: 'virtualName',
  }],
  image: 'image',
};
```

Python:

```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_imagebuilder as imagebuilder

instance_configuration_property = imagebuilder.CfnContainerRecipe.InstanceConfigurationProperty(
    block_device_mappings=[imagebuilder.CfnContainerRecipe.InstanceBlockDeviceMappingProperty(
        device_name="deviceName",
        ebs=imagebuilder.CfnContainerRecipe.EbsInstanceBlockDeviceSpecificationProperty(
            delete_on_termination=False,
            encrypted=False,
            iops=123,
            kms_key_id="kmsKeyId",
            snapshot_id="snapshotId",
            throughput=123,
            volume_size=123,
            volume_type="volumeType"
        ),
        no_device="noDevice",
        virtual_name="virtualName"
    )],
    image="image"
)
```

Java:

```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.imagebuilder.*;

InstanceConfigurationProperty instanceConfigurationProperty = InstanceConfigurationProperty.builder()
        .blockDeviceMappings(List.of(InstanceBlockDeviceMappingProperty.builder()
                .deviceName("deviceName")
                .ebs(EbsInstanceBlockDeviceSpecificationProperty.builder()
                        .deleteOnTermination(false)
                        .encrypted(false)
                        .iops(123)
                        .kmsKeyId("kmsKeyId")
                        .snapshotId("snapshotId")
                        .throughput(123)
                        .volumeSize(123)
                        .volumeType("volumeType")
                        .build())
                .noDevice("noDevice")
                .virtualName("virtualName")
                .build()))
        .image("image")
        .build();
```

C# / .NET:

```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.ImageBuilder;

var instanceConfigurationProperty = new InstanceConfigurationProperty {
    BlockDeviceMappings = new [] { new InstanceBlockDeviceMappingProperty {
        DeviceName = "deviceName",
        Ebs = new EbsInstanceBlockDeviceSpecificationProperty {
            DeleteOnTermination = false,
            Encrypted = false,
            Iops = 123,
            KmsKeyId = "kmsKeyId",
            SnapshotId = "snapshotId",
            Throughput = 123,
            VolumeSize = 123,
            VolumeType = "volumeType"
        },
        NoDevice = "noDevice",
        VirtualName = "virtualName"
    } },
    Image = "image"
};
```

Golang:

```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"

instanceConfigurationProperty := &InstanceConfigurationProperty{
	BlockDeviceMappings: []interface{}{
		&InstanceBlockDeviceMappingProperty{
			DeviceName: jsii.String("deviceName"),
			Ebs: &EbsInstanceBlockDeviceSpecificationProperty{
				DeleteOnTermination: jsii.Boolean(false),
				Encrypted: jsii.Boolean(false),
				Iops: jsii.Number(123),
				KmsKeyId: jsii.String("kmsKeyId"),
				SnapshotId: jsii.String("snapshotId"),
				Throughput: jsii.Number(123),
				VolumeSize: jsii.Number(123),
				VolumeType: jsii.String("volumeType"),
			},
			NoDevice: jsii.String("noDevice"),
			VirtualName: jsii.String("virtualName"),
		},
	},
	Image: jsii.String("image"),
}
```

## Properties

- `blockDeviceMappings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnContainerRecipe.InstanceBlockDeviceMappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_imagebuilder.CfnContainerRecipe.InstanceBlockDeviceMappingProperty.html)[] — Defines the block devices to attach for building an instance from this Image Builder AMI.

- `image`: string — The base image for a container build and test instance.

  This can contain an AMI ID or it can specify an AWS Systems Manager (SSM) Parameter Store Parameter, prefixed by `ssm:` , followed by the parameter name or ARN.

  If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image.
