@aws-cdk_aws-batch-alpha.HostPathVolume

class HostPathVolume ๐Ÿ”น

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

Extends EksVolume

A Kubernetes HostPath volume.

See also: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath

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 hostPathVolume = new batch_alpha.HostPathVolume({
  hostPath: 'hostPath',
  name: 'name',

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

Initializer

new HostPathVolume(options: HostPathVolumeOptions)

Parameters

  • options HostPathVolumeOptions

Properties

NameTypeDescription
name๐Ÿ”นstringThe name of this volume.
path๐Ÿ”นstringThe path of the file or directory on the host to mount into containers on the pod.
containerPath?๐Ÿ”นstringThe path on the container where the container is mounted.
readonly?๐Ÿ”นbooleanIf specified, the container has readonly access to the volume.

name๐Ÿ”น

Type: string

The name of this volume.

The name must be a valid DNS subdomain name.

See also: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names


path๐Ÿ”น

Type: string

The path of the file or directory on the host to mount into containers on the pod.

Note: HothPath Volumes present many security risks, and should be avoided when possible.

See also: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath


containerPath?๐Ÿ”น

Type: string (optional, default: the container is not mounted)

The path on the container where the container is mounted.


readonly?๐Ÿ”น

Type: boolean (optional, default: false)

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

Methods

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

static isHostPathVolume(x)๐Ÿ”น

public static isHostPathVolume(x: any): boolean

Parameters

  • x any

Returns

  • boolean

returns true if x is a HostPathVolume, false otherwise.