Class: CDK8sPlus25::AzureDiskPersistentVolume

Inherits:
PersistentVolume
  • Object
show all
Defined in:
azure_disk_persistent_volume.rb

Overview

AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props, &jsii_block) ⇒ AzureDiskPersistentVolume

Returns a new instance of AzureDiskPersistentVolume.

Parameters:



11
12
13
14
15
16
17
# File 'azure_disk_persistent_volume.rb', line 11

def initialize(scope, id, props, &jsii_block)
  props = props.is_a?(Hash) ? ::CDK8sPlus25::AzureDiskPersistentVolumeProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, "eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9", "scope")
  Jsii::Type.check_type(id, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "id")
  Jsii::Type.check_type(props, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LkF6dXJlRGlza1BlcnNpc3RlbnRWb2x1bWVQcm9wcyJ9", "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props, &jsii_block)
end

Class Method Details

.jsii_overridable_methodsObject



19
20
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
51
52
# File 'azure_disk_persistent_volume.rb', line 19

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :api_group => { kind: :property, name: "apiGroup", is_optional: false },
    :api_object => { kind: :property, name: "apiObject", is_optional: false },
    :api_version => { kind: :property, name: "apiVersion", is_optional: false },
    :kind => { kind: :property, name: "kind", is_optional: false },
    :metadata => { kind: :property, name: "metadata", is_optional: false },
    :name => { kind: :property, name: "name", is_optional: false },
    :permissions => { kind: :property, name: "permissions", is_optional: false },
    :resource_type => { kind: :property, name: "resourceType", is_optional: false },
    :resource_name => { kind: :property, name: "resourceName", is_optional: true },
    :mode => { kind: :property, name: "mode", is_optional: false },
    :reclaim_policy => { kind: :property, name: "reclaimPolicy", is_optional: false },
    :access_modes => { kind: :property, name: "accessModes", is_optional: true },
    :claim => { kind: :property, name: "claim", is_optional: true },
    :mount_options => { kind: :property, name: "mountOptions", is_optional: true },
    :storage => { kind: :property, name: "storage", is_optional: true },
    :storage_class_name => { kind: :property, name: "storageClassName", is_optional: true },
    :azure_kind => { kind: :property, name: "azureKind", is_optional: false },
    :caching_mode => { kind: :property, name: "cachingMode", is_optional: false },
    :disk_name => { kind: :property, name: "diskName", is_optional: false },
    :disk_uri => { kind: :property, name: "diskUri", is_optional: false },
    :fs_type => { kind: :property, name: "fsType", is_optional: false },
    :read_only => { kind: :property, name: "readOnly", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :as_api_resource => { kind: :method, name: "asApiResource", is_optional: false },
    :as_non_api_resource => { kind: :method, name: "asNonApiResource", is_optional: false },
    :as_volume => { kind: :method, name: "asVolume", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
    :reserve => { kind: :method, name: "reserve", is_optional: false },
  }
end

Instance Method Details

#access_modesArray<CDK8sPlus25::PersistentVolumeAccessMode>?

Access modes requirement of this claim.



140
141
142
# File 'azure_disk_persistent_volume.rb', line 140

def access_modes()
  jsii_get_property("accessModes")
end

#api_groupString

The group portion of the API version (e.g. "authorization.k8s.io").

Returns:

  • (String)


64
65
66
# File 'azure_disk_persistent_volume.rb', line 64

def api_group()
  jsii_get_property("apiGroup")
end

#api_objectCDK8s::APIObject

The underlying cdk8s API object.

Returns:

See Also:

  • CDK8sPlus25::AzureDiskPersistentVolume.basebase.Resourcebase.Resource.apiObject


72
73
74
# File 'azure_disk_persistent_volume.rb', line 72

def api_object()
  jsii_get_property("apiObject")
end

#api_versionString

The object's API version (e.g. "authorization.k8s.io/v1").

Returns:

  • (String)


79
80
81
# File 'azure_disk_persistent_volume.rb', line 79

def api_version()
  jsii_get_property("apiVersion")
end

#as_api_resourceCDK8sPlus25::IAPIResource?

Return the IApiResource this object represents.

Returns:



243
244
245
# File 'azure_disk_persistent_volume.rb', line 243

def as_api_resource()
  jsii_call_method("asApiResource", [])
end

#as_non_api_resourceString?

Return the non resource url this object represents.

Returns:

  • (String, nil)


250
251
252
# File 'azure_disk_persistent_volume.rb', line 250

def as_non_api_resource()
  jsii_call_method("asNonApiResource", [])
end

#as_volumeCDK8sPlus25::Volume

Convert the piece of storage into a concrete volume.

Returns:



257
258
259
# File 'azure_disk_persistent_volume.rb', line 257

def as_volume()
  jsii_call_method("asVolume", [])
end

#azure_kindCDK8sPlus25::AzureDiskPersistentVolumeKind

Azure kind of this volume.



178
179
180
# File 'azure_disk_persistent_volume.rb', line 178

def azure_kind()
  jsii_get_property("azureKind")
end

#bind(claim) ⇒ void

This method returns an undefined value.

Bind a volume to a specific claim.

Note that you must also bind the claim to the volume.



268
269
270
271
# File 'azure_disk_persistent_volume.rb', line 268

def bind(claim)
  Jsii::Type.check_type(claim, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LklQZXJzaXN0ZW50Vm9sdW1lQ2xhaW0ifQ==", "claim")
  jsii_call_method("bind", [claim])
end

#caching_modeCDK8sPlus25::AzureDiskPersistentVolumeCachingMode

Caching mode of this volume.



185
186
187
# File 'azure_disk_persistent_volume.rb', line 185

def caching_mode()
  jsii_get_property("cachingMode")
end

#claimCDK8sPlus25::IPersistentVolumeClaim?

PVC this volume is bound to.

Undefined means this volume is not yet claimed by any PVC.



150
151
152
# File 'azure_disk_persistent_volume.rb', line 150

def claim()
  jsii_get_property("claim")
end

#disk_nameString

Disk name of this volume.

Returns:

  • (String)


192
193
194
# File 'azure_disk_persistent_volume.rb', line 192

def disk_name()
  jsii_get_property("diskName")
end

#disk_uriString

Disk URI of this volume.

Returns:

  • (String)


199
200
201
# File 'azure_disk_persistent_volume.rb', line 199

def disk_uri()
  jsii_get_property("diskUri")
end

#fs_typeString

File system type of this volume.

Returns:

  • (String)


206
207
208
# File 'azure_disk_persistent_volume.rb', line 206

def fs_type()
  jsii_get_property("fsType")
end

#kindString

The object kind (e.g. "Deployment").

Returns:

  • (String)


86
87
88
# File 'azure_disk_persistent_volume.rb', line 86

def kind()
  jsii_get_property("kind")
end

#metadataCDK8s::APIObjectMetadataDefinition



91
92
93
# File 'azure_disk_persistent_volume.rb', line 91

def ()
  jsii_get_property("metadata")
end

#modeCDK8sPlus25::PersistentVolumeMode

Volume mode of this volume.



126
127
128
# File 'azure_disk_persistent_volume.rb', line 126

def mode()
  jsii_get_property("mode")
end

#mount_optionsArray<String>?

Mount options of this volume.

Returns:

  • (Array<String>, nil)


157
158
159
# File 'azure_disk_persistent_volume.rb', line 157

def mount_options()
  jsii_get_property("mountOptions")
end

#nameString

The name of this API object.

Returns:

  • (String)


98
99
100
# File 'azure_disk_persistent_volume.rb', line 98

def name()
  jsii_get_property("name")
end

#nodeConstructs::Node

The tree node.

Returns:



57
58
59
# File 'azure_disk_persistent_volume.rb', line 57

def node()
  jsii_get_property("node")
end

#permissionsCDK8sPlus25::ResourcePermissions



103
104
105
# File 'azure_disk_persistent_volume.rb', line 103

def permissions()
  jsii_get_property("permissions")
end

#read_onlyBoolean

Whether or not it is mounted as a read-only volume.

Returns:

  • (Boolean)


213
214
215
# File 'azure_disk_persistent_volume.rb', line 213

def read_only()
  jsii_get_property("readOnly")
end

#reclaim_policyCDK8sPlus25::PersistentVolumeReclaimPolicy

Reclaim policy of this volume.



133
134
135
# File 'azure_disk_persistent_volume.rb', line 133

def reclaim_policy()
  jsii_get_property("reclaimPolicy")
end

#reserveCDK8sPlus25::PersistentVolumeClaim

Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume.

Note that this method will throw in case the volume is already claimed.



279
280
281
# File 'azure_disk_persistent_volume.rb', line 279

def reserve()
  jsii_call_method("reserve", [])
end

#resource_nameString?

The unique, namespace-global, name of an object inside the Kubernetes cluster.

If this is omitted, the ApiResource should represent all objects of the given type.

Returns:

  • (String, nil)


119
120
121
# File 'azure_disk_persistent_volume.rb', line 119

def resource_name()
  jsii_get_property("resourceName")
end

#resource_typeString

The name of a resource type as it appears in the relevant API endpoint.

Returns:

  • (String)


110
111
112
# File 'azure_disk_persistent_volume.rb', line 110

def resource_type()
  jsii_get_property("resourceType")
end

#storageCDK8s::Size?

Storage size of this volume.

Returns:



164
165
166
# File 'azure_disk_persistent_volume.rb', line 164

def storage()
  jsii_get_property("storage")
end

#storage_class_nameString?

Storage class this volume belongs to.

Returns:

  • (String, nil)


171
172
173
# File 'azure_disk_persistent_volume.rb', line 171

def storage_class_name()
  jsii_get_property("storageClassName")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


220
221
222
# File 'azure_disk_persistent_volume.rb', line 220

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

Returns:



233
234
235
236
237
238
# File 'azure_disk_persistent_volume.rb', line 233

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, "eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9", "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end