1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for license information.
5# Code generated by Microsoft (R) AutoRest Code Generator.
6# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7# --------------------------------------------------------------------------
8
9from typing import Dict, List, Optional, Union
10
11import msrest.serialization
12
13from ._compute_management_client_enums import *
14
15
16class AccessUri(msrest.serialization.Model):
17    """A disk access SAS uri.
18
19    Variables are only populated by the server, and will be ignored when sending a request.
20
21    :ivar access_sas: A SAS uri for accessing a disk.
22    :vartype access_sas: str
23    """
24
25    _validation = {
26        'access_sas': {'readonly': True},
27    }
28
29    _attribute_map = {
30        'access_sas': {'key': 'accessSAS', 'type': 'str'},
31    }
32
33    def __init__(
34        self,
35        **kwargs
36    ):
37        super(AccessUri, self).__init__(**kwargs)
38        self.access_sas = None
39
40
41class ApiError(msrest.serialization.Model):
42    """Api error.
43
44    :param details: The Api error details.
45    :type details: list[~azure.mgmt.compute.v2020_06_30.models.ApiErrorBase]
46    :param innererror: The Api inner error.
47    :type innererror: ~azure.mgmt.compute.v2020_06_30.models.InnerError
48    :param code: The error code.
49    :type code: str
50    :param target: The target of the particular error.
51    :type target: str
52    :param message: The error message.
53    :type message: str
54    """
55
56    _attribute_map = {
57        'details': {'key': 'details', 'type': '[ApiErrorBase]'},
58        'innererror': {'key': 'innererror', 'type': 'InnerError'},
59        'code': {'key': 'code', 'type': 'str'},
60        'target': {'key': 'target', 'type': 'str'},
61        'message': {'key': 'message', 'type': 'str'},
62    }
63
64    def __init__(
65        self,
66        *,
67        details: Optional[List["ApiErrorBase"]] = None,
68        innererror: Optional["InnerError"] = None,
69        code: Optional[str] = None,
70        target: Optional[str] = None,
71        message: Optional[str] = None,
72        **kwargs
73    ):
74        super(ApiError, self).__init__(**kwargs)
75        self.details = details
76        self.innererror = innererror
77        self.code = code
78        self.target = target
79        self.message = message
80
81
82class ApiErrorBase(msrest.serialization.Model):
83    """Api error base.
84
85    :param code: The error code.
86    :type code: str
87    :param target: The target of the particular error.
88    :type target: str
89    :param message: The error message.
90    :type message: str
91    """
92
93    _attribute_map = {
94        'code': {'key': 'code', 'type': 'str'},
95        'target': {'key': 'target', 'type': 'str'},
96        'message': {'key': 'message', 'type': 'str'},
97    }
98
99    def __init__(
100        self,
101        *,
102        code: Optional[str] = None,
103        target: Optional[str] = None,
104        message: Optional[str] = None,
105        **kwargs
106    ):
107        super(ApiErrorBase, self).__init__(**kwargs)
108        self.code = code
109        self.target = target
110        self.message = message
111
112
113class CreationData(msrest.serialization.Model):
114    """Data used when creating a disk.
115
116    Variables are only populated by the server, and will be ignored when sending a request.
117
118    All required parameters must be populated in order to send to Azure.
119
120    :param create_option: Required. This enumerates the possible sources of a disk's creation.
121     Possible values include: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload".
122    :type create_option: str or ~azure.mgmt.compute.v2020_06_30.models.DiskCreateOption
123    :param storage_account_id: Required if createOption is Import. The Azure Resource Manager
124     identifier of the storage account containing the blob to import as a disk.
125    :type storage_account_id: str
126    :param image_reference: Disk source information.
127    :type image_reference: ~azure.mgmt.compute.v2020_06_30.models.ImageDiskReference
128    :param gallery_image_reference: Required if creating from a Gallery Image. The id of the
129     ImageDiskReference will be the ARM id of the shared galley image version from which to create a
130     disk.
131    :type gallery_image_reference: ~azure.mgmt.compute.v2020_06_30.models.ImageDiskReference
132    :param source_uri: If createOption is Import, this is the URI of a blob to be imported into a
133     managed disk.
134    :type source_uri: str
135    :param source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot
136     or disk.
137    :type source_resource_id: str
138    :ivar source_unique_id: If this field is set, this is the unique id identifying the source of
139     this resource.
140    :vartype source_unique_id: str
141    :param upload_size_bytes: If createOption is Upload, this is the size of the contents of the
142     upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for
143     the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
144    :type upload_size_bytes: long
145    :param logical_sector_size: Logical sector size in bytes for Ultra disks. Supported values are
146     512 ad 4096. 4096 is the default.
147    :type logical_sector_size: int
148    """
149
150    _validation = {
151        'create_option': {'required': True},
152        'source_unique_id': {'readonly': True},
153    }
154
155    _attribute_map = {
156        'create_option': {'key': 'createOption', 'type': 'str'},
157        'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
158        'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'},
159        'gallery_image_reference': {'key': 'galleryImageReference', 'type': 'ImageDiskReference'},
160        'source_uri': {'key': 'sourceUri', 'type': 'str'},
161        'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
162        'source_unique_id': {'key': 'sourceUniqueId', 'type': 'str'},
163        'upload_size_bytes': {'key': 'uploadSizeBytes', 'type': 'long'},
164        'logical_sector_size': {'key': 'logicalSectorSize', 'type': 'int'},
165    }
166
167    def __init__(
168        self,
169        *,
170        create_option: Union[str, "DiskCreateOption"],
171        storage_account_id: Optional[str] = None,
172        image_reference: Optional["ImageDiskReference"] = None,
173        gallery_image_reference: Optional["ImageDiskReference"] = None,
174        source_uri: Optional[str] = None,
175        source_resource_id: Optional[str] = None,
176        upload_size_bytes: Optional[int] = None,
177        logical_sector_size: Optional[int] = None,
178        **kwargs
179    ):
180        super(CreationData, self).__init__(**kwargs)
181        self.create_option = create_option
182        self.storage_account_id = storage_account_id
183        self.image_reference = image_reference
184        self.gallery_image_reference = gallery_image_reference
185        self.source_uri = source_uri
186        self.source_resource_id = source_resource_id
187        self.source_unique_id = None
188        self.upload_size_bytes = upload_size_bytes
189        self.logical_sector_size = logical_sector_size
190
191
192class Resource(msrest.serialization.Model):
193    """The Resource model definition.
194
195    Variables are only populated by the server, and will be ignored when sending a request.
196
197    All required parameters must be populated in order to send to Azure.
198
199    :ivar id: Resource Id.
200    :vartype id: str
201    :ivar name: Resource name.
202    :vartype name: str
203    :ivar type: Resource type.
204    :vartype type: str
205    :param location: Required. Resource location.
206    :type location: str
207    :param tags: A set of tags. Resource tags.
208    :type tags: dict[str, str]
209    """
210
211    _validation = {
212        'id': {'readonly': True},
213        'name': {'readonly': True},
214        'type': {'readonly': True},
215        'location': {'required': True},
216    }
217
218    _attribute_map = {
219        'id': {'key': 'id', 'type': 'str'},
220        'name': {'key': 'name', 'type': 'str'},
221        'type': {'key': 'type', 'type': 'str'},
222        'location': {'key': 'location', 'type': 'str'},
223        'tags': {'key': 'tags', 'type': '{str}'},
224    }
225
226    def __init__(
227        self,
228        *,
229        location: str,
230        tags: Optional[Dict[str, str]] = None,
231        **kwargs
232    ):
233        super(Resource, self).__init__(**kwargs)
234        self.id = None
235        self.name = None
236        self.type = None
237        self.location = location
238        self.tags = tags
239
240
241class Disk(Resource):
242    """Disk resource.
243
244    Variables are only populated by the server, and will be ignored when sending a request.
245
246    All required parameters must be populated in order to send to Azure.
247
248    :ivar id: Resource Id.
249    :vartype id: str
250    :ivar name: Resource name.
251    :vartype name: str
252    :ivar type: Resource type.
253    :vartype type: str
254    :param location: Required. Resource location.
255    :type location: str
256    :param tags: A set of tags. Resource tags.
257    :type tags: dict[str, str]
258    :ivar managed_by: A relative URI containing the ID of the VM that has the disk attached.
259    :vartype managed_by: str
260    :ivar managed_by_extended: List of relative URIs containing the IDs of the VMs that have the
261     disk attached. maxShares should be set to a value greater than one for disks to allow attaching
262     them to multiple VMs.
263    :vartype managed_by_extended: list[str]
264    :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or
265     UltraSSD_LRS.
266    :type sku: ~azure.mgmt.compute.v2020_06_30.models.DiskSku
267    :param zones: The Logical zone list for Disk.
268    :type zones: list[str]
269    :ivar time_created: The time when the disk was created.
270    :vartype time_created: ~datetime.datetime
271    :param os_type: The Operating System type. Possible values include: "Windows", "Linux".
272    :type os_type: str or ~azure.mgmt.compute.v2020_06_30.models.OperatingSystemTypes
273    :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
274     disks only. Possible values include: "V1", "V2".
275    :type hyper_v_generation: str or ~azure.mgmt.compute.v2020_06_30.models.HyperVGeneration
276    :param creation_data: Disk source information. CreationData information cannot be changed after
277     the disk has been created.
278    :type creation_data: ~azure.mgmt.compute.v2020_06_30.models.CreationData
279    :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
280     indicates the size of the disk to create. If this field is present for updates or creation with
281     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
282     running VM, and can only increase the disk's size.
283    :type disk_size_gb: int
284    :ivar disk_size_bytes: The size of the disk in bytes. This field is read only.
285    :vartype disk_size_bytes: long
286    :ivar unique_id: Unique Guid identifying the resource.
287    :vartype unique_id: str
288    :param encryption_settings_collection: Encryption settings collection used for Azure Disk
289     Encryption, can contain multiple encryption settings per disk or snapshot.
290    :type encryption_settings_collection:
291     ~azure.mgmt.compute.v2020_06_30.models.EncryptionSettingsCollection
292    :ivar provisioning_state: The disk provisioning state.
293    :vartype provisioning_state: str
294    :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for
295     UltraSSD disks. One operation can transfer between 4k and 256k bytes.
296    :type disk_iops_read_write: long
297    :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD
298     disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
299     10.
300    :type disk_m_bps_read_write: long
301    :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs
302     mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
303    :type disk_iops_read_only: long
304    :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs
305     mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses
306     the ISO notation, of powers of 10.
307    :type disk_m_bps_read_only: long
308    :ivar disk_state: The state of the disk. Possible values include: "Unattached", "Attached",
309     "Reserved", "ActiveSAS", "ReadyToUpload", "ActiveUpload".
310    :vartype disk_state: str or ~azure.mgmt.compute.v2020_06_30.models.DiskState
311    :param encryption: Encryption property can be used to encrypt data at rest with customer
312     managed keys or platform managed keys.
313    :type encryption: ~azure.mgmt.compute.v2020_06_30.models.Encryption
314    :param max_shares: The maximum number of VMs that can attach to the disk at the same time.
315     Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
316    :type max_shares: int
317    :ivar share_info: Details of the list of all VMs that have the disk attached. maxShares should
318     be set to a value greater than one for disks to allow attaching them to multiple VMs.
319    :vartype share_info: list[~azure.mgmt.compute.v2020_06_30.models.ShareInfoElement]
320    :param network_access_policy: Policy for accessing the disk via network. Possible values
321     include: "AllowAll", "AllowPrivate", "DenyAll".
322    :type network_access_policy: str or ~azure.mgmt.compute.v2020_06_30.models.NetworkAccessPolicy
323    :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
324    :type disk_access_id: str
325    :param tier: Performance tier of the disk (e.g, P4, S10) as described here:
326     https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra
327     disks.
328    :type tier: str
329    """
330
331    _validation = {
332        'id': {'readonly': True},
333        'name': {'readonly': True},
334        'type': {'readonly': True},
335        'location': {'required': True},
336        'managed_by': {'readonly': True},
337        'managed_by_extended': {'readonly': True},
338        'time_created': {'readonly': True},
339        'disk_size_bytes': {'readonly': True},
340        'unique_id': {'readonly': True},
341        'provisioning_state': {'readonly': True},
342        'disk_state': {'readonly': True},
343        'share_info': {'readonly': True},
344    }
345
346    _attribute_map = {
347        'id': {'key': 'id', 'type': 'str'},
348        'name': {'key': 'name', 'type': 'str'},
349        'type': {'key': 'type', 'type': 'str'},
350        'location': {'key': 'location', 'type': 'str'},
351        'tags': {'key': 'tags', 'type': '{str}'},
352        'managed_by': {'key': 'managedBy', 'type': 'str'},
353        'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'},
354        'sku': {'key': 'sku', 'type': 'DiskSku'},
355        'zones': {'key': 'zones', 'type': '[str]'},
356        'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
357        'os_type': {'key': 'properties.osType', 'type': 'str'},
358        'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'},
359        'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
360        'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
361        'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'},
362        'unique_id': {'key': 'properties.uniqueId', 'type': 'str'},
363        'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'},
364        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
365        'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'},
366        'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'},
367        'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'},
368        'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'},
369        'disk_state': {'key': 'properties.diskState', 'type': 'str'},
370        'encryption': {'key': 'properties.encryption', 'type': 'Encryption'},
371        'max_shares': {'key': 'properties.maxShares', 'type': 'int'},
372        'share_info': {'key': 'properties.shareInfo', 'type': '[ShareInfoElement]'},
373        'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'},
374        'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'},
375        'tier': {'key': 'properties.tier', 'type': 'str'},
376    }
377
378    def __init__(
379        self,
380        *,
381        location: str,
382        tags: Optional[Dict[str, str]] = None,
383        sku: Optional["DiskSku"] = None,
384        zones: Optional[List[str]] = None,
385        os_type: Optional[Union[str, "OperatingSystemTypes"]] = None,
386        hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None,
387        creation_data: Optional["CreationData"] = None,
388        disk_size_gb: Optional[int] = None,
389        encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None,
390        disk_iops_read_write: Optional[int] = None,
391        disk_m_bps_read_write: Optional[int] = None,
392        disk_iops_read_only: Optional[int] = None,
393        disk_m_bps_read_only: Optional[int] = None,
394        encryption: Optional["Encryption"] = None,
395        max_shares: Optional[int] = None,
396        network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None,
397        disk_access_id: Optional[str] = None,
398        tier: Optional[str] = None,
399        **kwargs
400    ):
401        super(Disk, self).__init__(location=location, tags=tags, **kwargs)
402        self.managed_by = None
403        self.managed_by_extended = None
404        self.sku = sku
405        self.zones = zones
406        self.time_created = None
407        self.os_type = os_type
408        self.hyper_v_generation = hyper_v_generation
409        self.creation_data = creation_data
410        self.disk_size_gb = disk_size_gb
411        self.disk_size_bytes = None
412        self.unique_id = None
413        self.encryption_settings_collection = encryption_settings_collection
414        self.provisioning_state = None
415        self.disk_iops_read_write = disk_iops_read_write
416        self.disk_m_bps_read_write = disk_m_bps_read_write
417        self.disk_iops_read_only = disk_iops_read_only
418        self.disk_m_bps_read_only = disk_m_bps_read_only
419        self.disk_state = None
420        self.encryption = encryption
421        self.max_shares = max_shares
422        self.share_info = None
423        self.network_access_policy = network_access_policy
424        self.disk_access_id = disk_access_id
425        self.tier = tier
426
427
428class DiskAccess(Resource):
429    """disk access resource.
430
431    Variables are only populated by the server, and will be ignored when sending a request.
432
433    All required parameters must be populated in order to send to Azure.
434
435    :ivar id: Resource Id.
436    :vartype id: str
437    :ivar name: Resource name.
438    :vartype name: str
439    :ivar type: Resource type.
440    :vartype type: str
441    :param location: Required. Resource location.
442    :type location: str
443    :param tags: A set of tags. Resource tags.
444    :type tags: dict[str, str]
445    :ivar private_endpoint_connections: A readonly collection of private endpoint connections
446     created on the disk. Currently only one endpoint connection is supported.
447    :vartype private_endpoint_connections:
448     list[~azure.mgmt.compute.v2020_06_30.models.PrivateEndpointConnection]
449    :ivar provisioning_state: The disk access resource provisioning state.
450    :vartype provisioning_state: str
451    :ivar time_created: The time when the disk access was created.
452    :vartype time_created: ~datetime.datetime
453    """
454
455    _validation = {
456        'id': {'readonly': True},
457        'name': {'readonly': True},
458        'type': {'readonly': True},
459        'location': {'required': True},
460        'private_endpoint_connections': {'readonly': True},
461        'provisioning_state': {'readonly': True},
462        'time_created': {'readonly': True},
463    }
464
465    _attribute_map = {
466        'id': {'key': 'id', 'type': 'str'},
467        'name': {'key': 'name', 'type': 'str'},
468        'type': {'key': 'type', 'type': 'str'},
469        'location': {'key': 'location', 'type': 'str'},
470        'tags': {'key': 'tags', 'type': '{str}'},
471        'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
472        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
473        'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
474    }
475
476    def __init__(
477        self,
478        *,
479        location: str,
480        tags: Optional[Dict[str, str]] = None,
481        **kwargs
482    ):
483        super(DiskAccess, self).__init__(location=location, tags=tags, **kwargs)
484        self.private_endpoint_connections = None
485        self.provisioning_state = None
486        self.time_created = None
487
488
489class DiskAccessList(msrest.serialization.Model):
490    """The List disk access operation response.
491
492    All required parameters must be populated in order to send to Azure.
493
494    :param value: Required. A list of disk access resources.
495    :type value: list[~azure.mgmt.compute.v2020_06_30.models.DiskAccess]
496    :param next_link: The uri to fetch the next page of disk access resources. Call ListNext() with
497     this to fetch the next page of disk access resources.
498    :type next_link: str
499    """
500
501    _validation = {
502        'value': {'required': True},
503    }
504
505    _attribute_map = {
506        'value': {'key': 'value', 'type': '[DiskAccess]'},
507        'next_link': {'key': 'nextLink', 'type': 'str'},
508    }
509
510    def __init__(
511        self,
512        *,
513        value: List["DiskAccess"],
514        next_link: Optional[str] = None,
515        **kwargs
516    ):
517        super(DiskAccessList, self).__init__(**kwargs)
518        self.value = value
519        self.next_link = next_link
520
521
522class DiskAccessUpdate(msrest.serialization.Model):
523    """Used for updating a disk access resource.
524
525    :param tags: A set of tags. Resource tags.
526    :type tags: dict[str, str]
527    """
528
529    _attribute_map = {
530        'tags': {'key': 'tags', 'type': '{str}'},
531    }
532
533    def __init__(
534        self,
535        *,
536        tags: Optional[Dict[str, str]] = None,
537        **kwargs
538    ):
539        super(DiskAccessUpdate, self).__init__(**kwargs)
540        self.tags = tags
541
542
543class DiskEncryptionSet(Resource):
544    """disk encryption set resource.
545
546    Variables are only populated by the server, and will be ignored when sending a request.
547
548    All required parameters must be populated in order to send to Azure.
549
550    :ivar id: Resource Id.
551    :vartype id: str
552    :ivar name: Resource name.
553    :vartype name: str
554    :ivar type: Resource type.
555    :vartype type: str
556    :param location: Required. Resource location.
557    :type location: str
558    :param tags: A set of tags. Resource tags.
559    :type tags: dict[str, str]
560    :param identity: The managed identity for the disk encryption set. It should be given
561     permission on the key vault before it can be used to encrypt disks.
562    :type identity: ~azure.mgmt.compute.v2020_06_30.models.EncryptionSetIdentity
563    :param encryption_type: The type of key used to encrypt the data of the disk. Possible values
564     include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys".
565    :type encryption_type: str or ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSetType
566    :param active_key: The key vault key which is currently used by this disk encryption set.
567    :type active_key: ~azure.mgmt.compute.v2020_06_30.models.KeyVaultAndKeyReference
568    :ivar previous_keys: A readonly collection of key vault keys previously used by this disk
569     encryption set while a key rotation is in progress. It will be empty if there is no ongoing key
570     rotation.
571    :vartype previous_keys: list[~azure.mgmt.compute.v2020_06_30.models.KeyVaultAndKeyReference]
572    :ivar provisioning_state: The disk encryption set provisioning state.
573    :vartype provisioning_state: str
574    """
575
576    _validation = {
577        'id': {'readonly': True},
578        'name': {'readonly': True},
579        'type': {'readonly': True},
580        'location': {'required': True},
581        'previous_keys': {'readonly': True},
582        'provisioning_state': {'readonly': True},
583    }
584
585    _attribute_map = {
586        'id': {'key': 'id', 'type': 'str'},
587        'name': {'key': 'name', 'type': 'str'},
588        'type': {'key': 'type', 'type': 'str'},
589        'location': {'key': 'location', 'type': 'str'},
590        'tags': {'key': 'tags', 'type': '{str}'},
591        'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'},
592        'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'},
593        'active_key': {'key': 'properties.activeKey', 'type': 'KeyVaultAndKeyReference'},
594        'previous_keys': {'key': 'properties.previousKeys', 'type': '[KeyVaultAndKeyReference]'},
595        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
596    }
597
598    def __init__(
599        self,
600        *,
601        location: str,
602        tags: Optional[Dict[str, str]] = None,
603        identity: Optional["EncryptionSetIdentity"] = None,
604        encryption_type: Optional[Union[str, "DiskEncryptionSetType"]] = None,
605        active_key: Optional["KeyVaultAndKeyReference"] = None,
606        **kwargs
607    ):
608        super(DiskEncryptionSet, self).__init__(location=location, tags=tags, **kwargs)
609        self.identity = identity
610        self.encryption_type = encryption_type
611        self.active_key = active_key
612        self.previous_keys = None
613        self.provisioning_state = None
614
615
616class DiskEncryptionSetList(msrest.serialization.Model):
617    """The List disk encryption set operation response.
618
619    All required parameters must be populated in order to send to Azure.
620
621    :param value: Required. A list of disk encryption sets.
622    :type value: list[~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSet]
623    :param next_link: The uri to fetch the next page of disk encryption sets. Call ListNext() with
624     this to fetch the next page of disk encryption sets.
625    :type next_link: str
626    """
627
628    _validation = {
629        'value': {'required': True},
630    }
631
632    _attribute_map = {
633        'value': {'key': 'value', 'type': '[DiskEncryptionSet]'},
634        'next_link': {'key': 'nextLink', 'type': 'str'},
635    }
636
637    def __init__(
638        self,
639        *,
640        value: List["DiskEncryptionSet"],
641        next_link: Optional[str] = None,
642        **kwargs
643    ):
644        super(DiskEncryptionSetList, self).__init__(**kwargs)
645        self.value = value
646        self.next_link = next_link
647
648
649class DiskEncryptionSetUpdate(msrest.serialization.Model):
650    """disk encryption set update resource.
651
652    :param tags: A set of tags. Resource tags.
653    :type tags: dict[str, str]
654    :param encryption_type: The type of key used to encrypt the data of the disk. Possible values
655     include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys".
656    :type encryption_type: str or ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSetType
657    :param active_key: Key Vault Key Url and vault id of KeK, KeK is optional and when provided is
658     used to unwrap the encryptionKey.
659    :type active_key: ~azure.mgmt.compute.v2020_06_30.models.KeyVaultAndKeyReference
660    """
661
662    _attribute_map = {
663        'tags': {'key': 'tags', 'type': '{str}'},
664        'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'},
665        'active_key': {'key': 'properties.activeKey', 'type': 'KeyVaultAndKeyReference'},
666    }
667
668    def __init__(
669        self,
670        *,
671        tags: Optional[Dict[str, str]] = None,
672        encryption_type: Optional[Union[str, "DiskEncryptionSetType"]] = None,
673        active_key: Optional["KeyVaultAndKeyReference"] = None,
674        **kwargs
675    ):
676        super(DiskEncryptionSetUpdate, self).__init__(**kwargs)
677        self.tags = tags
678        self.encryption_type = encryption_type
679        self.active_key = active_key
680
681
682class DiskList(msrest.serialization.Model):
683    """The List Disks operation response.
684
685    All required parameters must be populated in order to send to Azure.
686
687    :param value: Required. A list of disks.
688    :type value: list[~azure.mgmt.compute.v2020_06_30.models.Disk]
689    :param next_link: The uri to fetch the next page of disks. Call ListNext() with this to fetch
690     the next page of disks.
691    :type next_link: str
692    """
693
694    _validation = {
695        'value': {'required': True},
696    }
697
698    _attribute_map = {
699        'value': {'key': 'value', 'type': '[Disk]'},
700        'next_link': {'key': 'nextLink', 'type': 'str'},
701    }
702
703    def __init__(
704        self,
705        *,
706        value: List["Disk"],
707        next_link: Optional[str] = None,
708        **kwargs
709    ):
710        super(DiskList, self).__init__(**kwargs)
711        self.value = value
712        self.next_link = next_link
713
714
715class DiskSku(msrest.serialization.Model):
716    """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS.
717
718    Variables are only populated by the server, and will be ignored when sending a request.
719
720    :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS",
721     "StandardSSD_LRS", "UltraSSD_LRS".
722    :type name: str or ~azure.mgmt.compute.v2020_06_30.models.DiskStorageAccountTypes
723    :ivar tier: The sku tier.
724    :vartype tier: str
725    """
726
727    _validation = {
728        'tier': {'readonly': True},
729    }
730
731    _attribute_map = {
732        'name': {'key': 'name', 'type': 'str'},
733        'tier': {'key': 'tier', 'type': 'str'},
734    }
735
736    def __init__(
737        self,
738        *,
739        name: Optional[Union[str, "DiskStorageAccountTypes"]] = None,
740        **kwargs
741    ):
742        super(DiskSku, self).__init__(**kwargs)
743        self.name = name
744        self.tier = None
745
746
747class DiskUpdate(msrest.serialization.Model):
748    """Disk update resource.
749
750    :param tags: A set of tags. Resource tags.
751    :type tags: dict[str, str]
752    :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or
753     UltraSSD_LRS.
754    :type sku: ~azure.mgmt.compute.v2020_06_30.models.DiskSku
755    :param os_type: the Operating System type. Possible values include: "Windows", "Linux".
756    :type os_type: str or ~azure.mgmt.compute.v2020_06_30.models.OperatingSystemTypes
757    :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
758     indicates the size of the disk to create. If this field is present for updates or creation with
759     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
760     running VM, and can only increase the disk's size.
761    :type disk_size_gb: int
762    :param encryption_settings_collection: Encryption settings collection used be Azure Disk
763     Encryption, can contain multiple encryption settings per disk or snapshot.
764    :type encryption_settings_collection:
765     ~azure.mgmt.compute.v2020_06_30.models.EncryptionSettingsCollection
766    :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for
767     UltraSSD disks. One operation can transfer between 4k and 256k bytes.
768    :type disk_iops_read_write: long
769    :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD
770     disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of
771     10.
772    :type disk_m_bps_read_write: long
773    :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs
774     mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
775    :type disk_iops_read_only: long
776    :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs
777     mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses
778     the ISO notation, of powers of 10.
779    :type disk_m_bps_read_only: long
780    :param max_shares: The maximum number of VMs that can attach to the disk at the same time.
781     Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
782    :type max_shares: int
783    :param encryption: Encryption property can be used to encrypt data at rest with customer
784     managed keys or platform managed keys.
785    :type encryption: ~azure.mgmt.compute.v2020_06_30.models.Encryption
786    :param network_access_policy: Policy for accessing the disk via network. Possible values
787     include: "AllowAll", "AllowPrivate", "DenyAll".
788    :type network_access_policy: str or ~azure.mgmt.compute.v2020_06_30.models.NetworkAccessPolicy
789    :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
790    :type disk_access_id: str
791    :param tier: Performance tier of the disk (e.g, P4, S10) as described here:
792     https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra
793     disks.
794    :type tier: str
795    """
796
797    _attribute_map = {
798        'tags': {'key': 'tags', 'type': '{str}'},
799        'sku': {'key': 'sku', 'type': 'DiskSku'},
800        'os_type': {'key': 'properties.osType', 'type': 'str'},
801        'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
802        'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'},
803        'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'},
804        'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'},
805        'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'},
806        'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'},
807        'max_shares': {'key': 'properties.maxShares', 'type': 'int'},
808        'encryption': {'key': 'properties.encryption', 'type': 'Encryption'},
809        'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'},
810        'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'},
811        'tier': {'key': 'properties.tier', 'type': 'str'},
812    }
813
814    def __init__(
815        self,
816        *,
817        tags: Optional[Dict[str, str]] = None,
818        sku: Optional["DiskSku"] = None,
819        os_type: Optional[Union[str, "OperatingSystemTypes"]] = None,
820        disk_size_gb: Optional[int] = None,
821        encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None,
822        disk_iops_read_write: Optional[int] = None,
823        disk_m_bps_read_write: Optional[int] = None,
824        disk_iops_read_only: Optional[int] = None,
825        disk_m_bps_read_only: Optional[int] = None,
826        max_shares: Optional[int] = None,
827        encryption: Optional["Encryption"] = None,
828        network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None,
829        disk_access_id: Optional[str] = None,
830        tier: Optional[str] = None,
831        **kwargs
832    ):
833        super(DiskUpdate, self).__init__(**kwargs)
834        self.tags = tags
835        self.sku = sku
836        self.os_type = os_type
837        self.disk_size_gb = disk_size_gb
838        self.encryption_settings_collection = encryption_settings_collection
839        self.disk_iops_read_write = disk_iops_read_write
840        self.disk_m_bps_read_write = disk_m_bps_read_write
841        self.disk_iops_read_only = disk_iops_read_only
842        self.disk_m_bps_read_only = disk_m_bps_read_only
843        self.max_shares = max_shares
844        self.encryption = encryption
845        self.network_access_policy = network_access_policy
846        self.disk_access_id = disk_access_id
847        self.tier = tier
848
849
850class Encryption(msrest.serialization.Model):
851    """Encryption at rest settings for disk or snapshot.
852
853    :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling
854     encryption at rest.
855    :type disk_encryption_set_id: str
856    :param type: The type of key used to encrypt the data of the disk. Possible values include:
857     "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey",
858     "EncryptionAtRestWithPlatformAndCustomerKeys".
859    :type type: str or ~azure.mgmt.compute.v2020_06_30.models.EncryptionType
860    """
861
862    _attribute_map = {
863        'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
864        'type': {'key': 'type', 'type': 'str'},
865    }
866
867    def __init__(
868        self,
869        *,
870        disk_encryption_set_id: Optional[str] = None,
871        type: Optional[Union[str, "EncryptionType"]] = None,
872        **kwargs
873    ):
874        super(Encryption, self).__init__(**kwargs)
875        self.disk_encryption_set_id = disk_encryption_set_id
876        self.type = type
877
878
879class EncryptionSetIdentity(msrest.serialization.Model):
880    """The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.
881
882    Variables are only populated by the server, and will be ignored when sending a request.
883
884    :param type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is
885     supported. Possible values include: "SystemAssigned".
886    :type type: str or ~azure.mgmt.compute.v2020_06_30.models.DiskEncryptionSetIdentityType
887    :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP
888     from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a
889     systemAssigned(implicit) identity.
890    :vartype principal_id: str
891    :ivar tenant_id: The tenant id of the Managed Identity Resource. This will be sent to the RP
892     from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a
893     systemAssigned(implicit) identity.
894    :vartype tenant_id: str
895    """
896
897    _validation = {
898        'principal_id': {'readonly': True},
899        'tenant_id': {'readonly': True},
900    }
901
902    _attribute_map = {
903        'type': {'key': 'type', 'type': 'str'},
904        'principal_id': {'key': 'principalId', 'type': 'str'},
905        'tenant_id': {'key': 'tenantId', 'type': 'str'},
906    }
907
908    def __init__(
909        self,
910        *,
911        type: Optional[Union[str, "DiskEncryptionSetIdentityType"]] = None,
912        **kwargs
913    ):
914        super(EncryptionSetIdentity, self).__init__(**kwargs)
915        self.type = type
916        self.principal_id = None
917        self.tenant_id = None
918
919
920class EncryptionSettingsCollection(msrest.serialization.Model):
921    """Encryption settings for disk or snapshot.
922
923    All required parameters must be populated in order to send to Azure.
924
925    :param enabled: Required. Set this flag to true and provide DiskEncryptionKey and optional
926     KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and
927     KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object,
928     the existing settings remain unchanged.
929    :type enabled: bool
930    :param encryption_settings: A collection of encryption settings, one for each disk volume.
931    :type encryption_settings:
932     list[~azure.mgmt.compute.v2020_06_30.models.EncryptionSettingsElement]
933    :param encryption_settings_version: Describes what type of encryption is used for the disks.
934     Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption
935     with AAD app.'1.1' corresponds to Azure Disk Encryption.
936    :type encryption_settings_version: str
937    """
938
939    _validation = {
940        'enabled': {'required': True},
941    }
942
943    _attribute_map = {
944        'enabled': {'key': 'enabled', 'type': 'bool'},
945        'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'},
946        'encryption_settings_version': {'key': 'encryptionSettingsVersion', 'type': 'str'},
947    }
948
949    def __init__(
950        self,
951        *,
952        enabled: bool,
953        encryption_settings: Optional[List["EncryptionSettingsElement"]] = None,
954        encryption_settings_version: Optional[str] = None,
955        **kwargs
956    ):
957        super(EncryptionSettingsCollection, self).__init__(**kwargs)
958        self.enabled = enabled
959        self.encryption_settings = encryption_settings
960        self.encryption_settings_version = encryption_settings_version
961
962
963class EncryptionSettingsElement(msrest.serialization.Model):
964    """Encryption settings for one disk volume.
965
966    :param disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key.
967    :type disk_encryption_key: ~azure.mgmt.compute.v2020_06_30.models.KeyVaultAndSecretReference
968    :param key_encryption_key: Key Vault Key Url and vault id of the key encryption key.
969     KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
970    :type key_encryption_key: ~azure.mgmt.compute.v2020_06_30.models.KeyVaultAndKeyReference
971    """
972
973    _attribute_map = {
974        'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'},
975        'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'},
976    }
977
978    def __init__(
979        self,
980        *,
981        disk_encryption_key: Optional["KeyVaultAndSecretReference"] = None,
982        key_encryption_key: Optional["KeyVaultAndKeyReference"] = None,
983        **kwargs
984    ):
985        super(EncryptionSettingsElement, self).__init__(**kwargs)
986        self.disk_encryption_key = disk_encryption_key
987        self.key_encryption_key = key_encryption_key
988
989
990class GrantAccessData(msrest.serialization.Model):
991    """Data used for requesting a SAS.
992
993    All required parameters must be populated in order to send to Azure.
994
995    :param access: Required.  Possible values include: "None", "Read", "Write".
996    :type access: str or ~azure.mgmt.compute.v2020_06_30.models.AccessLevel
997    :param duration_in_seconds: Required. Time duration in seconds until the SAS access expires.
998    :type duration_in_seconds: int
999    """
1000
1001    _validation = {
1002        'access': {'required': True},
1003        'duration_in_seconds': {'required': True},
1004    }
1005
1006    _attribute_map = {
1007        'access': {'key': 'access', 'type': 'str'},
1008        'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'},
1009    }
1010
1011    def __init__(
1012        self,
1013        *,
1014        access: Union[str, "AccessLevel"],
1015        duration_in_seconds: int,
1016        **kwargs
1017    ):
1018        super(GrantAccessData, self).__init__(**kwargs)
1019        self.access = access
1020        self.duration_in_seconds = duration_in_seconds
1021
1022
1023class ImageDiskReference(msrest.serialization.Model):
1024    """The source image used for creating the disk.
1025
1026    All required parameters must be populated in order to send to Azure.
1027
1028    :param id: Required. A relative uri containing either a Platform Image Repository or user image
1029     reference.
1030    :type id: str
1031    :param lun: If the disk is created from an image's data disk, this is an index that indicates
1032     which of the data disks in the image to use. For OS disks, this field is null.
1033    :type lun: int
1034    """
1035
1036    _validation = {
1037        'id': {'required': True},
1038    }
1039
1040    _attribute_map = {
1041        'id': {'key': 'id', 'type': 'str'},
1042        'lun': {'key': 'lun', 'type': 'int'},
1043    }
1044
1045    def __init__(
1046        self,
1047        *,
1048        id: str,
1049        lun: Optional[int] = None,
1050        **kwargs
1051    ):
1052        super(ImageDiskReference, self).__init__(**kwargs)
1053        self.id = id
1054        self.lun = lun
1055
1056
1057class InnerError(msrest.serialization.Model):
1058    """Inner error details.
1059
1060    :param exceptiontype: The exception type.
1061    :type exceptiontype: str
1062    :param errordetail: The internal error message or exception dump.
1063    :type errordetail: str
1064    """
1065
1066    _attribute_map = {
1067        'exceptiontype': {'key': 'exceptiontype', 'type': 'str'},
1068        'errordetail': {'key': 'errordetail', 'type': 'str'},
1069    }
1070
1071    def __init__(
1072        self,
1073        *,
1074        exceptiontype: Optional[str] = None,
1075        errordetail: Optional[str] = None,
1076        **kwargs
1077    ):
1078        super(InnerError, self).__init__(**kwargs)
1079        self.exceptiontype = exceptiontype
1080        self.errordetail = errordetail
1081
1082
1083class KeyVaultAndKeyReference(msrest.serialization.Model):
1084    """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey.
1085
1086    All required parameters must be populated in order to send to Azure.
1087
1088    :param source_vault: Required. Resource id of the KeyVault containing the key or secret.
1089    :type source_vault: ~azure.mgmt.compute.v2020_06_30.models.SourceVault
1090    :param key_url: Required. Url pointing to a key or secret in KeyVault.
1091    :type key_url: str
1092    """
1093
1094    _validation = {
1095        'source_vault': {'required': True},
1096        'key_url': {'required': True},
1097    }
1098
1099    _attribute_map = {
1100        'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
1101        'key_url': {'key': 'keyUrl', 'type': 'str'},
1102    }
1103
1104    def __init__(
1105        self,
1106        *,
1107        source_vault: "SourceVault",
1108        key_url: str,
1109        **kwargs
1110    ):
1111        super(KeyVaultAndKeyReference, self).__init__(**kwargs)
1112        self.source_vault = source_vault
1113        self.key_url = key_url
1114
1115
1116class KeyVaultAndSecretReference(msrest.serialization.Model):
1117    """Key Vault Secret Url and vault id of the encryption key.
1118
1119    All required parameters must be populated in order to send to Azure.
1120
1121    :param source_vault: Required. Resource id of the KeyVault containing the key or secret.
1122    :type source_vault: ~azure.mgmt.compute.v2020_06_30.models.SourceVault
1123    :param secret_url: Required. Url pointing to a key or secret in KeyVault.
1124    :type secret_url: str
1125    """
1126
1127    _validation = {
1128        'source_vault': {'required': True},
1129        'secret_url': {'required': True},
1130    }
1131
1132    _attribute_map = {
1133        'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'},
1134        'secret_url': {'key': 'secretUrl', 'type': 'str'},
1135    }
1136
1137    def __init__(
1138        self,
1139        *,
1140        source_vault: "SourceVault",
1141        secret_url: str,
1142        **kwargs
1143    ):
1144        super(KeyVaultAndSecretReference, self).__init__(**kwargs)
1145        self.source_vault = source_vault
1146        self.secret_url = secret_url
1147
1148
1149class PrivateEndpoint(msrest.serialization.Model):
1150    """The Private Endpoint resource.
1151
1152    Variables are only populated by the server, and will be ignored when sending a request.
1153
1154    :ivar id: The ARM identifier for Private Endpoint.
1155    :vartype id: str
1156    """
1157
1158    _validation = {
1159        'id': {'readonly': True},
1160    }
1161
1162    _attribute_map = {
1163        'id': {'key': 'id', 'type': 'str'},
1164    }
1165
1166    def __init__(
1167        self,
1168        **kwargs
1169    ):
1170        super(PrivateEndpoint, self).__init__(**kwargs)
1171        self.id = None
1172
1173
1174class PrivateEndpointConnection(msrest.serialization.Model):
1175    """The Private Endpoint Connection resource.
1176
1177    Variables are only populated by the server, and will be ignored when sending a request.
1178
1179    :ivar id: private endpoint connection Id.
1180    :vartype id: str
1181    :ivar name: private endpoint connection name.
1182    :vartype name: str
1183    :ivar type: private endpoint connection type.
1184    :vartype type: str
1185    :param private_endpoint: The resource of private end point.
1186    :type private_endpoint: ~azure.mgmt.compute.v2020_06_30.models.PrivateEndpoint
1187    :param private_link_service_connection_state: A collection of information about the state of
1188     the connection between DiskAccess and Virtual Network.
1189    :type private_link_service_connection_state:
1190     ~azure.mgmt.compute.v2020_06_30.models.PrivateLinkServiceConnectionState
1191    :ivar provisioning_state: The provisioning state of the private endpoint connection resource.
1192     Possible values include: "Succeeded", "Creating", "Deleting", "Failed".
1193    :vartype provisioning_state: str or
1194     ~azure.mgmt.compute.v2020_06_30.models.PrivateEndpointConnectionProvisioningState
1195    """
1196
1197    _validation = {
1198        'id': {'readonly': True},
1199        'name': {'readonly': True},
1200        'type': {'readonly': True},
1201        'provisioning_state': {'readonly': True},
1202    }
1203
1204    _attribute_map = {
1205        'id': {'key': 'id', 'type': 'str'},
1206        'name': {'key': 'name', 'type': 'str'},
1207        'type': {'key': 'type', 'type': 'str'},
1208        'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'},
1209        'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
1210        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1211    }
1212
1213    def __init__(
1214        self,
1215        *,
1216        private_endpoint: Optional["PrivateEndpoint"] = None,
1217        private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None,
1218        **kwargs
1219    ):
1220        super(PrivateEndpointConnection, self).__init__(**kwargs)
1221        self.id = None
1222        self.name = None
1223        self.type = None
1224        self.private_endpoint = private_endpoint
1225        self.private_link_service_connection_state = private_link_service_connection_state
1226        self.provisioning_state = None
1227
1228
1229class PrivateLinkResource(msrest.serialization.Model):
1230    """A private link resource.
1231
1232    Variables are only populated by the server, and will be ignored when sending a request.
1233
1234    :ivar id: private link resource Id.
1235    :vartype id: str
1236    :ivar name: private link resource name.
1237    :vartype name: str
1238    :ivar type: private link resource type.
1239    :vartype type: str
1240    :ivar group_id: The private link resource group id.
1241    :vartype group_id: str
1242    :ivar required_members: The private link resource required member names.
1243    :vartype required_members: list[str]
1244    :param required_zone_names: The private link resource DNS zone name.
1245    :type required_zone_names: list[str]
1246    """
1247
1248    _validation = {
1249        'id': {'readonly': True},
1250        'name': {'readonly': True},
1251        'type': {'readonly': True},
1252        'group_id': {'readonly': True},
1253        'required_members': {'readonly': True},
1254    }
1255
1256    _attribute_map = {
1257        'id': {'key': 'id', 'type': 'str'},
1258        'name': {'key': 'name', 'type': 'str'},
1259        'type': {'key': 'type', 'type': 'str'},
1260        'group_id': {'key': 'properties.groupId', 'type': 'str'},
1261        'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'},
1262        'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'},
1263    }
1264
1265    def __init__(
1266        self,
1267        *,
1268        required_zone_names: Optional[List[str]] = None,
1269        **kwargs
1270    ):
1271        super(PrivateLinkResource, self).__init__(**kwargs)
1272        self.id = None
1273        self.name = None
1274        self.type = None
1275        self.group_id = None
1276        self.required_members = None
1277        self.required_zone_names = required_zone_names
1278
1279
1280class PrivateLinkResourceListResult(msrest.serialization.Model):
1281    """A list of private link resources.
1282
1283    :param value: Array of private link resources.
1284    :type value: list[~azure.mgmt.compute.v2020_06_30.models.PrivateLinkResource]
1285    """
1286
1287    _attribute_map = {
1288        'value': {'key': 'value', 'type': '[PrivateLinkResource]'},
1289    }
1290
1291    def __init__(
1292        self,
1293        *,
1294        value: Optional[List["PrivateLinkResource"]] = None,
1295        **kwargs
1296    ):
1297        super(PrivateLinkResourceListResult, self).__init__(**kwargs)
1298        self.value = value
1299
1300
1301class PrivateLinkServiceConnectionState(msrest.serialization.Model):
1302    """A collection of information about the state of the connection between service consumer and provider.
1303
1304    :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner
1305     of the service. Possible values include: "Pending", "Approved", "Rejected".
1306    :type status: str or
1307     ~azure.mgmt.compute.v2020_06_30.models.PrivateEndpointServiceConnectionStatus
1308    :param description: The reason for approval/rejection of the connection.
1309    :type description: str
1310    :param actions_required: A message indicating if changes on the service provider require any
1311     updates on the consumer.
1312    :type actions_required: str
1313    """
1314
1315    _attribute_map = {
1316        'status': {'key': 'status', 'type': 'str'},
1317        'description': {'key': 'description', 'type': 'str'},
1318        'actions_required': {'key': 'actionsRequired', 'type': 'str'},
1319    }
1320
1321    def __init__(
1322        self,
1323        *,
1324        status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None,
1325        description: Optional[str] = None,
1326        actions_required: Optional[str] = None,
1327        **kwargs
1328    ):
1329        super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
1330        self.status = status
1331        self.description = description
1332        self.actions_required = actions_required
1333
1334
1335class ResourceUriList(msrest.serialization.Model):
1336    """The List resources which are encrypted with the disk encryption set.
1337
1338    All required parameters must be populated in order to send to Azure.
1339
1340    :param value: Required. A list of IDs or Owner IDs of resources which are encrypted with the
1341     disk encryption set.
1342    :type value: list[str]
1343    :param next_link: The uri to fetch the next page of encrypted resources. Call ListNext() with
1344     this to fetch the next page of encrypted resources.
1345    :type next_link: str
1346    """
1347
1348    _validation = {
1349        'value': {'required': True},
1350    }
1351
1352    _attribute_map = {
1353        'value': {'key': 'value', 'type': '[str]'},
1354        'next_link': {'key': 'nextLink', 'type': 'str'},
1355    }
1356
1357    def __init__(
1358        self,
1359        *,
1360        value: List[str],
1361        next_link: Optional[str] = None,
1362        **kwargs
1363    ):
1364        super(ResourceUriList, self).__init__(**kwargs)
1365        self.value = value
1366        self.next_link = next_link
1367
1368
1369class ShareInfoElement(msrest.serialization.Model):
1370    """ShareInfoElement.
1371
1372    Variables are only populated by the server, and will be ignored when sending a request.
1373
1374    :ivar vm_uri: A relative URI containing the ID of the VM that has the disk attached.
1375    :vartype vm_uri: str
1376    """
1377
1378    _validation = {
1379        'vm_uri': {'readonly': True},
1380    }
1381
1382    _attribute_map = {
1383        'vm_uri': {'key': 'vmUri', 'type': 'str'},
1384    }
1385
1386    def __init__(
1387        self,
1388        **kwargs
1389    ):
1390        super(ShareInfoElement, self).__init__(**kwargs)
1391        self.vm_uri = None
1392
1393
1394class Snapshot(Resource):
1395    """Snapshot resource.
1396
1397    Variables are only populated by the server, and will be ignored when sending a request.
1398
1399    All required parameters must be populated in order to send to Azure.
1400
1401    :ivar id: Resource Id.
1402    :vartype id: str
1403    :ivar name: Resource name.
1404    :vartype name: str
1405    :ivar type: Resource type.
1406    :vartype type: str
1407    :param location: Required. Resource location.
1408    :type location: str
1409    :param tags: A set of tags. Resource tags.
1410    :type tags: dict[str, str]
1411    :ivar managed_by: Unused. Always Null.
1412    :vartype managed_by: str
1413    :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
1414    :type sku: ~azure.mgmt.compute.v2020_06_30.models.SnapshotSku
1415    :ivar time_created: The time when the snapshot was created.
1416    :vartype time_created: ~datetime.datetime
1417    :param os_type: The Operating System type. Possible values include: "Windows", "Linux".
1418    :type os_type: str or ~azure.mgmt.compute.v2020_06_30.models.OperatingSystemTypes
1419    :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS
1420     disks only. Possible values include: "V1", "V2".
1421    :type hyper_v_generation: str or ~azure.mgmt.compute.v2020_06_30.models.HyperVGeneration
1422    :param creation_data: Disk source information. CreationData information cannot be changed after
1423     the disk has been created.
1424    :type creation_data: ~azure.mgmt.compute.v2020_06_30.models.CreationData
1425    :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
1426     indicates the size of the disk to create. If this field is present for updates or creation with
1427     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
1428     running VM, and can only increase the disk's size.
1429    :type disk_size_gb: int
1430    :ivar disk_size_bytes: The size of the disk in bytes. This field is read only.
1431    :vartype disk_size_bytes: long
1432    :ivar disk_state: The state of the snapshot. Possible values include: "Unattached", "Attached",
1433     "Reserved", "ActiveSAS", "ReadyToUpload", "ActiveUpload".
1434    :vartype disk_state: str or ~azure.mgmt.compute.v2020_06_30.models.DiskState
1435    :ivar unique_id: Unique Guid identifying the resource.
1436    :vartype unique_id: str
1437    :param encryption_settings_collection: Encryption settings collection used be Azure Disk
1438     Encryption, can contain multiple encryption settings per disk or snapshot.
1439    :type encryption_settings_collection:
1440     ~azure.mgmt.compute.v2020_06_30.models.EncryptionSettingsCollection
1441    :ivar provisioning_state: The disk provisioning state.
1442    :vartype provisioning_state: str
1443    :param incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk
1444     occupy less space than full snapshots and can be diffed.
1445    :type incremental: bool
1446    :param encryption: Encryption property can be used to encrypt data at rest with customer
1447     managed keys or platform managed keys.
1448    :type encryption: ~azure.mgmt.compute.v2020_06_30.models.Encryption
1449    :param network_access_policy: Policy for accessing the disk via network. Possible values
1450     include: "AllowAll", "AllowPrivate", "DenyAll".
1451    :type network_access_policy: str or ~azure.mgmt.compute.v2020_06_30.models.NetworkAccessPolicy
1452    :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
1453    :type disk_access_id: str
1454    """
1455
1456    _validation = {
1457        'id': {'readonly': True},
1458        'name': {'readonly': True},
1459        'type': {'readonly': True},
1460        'location': {'required': True},
1461        'managed_by': {'readonly': True},
1462        'time_created': {'readonly': True},
1463        'disk_size_bytes': {'readonly': True},
1464        'disk_state': {'readonly': True},
1465        'unique_id': {'readonly': True},
1466        'provisioning_state': {'readonly': True},
1467    }
1468
1469    _attribute_map = {
1470        'id': {'key': 'id', 'type': 'str'},
1471        'name': {'key': 'name', 'type': 'str'},
1472        'type': {'key': 'type', 'type': 'str'},
1473        'location': {'key': 'location', 'type': 'str'},
1474        'tags': {'key': 'tags', 'type': '{str}'},
1475        'managed_by': {'key': 'managedBy', 'type': 'str'},
1476        'sku': {'key': 'sku', 'type': 'SnapshotSku'},
1477        'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
1478        'os_type': {'key': 'properties.osType', 'type': 'str'},
1479        'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'},
1480        'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'},
1481        'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
1482        'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'},
1483        'disk_state': {'key': 'properties.diskState', 'type': 'str'},
1484        'unique_id': {'key': 'properties.uniqueId', 'type': 'str'},
1485        'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'},
1486        'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
1487        'incremental': {'key': 'properties.incremental', 'type': 'bool'},
1488        'encryption': {'key': 'properties.encryption', 'type': 'Encryption'},
1489        'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'},
1490        'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'},
1491    }
1492
1493    def __init__(
1494        self,
1495        *,
1496        location: str,
1497        tags: Optional[Dict[str, str]] = None,
1498        sku: Optional["SnapshotSku"] = None,
1499        os_type: Optional[Union[str, "OperatingSystemTypes"]] = None,
1500        hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None,
1501        creation_data: Optional["CreationData"] = None,
1502        disk_size_gb: Optional[int] = None,
1503        encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None,
1504        incremental: Optional[bool] = None,
1505        encryption: Optional["Encryption"] = None,
1506        network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None,
1507        disk_access_id: Optional[str] = None,
1508        **kwargs
1509    ):
1510        super(Snapshot, self).__init__(location=location, tags=tags, **kwargs)
1511        self.managed_by = None
1512        self.sku = sku
1513        self.time_created = None
1514        self.os_type = os_type
1515        self.hyper_v_generation = hyper_v_generation
1516        self.creation_data = creation_data
1517        self.disk_size_gb = disk_size_gb
1518        self.disk_size_bytes = None
1519        self.disk_state = None
1520        self.unique_id = None
1521        self.encryption_settings_collection = encryption_settings_collection
1522        self.provisioning_state = None
1523        self.incremental = incremental
1524        self.encryption = encryption
1525        self.network_access_policy = network_access_policy
1526        self.disk_access_id = disk_access_id
1527
1528
1529class SnapshotList(msrest.serialization.Model):
1530    """The List Snapshots operation response.
1531
1532    All required parameters must be populated in order to send to Azure.
1533
1534    :param value: Required. A list of snapshots.
1535    :type value: list[~azure.mgmt.compute.v2020_06_30.models.Snapshot]
1536    :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to
1537     fetch the next page of snapshots.
1538    :type next_link: str
1539    """
1540
1541    _validation = {
1542        'value': {'required': True},
1543    }
1544
1545    _attribute_map = {
1546        'value': {'key': 'value', 'type': '[Snapshot]'},
1547        'next_link': {'key': 'nextLink', 'type': 'str'},
1548    }
1549
1550    def __init__(
1551        self,
1552        *,
1553        value: List["Snapshot"],
1554        next_link: Optional[str] = None,
1555        **kwargs
1556    ):
1557        super(SnapshotList, self).__init__(**kwargs)
1558        self.value = value
1559        self.next_link = next_link
1560
1561
1562class SnapshotSku(msrest.serialization.Model):
1563    """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
1564
1565    Variables are only populated by the server, and will be ignored when sending a request.
1566
1567    :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS",
1568     "Standard_ZRS".
1569    :type name: str or ~azure.mgmt.compute.v2020_06_30.models.SnapshotStorageAccountTypes
1570    :ivar tier: The sku tier.
1571    :vartype tier: str
1572    """
1573
1574    _validation = {
1575        'tier': {'readonly': True},
1576    }
1577
1578    _attribute_map = {
1579        'name': {'key': 'name', 'type': 'str'},
1580        'tier': {'key': 'tier', 'type': 'str'},
1581    }
1582
1583    def __init__(
1584        self,
1585        *,
1586        name: Optional[Union[str, "SnapshotStorageAccountTypes"]] = None,
1587        **kwargs
1588    ):
1589        super(SnapshotSku, self).__init__(**kwargs)
1590        self.name = name
1591        self.tier = None
1592
1593
1594class SnapshotUpdate(msrest.serialization.Model):
1595    """Snapshot update resource.
1596
1597    :param tags: A set of tags. Resource tags.
1598    :type tags: dict[str, str]
1599    :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS.
1600    :type sku: ~azure.mgmt.compute.v2020_06_30.models.SnapshotSku
1601    :param os_type: the Operating System type. Possible values include: "Windows", "Linux".
1602    :type os_type: str or ~azure.mgmt.compute.v2020_06_30.models.OperatingSystemTypes
1603    :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it
1604     indicates the size of the disk to create. If this field is present for updates or creation with
1605     other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a
1606     running VM, and can only increase the disk's size.
1607    :type disk_size_gb: int
1608    :param encryption_settings_collection: Encryption settings collection used be Azure Disk
1609     Encryption, can contain multiple encryption settings per disk or snapshot.
1610    :type encryption_settings_collection:
1611     ~azure.mgmt.compute.v2020_06_30.models.EncryptionSettingsCollection
1612    :param encryption: Encryption property can be used to encrypt data at rest with customer
1613     managed keys or platform managed keys.
1614    :type encryption: ~azure.mgmt.compute.v2020_06_30.models.Encryption
1615    :param network_access_policy: Policy for accessing the disk via network. Possible values
1616     include: "AllowAll", "AllowPrivate", "DenyAll".
1617    :type network_access_policy: str or ~azure.mgmt.compute.v2020_06_30.models.NetworkAccessPolicy
1618    :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks.
1619    :type disk_access_id: str
1620    """
1621
1622    _attribute_map = {
1623        'tags': {'key': 'tags', 'type': '{str}'},
1624        'sku': {'key': 'sku', 'type': 'SnapshotSku'},
1625        'os_type': {'key': 'properties.osType', 'type': 'str'},
1626        'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'},
1627        'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'},
1628        'encryption': {'key': 'properties.encryption', 'type': 'Encryption'},
1629        'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'},
1630        'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'},
1631    }
1632
1633    def __init__(
1634        self,
1635        *,
1636        tags: Optional[Dict[str, str]] = None,
1637        sku: Optional["SnapshotSku"] = None,
1638        os_type: Optional[Union[str, "OperatingSystemTypes"]] = None,
1639        disk_size_gb: Optional[int] = None,
1640        encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None,
1641        encryption: Optional["Encryption"] = None,
1642        network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None,
1643        disk_access_id: Optional[str] = None,
1644        **kwargs
1645    ):
1646        super(SnapshotUpdate, self).__init__(**kwargs)
1647        self.tags = tags
1648        self.sku = sku
1649        self.os_type = os_type
1650        self.disk_size_gb = disk_size_gb
1651        self.encryption_settings_collection = encryption_settings_collection
1652        self.encryption = encryption
1653        self.network_access_policy = network_access_policy
1654        self.disk_access_id = disk_access_id
1655
1656
1657class SourceVault(msrest.serialization.Model):
1658    """The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}.
1659
1660    :param id: Resource Id.
1661    :type id: str
1662    """
1663
1664    _attribute_map = {
1665        'id': {'key': 'id', 'type': 'str'},
1666    }
1667
1668    def __init__(
1669        self,
1670        *,
1671        id: Optional[str] = None,
1672        **kwargs
1673    ):
1674        super(SourceVault, self).__init__(**kwargs)
1675        self.id = id
1676