HostVolumeOptions

class aws_cdk.aws_batch.HostVolumeOptions(*, container_path, name, readonly=None, host_path=None)

Bases: EcsVolumeOptions

Options for configuring an ECS HostVolume.

Parameters:
  • container_path (str) – the path on the container where this volume is mounted.

  • name (str) – the name of this volume.

  • readonly (Optional[bool]) – if set, the container will have readonly access to the volume. Default: false

  • host_path (Optional[str]) – The path on the host machine this container will have access to. Default: - Docker will choose the host path. The data may not persist after the containers that use it stop running.

ExampleMetadata:

fixture=_generated

Example:

# 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

host_volume_options = batch.HostVolumeOptions(
    container_path="containerPath",
    name="name",

    # the properties below are optional
    host_path="hostPath",
    readonly=False
)

Attributes

container_path

the path on the container where this volume is mounted.

host_path

The path on the host machine this container will have access to.

Default:

  • Docker will choose the host path.

The data may not persist after the containers that use it stop running.

name

the name of this volume.

readonly

if set, the container will have readonly access to the volume.

Default:

false