1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class DataDisk(Model):
"""Describes a data disk.
:param lun: the logical unit number.
:type lun: int
:param name: the disk name.
:type name: str
:param vhd: the Virtual Hard Disk.
:type vhd: :class:`VirtualHardDisk
<azure.mgmt.compute.models.VirtualHardDisk>`
:param image: the Source User Image VirtualHardDisk. This VirtualHardDisk
will be copied before using it to attach to the Virtual Machine.If
SourceImage is provided, the destination VirtualHardDisk should not
exist.
:type image: :class:`VirtualHardDisk
<azure.mgmt.compute.models.VirtualHardDisk>`
:param caching: the caching type. Possible values include: 'None',
'ReadOnly', 'ReadWrite'
:type caching: str or :class:`CachingTypes
<azure.mgmt.compute.models.CachingTypes>`
:param create_option: the create option. Possible values include:
'fromImage', 'empty', 'attach'
:type create_option: str or :class:`DiskCreateOptionTypes
<azure.mgmt.compute.models.DiskCreateOptionTypes>`
:param disk_size_gb: the initial disk size in GB for blank data disks,
and the new desired size for existing OS and Data disks.
:type disk_size_gb: int
"""
_validation = {
'lun': {'required': True},
'name': {'required': True},
'vhd': {'required': True},
'create_option': {'required': True},
}
_attribute_map = {
'lun': {'key': 'lun', 'type': 'int'},
'name': {'key': 'name', 'type': 'str'},
'vhd': {'key': 'vhd', 'type': 'VirtualHardDisk'},
'image': {'key': 'image', 'type': 'VirtualHardDisk'},
'caching': {'key': 'caching', 'type': 'CachingTypes'},
'create_option': {'key': 'createOption', 'type': 'DiskCreateOptionTypes'},
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
}
def __init__(self, lun, name, vhd, create_option, image=None, caching=None, disk_size_gb=None):
self.lun = lun
self.name = name
self.vhd = vhd
self.image = image
self.caching = caching
self.create_option = create_option
self.disk_size_gb = disk_size_gb
|