Class: CDK8sPlus25::AzureDiskPersistentVolumeProps
- Inherits:
-
PersistentVolumeProps
- Object
- PersistentVolumeProps
- CDK8sPlus25::AzureDiskPersistentVolumeProps
- Defined in:
- azure_disk_persistent_volume_props.rb
Overview
Properties for AzureDiskPersistentVolume.
Instance Attribute Summary collapse
-
#access_modes ⇒ Array<CDK8sPlus25::PersistentVolumeAccessMode>?
readonly
Contains all ways the volume can be mounted.
-
#caching_mode ⇒ CDK8sPlus25::AzureDiskPersistentVolumeCachingMode?
readonly
Host Caching mode.
-
#claim ⇒ CDK8sPlus25::IPersistentVolumeClaim?
readonly
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
-
#disk_name ⇒ String
readonly
The Name of the data disk in the blob storage.
-
#disk_uri ⇒ String
readonly
The URI the data disk in the blob storage.
-
#fs_type ⇒ String?
readonly
Filesystem type to mount.
-
#kind ⇒ CDK8sPlus25::AzureDiskPersistentVolumeKind?
readonly
Kind of disk.
-
#metadata ⇒ CDK8s::APIObjectMetadata?
readonly
Metadata that all persisted resources must have, which includes all objects users must create.
-
#mount_options ⇒ Array<String>?
readonly
A list of mount options, e.g.
-
#read_only ⇒ Boolean?
readonly
Force the ReadOnly setting in VolumeMounts.
-
#reclaim_policy ⇒ CDK8sPlus25::PersistentVolumeReclaimPolicy?
readonly
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
-
#storage ⇒ CDK8s::Size?
readonly
What is the storage capacity of this volume.
-
#storage_class_name ⇒ String?
readonly
Name of StorageClass to which this persistent volume belongs.
-
#volume_mode ⇒ CDK8sPlus25::PersistentVolumeMode?
readonly
Defines what type of volume is required by the claim.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, access_modes: nil, claim: nil, mount_options: nil, reclaim_policy: nil, storage: nil, storage_class_name: nil, volume_mode: nil, disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil) ⇒ AzureDiskPersistentVolumeProps
constructor
A new instance of AzureDiskPersistentVolumeProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, access_modes: nil, claim: nil, mount_options: nil, reclaim_policy: nil, storage: nil, storage_class_name: nil, volume_mode: nil, disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil) ⇒ AzureDiskPersistentVolumeProps
Returns a new instance of AzureDiskPersistentVolumeProps.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'azure_disk_persistent_volume_props.rb', line 21 def initialize(metadata: nil, access_modes: nil, claim: nil, mount_options: nil, reclaim_policy: nil, storage: nil, storage_class_name: nil, volume_mode: nil, disk_name:, disk_uri:, caching_mode: nil, fs_type: nil, kind: nil, read_only: nil) @metadata = .is_a?(Hash) ? ::CDK8s::APIObjectMetadata.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy5BcGlPYmplY3RNZXRhZGF0YSJ9", "metadata") unless @metadata.nil? @access_modes = access_modes Jsii::Type.check_type(@access_modes, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImNkazhzLXBsdXMtMjUuUGVyc2lzdGVudFZvbHVtZUFjY2Vzc01vZGUifSwia2luZCI6ImFycmF5In19", "accessModes") unless @access_modes.nil? @claim = claim Jsii::Type.check_type(@claim, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LklQZXJzaXN0ZW50Vm9sdW1lQ2xhaW0ifQ==", "claim") unless @claim.nil? @mount_options = Jsii::Type.check_type(@mount_options, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=", "mountOptions") unless @mount_options.nil? @reclaim_policy = reclaim_policy Jsii::Type.check_type(@reclaim_policy, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LlBlcnNpc3RlbnRWb2x1bWVSZWNsYWltUG9saWN5In0=", "reclaimPolicy") unless @reclaim_policy.nil? @storage = storage Jsii::Type.check_type(@storage, "eyJmcW4iOiJjZGs4cy5TaXplIn0=", "storage") unless @storage.nil? @storage_class_name = storage_class_name Jsii::Type.check_type(@storage_class_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "storageClassName") unless @storage_class_name.nil? @volume_mode = volume_mode Jsii::Type.check_type(@volume_mode, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LlBlcnNpc3RlbnRWb2x1bWVNb2RlIn0=", "volumeMode") unless @volume_mode.nil? @disk_name = disk_name Jsii::Type.check_type(@disk_name, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "diskName") @disk_uri = disk_uri Jsii::Type.check_type(@disk_uri, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "diskUri") @caching_mode = caching_mode Jsii::Type.check_type(@caching_mode, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkF6dXJlRGlza1BlcnNpc3RlbnRWb2x1bWVDYWNoaW5nTW9kZSJ9", "cachingMode") unless @caching_mode.nil? @fs_type = fs_type Jsii::Type.check_type(@fs_type, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "fsType") unless @fs_type.nil? @kind = kind Jsii::Type.check_type(@kind, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkF6dXJlRGlza1BlcnNpc3RlbnRWb2x1bWVLaW5kIn0=", "kind") unless @kind.nil? @read_only = read_only Jsii::Type.check_type(@read_only, "eyJwcmltaXRpdmUiOiJib29sZWFuIn0=", "readOnly") unless @read_only.nil? end |
Instance Attribute Details
#access_modes ⇒ Array<CDK8sPlus25::PersistentVolumeAccessMode>? (readonly)
Default: - No access modes.
Contains all ways the volume can be mounted.
61 62 63 |
# File 'azure_disk_persistent_volume_props.rb', line 61 def access_modes @access_modes end |
#caching_mode ⇒ CDK8sPlus25::AzureDiskPersistentVolumeCachingMode? (readonly)
Default: - AzureDiskPersistentVolumeCachingMode.NONE.
Host Caching mode.
113 114 115 |
# File 'azure_disk_persistent_volume_props.rb', line 113 def caching_mode @caching_mode end |
#claim ⇒ CDK8sPlus25::IPersistentVolumeClaim? (readonly)
Default: - Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
69 70 71 |
# File 'azure_disk_persistent_volume_props.rb', line 69 def claim @claim end |
#disk_name ⇒ String (readonly)
The Name of the data disk in the blob storage.
104 105 106 |
# File 'azure_disk_persistent_volume_props.rb', line 104 def disk_name @disk_name end |
#disk_uri ⇒ String (readonly)
The URI the data disk in the blob storage.
108 109 110 |
# File 'azure_disk_persistent_volume_props.rb', line 108 def disk_uri @disk_uri end |
#fs_type ⇒ String? (readonly)
Default: 'ext4'
Filesystem type to mount.
Must be a filesystem type supported by the host operating system.
120 121 122 |
# File 'azure_disk_persistent_volume_props.rb', line 120 def fs_type @fs_type end |
#kind ⇒ CDK8sPlus25::AzureDiskPersistentVolumeKind? (readonly)
Default: AzureDiskPersistentVolumeKind.SHARED
Kind of disk.
125 126 127 |
# File 'azure_disk_persistent_volume_props.rb', line 125 def kind @kind end |
#metadata ⇒ CDK8s::APIObjectMetadata? (readonly)
Metadata that all persisted resources must have, which includes all objects users must create.
55 56 57 |
# File 'azure_disk_persistent_volume_props.rb', line 55 def @metadata end |
#mount_options ⇒ Array<String>? (readonly)
Default: - No options.
A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid.
75 76 77 |
# File 'azure_disk_persistent_volume_props.rb', line 75 def @mount_options end |
#read_only ⇒ Boolean? (readonly)
Default: false
Force the ReadOnly setting in VolumeMounts.
130 131 132 |
# File 'azure_disk_persistent_volume_props.rb', line 130 def read_only @read_only end |
#reclaim_policy ⇒ CDK8sPlus25::PersistentVolumeReclaimPolicy? (readonly)
Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
84 85 86 |
# File 'azure_disk_persistent_volume_props.rb', line 84 def reclaim_policy @reclaim_policy end |
#storage ⇒ CDK8s::Size? (readonly)
Default: - No specified.
What is the storage capacity of this volume.
90 91 92 |
# File 'azure_disk_persistent_volume_props.rb', line 90 def storage @storage end |
#storage_class_name ⇒ String? (readonly)
Default: - Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
95 96 97 |
# File 'azure_disk_persistent_volume_props.rb', line 95 def storage_class_name @storage_class_name end |
#volume_mode ⇒ CDK8sPlus25::PersistentVolumeMode? (readonly)
Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
100 101 102 |
# File 'azure_disk_persistent_volume_props.rb', line 100 def volume_mode @volume_mode end |
Class Method Details
.jsii_properties ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'azure_disk_persistent_volume_props.rb', line 132 def self.jsii_properties { :metadata => "metadata", :access_modes => "accessModes", :claim => "claim", :mount_options => "mountOptions", :reclaim_policy => "reclaimPolicy", :storage => "storage", :storage_class_name => "storageClassName", :volume_mode => "volumeMode", :disk_name => "diskName", :disk_uri => "diskUri", :caching_mode => "cachingMode", :fs_type => "fsType", :kind => "kind", :read_only => "readOnly", } end |
Instance Method Details
#to_jsii ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'azure_disk_persistent_volume_props.rb', line 151 def to_jsii result = {} result.merge!(super) result.merge!({ "metadata" => @metadata, "accessModes" => @access_modes, "claim" => @claim, "mountOptions" => @mount_options, "reclaimPolicy" => @reclaim_policy, "storage" => @storage, "storageClassName" => @storage_class_name, "volumeMode" => @volume_mode, "diskName" => @disk_name, "diskUri" => @disk_uri, "cachingMode" => @caching_mode, "fsType" => @fs_type, "kind" => @kind, "readOnly" => @read_only, }) result.compact end |