Class VolumeFrom.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.VolumeFrom.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VolumeFrom>
- Enclosing interface:
- VolumeFrom
@Stability(Stable)
public static final class VolumeFrom.Builder
extends Object
implements software.amazon.jsii.Builder<VolumeFrom>
A builder for
VolumeFrom-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofVolumeFrom.getReadOnly()sourceContainer(String sourceContainer) Sets the value ofVolumeFrom.getSourceContainer()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
readOnly
Sets the value ofVolumeFrom.getReadOnly()- Parameters:
readOnly- Specifies whether the container has read-only access to the volume. This parameter is required. If this value is true, the container has read-only access to the volume. If this value is false, then the container can write to the volume.- Returns:
this
-
sourceContainer
Sets the value ofVolumeFrom.getSourceContainer()- Parameters:
sourceContainer- The name of another container within the same task definition from which to mount volumes. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<VolumeFrom>- Returns:
- a new instance of
VolumeFrom - Throws:
NullPointerException- if any required attribute was not provided
-