Class: AWSCDK::Batch::CfnJobDefinition::EKSVolumeProperty

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

Overview

Specifies an Amazon EKS volume for a job definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, empty_dir: nil, host_path: nil, persistent_volume_claim: nil, secret: nil) ⇒ EKSVolumeProperty

Returns a new instance of EKSVolumeProperty.

Parameters:



1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'batch/cfn_job_definition.rb', line 1842

def initialize(name:, empty_dir: nil, host_path: nil, persistent_volume_claim: nil, secret: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @empty_dir = empty_dir.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::EmptyDirProperty.new(**empty_dir.transform_keys(&:to_sym)) : empty_dir
  Jsii::Type.check_type(@empty_dir, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkVtcHR5RGlyUHJvcGVydHkifV19fQ==")), "emptyDir") unless @empty_dir.nil?
  @host_path = host_path.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::HostPathProperty.new(**host_path.transform_keys(&:to_sym)) : host_path
  Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkhvc3RQYXRoUHJvcGVydHkifV19fQ==")), "hostPath") unless @host_path.nil?
  @persistent_volume_claim = persistent_volume_claim.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::EKSPersistentVolumeClaimProperty.new(**persistent_volume_claim.transform_keys(&:to_sym)) : persistent_volume_claim
  Jsii::Type.check_type(@persistent_volume_claim, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkVrc1BlcnNpc3RlbnRWb2x1bWVDbGFpbVByb3BlcnR5In1dfX0=")), "persistentVolumeClaim") unless @persistent_volume_claim.nil?
  @secret = secret.is_a?(Hash) ? ::AWSCDK::Batch::CfnJobDefinition::EKSSecretProperty.new(**secret.transform_keys(&:to_sym)) : secret
  Jsii::Type.check_type(@secret, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iYXRjaC5DZm5Kb2JEZWZpbml0aW9uLkVrc1NlY3JldFByb3BlcnR5In1dfX0=")), "secret") unless @secret.nil?
end

Instance Attribute Details

#empty_dirAWSCDK::IResolvable, ... (readonly)

Specifies the configuration of a Kubernetes emptyDir volume.

For more information, see emptyDir in the Kubernetes documentation .



1868
1869
1870
# File 'batch/cfn_job_definition.rb', line 1868

def empty_dir
  @empty_dir
end

#host_pathAWSCDK::IResolvable, ... (readonly)

Specifies the configuration of a Kubernetes hostPath volume.

For more information, see hostPath in the Kubernetes documentation .



1875
1876
1877
# File 'batch/cfn_job_definition.rb', line 1875

def host_path
  @host_path
end

#nameString (readonly)

The name of the volume.

The name must be allowed as a DNS subdomain name. For more information, see DNS subdomain names in the Kubernetes documentation .



1861
1862
1863
# File 'batch/cfn_job_definition.rb', line 1861

def name
  @name
end

#persistent_volume_claimAWSCDK::IResolvable, ... (readonly)

Specifies the configuration of a Kubernetes persistentVolumeClaim bounded to a persistentVolume .

For more information, see Persistent Volume Claims in the Kubernetes documentation .



1882
1883
1884
# File 'batch/cfn_job_definition.rb', line 1882

def persistent_volume_claim
  @persistent_volume_claim
end

#secretAWSCDK::IResolvable, ... (readonly)

Specifies the configuration of a Kubernetes secret volume.

For more information, see secret in the Kubernetes documentation .



1889
1890
1891
# File 'batch/cfn_job_definition.rb', line 1889

def secret
  @secret
end

Class Method Details

.jsii_propertiesObject



1891
1892
1893
1894
1895
1896
1897
1898
1899
# File 'batch/cfn_job_definition.rb', line 1891

def self.jsii_properties
  {
    :name => "name",
    :empty_dir => "emptyDir",
    :host_path => "hostPath",
    :persistent_volume_claim => "persistentVolumeClaim",
    :secret => "secret",
  }
end

Instance Method Details

#to_jsiiObject



1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
# File 'batch/cfn_job_definition.rb', line 1901

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "emptyDir" => @empty_dir,
    "hostPath" => @host_path,
    "persistentVolumeClaim" => @persistent_volume_claim,
    "secret" => @secret,
  })
  result.compact
end