/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ECS { namespace 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.

See Also:

AWS * API Reference

*/ class DockerVolumeConfiguration { public: AWS_ECS_API DockerVolumeConfiguration(); AWS_ECS_API DockerVolumeConfiguration(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API DockerVolumeConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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.

*/ inline const Scope& GetScope() const{ return m_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.

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

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.

*/ inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

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.

*/ inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

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.

*/ inline DockerVolumeConfiguration& WithScope(const Scope& value) { SetScope(value); 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.

*/ inline DockerVolumeConfiguration& WithScope(Scope&& value) { SetScope(std::move(value)); 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.

*/ inline bool GetAutoprovision() const{ return m_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.

*/ inline bool AutoprovisionHasBeenSet() const { return m_autoprovisionHasBeenSet; } /** *

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.

*/ inline void SetAutoprovision(bool value) { m_autoprovisionHasBeenSet = true; m_autoprovision = value; } /** *

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.

*/ inline DockerVolumeConfiguration& WithAutoprovision(bool value) { SetAutoprovision(value); return *this;} /** *

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.

*/ inline const Aws::String& GetDriver() const{ return m_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.

*/ inline bool DriverHasBeenSet() const { return m_driverHasBeenSet; } /** *

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.

*/ inline void SetDriver(const Aws::String& value) { m_driverHasBeenSet = true; m_driver = value; } /** *

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.

*/ inline void SetDriver(Aws::String&& value) { m_driverHasBeenSet = true; m_driver = std::move(value); } /** *

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.

*/ inline void SetDriver(const char* value) { m_driverHasBeenSet = true; m_driver.assign(value); } /** *

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.

*/ inline DockerVolumeConfiguration& WithDriver(const Aws::String& value) { SetDriver(value); return *this;} /** *

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.

*/ inline DockerVolumeConfiguration& WithDriver(Aws::String&& value) { SetDriver(std::move(value)); return *this;} /** *

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.

*/ inline DockerVolumeConfiguration& WithDriver(const char* value) { SetDriver(value); 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.

*/ inline const Aws::Map& GetDriverOpts() const{ return m_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.

*/ inline bool DriverOptsHasBeenSet() const { return m_driverOptsHasBeenSet; } /** *

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.

*/ inline void SetDriverOpts(const Aws::Map& value) { m_driverOptsHasBeenSet = true; m_driverOpts = value; } /** *

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.

*/ inline void SetDriverOpts(Aws::Map&& value) { m_driverOptsHasBeenSet = true; m_driverOpts = std::move(value); } /** *

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.

*/ inline DockerVolumeConfiguration& WithDriverOpts(const Aws::Map& value) { SetDriverOpts(value); 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.

*/ inline DockerVolumeConfiguration& WithDriverOpts(Aws::Map&& value) { SetDriverOpts(std::move(value)); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(const Aws::String& key, const Aws::String& value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(key, value); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(Aws::String&& key, const Aws::String& value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(std::move(key), value); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(const Aws::String& key, Aws::String&& value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(key, std::move(value)); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(Aws::String&& key, Aws::String&& value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(std::move(key), std::move(value)); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(const char* key, Aws::String&& value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(key, std::move(value)); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(Aws::String&& key, const char* value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(std::move(key), value); 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.

*/ inline DockerVolumeConfiguration& AddDriverOpts(const char* key, const char* value) { m_driverOptsHasBeenSet = true; m_driverOpts.emplace(key, value); return *this; } /** *

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.

*/ inline const Aws::Map& GetLabels() const{ return m_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.

*/ inline bool LabelsHasBeenSet() const { return m_labelsHasBeenSet; } /** *

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.

*/ inline void SetLabels(const Aws::Map& value) { m_labelsHasBeenSet = true; m_labels = value; } /** *

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.

*/ inline void SetLabels(Aws::Map&& value) { m_labelsHasBeenSet = true; m_labels = std::move(value); } /** *

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.

*/ inline DockerVolumeConfiguration& WithLabels(const Aws::Map& value) { SetLabels(value); return *this;} /** *

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.

*/ inline DockerVolumeConfiguration& WithLabels(Aws::Map&& value) { SetLabels(std::move(value)); return *this;} /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(const Aws::String& key, const Aws::String& value) { m_labelsHasBeenSet = true; m_labels.emplace(key, value); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(Aws::String&& key, const Aws::String& value) { m_labelsHasBeenSet = true; m_labels.emplace(std::move(key), value); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(const Aws::String& key, Aws::String&& value) { m_labelsHasBeenSet = true; m_labels.emplace(key, std::move(value)); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(Aws::String&& key, Aws::String&& value) { m_labelsHasBeenSet = true; m_labels.emplace(std::move(key), std::move(value)); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(const char* key, Aws::String&& value) { m_labelsHasBeenSet = true; m_labels.emplace(key, std::move(value)); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(Aws::String&& key, const char* value) { m_labelsHasBeenSet = true; m_labels.emplace(std::move(key), value); return *this; } /** *

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.

*/ inline DockerVolumeConfiguration& AddLabels(const char* key, const char* value) { m_labelsHasBeenSet = true; m_labels.emplace(key, value); return *this; } private: Scope m_scope; bool m_scopeHasBeenSet = false; bool m_autoprovision; bool m_autoprovisionHasBeenSet = false; Aws::String m_driver; bool m_driverHasBeenSet = false; Aws::Map m_driverOpts; bool m_driverOptsHasBeenSet = false; Aws::Map m_labels; bool m_labelsHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws