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 CreationData(msrest.serialization.Model): 42 """Data used when creating a disk. 43 44 All required parameters must be populated in order to send to Azure. 45 46 :param create_option: Required. This enumerates the possible sources of a disk's creation. 47 Possible values include: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload". 48 :type create_option: str or ~azure.mgmt.compute.v2018_09_30.models.DiskCreateOption 49 :param storage_account_id: If createOption is Import, the Azure Resource Manager identifier of 50 the storage account containing the blob to import as a disk. Required only if the blob is in a 51 different subscription. 52 :type storage_account_id: str 53 :param image_reference: Disk source information. 54 :type image_reference: ~azure.mgmt.compute.v2018_09_30.models.ImageDiskReference 55 :param source_uri: If createOption is Import, this is the URI of a blob to be imported into a 56 managed disk. 57 :type source_uri: str 58 :param source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot 59 or disk. 60 :type source_resource_id: str 61 """ 62 63 _validation = { 64 'create_option': {'required': True}, 65 } 66 67 _attribute_map = { 68 'create_option': {'key': 'createOption', 'type': 'str'}, 69 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, 70 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, 71 'source_uri': {'key': 'sourceUri', 'type': 'str'}, 72 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, 73 } 74 75 def __init__( 76 self, 77 *, 78 create_option: Union[str, "DiskCreateOption"], 79 storage_account_id: Optional[str] = None, 80 image_reference: Optional["ImageDiskReference"] = None, 81 source_uri: Optional[str] = None, 82 source_resource_id: Optional[str] = None, 83 **kwargs 84 ): 85 super(CreationData, self).__init__(**kwargs) 86 self.create_option = create_option 87 self.storage_account_id = storage_account_id 88 self.image_reference = image_reference 89 self.source_uri = source_uri 90 self.source_resource_id = source_resource_id 91 92 93class Resource(msrest.serialization.Model): 94 """The Resource model definition. 95 96 Variables are only populated by the server, and will be ignored when sending a request. 97 98 All required parameters must be populated in order to send to Azure. 99 100 :ivar id: Resource Id. 101 :vartype id: str 102 :ivar name: Resource name. 103 :vartype name: str 104 :ivar type: Resource type. 105 :vartype type: str 106 :param location: Required. Resource location. 107 :type location: str 108 :param tags: A set of tags. Resource tags. 109 :type tags: dict[str, str] 110 """ 111 112 _validation = { 113 'id': {'readonly': True}, 114 'name': {'readonly': True}, 115 'type': {'readonly': True}, 116 'location': {'required': True}, 117 } 118 119 _attribute_map = { 120 'id': {'key': 'id', 'type': 'str'}, 121 'name': {'key': 'name', 'type': 'str'}, 122 'type': {'key': 'type', 'type': 'str'}, 123 'location': {'key': 'location', 'type': 'str'}, 124 'tags': {'key': 'tags', 'type': '{str}'}, 125 } 126 127 def __init__( 128 self, 129 *, 130 location: str, 131 tags: Optional[Dict[str, str]] = None, 132 **kwargs 133 ): 134 super(Resource, self).__init__(**kwargs) 135 self.id = None 136 self.name = None 137 self.type = None 138 self.location = location 139 self.tags = tags 140 141 142class Disk(Resource): 143 """Disk resource. 144 145 Variables are only populated by the server, and will be ignored when sending a request. 146 147 All required parameters must be populated in order to send to Azure. 148 149 :ivar id: Resource Id. 150 :vartype id: str 151 :ivar name: Resource name. 152 :vartype name: str 153 :ivar type: Resource type. 154 :vartype type: str 155 :param location: Required. Resource location. 156 :type location: str 157 :param tags: A set of tags. Resource tags. 158 :type tags: dict[str, str] 159 :ivar managed_by: A relative URI containing the ID of the VM that has the disk attached. 160 :vartype managed_by: str 161 :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or 162 UltraSSD_LRS. 163 :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku 164 :param zones: The Logical zone list for Disk. 165 :type zones: list[str] 166 :ivar time_created: The time when the disk was created. 167 :vartype time_created: ~datetime.datetime 168 :param os_type: The Operating System type. Possible values include: "Windows", "Linux". 169 :type os_type: str or ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes 170 :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS 171 disks only. Possible values include: "V1", "V2". 172 :type hyper_v_generation: str or ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration 173 :param creation_data: Disk source information. CreationData information cannot be changed after 174 the disk has been created. 175 :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData 176 :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it 177 indicates the size of the VHD to create. If this field is present for updates or creation with 178 other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a 179 running VM, and can only increase the disk's size. 180 :type disk_size_gb: int 181 :param encryption_settings_collection: Encryption settings collection used for Azure Disk 182 Encryption, can contain multiple encryption settings per disk or snapshot. 183 :type encryption_settings_collection: 184 ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection 185 :ivar provisioning_state: The disk provisioning state. 186 :vartype provisioning_state: str 187 :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for 188 UltraSSD disks. One operation can transfer between 4k and 256k bytes. 189 :type disk_iops_read_write: long 190 :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD 191 disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 192 10. 193 :type disk_m_bps_read_write: int 194 :ivar disk_state: The state of the disk. Possible values include: "Unattached", "Attached", 195 "Reserved", "ActiveSAS", "ReadyToUpload", "ActiveUpload". 196 :vartype disk_state: str or ~azure.mgmt.compute.v2018_09_30.models.DiskState 197 """ 198 199 _validation = { 200 'id': {'readonly': True}, 201 'name': {'readonly': True}, 202 'type': {'readonly': True}, 203 'location': {'required': True}, 204 'managed_by': {'readonly': True}, 205 'time_created': {'readonly': True}, 206 'provisioning_state': {'readonly': True}, 207 'disk_state': {'readonly': True}, 208 } 209 210 _attribute_map = { 211 'id': {'key': 'id', 'type': 'str'}, 212 'name': {'key': 'name', 'type': 'str'}, 213 'type': {'key': 'type', 'type': 'str'}, 214 'location': {'key': 'location', 'type': 'str'}, 215 'tags': {'key': 'tags', 'type': '{str}'}, 216 'managed_by': {'key': 'managedBy', 'type': 'str'}, 217 'sku': {'key': 'sku', 'type': 'DiskSku'}, 218 'zones': {'key': 'zones', 'type': '[str]'}, 219 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, 220 'os_type': {'key': 'properties.osType', 'type': 'str'}, 221 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, 222 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, 223 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 224 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 225 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 226 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, 227 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, 228 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, 229 } 230 231 def __init__( 232 self, 233 *, 234 location: str, 235 tags: Optional[Dict[str, str]] = None, 236 sku: Optional["DiskSku"] = None, 237 zones: Optional[List[str]] = None, 238 os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, 239 hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, 240 creation_data: Optional["CreationData"] = None, 241 disk_size_gb: Optional[int] = None, 242 encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, 243 disk_iops_read_write: Optional[int] = None, 244 disk_m_bps_read_write: Optional[int] = None, 245 **kwargs 246 ): 247 super(Disk, self).__init__(location=location, tags=tags, **kwargs) 248 self.managed_by = None 249 self.sku = sku 250 self.zones = zones 251 self.time_created = None 252 self.os_type = os_type 253 self.hyper_v_generation = hyper_v_generation 254 self.creation_data = creation_data 255 self.disk_size_gb = disk_size_gb 256 self.encryption_settings_collection = encryption_settings_collection 257 self.provisioning_state = None 258 self.disk_iops_read_write = disk_iops_read_write 259 self.disk_m_bps_read_write = disk_m_bps_read_write 260 self.disk_state = None 261 262 263class DiskList(msrest.serialization.Model): 264 """The List Disks operation response. 265 266 All required parameters must be populated in order to send to Azure. 267 268 :param value: Required. A list of disks. 269 :type value: list[~azure.mgmt.compute.v2018_09_30.models.Disk] 270 :param next_link: The uri to fetch the next page of disks. Call ListNext() with this to fetch 271 the next page of disks. 272 :type next_link: str 273 """ 274 275 _validation = { 276 'value': {'required': True}, 277 } 278 279 _attribute_map = { 280 'value': {'key': 'value', 'type': '[Disk]'}, 281 'next_link': {'key': 'nextLink', 'type': 'str'}, 282 } 283 284 def __init__( 285 self, 286 *, 287 value: List["Disk"], 288 next_link: Optional[str] = None, 289 **kwargs 290 ): 291 super(DiskList, self).__init__(**kwargs) 292 self.value = value 293 self.next_link = next_link 294 295 296class DiskSku(msrest.serialization.Model): 297 """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or UltraSSD_LRS. 298 299 Variables are only populated by the server, and will be ignored when sending a request. 300 301 :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", 302 "StandardSSD_LRS", "UltraSSD_LRS". 303 :type name: str or ~azure.mgmt.compute.v2018_09_30.models.DiskStorageAccountTypes 304 :ivar tier: The sku tier. 305 :vartype tier: str 306 """ 307 308 _validation = { 309 'tier': {'readonly': True}, 310 } 311 312 _attribute_map = { 313 'name': {'key': 'name', 'type': 'str'}, 314 'tier': {'key': 'tier', 'type': 'str'}, 315 } 316 317 def __init__( 318 self, 319 *, 320 name: Optional[Union[str, "DiskStorageAccountTypes"]] = None, 321 **kwargs 322 ): 323 super(DiskSku, self).__init__(**kwargs) 324 self.name = name 325 self.tier = None 326 327 328class DiskUpdate(msrest.serialization.Model): 329 """Disk update resource. 330 331 :param tags: A set of tags. Resource tags. 332 :type tags: dict[str, str] 333 :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, or 334 UltraSSD_LRS. 335 :type sku: ~azure.mgmt.compute.v2018_09_30.models.DiskSku 336 :param os_type: the Operating System type. Possible values include: "Windows", "Linux". 337 :type os_type: str or ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes 338 :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it 339 indicates the size of the VHD to create. If this field is present for updates or creation with 340 other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a 341 running VM, and can only increase the disk's size. 342 :type disk_size_gb: int 343 :param encryption_settings_collection: Encryption settings collection used be Azure Disk 344 Encryption, can contain multiple encryption settings per disk or snapshot. 345 :type encryption_settings_collection: 346 ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection 347 :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for 348 UltraSSD disks. One operation can transfer between 4k and 256k bytes. 349 :type disk_iops_read_write: long 350 :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD 351 disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 352 10. 353 :type disk_m_bps_read_write: int 354 """ 355 356 _attribute_map = { 357 'tags': {'key': 'tags', 'type': '{str}'}, 358 'sku': {'key': 'sku', 'type': 'DiskSku'}, 359 'os_type': {'key': 'properties.osType', 'type': 'str'}, 360 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 361 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 362 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, 363 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'int'}, 364 } 365 366 def __init__( 367 self, 368 *, 369 tags: Optional[Dict[str, str]] = None, 370 sku: Optional["DiskSku"] = None, 371 os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, 372 disk_size_gb: Optional[int] = None, 373 encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, 374 disk_iops_read_write: Optional[int] = None, 375 disk_m_bps_read_write: Optional[int] = None, 376 **kwargs 377 ): 378 super(DiskUpdate, self).__init__(**kwargs) 379 self.tags = tags 380 self.sku = sku 381 self.os_type = os_type 382 self.disk_size_gb = disk_size_gb 383 self.encryption_settings_collection = encryption_settings_collection 384 self.disk_iops_read_write = disk_iops_read_write 385 self.disk_m_bps_read_write = disk_m_bps_read_write 386 387 388class EncryptionSettingsCollection(msrest.serialization.Model): 389 """Encryption settings for disk or snapshot. 390 391 All required parameters must be populated in order to send to Azure. 392 393 :param enabled: Required. Set this flag to true and provide DiskEncryptionKey and optional 394 KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and 395 KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, 396 the existing settings remain unchanged. 397 :type enabled: bool 398 :param encryption_settings: A collection of encryption settings, one for each disk volume. 399 :type encryption_settings: 400 list[~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsElement] 401 """ 402 403 _validation = { 404 'enabled': {'required': True}, 405 } 406 407 _attribute_map = { 408 'enabled': {'key': 'enabled', 'type': 'bool'}, 409 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, 410 } 411 412 def __init__( 413 self, 414 *, 415 enabled: bool, 416 encryption_settings: Optional[List["EncryptionSettingsElement"]] = None, 417 **kwargs 418 ): 419 super(EncryptionSettingsCollection, self).__init__(**kwargs) 420 self.enabled = enabled 421 self.encryption_settings = encryption_settings 422 423 424class EncryptionSettingsElement(msrest.serialization.Model): 425 """Encryption settings for one disk volume. 426 427 :param disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key. 428 :type disk_encryption_key: ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndSecretReference 429 :param key_encryption_key: Key Vault Key Url and vault id of the key encryption key. 430 KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. 431 :type key_encryption_key: ~azure.mgmt.compute.v2018_09_30.models.KeyVaultAndKeyReference 432 """ 433 434 _attribute_map = { 435 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, 436 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, 437 } 438 439 def __init__( 440 self, 441 *, 442 disk_encryption_key: Optional["KeyVaultAndSecretReference"] = None, 443 key_encryption_key: Optional["KeyVaultAndKeyReference"] = None, 444 **kwargs 445 ): 446 super(EncryptionSettingsElement, self).__init__(**kwargs) 447 self.disk_encryption_key = disk_encryption_key 448 self.key_encryption_key = key_encryption_key 449 450 451class GrantAccessData(msrest.serialization.Model): 452 """Data used for requesting a SAS. 453 454 All required parameters must be populated in order to send to Azure. 455 456 :param access: Required. Possible values include: "None", "Read", "Write". 457 :type access: str or ~azure.mgmt.compute.v2018_09_30.models.AccessLevel 458 :param duration_in_seconds: Required. Time duration in seconds until the SAS access expires. 459 :type duration_in_seconds: int 460 """ 461 462 _validation = { 463 'access': {'required': True}, 464 'duration_in_seconds': {'required': True}, 465 } 466 467 _attribute_map = { 468 'access': {'key': 'access', 'type': 'str'}, 469 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, 470 } 471 472 def __init__( 473 self, 474 *, 475 access: Union[str, "AccessLevel"], 476 duration_in_seconds: int, 477 **kwargs 478 ): 479 super(GrantAccessData, self).__init__(**kwargs) 480 self.access = access 481 self.duration_in_seconds = duration_in_seconds 482 483 484class ImageDiskReference(msrest.serialization.Model): 485 """The source image used for creating the disk. 486 487 All required parameters must be populated in order to send to Azure. 488 489 :param id: Required. A relative uri containing either a Platform Image Repository or user image 490 reference. 491 :type id: str 492 :param lun: If the disk is created from an image's data disk, this is an index that indicates 493 which of the data disks in the image to use. For OS disks, this field is null. 494 :type lun: int 495 """ 496 497 _validation = { 498 'id': {'required': True}, 499 } 500 501 _attribute_map = { 502 'id': {'key': 'id', 'type': 'str'}, 503 'lun': {'key': 'lun', 'type': 'int'}, 504 } 505 506 def __init__( 507 self, 508 *, 509 id: str, 510 lun: Optional[int] = None, 511 **kwargs 512 ): 513 super(ImageDiskReference, self).__init__(**kwargs) 514 self.id = id 515 self.lun = lun 516 517 518class KeyVaultAndKeyReference(msrest.serialization.Model): 519 """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey. 520 521 All required parameters must be populated in order to send to Azure. 522 523 :param source_vault: Required. Resource id of the KeyVault containing the key or secret. 524 :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault 525 :param key_url: Required. Url pointing to a key or secret in KeyVault. 526 :type key_url: str 527 """ 528 529 _validation = { 530 'source_vault': {'required': True}, 531 'key_url': {'required': True}, 532 } 533 534 _attribute_map = { 535 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, 536 'key_url': {'key': 'keyUrl', 'type': 'str'}, 537 } 538 539 def __init__( 540 self, 541 *, 542 source_vault: "SourceVault", 543 key_url: str, 544 **kwargs 545 ): 546 super(KeyVaultAndKeyReference, self).__init__(**kwargs) 547 self.source_vault = source_vault 548 self.key_url = key_url 549 550 551class KeyVaultAndSecretReference(msrest.serialization.Model): 552 """Key Vault Secret Url and vault id of the encryption key. 553 554 All required parameters must be populated in order to send to Azure. 555 556 :param source_vault: Required. Resource id of the KeyVault containing the key or secret. 557 :type source_vault: ~azure.mgmt.compute.v2018_09_30.models.SourceVault 558 :param secret_url: Required. Url pointing to a key or secret in KeyVault. 559 :type secret_url: str 560 """ 561 562 _validation = { 563 'source_vault': {'required': True}, 564 'secret_url': {'required': True}, 565 } 566 567 _attribute_map = { 568 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, 569 'secret_url': {'key': 'secretUrl', 'type': 'str'}, 570 } 571 572 def __init__( 573 self, 574 *, 575 source_vault: "SourceVault", 576 secret_url: str, 577 **kwargs 578 ): 579 super(KeyVaultAndSecretReference, self).__init__(**kwargs) 580 self.source_vault = source_vault 581 self.secret_url = secret_url 582 583 584class Snapshot(Resource): 585 """Snapshot resource. 586 587 Variables are only populated by the server, and will be ignored when sending a request. 588 589 All required parameters must be populated in order to send to Azure. 590 591 :ivar id: Resource Id. 592 :vartype id: str 593 :ivar name: Resource name. 594 :vartype name: str 595 :ivar type: Resource type. 596 :vartype type: str 597 :param location: Required. Resource location. 598 :type location: str 599 :param tags: A set of tags. Resource tags. 600 :type tags: dict[str, str] 601 :ivar managed_by: Unused. Always Null. 602 :vartype managed_by: str 603 :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. 604 :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku 605 :ivar time_created: The time when the disk was created. 606 :vartype time_created: ~datetime.datetime 607 :param os_type: The Operating System type. Possible values include: "Windows", "Linux". 608 :type os_type: str or ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes 609 :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS 610 disks only. Possible values include: "V1", "V2". 611 :type hyper_v_generation: str or ~azure.mgmt.compute.v2018_09_30.models.HyperVGeneration 612 :param creation_data: Disk source information. CreationData information cannot be changed after 613 the disk has been created. 614 :type creation_data: ~azure.mgmt.compute.v2018_09_30.models.CreationData 615 :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it 616 indicates the size of the VHD to create. If this field is present for updates or creation with 617 other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a 618 running VM, and can only increase the disk's size. 619 :type disk_size_gb: int 620 :param encryption_settings_collection: Encryption settings collection used be Azure Disk 621 Encryption, can contain multiple encryption settings per disk or snapshot. 622 :type encryption_settings_collection: 623 ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection 624 :ivar provisioning_state: The disk provisioning state. 625 :vartype provisioning_state: str 626 """ 627 628 _validation = { 629 'id': {'readonly': True}, 630 'name': {'readonly': True}, 631 'type': {'readonly': True}, 632 'location': {'required': True}, 633 'managed_by': {'readonly': True}, 634 'time_created': {'readonly': True}, 635 'provisioning_state': {'readonly': True}, 636 } 637 638 _attribute_map = { 639 'id': {'key': 'id', 'type': 'str'}, 640 'name': {'key': 'name', 'type': 'str'}, 641 'type': {'key': 'type', 'type': 'str'}, 642 'location': {'key': 'location', 'type': 'str'}, 643 'tags': {'key': 'tags', 'type': '{str}'}, 644 'managed_by': {'key': 'managedBy', 'type': 'str'}, 645 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, 646 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, 647 'os_type': {'key': 'properties.osType', 'type': 'str'}, 648 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, 649 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, 650 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 651 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 652 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 653 } 654 655 def __init__( 656 self, 657 *, 658 location: str, 659 tags: Optional[Dict[str, str]] = None, 660 sku: Optional["SnapshotSku"] = None, 661 os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, 662 hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, 663 creation_data: Optional["CreationData"] = None, 664 disk_size_gb: Optional[int] = None, 665 encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, 666 **kwargs 667 ): 668 super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) 669 self.managed_by = None 670 self.sku = sku 671 self.time_created = None 672 self.os_type = os_type 673 self.hyper_v_generation = hyper_v_generation 674 self.creation_data = creation_data 675 self.disk_size_gb = disk_size_gb 676 self.encryption_settings_collection = encryption_settings_collection 677 self.provisioning_state = None 678 679 680class SnapshotList(msrest.serialization.Model): 681 """The List Snapshots operation response. 682 683 All required parameters must be populated in order to send to Azure. 684 685 :param value: Required. A list of snapshots. 686 :type value: list[~azure.mgmt.compute.v2018_09_30.models.Snapshot] 687 :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to 688 fetch the next page of snapshots. 689 :type next_link: str 690 """ 691 692 _validation = { 693 'value': {'required': True}, 694 } 695 696 _attribute_map = { 697 'value': {'key': 'value', 'type': '[Snapshot]'}, 698 'next_link': {'key': 'nextLink', 'type': 'str'}, 699 } 700 701 def __init__( 702 self, 703 *, 704 value: List["Snapshot"], 705 next_link: Optional[str] = None, 706 **kwargs 707 ): 708 super(SnapshotList, self).__init__(**kwargs) 709 self.value = value 710 self.next_link = next_link 711 712 713class SnapshotSku(msrest.serialization.Model): 714 """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. 715 716 Variables are only populated by the server, and will be ignored when sending a request. 717 718 :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", 719 "Standard_ZRS". 720 :type name: str or ~azure.mgmt.compute.v2018_09_30.models.SnapshotStorageAccountTypes 721 :ivar tier: The sku tier. 722 :vartype tier: str 723 """ 724 725 _validation = { 726 'tier': {'readonly': True}, 727 } 728 729 _attribute_map = { 730 'name': {'key': 'name', 'type': 'str'}, 731 'tier': {'key': 'tier', 'type': 'str'}, 732 } 733 734 def __init__( 735 self, 736 *, 737 name: Optional[Union[str, "SnapshotStorageAccountTypes"]] = None, 738 **kwargs 739 ): 740 super(SnapshotSku, self).__init__(**kwargs) 741 self.name = name 742 self.tier = None 743 744 745class SnapshotUpdate(msrest.serialization.Model): 746 """Snapshot update resource. 747 748 :param tags: A set of tags. Resource tags. 749 :type tags: dict[str, str] 750 :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. 751 :type sku: ~azure.mgmt.compute.v2018_09_30.models.SnapshotSku 752 :param os_type: the Operating System type. Possible values include: "Windows", "Linux". 753 :type os_type: str or ~azure.mgmt.compute.v2018_09_30.models.OperatingSystemTypes 754 :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it 755 indicates the size of the VHD to create. If this field is present for updates or creation with 756 other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a 757 running VM, and can only increase the disk's size. 758 :type disk_size_gb: int 759 :param encryption_settings_collection: Encryption settings collection used be Azure Disk 760 Encryption, can contain multiple encryption settings per disk or snapshot. 761 :type encryption_settings_collection: 762 ~azure.mgmt.compute.v2018_09_30.models.EncryptionSettingsCollection 763 """ 764 765 _attribute_map = { 766 'tags': {'key': 'tags', 'type': '{str}'}, 767 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, 768 'os_type': {'key': 'properties.osType', 'type': 'str'}, 769 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, 770 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, 771 } 772 773 def __init__( 774 self, 775 *, 776 tags: Optional[Dict[str, str]] = None, 777 sku: Optional["SnapshotSku"] = None, 778 os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, 779 disk_size_gb: Optional[int] = None, 780 encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, 781 **kwargs 782 ): 783 super(SnapshotUpdate, self).__init__(**kwargs) 784 self.tags = tags 785 self.sku = sku 786 self.os_type = os_type 787 self.disk_size_gb = disk_size_gb 788 self.encryption_settings_collection = encryption_settings_collection 789 790 791class SourceVault(msrest.serialization.Model): 792 """The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. 793 794 :param id: Resource Id. 795 :type id: str 796 """ 797 798 _attribute_map = { 799 'id': {'key': 'id', 'type': 'str'}, 800 } 801 802 def __init__( 803 self, 804 *, 805 id: Optional[str] = None, 806 **kwargs 807 ): 808 super(SourceVault, self).__init__(**kwargs) 809 self.id = id 810