/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* This parameter is specified when you're using Docker volumes. Docker volumes are only supported when you're using the
* EC2 launch type. Windows containers only support the use of the local
driver. To use bind mounts,
* specify a host
instead.
*
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a
* task
are automatically provisioned when the task starts and destroyed when the task stops. Docker
* volumes that are scoped as shared
persist after the task stops.
*
* If this value is true
, the Docker volume is created if it doesn't already exist.
*
* This field is only used if the scope
is shared
.
*
* 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, use
* docker plugin ls
to 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. For more information,
* see Docker plugin discovery.
* This parameter maps to Driver
in the Create a volume section of the Docker Remote API and the xxdriver
option to docker volume create.
*
* A map of Docker driver-specific options passed through. This parameter maps to DriverOpts
in the Create a volume section of the Docker Remote API and the xxopt
option to docker volume create.
*
* Custom metadata to add to your Docker volume. This parameter maps to Labels
in the Create a volume section of the Docker Remote API and the xxlabel
option to docker volume create.
*
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a
* task
are automatically provisioned when the task starts and destroyed when the task stops. Docker
* volumes that are scoped as shared
persist after the task stops.
*
task
are automatically provisioned when the task starts and destroyed when the task stops.
* Docker volumes that are scoped as shared
persist after the task stops.
* @see Scope
*/
public void setScope(String scope) {
this.scope = scope;
}
/**
*
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a
* task
are automatically provisioned when the task starts and destroyed when the task stops. Docker
* volumes that are scoped as shared
persist after the task stops.
*
task
are automatically provisioned when the task starts and destroyed when the task stops.
* Docker volumes that are scoped as shared
persist after the task stops.
* @see Scope
*/
public String getScope() {
return this.scope;
}
/**
*
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a
* task
are automatically provisioned when the task starts and destroyed when the task stops. Docker
* volumes that are scoped as shared
persist after the task stops.
*
task
are automatically provisioned when the task starts and destroyed when the task stops.
* Docker volumes that are scoped as shared
persist after the task stops.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Scope
*/
public DockerVolumeConfiguration withScope(String scope) {
setScope(scope);
return this;
}
/**
*
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a
* task
are automatically provisioned when the task starts and destroyed when the task stops. Docker
* volumes that are scoped as shared
persist after the task stops.
*
task
are automatically provisioned when the task starts and destroyed when the task stops.
* Docker volumes that are scoped as shared
persist after the task stops.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Scope
*/
public DockerVolumeConfiguration withScope(Scope scope) {
this.scope = scope.toString();
return this;
}
/**
*
* If this value is true
, the Docker volume is created if it doesn't already exist.
*
* This field is only used if the scope
is shared
.
*
true
, the Docker volume is created if it doesn't already exist.
* This field is only used if the scope
is shared
.
*
* If this value is true
, the Docker volume is created if it doesn't already exist.
*
* This field is only used if the scope
is shared
.
*
true
, the Docker volume is created if it doesn't already exist.
* This field is only used if the scope
is shared
.
*
* If this value is true
, the Docker volume is created if it doesn't already exist.
*
* This field is only used if the scope
is shared
.
*
true
, the Docker volume is created if it doesn't already exist.
* This field is only used if the scope
is shared
.
*
* If this value is true
, the Docker volume is created if it doesn't already exist.
*
* This field is only used if the scope
is shared
.
*
true
, the Docker volume is created if it doesn't already exist.
* This field is only used if the scope
is shared
.
*
* 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, use
* docker plugin ls
to 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. For more information,
* see Docker plugin discovery.
* This parameter maps to Driver
in the Create a volume section of the Docker Remote API and the xxdriver
option to docker volume create.
*
docker plugin ls
to 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. For more
* information, see Docker
* plugin discovery. This parameter maps to Driver
in the Create a volume section of the
* Docker Remote API and the xxdriver
* option to docker volume
* create.
*/
public void setDriver(String driver) {
this.driver = 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, use
* docker plugin ls
to 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. For more information,
* see Docker plugin discovery.
* This parameter maps to Driver
in the Create a volume section of the Docker Remote API and the xxdriver
option to docker volume create.
*
docker plugin ls
to 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. For more
* information, see Docker
* plugin discovery. This parameter maps to Driver
in the Create a volume section of
* the Docker Remote API and the
* xxdriver
option to docker volume create.
*/
public String getDriver() {
return this.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, use
* docker plugin ls
to 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. For more information,
* see Docker plugin discovery.
* This parameter maps to Driver
in the Create a volume section of the Docker Remote API and the xxdriver
option to docker volume create.
*
docker plugin ls
to 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. For more
* information, see Docker
* plugin discovery. This parameter maps to Driver
in the Create a volume section of the
* Docker Remote API and the xxdriver
* option to docker volume
* create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DockerVolumeConfiguration withDriver(String driver) {
setDriver(driver);
return this;
}
/**
*
* A map of Docker driver-specific options passed through. This parameter maps to DriverOpts
in the Create a volume section of the Docker Remote API and the xxopt
option to docker volume create.
*
DriverOpts
in
* the Create a volume
* section of the Docker Remote API and the
* xxopt
option to docker volume create.
*/
public java.util.Map
* A map of Docker driver-specific options passed through. This parameter maps to DriverOpts
in the Create a volume section of the Docker Remote API and the xxopt
option to docker volume create.
*
DriverOpts
in
* the Create a volume section
* of the Docker Remote API and the
* xxopt
option to docker volume create.
*/
public void setDriverOpts(java.util.Map
* A map of Docker driver-specific options passed through. This parameter maps to DriverOpts
in the Create a volume section of the Docker Remote API and the xxopt
option to docker volume create.
*
DriverOpts
in
* the Create a volume section
* of the Docker Remote API and the
* xxopt
option to docker volume create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DockerVolumeConfiguration withDriverOpts(java.util.Map
* Custom metadata to add to your Docker volume. This parameter maps to Labels
in the Create a volume section of the Docker Remote API and the xxlabel
option to docker volume create.
*
Labels
in the Create a volume section of
* the Docker Remote API and the
* xxlabel
option to docker volume create.
*/
public java.util.Map
* Custom metadata to add to your Docker volume. This parameter maps to Labels
in the Create a volume section of the Docker Remote API and the xxlabel
option to docker volume create.
*
Labels
in the Create a volume section of the
* Docker Remote API and the xxlabel
* option to docker volume
* create.
*/
public void setLabels(java.util.Map
* Custom metadata to add to your Docker volume. This parameter maps to Labels
in the Create a volume section of the Docker Remote API and the xxlabel
option to docker volume create.
*
Labels
in the Create a volume section of the
* Docker Remote API and the xxlabel
* option to docker volume
* create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DockerVolumeConfiguration withLabels(java.util.Map