Class: AWSCDK::ECS::CfnTaskDefinition::VolumeFromProperty

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

Overview

Details on a data volume from another container in the same task definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(read_only: nil, source_container: nil) ⇒ VolumeFromProperty

Returns a new instance of VolumeFromProperty.

Parameters:

  • read_only (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If this value is true , the container has read-only access to the volume.

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

    The name of another container within the same task definition to mount volumes from.



3432
3433
3434
3435
3436
3437
# File 'ecs/cfn_task_definition.rb', line 3432

def initialize(read_only: nil, source_container: nil)
  @read_only = read_only
  Jsii::Type.check_type(@read_only, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "readOnly") unless @read_only.nil?
  @source_container = source_container
  Jsii::Type.check_type(@source_container, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceContainer") unless @source_container.nil?
end

Instance Attribute Details

#read_onlyBoolean, ... (readonly)

If this value is true , the container has read-only access to the volume.

If this value is false , then the container can write to the volume. The default value is false .



3445
3446
3447
# File 'ecs/cfn_task_definition.rb', line 3445

def read_only
  @read_only
end

#source_containerString? (readonly)

The name of another container within the same task definition to mount volumes from.



3450
3451
3452
# File 'ecs/cfn_task_definition.rb', line 3450

def source_container
  @source_container
end

Class Method Details

.jsii_propertiesObject



3452
3453
3454
3455
3456
3457
# File 'ecs/cfn_task_definition.rb', line 3452

def self.jsii_properties
  {
    :read_only => "readOnly",
    :source_container => "sourceContainer",
  }
end

Instance Method Details

#to_jsiiObject



3459
3460
3461
3462
3463
3464
3465
3466
# File 'ecs/cfn_task_definition.rb', line 3459

def to_jsii
  result = {}
  result.merge!({
    "readOnly" => @read_only,
    "sourceContainer" => @source_container,
  })
  result.compact
end