# DeviceProperty

An object representing a container instance host device.

- Source: Generated at build time
- Type last changed: v2.249.0 · 13 Apr 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const deviceProperty: ecs.CfnDaemonTaskDefinition.DeviceProperty = {
  containerPath: 'containerPath',
  hostPath: 'hostPath',
  permissions: ['permissions'],
};
```

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_ecs as ecs

device_property = ecs.CfnDaemonTaskDefinition.DeviceProperty(
    container_path="containerPath",
    host_path="hostPath",
    permissions=["permissions"]
)
```

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.ecs.*;

DeviceProperty deviceProperty = DeviceProperty.builder()
        .containerPath("containerPath")
        .hostPath("hostPath")
        .permissions(List.of("permissions"))
        .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.ECS;

var deviceProperty = new DeviceProperty {
    ContainerPath = "containerPath",
    HostPath = "hostPath",
    Permissions = new [] { "permissions" }
};
```

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"

deviceProperty := &DeviceProperty{
	ContainerPath: jsii.String("containerPath"),
	HostPath: jsii.String("hostPath"),
	Permissions: []*string{
		jsii.String("permissions"),
	},
}
```

## Properties

- `containerPath`: string — The path inside the container at which to expose the host device.

- `hostPath`: string — The path for the device on the host container instance.

- `permissions`: string[] — The explicit permissions to provide to the container for the device.

  By default, the container has permissions for ``read``, ``write``, and ``mknod`` for the device.
