Class: AWSCDK::Batch::CfnJobDefinition::EKSContainerVolumeMountProperty

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

Overview

The volume mounts for a container for an Amazon EKS job.

For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mount_path: nil, name: nil, read_only: nil, sub_path: nil) ⇒ EKSContainerVolumeMountProperty

Returns a new instance of EKSContainerVolumeMountProperty.

Parameters:

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

    The path on the container where the volume is mounted.

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

    The name the volume mount.

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

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

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

    A sub-path inside the referenced volume instead of its root.



1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
# File 'batch/cfn_job_definition.rb', line 1647

def initialize(mount_path: nil, name: nil, read_only: nil, sub_path: nil)
  @mount_path = mount_path
  Jsii::Type.check_type(@mount_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPath") unless @mount_path.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @read_only = read_only
  Jsii::Type.check_type(@read_only, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "readOnly") unless @read_only.nil?
  @sub_path = sub_path
  Jsii::Type.check_type(@sub_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subPath") unless @sub_path.nil?
end

Instance Attribute Details

#mount_pathString? (readonly)

The path on the container where the volume is mounted.



1662
1663
1664
# File 'batch/cfn_job_definition.rb', line 1662

def mount_path
  @mount_path
end

#nameString? (readonly)

The name the volume mount.

This must match the name of one of the volumes in the pod.



1669
1670
1671
# File 'batch/cfn_job_definition.rb', line 1669

def name
  @name
end

#read_onlyBoolean, ... (readonly)

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

Otherwise, the container can write to the volume. The default value is false .



1676
1677
1678
# File 'batch/cfn_job_definition.rb', line 1676

def read_only
  @read_only
end

#sub_pathString? (readonly)

A sub-path inside the referenced volume instead of its root.



1681
1682
1683
# File 'batch/cfn_job_definition.rb', line 1681

def sub_path
  @sub_path
end

Class Method Details

.jsii_propertiesObject



1683
1684
1685
1686
1687
1688
1689
1690
# File 'batch/cfn_job_definition.rb', line 1683

def self.jsii_properties
  {
    :mount_path => "mountPath",
    :name => "name",
    :read_only => "readOnly",
    :sub_path => "subPath",
  }
end

Instance Method Details

#to_jsiiObject



1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
# File 'batch/cfn_job_definition.rb', line 1692

def to_jsii
  result = {}
  result.merge!({
    "mountPath" => @mount_path,
    "name" => @name,
    "readOnly" => @read_only,
    "subPath" => @sub_path,
  })
  result.compact
end