Class DockerVolumeConfiguration.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.DockerVolumeConfiguration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<DockerVolumeConfiguration>
- Enclosing interface:
- DockerVolumeConfiguration
@Stability(Stable)
public static final class DockerVolumeConfiguration.Builder
extends Object
implements software.amazon.jsii.Builder<DockerVolumeConfiguration>
A builder for
DockerVolumeConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionautoprovision
(Boolean autoprovision) Sets the value ofDockerVolumeConfiguration.getAutoprovision()
build()
Builds the configured instance.Sets the value ofDockerVolumeConfiguration.getDriver()
driverOpts
(Map<String, String> driverOpts) Sets the value ofDockerVolumeConfiguration.getDriverOpts()
Sets the value ofDockerVolumeConfiguration.getLabels()
Sets the value ofDockerVolumeConfiguration.getScope()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
driver
Sets the value ofDockerVolumeConfiguration.getDriver()
- Parameters:
driver
- The Docker volume driver to use. This parameter is required.- Returns:
this
-
scope
Sets the value ofDockerVolumeConfiguration.getScope()
- Parameters:
scope
- The scope for the Docker volume that determines its lifecycle. This parameter is required.- Returns:
this
-
autoprovision
Sets the value ofDockerVolumeConfiguration.getAutoprovision()
- Parameters:
autoprovision
- Specifies whether the Docker volume should be created if it does not already exist. If true is specified, the Docker volume will be created for you.- Returns:
this
-
driverOpts
@Stability(Stable) public DockerVolumeConfiguration.Builder driverOpts(Map<String, String> driverOpts) Sets the value ofDockerVolumeConfiguration.getDriverOpts()
- Parameters:
driverOpts
- A map of Docker driver-specific options passed through.- Returns:
this
-
labels
Sets the value ofDockerVolumeConfiguration.getLabels()
- Parameters:
labels
- Custom metadata to add to your Docker volume.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<DockerVolumeConfiguration>
- Returns:
- a new instance of
DockerVolumeConfiguration
- Throws:
NullPointerException
- if any required attribute was not provided
-