HostPathVolume
- class aws_cdk.aws_batch.HostPathVolume(*, host_path, name, mount_path=None, readonly=None)
- Bases: - EksVolume- A Kubernetes HostPath volume. - See:
- https://kubernetes.io/docs/concepts/storage/volumes/#hostpath 
- 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_path_volume = batch.HostPathVolume( host_path="hostPath", name="name", # the properties below are optional mount_path="mountPath", readonly=False ) - Parameters:
- host_path ( - str) – 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.
- name ( - str) – The name of this volume. The name must be a valid DNS subdomain name.
- mount_path ( - Optional[- str]) – The path on the container where the volume is mounted. Default: - the volume is not mounted
- readonly ( - Optional[- bool]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: false
 
 - Attributes - container_path
- The path on the container where the container is mounted. - Default:
- the container is not mounted 
 
 
 - name
- The name of this volume. - The name must be a valid DNS subdomain name. 
 - path
- 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. 
 - readonly
- If specified, the container has readonly access to the volume. - Otherwise, the container has read/write access. - Default:
- false 
 
 - Static Methods - classmethod empty_dir(*, medium=None, size_limit=None, name, mount_path=None, readonly=None)
- Creates a Kubernetes EmptyDir volume. - Parameters:
- medium ( - Optional[- EmptyDirMediumType]) – The storage type to use for this Volume. Default:- EmptyDirMediumType.DISK
- size_limit ( - Optional[- Size]) – The maximum size for this Volume. Default: - no size limit
- name ( - str) – The name of this volume. The name must be a valid DNS subdomain name.
- mount_path ( - Optional[- str]) – The path on the container where the volume is mounted. Default: - the volume is not mounted
- readonly ( - Optional[- bool]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: false
 
- See:
- https://kubernetes.io/docs/concepts/storage/volumes/#emptydir 
- Return type:
 
 - classmethod host_path(*, host_path, name, mount_path=None, readonly=None)
- Creates a Kubernetes HostPath volume. - Parameters:
- host_path ( - str) – 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.
- name ( - str) – The name of this volume. The name must be a valid DNS subdomain name.
- mount_path ( - Optional[- str]) – The path on the container where the volume is mounted. Default: - the volume is not mounted
- readonly ( - Optional[- bool]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: false
 
- See:
- https://kubernetes.io/docs/concepts/storage/volumes/#hostpath 
- Return type:
 
 - classmethod is_host_path_volume(x)
- returns - trueif- xis a HostPathVolume,- falseotherwise.- Parameters:
- x ( - Any)
- Return type:
- bool
 
 - classmethod secret(*, secret_name, optional=None, name, mount_path=None, readonly=None)
- Creates a Kubernetes Secret volume. - Parameters:
- secret_name ( - str) – The name of the secret. Must be a valid DNS subdomain name.
- optional ( - Optional[- bool]) – Specifies whether the secret or the secret’s keys must be defined. Default: true
- name ( - str) – The name of this volume. The name must be a valid DNS subdomain name.
- mount_path ( - Optional[- str]) – The path on the container where the volume is mounted. Default: - the volume is not mounted
- readonly ( - Optional[- bool]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: false
 
- See:
- Return type: