Class CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskDefinition.DockerVolumeConfigurationProperty>
- Enclosing interface:
CfnTaskDefinition.DockerVolumeConfigurationProperty
@Stability(Stable)
public static final class CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskDefinition.DockerVolumeConfigurationProperty>
A builder for
CfnTaskDefinition.DockerVolumeConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoprovision(Boolean autoprovision) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getAutoprovision()autoprovision(IResolvable autoprovision) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getAutoprovision()build()Builds the configured instance.Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriver()driverOpts(Map<String, String> driverOpts) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriverOpts()driverOpts(IResolvable driverOpts) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriverOpts()Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getLabels()labels(IResolvable labels) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getLabels()Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getScope()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
autoprovision
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder autoprovision(Boolean autoprovision) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getAutoprovision()- Parameters:
autoprovision- If this value istrue, the Docker volume is created if it doesn't already exist.This field is only used if the
scopeisshared.- Returns:
this
-
autoprovision
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder autoprovision(IResolvable autoprovision) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getAutoprovision()- Parameters:
autoprovision- If this value istrue, the Docker volume is created if it doesn't already exist.This field is only used if the
scopeisshared.- Returns:
this
-
driver
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder driver(String driver) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriver()- Parameters:
driver- The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement. If the driver was installed using the Docker plugin CLI, usedocker plugin lsto retrieve the driver name from your container instance. If the driver was installed using another method, use Docker plugin discovery to retrieve the driver name. This parameter maps toDriverin the docker container create command and thexxdriveroption to docker volume create.- Returns:
this
-
driverOpts
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder driverOpts(Map<String, String> driverOpts) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriverOpts()- Parameters:
driverOpts- A map of Docker driver-specific options passed through. This parameter maps toDriverOptsin the docker create-volume command and thexxoptoption to docker volume create.- Returns:
this
-
driverOpts
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder driverOpts(IResolvable driverOpts) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getDriverOpts()- Parameters:
driverOpts- A map of Docker driver-specific options passed through. This parameter maps toDriverOptsin the docker create-volume command and thexxoptoption to docker volume create.- Returns:
this
-
labels
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder labels(Map<String, String> labels) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getLabels()- Parameters:
labels- Custom metadata to add to your Docker volume. This parameter maps toLabelsin the docker container create command and thexxlabeloption to docker volume create.- Returns:
this
-
labels
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder labels(IResolvable labels) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getLabels()- Parameters:
labels- Custom metadata to add to your Docker volume. This parameter maps toLabelsin the docker container create command and thexxlabeloption to docker volume create.- Returns:
this
-
scope
@Stability(Stable) public CfnTaskDefinition.DockerVolumeConfigurationProperty.Builder scope(String scope) Sets the value ofCfnTaskDefinition.DockerVolumeConfigurationProperty.getScope()- Parameters:
scope- The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to ataskare automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped assharedpersist after the task stops.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTaskDefinition.DockerVolumeConfigurationProperty>- Returns:
- a new instance of
CfnTaskDefinition.DockerVolumeConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-