Class: AWSCDK::Batch::SecretPathVolumeOptions

Inherits:
EKSVolumeOptions
  • Object
show all
Defined in:
batch/secret_path_volume_options.rb

Overview

Options for a Kubernetes SecretPath Volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, mount_path: nil, readonly: nil, secret_name:, optional: nil) ⇒ SecretPathVolumeOptions

Returns a new instance of SecretPathVolumeOptions.

Parameters:

  • name (String)

    The name of this volume.

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

    The path on the container where the volume is mounted.

  • readonly (Boolean, nil) (defaults to: nil)

    If specified, the container has readonly access to the volume.

  • secret_name (String)

    The name of the secret.

  • optional (Boolean, nil) (defaults to: nil)

    Specifies whether the secret or the secret's keys must be defined.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'batch/secret_path_volume_options.rb', line 14

def initialize(name:, mount_path: nil, readonly: nil, secret_name:, optional: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @mount_path = mount_path
  Jsii::Type.check_type(@mount_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPath") unless @mount_path.nil?
  @readonly = readonly
  Jsii::Type.check_type(@readonly, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readonly") unless @readonly.nil?
  @secret_name = secret_name
  Jsii::Type.check_type(@secret_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretName")
  @optional = optional
  Jsii::Type.check_type(@optional, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "optional") unless @optional.nil?
end

Instance Attribute Details

#mount_pathString? (readonly)

Note:

Default: - the volume is not mounted

The path on the container where the volume is mounted.

Returns:

  • (String, nil)


38
39
40
# File 'batch/secret_path_volume_options.rb', line 38

def mount_path
  @mount_path
end

#nameString (readonly)

The name of this volume.

The name must be a valid DNS subdomain name.



33
34
35
# File 'batch/secret_path_volume_options.rb', line 33

def name
  @name
end

#optionalBoolean? (readonly)

Note:

Default: true

Specifies whether the secret or the secret's keys must be defined.

Returns:

  • (Boolean, nil)


57
58
59
# File 'batch/secret_path_volume_options.rb', line 57

def optional
  @optional
end

#readonlyBoolean? (readonly)

Note:

Default: false

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

Returns:

  • (Boolean, nil)


45
46
47
# File 'batch/secret_path_volume_options.rb', line 45

def readonly
  @readonly
end

#secret_nameString (readonly)

The name of the secret.

Must be a valid DNS subdomain name.



52
53
54
# File 'batch/secret_path_volume_options.rb', line 52

def secret_name
  @secret_name
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'batch/secret_path_volume_options.rb', line 59

def self.jsii_properties
  {
    :name => "name",
    :mount_path => "mountPath",
    :readonly => "readonly",
    :secret_name => "secretName",
    :optional => "optional",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
80
# File 'batch/secret_path_volume_options.rb', line 69

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "name" => @name,
    "mountPath" => @mount_path,
    "readonly" => @readonly,
    "secretName" => @secret_name,
    "optional" => @optional,
  })
  result.compact
end