Class HostPathVolumeOptions.Builder
java.lang.Object
software.amazon.awscdk.services.batch.HostPathVolumeOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HostPathVolumeOptions>
- Enclosing interface:
HostPathVolumeOptions
@Stability(Stable)
public static final class HostPathVolumeOptions.Builder
extends Object
implements software.amazon.jsii.Builder<HostPathVolumeOptions>
A builder for
HostPathVolumeOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofHostPathVolumeOptions.getHostPath()Sets the value ofEksVolumeOptions.getMountPath()Sets the value ofEksVolumeOptions.getName()Sets the value ofEksVolumeOptions.getReadonly()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
hostPath
Sets the value ofHostPathVolumeOptions.getHostPath()- Parameters:
hostPath- The path of the file or directory on the host to mount into containers on the pod. This parameter is required. Note: HothPath Volumes present many security risks, and should be avoided when possible.- Returns:
this
-
name
Sets the value ofEksVolumeOptions.getName()- Parameters:
name- The name of this volume. This parameter is required. The name must be a valid DNS subdomain name.- Returns:
this
-
mountPath
Sets the value ofEksVolumeOptions.getMountPath()- Parameters:
mountPath- The path on the container where the volume is mounted.- Returns:
this
-
readonly
Sets the value ofEksVolumeOptions.getReadonly()- Parameters:
readonly- If specified, the container has readonly access to the volume. Otherwise, the container has read/write access.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HostPathVolumeOptions>- Returns:
- a new instance of
HostPathVolumeOptions - Throws:
NullPointerException- if any required attribute was not provided
-