Class: AWSCDK::Batch::CfnJobDefinition::EKSVolumeProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnJobDefinition::EKSVolumeProperty
- Defined in:
- batch/cfn_job_definition.rb
Overview
Specifies an Amazon EKS volume for a job definition.
Instance Attribute Summary collapse
-
#empty_dir ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration of a Kubernetes
emptyDirvolume. -
#host_path ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration of a Kubernetes
hostPathvolume. -
#name ⇒ String
readonly
The name of the volume.
-
#persistent_volume_claim ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration of a Kubernetes
persistentVolumeClaimbounded to apersistentVolume. -
#secret ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the configuration of a Kubernetes
secretvolume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, empty_dir: nil, host_path: nil, persistent_volume_claim: nil, secret: nil) ⇒ EKSVolumeProperty
constructor
A new instance of EKSVolumeProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, empty_dir: nil, host_path: nil, persistent_volume_claim: nil, secret: nil) ⇒ EKSVolumeProperty
Returns a new instance of EKSVolumeProperty.
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_dir ⇒ AWSCDK::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_path ⇒ AWSCDK::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 |
#name ⇒ String (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_claim ⇒ AWSCDK::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 |
#secret ⇒ AWSCDK::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_properties ⇒ Object
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_jsii ⇒ Object
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 |