@Stability(value=Experimental) public static final class ContainerOptions.Builder extends Object implements software.amazon.jsii.Builder<ContainerOptions>
ContainerOptions| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ContainerOptions |
build()
Builds the configured instance.
|
ContainerOptions.Builder |
credentials(ContainerCredentials credentials)
Sets the value of
ContainerOptions.getCredentials() |
ContainerOptions.Builder |
env(Map<String,String> env)
Sets the value of
ContainerOptions.getEnv() |
ContainerOptions.Builder |
image(String image)
Sets the value of
ContainerOptions.getImage() |
ContainerOptions.Builder |
options(List<String> options)
Sets the value of
ContainerOptions.getOptions() |
ContainerOptions.Builder |
ports(List<? extends Number> ports)
Sets the value of
ContainerOptions.getPorts() |
ContainerOptions.Builder |
volumes(List<String> volumes)
Sets the value of
ContainerOptions.getVolumes() |
@Stability(value=Experimental) public ContainerOptions.Builder image(String image)
ContainerOptions.getImage()image - The Docker image to use as the container to run the action. This parameter is required.
The value can
be the Docker Hub image name or a registry name.this@Stability(value=Experimental) public ContainerOptions.Builder credentials(ContainerCredentials credentials)
ContainerOptions.getCredentials()credentials - f the image's container registry requires authentication to pull the image, you can use credentials to set a map of the username and password.
The credentials are the same values that you would provide to the docker
login command.this@Stability(value=Experimental) public ContainerOptions.Builder env(Map<String,String> env)
ContainerOptions.getEnv()env - Sets a map of environment variables in the container.this@Stability(value=Experimental) public ContainerOptions.Builder options(List<String> options)
ContainerOptions.getOptions()options - Additional Docker container resource options.this@Stability(value=Experimental) public ContainerOptions.Builder ports(List<? extends Number> ports)
ContainerOptions.getPorts()ports - Sets an array of ports to expose on the container.this@Stability(value=Experimental) public ContainerOptions.Builder volumes(List<String> volumes)
ContainerOptions.getVolumes()volumes - Sets an array of volumes for the container to use.
You can use volumes to
share data between services or other steps in a job. You can specify
named Docker volumes, anonymous Docker volumes, or bind mounts on the
host.
To specify a volume, you specify the source and destination path:
<source>:<destinationPath>.
this@Stability(value=Experimental) public ContainerOptions build()
build in interface software.amazon.jsii.Builder<ContainerOptions>ContainerOptionsNullPointerException - if any required attribute was not providedCopyright © 2021. All rights reserved.