SecretPathVolumeOptions
- class aws_cdk.aws_batch.SecretPathVolumeOptions(*, name, mount_path=None, readonly=None, secret_name, optional=None)
Bases:
EksVolumeOptions
Options for a Kubernetes SecretPath Volume.
- Parameters:
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 mountedreadonly (
Optional
[bool
]) – If specified, the container has readonly access to the volume. Otherwise, the container has read/write access. Default: falsesecret_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
- See:
- ExampleMetadata:
infused
Example:
# job_defn: batch.EksJobDefinition job_defn.container.add_volume(batch.EksVolume.empty_dir( name="emptyDir", mount_path="/Volumes/emptyDir" )) job_defn.container.add_volume(batch.EksVolume.host_path( name="hostPath", host_path="/sys", mount_path="/Volumes/hostPath" )) job_defn.container.add_volume(batch.EksVolume.secret( name="secret", optional=True, mount_path="/Volumes/secret", secret_name="mySecret" ))
Attributes
- mount_path
The path on the container where the volume is mounted.
- Default:
the volume is not mounted
- name
The name of this volume.
The name must be a valid DNS subdomain name.
- optional
Specifies whether the secret or the secret’s keys must be defined.
- Default:
true
- readonly
If specified, the container has readonly access to the volume.
Otherwise, the container has read/write access.
- Default:
false
- secret_name
The name of the secret.
Must be a valid DNS subdomain name.