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 at rest with Platform managed key. It is the default encryption type. This is 101 #: not a valid encryption type for disk encryption sets. 102 ENCRYPTION_AT_REST_WITH_PLATFORM_KEY = "EncryptionAtRestWithPlatformKey" 103 #: Disk is encrypted at rest with Customer managed key that can be changed and revoked by a 104 #: customer. 105 ENCRYPTION_AT_REST_WITH_CUSTOMER_KEY = "EncryptionAtRestWithCustomerKey" 106 #: Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and 107 #: the other key is Platform managed. 108 ENCRYPTION_AT_REST_WITH_PLATFORM_AND_CUSTOMER_KEYS = "EncryptionAtRestWithPlatformAndCustomerKeys" 109 110class HyperVGeneration(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 111 """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. 112 """ 113 114 V1 = "V1" 115 V2 = "V2" 116 117class NetworkAccessPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 118 """Policy for accessing the disk via network. 119 """ 120 121 #: The disk can be exported or uploaded to from any network. 122 ALLOW_ALL = "AllowAll" 123 #: The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. 124 ALLOW_PRIVATE = "AllowPrivate" 125 #: The disk cannot be exported. 126 DENY_ALL = "DenyAll" 127 128class OperatingSystemTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 129 """The Operating System type. 130 """ 131 132 WINDOWS = "Windows" 133 LINUX = "Linux" 134 135class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 136 """The current provisioning state. 137 """ 138 139 SUCCEEDED = "Succeeded" 140 CREATING = "Creating" 141 DELETING = "Deleting" 142 FAILED = "Failed" 143 144class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 145 """The private endpoint connection status. 146 """ 147 148 PENDING = "Pending" 149 APPROVED = "Approved" 150 REJECTED = "Rejected" 151 152class SnapshotStorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 153 """The sku name. 154 """ 155 156 #: Standard HDD locally redundant storage. 157 STANDARD_LRS = "Standard_LRS" 158 #: Premium SSD locally redundant storage. 159 PREMIUM_LRS = "Premium_LRS" 160 #: Standard zone redundant storage. 161 STANDARD_ZRS = "Standard_ZRS" 162