Skip to content
v2.277.0

DeviceProperty Struct ​

An object that represents a container instance host device.

This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_batch as batch } from 'aws-cdk-lib';
const deviceProperty: batch.CfnJobDefinition.DeviceProperty = {
  containerPath: 'containerPath',
  hostPath: 'hostPath',
  permissions: ['permissions'],
};
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_batch as batch

device_property = batch.CfnJobDefinition.DeviceProperty(
    container_path="containerPath",
    host_path="hostPath",
    permissions=["permissions"]
)
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.batch.*;

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

var deviceProperty = new DeviceProperty {
    ContainerPath = "containerPath",
    HostPath = "hostPath",
    Permissions = new [] { "permissions" }
};
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 ​

containerPathoptionalstringcontainer_pathoptionalstrcontainerPathoptionalStringContainerPathoptionalstringContainerPathoptional*string#
The path inside the container that's used to expose the host device.

By default, the hostPath value is used.

hostPathoptionalstringhost_pathoptionalstrhostPathoptionalStringHostPathoptionalstringHostPathoptional*string#
The path for the device on the host container instance.
permissionsoptionalstring[]permissionsoptionaltyping.List[str]permissionsoptionalList<String>Permissionsoptionalstring[]Permissionsoptional*[]*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.