Class: AWSCDK::ECS::CfnDaemonTaskDefinition::HostVolumePropertiesProperty

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

Overview

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.



1400
1401
1402
1403
# File 'ecs/cfn_daemon_task_definition.rb', line 1400

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.



1412
1413
1414
# File 'ecs/cfn_daemon_task_definition.rb', line 1412

def source_path
  @source_path
end

Class Method Details

.jsii_propertiesObject



1414
1415
1416
1417
1418
# File 'ecs/cfn_daemon_task_definition.rb', line 1414

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

Instance Method Details

#to_jsiiObject



1420
1421
1422
1423
1424
1425
1426
# File 'ecs/cfn_daemon_task_definition.rb', line 1420

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