@aws-cdk_aws-batch-alpha.HostVolume

class HostVolume ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.HostVolume
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#HostVolume
Javasoftware.amazon.awscdk.services.batch.alpha.HostVolume
Pythonaws_cdk.aws_batch_alpha.HostVolume
TypeScript (source)@aws-cdk/aws-batch-alpha ยป HostVolume

Extends EcsVolume

Creates a Host volume.

This volume will persist on the host at the specified hostPath. If the hostPath is not specified, Docker will choose the host path. In this case, the data may not persist after the containers that use it stop running.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as batch_alpha from '@aws-cdk/aws-batch-alpha';
const hostVolume = new batch_alpha.HostVolume({
  containerPath: 'containerPath',
  name: 'name',

  // the properties below are optional
  hostPath: 'hostPath',
  readonly: false,
});

Initializer

new HostVolume(options: HostVolumeOptions)

Parameters

  • options HostVolumeOptions

Properties

NameTypeDescription
containerPath๐Ÿ”นstringThe path on the container that this volume will be mounted to.
name๐Ÿ”นstringThe name of this volume.
hostPath?๐Ÿ”นstringThe path on the host machine this container will have access to.
readonly?๐Ÿ”นbooleanWhether or not the container has readonly access to this volume.

containerPath๐Ÿ”น

Type: string

The path on the container that this volume will be mounted to.


name๐Ÿ”น

Type: string

The name of this volume.


hostPath?๐Ÿ”น

Type: string (optional)

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


readonly?๐Ÿ”น

Type: boolean (optional, default: false)

Whether or not the container has readonly access to this volume.

Methods

NameDescription
static isHostVolume(x)๐Ÿ”นreturns true if x is a HostVolume, false otherwise.

static isHostVolume(x)๐Ÿ”น

public static isHostVolume(x: any): boolean

Parameters

  • x any

Returns

  • boolean

returns true if x is a HostVolume, false otherwise.