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 enum import Enum, EnumMeta 10from six import with_metaclass 11 12class _CaseInsensitiveEnumMeta(EnumMeta): 13 def __getitem__(self, name): 14 return super().__getitem__(name.upper()) 15 16 def __getattr__(cls, name): 17 """Return the enum member matching `name` 18 We use __getattr__ instead of descriptors or inserting into the enum 19 class' __dict__ in order to support `name` and `value` being both 20 properties for enum members (which live in the class' __dict__) and 21 enum members themselves. 22 """ 23 try: 24 return cls._member_map_[name.upper()] 25 except KeyError: 26 raise AttributeError(name) 27 28 29class AccessLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 30 31 NONE = "None" 32 READ = "Read" 33 WRITE = "Write" 34 35class DiskCreateOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 36 """This enumerates the possible sources of a disk's creation. 37 """ 38 39 #: Create an empty data disk of a size given by diskSizeGB. 40 EMPTY = "Empty" 41 #: Disk will be attached to a VM. 42 ATTACH = "Attach" 43 #: Create a new disk from a platform image specified by the given imageReference or 44 #: galleryImageReference. 45 FROM_IMAGE = "FromImage" 46 #: Create a disk by importing from a blob specified by a sourceUri in a storage account specified 47 #: by storageAccountId. 48 IMPORT_ENUM = "Import" 49 #: Create a new disk or snapshot by copying from a disk or snapshot specified by the given 50 #: sourceResourceId. 51 COPY = "Copy" 52 #: Create a new disk by copying from a backup recovery point. 53 RESTORE = "Restore" 54 #: Create a new disk by obtaining a write token and using it to directly upload the contents of 55 #: the disk. 56 UPLOAD = "Upload" 57 58class DiskEncryptionSetIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 59 """The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported. 60 """ 61 62 SYSTEM_ASSIGNED = "SystemAssigned" 63 64class DiskState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 65 """The state of the disk. 66 """ 67 68 #: The disk is not being used and can be attached to a VM. 69 UNATTACHED = "Unattached" 70 #: The disk is currently mounted to a running VM. 71 ATTACHED = "Attached" 72 #: The disk is mounted to a stopped-deallocated VM. 73 RESERVED = "Reserved" 74 #: The disk currently has an Active SAS Uri associated with it. 75 ACTIVE_SAS = "ActiveSAS" 76 #: A disk is ready to be created by upload by requesting a write token. 77 READY_TO_UPLOAD = "ReadyToUpload" 78 #: A disk is created for upload and a write token has been issued for uploading to it. 79 ACTIVE_UPLOAD = "ActiveUpload" 80 81class DiskStorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 82 """The sku name. 83 """ 84 85 #: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. 86 STANDARD_LRS = "Standard_LRS" 87 #: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. 88 PREMIUM_LRS = "Premium_LRS" 89 #: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise 90 #: applications and dev/test. 91 STANDARD_SSD_LRS = "StandardSSD_LRS" 92 #: Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier 93 #: databases (for example, SQL, Oracle), and other transaction-heavy workloads. 94 ULTRA_SSD_LRS = "UltraSSD_LRS" 95 96class EncryptionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 97 """The type of key used to encrypt the data of the disk. 98 """ 99 100 #: Disk is encrypted with XStore managed key at rest. It is the default encryption type. 101 ENCRYPTION_AT_REST_WITH_PLATFORM_KEY = "EncryptionAtRestWithPlatformKey" 102 #: Disk is encrypted with Customer managed key at rest. 103 ENCRYPTION_AT_REST_WITH_CUSTOMER_KEY = "EncryptionAtRestWithCustomerKey" 104 105class HyperVGeneration(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 106 """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 107 """ 108 109 V1 = "V1" 110 V2 = "V2" 111 112class OperatingSystemTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 113 """The Operating System type. 114 """ 115 116 WINDOWS = "Windows" 117 LINUX = "Linux" 118 119class SnapshotStorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 120 """The sku name. 121 """ 122 123 #: Standard HDD locally redundant storage. 124 STANDARD_LRS = "Standard_LRS" 125 #: Premium SSD locally redundant storage. 126 PREMIUM_LRS = "Premium_LRS" 127 #: Standard zone redundant storage. 128 STANDARD_ZRS = "Standard_ZRS" 129