/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the ecs-2014-11-13.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ECS.Model
{
///
/// 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.
///
public partial class DockerVolumeConfiguration
{
private bool? _autoprovision;
private string _driver;
private Dictionary _driverOpts = new Dictionary();
private Dictionary _labels = new Dictionary();
private Scope _scope;
///
/// Gets and sets the property Autoprovision.
///
/// 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
.
///
///
///
public bool Autoprovision
{
get { return this._autoprovision.GetValueOrDefault(); }
set { this._autoprovision = value; }
}
// Check to see if Autoprovision property is set
internal bool IsSetAutoprovision()
{
return this._autoprovision.HasValue;
}
///
/// Gets and sets the property 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.
///
///
public string Driver
{
get { return this._driver; }
set { this._driver = value; }
}
// Check to see if Driver property is set
internal bool IsSetDriver()
{
return this._driver != null;
}
///
/// Gets and sets the property DriverOpts.
///
/// 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.
///
///
public Dictionary DriverOpts
{
get { return this._driverOpts; }
set { this._driverOpts = value; }
}
// Check to see if DriverOpts property is set
internal bool IsSetDriverOpts()
{
return this._driverOpts != null && this._driverOpts.Count > 0;
}
///
/// Gets and sets the property Labels.
///
/// 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.
///
///
public Dictionary Labels
{
get { return this._labels; }
set { this._labels = value; }
}
// Check to see if Labels property is set
internal bool IsSetLabels()
{
return this._labels != null && this._labels.Count > 0;
}
///
/// Gets and sets the property 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.
///
///
public Scope Scope
{
get { return this._scope; }
set { this._scope = value; }
}
// Check to see if Scope property is set
internal bool IsSetScope()
{
return this._scope != null;
}
}
}