class HostPathVolume
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Batch.HostPathVolume |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#HostPathVolume |
Java | software.amazon.awscdk.services.batch.HostPathVolume |
Python | aws_cdk.aws_batch.HostPathVolume |
TypeScript (source) | aws-cdk-lib » aws_batch » HostPathVolume |
Extends
Eks
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 { aws_batch as batch } from 'aws-cdk-lib';
const hostPathVolume = new batch.HostPathVolume({
hostPath: 'hostPath',
name: 'name',
// the properties below are optional
mountPath: 'mountPath',
readonly: false,
});
Initializer
new HostPathVolume(options: HostPathVolumeOptions)
Parameters
- options
Host
Path Volume Options
Properties
Name | Type | Description |
---|---|---|
name | string | The name of this volume. |
path | string | The path of the file or directory on the host to mount into containers on the pod. |
container | string | The path on the container where the container is mounted. |
readonly? | boolean | If 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
Name | Description |
---|---|
static is | returns true if x is a HostPathVolume, false otherwise. |
HostPathVolume(x)
static ispublic static isHostPathVolume(x: any): boolean
Parameters
- x
any
Returns
boolean
returns true
if x
is a HostPathVolume, false
otherwise.