Class: AWSCDK::ECS::CfnTaskDefinition::HostVolumePropertiesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_task_definition.rb

Overview

The HostVolumeProperties property specifies details on a container instance bind mount host volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_path: nil) ⇒ HostVolumePropertiesProperty

Returns a new instance of HostVolumePropertiesProperty.

Parameters:

  • source_path (String, nil) (defaults to: nil)

    When the host parameter is used, specify a sourcePath to declare the path on the host container instance that's presented to the container.



2159
2160
2161
2162
# File 'ecs/cfn_task_definition.rb', line 2159

def initialize(source_path: nil)
  @source_path = source_path
  Jsii::Type.check_type(@source_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourcePath") unless @source_path.nil?
end

Instance Attribute Details

#source_pathString? (readonly)

When the host parameter is used, specify a sourcePath to declare the path on the host container instance that's presented to the container.

If this parameter is empty, then the Docker daemon has assigned a host path for you. If the host parameter contains a source_path file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source_path value doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.

If you're using the Fargate launch type, the source_path parameter is not supported.



2172
2173
2174
# File 'ecs/cfn_task_definition.rb', line 2172

def source_path
  @source_path
end

Class Method Details

.jsii_propertiesObject



2174
2175
2176
2177
2178
# File 'ecs/cfn_task_definition.rb', line 2174

def self.jsii_properties
  {
    :source_path => "sourcePath",
  }
end

Instance Method Details

#to_jsiiObject



2180
2181
2182
2183
2184
2185
2186
# File 'ecs/cfn_task_definition.rb', line 2180

def to_jsii
  result = {}
  result.merge!({
    "sourcePath" => @source_path,
  })
  result.compact
end