Class: AWSCDK::ECS::DockerVolumeConfiguration
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::DockerVolumeConfiguration
- Defined in:
- ecs/docker_volume_configuration.rb
Overview
The configuration for a Docker volume.
Docker volumes are only supported when you are using the EC2 launch type.
Instance Attribute Summary collapse
-
#autoprovision ⇒ Boolean?
readonly
Specifies whether the Docker volume should be created if it does not already exist.
-
#driver ⇒ String
readonly
The Docker volume driver to use.
-
#driver_opts ⇒ Hash{String => String}?
readonly
A map of Docker driver-specific options passed through.
-
#labels ⇒ Hash{String => String}?
readonly
Custom metadata to add to your Docker volume.
-
#scope ⇒ AWSCDK::ECS::Scope
readonly
The scope for the Docker volume that determines its lifecycle.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(driver:, scope:, autoprovision: nil, driver_opts: nil, labels: nil) ⇒ DockerVolumeConfiguration
constructor
A new instance of DockerVolumeConfiguration.
- #to_jsii ⇒ Object
Constructor Details
#initialize(driver:, scope:, autoprovision: nil, driver_opts: nil, labels: nil) ⇒ DockerVolumeConfiguration
Returns a new instance of DockerVolumeConfiguration.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'ecs/docker_volume_configuration.rb', line 14 def initialize(driver:, scope:, autoprovision: nil, driver_opts: nil, labels: nil) @driver = driver Jsii::Type.check_type(@driver, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "driver") @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLlNjb3BlIn0=")), "scope") @autoprovision = autoprovision Jsii::Type.check_type(@autoprovision, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "autoprovision") unless @autoprovision.nil? @driver_opts = driver_opts Jsii::Type.check_type(@driver_opts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "driverOpts") unless @driver_opts.nil? @labels = labels Jsii::Type.check_type(@labels, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "labels") unless @labels.nil? end |
Instance Attribute Details
#autoprovision ⇒ Boolean? (readonly)
Default: false
Specifies whether the Docker volume should be created if it does not already exist.
If true is specified, the Docker volume will be created for you.
41 42 43 |
# File 'ecs/docker_volume_configuration.rb', line 41 def autoprovision @autoprovision end |
#driver ⇒ String (readonly)
The Docker volume driver to use.
30 31 32 |
# File 'ecs/docker_volume_configuration.rb', line 30 def driver @driver end |
#driver_opts ⇒ Hash{String => String}? (readonly)
Default: No options
A map of Docker driver-specific options passed through.
46 47 48 |
# File 'ecs/docker_volume_configuration.rb', line 46 def driver_opts @driver_opts end |
#labels ⇒ Hash{String => String}? (readonly)
Default: No labels
Custom metadata to add to your Docker volume.
51 52 53 |
# File 'ecs/docker_volume_configuration.rb', line 51 def labels @labels end |
#scope ⇒ AWSCDK::ECS::Scope (readonly)
The scope for the Docker volume that determines its lifecycle.
34 35 36 |
# File 'ecs/docker_volume_configuration.rb', line 34 def scope @scope end |
Class Method Details
.jsii_properties ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'ecs/docker_volume_configuration.rb', line 53 def self.jsii_properties { :driver => "driver", :scope => "scope", :autoprovision => "autoprovision", :driver_opts => "driverOpts", :labels => "labels", } end |
Instance Method Details
#to_jsii ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 |
# File 'ecs/docker_volume_configuration.rb', line 63 def to_jsii result = {} result.merge!({ "driver" => @driver, "scope" => @scope, "autoprovision" => @autoprovision, "driverOpts" => @driver_opts, "labels" => @labels, }) result.compact end |