Class: AWSCDK::ECS::Device
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::Device
- Defined in:
- ecs/device.rb
Overview
A container instance host device.
Instance Attribute Summary collapse
-
#container_path ⇒ String?
readonly
The path inside the container at which to expose the host device.
-
#host_path ⇒ String
readonly
The path for the device on the host container instance.
-
#permissions ⇒ Array<AWSCDK::ECS::DevicePermission>?
readonly
The explicit permissions to provide to the container for the device.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(host_path:, container_path: nil, permissions: nil) ⇒ Device
constructor
A new instance of Device.
- #to_jsii ⇒ Object
Constructor Details
#initialize(host_path:, container_path: nil, permissions: nil) ⇒ Device
Returns a new instance of Device.
10 11 12 13 14 15 16 17 |
# File 'ecs/device.rb', line 10 def initialize(host_path:, container_path: nil, permissions: nil) @host_path = host_path Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostPath") @container_path = container_path Jsii::Type.check_type(@container_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerPath") unless @container_path.nil? @permissions = Jsii::Type.check_type(@permissions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuRGV2aWNlUGVybWlzc2lvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "permissions") unless @permissions.nil? end |
Instance Attribute Details
#container_path ⇒ String? (readonly)
Note:
Default: Same path as the host
The path inside the container at which to expose the host device.
27 28 29 |
# File 'ecs/device.rb', line 27 def container_path @container_path end |
#host_path ⇒ String (readonly)
The path for the device on the host container instance.
22 23 24 |
# File 'ecs/device.rb', line 22 def host_path @host_path end |
#permissions ⇒ Array<AWSCDK::ECS::DevicePermission>? (readonly)
Note:
Default: Readonly
The explicit permissions to provide to the container for the device.
By default, the container has permissions for read, write, and mknod for the device.
34 35 36 |
# File 'ecs/device.rb', line 34 def @permissions end |
Class Method Details
.jsii_properties ⇒ Object
36 37 38 39 40 41 42 |
# File 'ecs/device.rb', line 36 def self.jsii_properties { :host_path => "hostPath", :container_path => "containerPath", :permissions => "permissions", } end |
Instance Method Details
#to_jsii ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'ecs/device.rb', line 44 def to_jsii result = {} result.merge!({ "hostPath" => @host_path, "containerPath" => @container_path, "permissions" => @permissions, }) result.compact end |