Class: AWSCDK::Batch::CfnJobDefinition::DeviceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_job_definition.rb

Overview

An object that represents a container instance host device.

This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path: nil, host_path: nil, permissions: nil) ⇒ DeviceProperty

Returns a new instance of DeviceProperty.

Parameters:

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

    The path inside the container that's used to expose the host device.

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

    The path for the device on the host container instance.

  • permissions (Array<String>, nil) (defaults to: nil)

    The explicit permissions to provide to the container for the device.



1148
1149
1150
1151
1152
1153
1154
1155
# File 'batch/cfn_job_definition.rb', line 1148

def initialize(container_path: nil, host_path: nil, permissions: nil)
  @container_path = container_path
  Jsii::Type.check_type(@container_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerPath") unless @container_path.nil?
  @host_path = host_path
  Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostPath") unless @host_path.nil?
  @permissions = permissions
  Jsii::Type.check_type(@permissions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "permissions") unless @permissions.nil?
end

Instance Attribute Details

#container_pathString? (readonly)

The path inside the container that's used to expose the host device.

By default, the host_path value is used.



1163
1164
1165
# File 'batch/cfn_job_definition.rb', line 1163

def container_path
  @container_path
end

#host_pathString? (readonly)

The path for the device on the host container instance.



1168
1169
1170
# File 'batch/cfn_job_definition.rb', line 1168

def host_path
  @host_path
end

#permissionsArray<String>? (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.



1175
1176
1177
# File 'batch/cfn_job_definition.rb', line 1175

def permissions
  @permissions
end

Class Method Details

.jsii_propertiesObject



1177
1178
1179
1180
1181
1182
1183
# File 'batch/cfn_job_definition.rb', line 1177

def self.jsii_properties
  {
    :container_path => "containerPath",
    :host_path => "hostPath",
    :permissions => "permissions",
  }
end

Instance Method Details

#to_jsiiObject



1185
1186
1187
1188
1189
1190
1191
1192
1193
# File 'batch/cfn_job_definition.rb', line 1185

def to_jsii
  result = {}
  result.merge!({
    "containerPath" => @container_path,
    "hostPath" => @host_path,
    "permissions" => @permissions,
  })
  result.compact
end