Class: AWSCDK::ECS::CfnTaskDefinition::DockerVolumeConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnTaskDefinition::DockerVolumeConfigurationProperty
- Defined in:
- ecs/cfn_task_definition.rb
Overview
The DockerVolumeConfiguration property specifies a Docker volume configuration and is used when you use Docker volumes.
Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the local driver. To use bind mounts, specify a host instead.
Instance Attribute Summary collapse
-
#autoprovision ⇒ Boolean, ...
readonly
If this value is
true, the Docker volume is created if it doesn't already exist. -
#driver ⇒ String?
readonly
The Docker volume driver to use.
-
#driver_opts ⇒ AWSCDK::IResolvable, ...
readonly
A map of Docker driver-specific options passed through.
-
#labels ⇒ AWSCDK::IResolvable, ...
readonly
Custom metadata to add to your Docker volume.
-
#scope ⇒ String?
readonly
The scope for the Docker volume that determines its lifecycle.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(autoprovision: nil, driver: nil, driver_opts: nil, labels: nil, scope: nil) ⇒ DockerVolumeConfigurationProperty
constructor
A new instance of DockerVolumeConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(autoprovision: nil, driver: nil, driver_opts: nil, labels: nil, scope: nil) ⇒ DockerVolumeConfigurationProperty
Returns a new instance of DockerVolumeConfigurationProperty.
1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 |
# File 'ecs/cfn_task_definition.rb', line 1584 def initialize(autoprovision: nil, driver: nil, driver_opts: nil, labels: nil, scope: nil) @autoprovision = autoprovision Jsii::Type.check_type(@autoprovision, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoprovision") unless @autoprovision.nil? @driver = driver Jsii::Type.check_type(@driver, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "driver") unless @driver.nil? @driver_opts = driver_opts Jsii::Type.check_type(@driver_opts, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "driverOpts") unless @driver_opts.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "labels") unless @labels.nil? @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scope") unless @scope.nil? end |
Instance Attribute Details
#autoprovision ⇒ Boolean, ... (readonly)
If this value is true , the Docker volume is created if it doesn't already exist.
This field is only used if the
scopeisshared.
1603 1604 1605 |
# File 'ecs/cfn_task_definition.rb', line 1603 def autoprovision @autoprovision end |
#driver ⇒ String? (readonly)
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. This parameter maps to Driver in the docker container create command and the xxdriver option to docker volume create.
1610 1611 1612 |
# File 'ecs/cfn_task_definition.rb', line 1610 def driver @driver end |
#driver_opts ⇒ AWSCDK::IResolvable, ... (readonly)
A map of Docker driver-specific options passed through.
This parameter maps to DriverOpts in the docker create-volume command and the xxopt option to docker volume create.
1617 1618 1619 |
# File 'ecs/cfn_task_definition.rb', line 1617 def driver_opts @driver_opts end |
#labels ⇒ AWSCDK::IResolvable, ... (readonly)
Custom metadata to add to your Docker volume.
This parameter maps to Labels in the docker container create command and the xxlabel option to docker volume create.
1624 1625 1626 |
# File 'ecs/cfn_task_definition.rb', line 1624 def labels @labels end |
#scope ⇒ String? (readonly)
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.
1631 1632 1633 |
# File 'ecs/cfn_task_definition.rb', line 1631 def scope @scope end |
Class Method Details
.jsii_properties ⇒ Object
1633 1634 1635 1636 1637 1638 1639 1640 1641 |
# File 'ecs/cfn_task_definition.rb', line 1633 def self.jsii_properties { :autoprovision => "autoprovision", :driver => "driver", :driver_opts => "driverOpts", :labels => "labels", :scope => "scope", } end |
Instance Method Details
#to_jsii ⇒ Object
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 |
# File 'ecs/cfn_task_definition.rb', line 1643 def to_jsii result = {} result.merge!({ "autoprovision" => @autoprovision, "driver" => @driver, "driverOpts" => @driver_opts, "labels" => @labels, "scope" => @scope, }) result.compact end |