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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
|
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from .version import VERSION
class ComputeManagementClientConfiguration(AzureConfiguration):
"""Configuration for ComputeManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""
def __init__(
self, credentials, subscription_id, base_url=None):
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'
super(ComputeManagementClientConfiguration, self).__init__(base_url)
self.add_user_agent('computemanagementclient/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')
self.credentials = credentials
self.subscription_id = subscription_id
class ComputeManagementClient(MultiApiClientMixin, SDKClient):
"""Compute Client.
This ready contains multiple API versions, to help you deal with all Azure clouds
(Azure Stack, Azure Government, Azure China, etc.).
By default, uses latest API version available on public Azure.
For production, you should stick a particular api-version and/or profile.
The profile sets a mapping between the operation group and an API version.
The api-version parameter sets the default API version if the operation
group is not described in the profile.
:ivar config: Configuration for client.
:vartype config: ComputeManagementClientConfiguration
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
:param str base_url: Service URL
:param profile: A profile definition, from KnownProfiles to dict.
:type profile: azure.profiles.KnownProfiles
"""
DEFAULT_API_VERSION = '2018-10-01'
_PROFILE_TAG = "azure.mgmt.compute.ComputeManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
'resource_skus': '2017-09-01',
'disks': '2018-06-01',
'snapshots': '2018-06-01',
None: DEFAULT_API_VERSION
}},
_PROFILE_TAG + " latest"
)
def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default):
self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url)
super(ComputeManagementClient, self).__init__(
credentials,
self.config,
api_version=api_version,
profile=profile
)
############ Generated from here ############
@classmethod
def _models_dict(cls, api_version):
return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)}
@classmethod
def models(cls, api_version=DEFAULT_API_VERSION):
"""Module depends on the API version:
* 2015-06-15: :mod:`v2015_06_15.models<azure.mgmt.compute.v2015_06_15.models>`
* 2016-03-30: :mod:`v2016_03_30.models<azure.mgmt.compute.v2016_03_30.models>`
* 2016-04-30-preview: :mod:`v2016_04_30_preview.models<azure.mgmt.compute.v2016_04_30_preview.models>`
* 2017-03-30: :mod:`v2017_03_30.models<azure.mgmt.compute.v2017_03_30.models>`
* 2017-09-01: :mod:`v2017_09_01.models<azure.mgmt.compute.v2017_09_01.models>`
* 2017-12-01: :mod:`v2017_12_01.models<azure.mgmt.compute.v2017_12_01.models>`
* 2018-04-01: :mod:`v2018_04_01.models<azure.mgmt.compute.v2018_04_01.models>`
* 2018-06-01: :mod:`v2018_06_01.models<azure.mgmt.compute.v2018_06_01.models>`
* 2018-10-01: :mod:`v2018_10_01.models<azure.mgmt.compute.v2018_10_01.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
return models
elif api_version == '2016-03-30':
from .v2016_03_30 import models
return models
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview import models
return models
elif api_version == '2017-03-30':
from .v2017_03_30 import models
return models
elif api_version == '2017-09-01':
from .v2017_09_01 import models
return models
elif api_version == '2017-12-01':
from .v2017_12_01 import models
return models
elif api_version == '2018-04-01':
from .v2018_04_01 import models
return models
elif api_version == '2018-06-01':
from .v2018_06_01 import models
return models
elif api_version == '2018-10-01':
from .v2018_10_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))
@property
def availability_sets(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2015_06_15.operations.AvailabilitySetsOperations>`
* 2016-03-30: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2016_03_30.operations.AvailabilitySetsOperations>`
* 2016-04-30-preview: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.AvailabilitySetsOperations>`
* 2017-03-30: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2017_03_30.operations.AvailabilitySetsOperations>`
* 2017-12-01: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2017_12_01.operations.AvailabilitySetsOperations>`
* 2018-04-01: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2018_04_01.operations.AvailabilitySetsOperations>`
* 2018-06-01: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2018_06_01.operations.AvailabilitySetsOperations>`
* 2018-10-01: :class:`AvailabilitySetsOperations<azure.mgmt.compute.v2018_10_01.operations.AvailabilitySetsOperations>`
"""
api_version = self._get_api_version('availability_sets')
if api_version == '2015-06-15':
from .v2015_06_15.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import AvailabilitySetsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import AvailabilitySetsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def disks(self):
"""Instance depends on the API version:
* 2016-04-30-preview: :class:`DisksOperations<azure.mgmt.compute.v2016_04_30_preview.operations.DisksOperations>`
* 2017-03-30: :class:`DisksOperations<azure.mgmt.compute.v2017_03_30.operations.DisksOperations>`
* 2018-04-01: :class:`DisksOperations<azure.mgmt.compute.v2018_04_01.operations.DisksOperations>`
* 2018-06-01: :class:`DisksOperations<azure.mgmt.compute.v2018_06_01.operations.DisksOperations>`
"""
api_version = self._get_api_version('disks')
if api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import DisksOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import DisksOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import DisksOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import DisksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def galleries(self):
"""Instance depends on the API version:
* 2018-06-01: :class:`GalleriesOperations<azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations>`
"""
api_version = self._get_api_version('galleries')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleriesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def gallery_image_versions(self):
"""Instance depends on the API version:
* 2018-06-01: :class:`GalleryImageVersionsOperations<azure.mgmt.compute.v2018_06_01.operations.GalleryImageVersionsOperations>`
"""
api_version = self._get_api_version('gallery_image_versions')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleryImageVersionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def gallery_images(self):
"""Instance depends on the API version:
* 2018-06-01: :class:`GalleryImagesOperations<azure.mgmt.compute.v2018_06_01.operations.GalleryImagesOperations>`
"""
api_version = self._get_api_version('gallery_images')
if api_version == '2018-06-01':
from .v2018_06_01.operations import GalleryImagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def images(self):
"""Instance depends on the API version:
* 2016-04-30-preview: :class:`ImagesOperations<azure.mgmt.compute.v2016_04_30_preview.operations.ImagesOperations>`
* 2017-03-30: :class:`ImagesOperations<azure.mgmt.compute.v2017_03_30.operations.ImagesOperations>`
* 2017-12-01: :class:`ImagesOperations<azure.mgmt.compute.v2017_12_01.operations.ImagesOperations>`
* 2018-04-01: :class:`ImagesOperations<azure.mgmt.compute.v2018_04_01.operations.ImagesOperations>`
* 2018-06-01: :class:`ImagesOperations<azure.mgmt.compute.v2018_06_01.operations.ImagesOperations>`
* 2018-10-01: :class:`ImagesOperations<azure.mgmt.compute.v2018_10_01.operations.ImagesOperations>`
"""
api_version = self._get_api_version('images')
if api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import ImagesOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import ImagesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import ImagesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import ImagesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import ImagesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import ImagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def log_analytics(self):
"""Instance depends on the API version:
* 2017-12-01: :class:`LogAnalyticsOperations<azure.mgmt.compute.v2017_12_01.operations.LogAnalyticsOperations>`
* 2018-04-01: :class:`LogAnalyticsOperations<azure.mgmt.compute.v2018_04_01.operations.LogAnalyticsOperations>`
* 2018-06-01: :class:`LogAnalyticsOperations<azure.mgmt.compute.v2018_06_01.operations.LogAnalyticsOperations>`
* 2018-10-01: :class:`LogAnalyticsOperations<azure.mgmt.compute.v2018_10_01.operations.LogAnalyticsOperations>`
"""
api_version = self._get_api_version('log_analytics')
if api_version == '2017-12-01':
from .v2017_12_01.operations import LogAnalyticsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import LogAnalyticsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import LogAnalyticsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import LogAnalyticsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def operations(self):
"""Instance depends on the API version:
* 2017-12-01: :class:`Operations<azure.mgmt.compute.v2017_12_01.operations.Operations>`
* 2018-04-01: :class:`Operations<azure.mgmt.compute.v2018_04_01.operations.Operations>`
* 2018-06-01: :class:`Operations<azure.mgmt.compute.v2018_06_01.operations.Operations>`
* 2018-10-01: :class:`Operations<azure.mgmt.compute.v2018_10_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-12-01':
from .v2017_12_01.operations import Operations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import Operations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import Operations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def resource_skus(self):
"""Instance depends on the API version:
* 2017-03-30: :class:`ResourceSkusOperations<azure.mgmt.compute.v2017_03_30.operations.ResourceSkusOperations>`
* 2017-09-01: :class:`ResourceSkusOperations<azure.mgmt.compute.v2017_09_01.operations.ResourceSkusOperations>`
"""
api_version = self._get_api_version('resource_skus')
if api_version == '2017-03-30':
from .v2017_03_30.operations import ResourceSkusOperations as OperationClass
elif api_version == '2017-09-01':
from .v2017_09_01.operations import ResourceSkusOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def snapshots(self):
"""Instance depends on the API version:
* 2016-04-30-preview: :class:`SnapshotsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.SnapshotsOperations>`
* 2017-03-30: :class:`SnapshotsOperations<azure.mgmt.compute.v2017_03_30.operations.SnapshotsOperations>`
* 2018-04-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations>`
* 2018-06-01: :class:`SnapshotsOperations<azure.mgmt.compute.v2018_06_01.operations.SnapshotsOperations>`
"""
api_version = self._get_api_version('snapshots')
if api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import SnapshotsOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import SnapshotsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import SnapshotsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def usage(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`UsageOperations<azure.mgmt.compute.v2015_06_15.operations.UsageOperations>`
* 2016-03-30: :class:`UsageOperations<azure.mgmt.compute.v2016_03_30.operations.UsageOperations>`
* 2016-04-30-preview: :class:`UsageOperations<azure.mgmt.compute.v2016_04_30_preview.operations.UsageOperations>`
* 2017-03-30: :class:`UsageOperations<azure.mgmt.compute.v2017_03_30.operations.UsageOperations>`
* 2017-12-01: :class:`UsageOperations<azure.mgmt.compute.v2017_12_01.operations.UsageOperations>`
* 2018-04-01: :class:`UsageOperations<azure.mgmt.compute.v2018_04_01.operations.UsageOperations>`
* 2018-06-01: :class:`UsageOperations<azure.mgmt.compute.v2018_06_01.operations.UsageOperations>`
* 2018-10-01: :class:`UsageOperations<azure.mgmt.compute.v2018_10_01.operations.UsageOperations>`
"""
api_version = self._get_api_version('usage')
if api_version == '2015-06-15':
from .v2015_06_15.operations import UsageOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import UsageOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import UsageOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import UsageOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import UsageOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import UsageOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import UsageOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import UsageOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_extension_images(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionImagesOperations>`
* 2016-03-30: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionImagesOperations>`
* 2016-04-30-preview: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionImagesOperations>`
* 2017-03-30: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionImagesOperations>`
* 2017-12-01: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionImagesOperations>`
* 2018-04-01: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionImagesOperations>`
* 2018-06-01: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionImagesOperations>`
* 2018-10-01: :class:`VirtualMachineExtensionImagesOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionImagesOperations>`
"""
api_version = self._get_api_version('virtual_machine_extension_images')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineExtensionImagesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineExtensionImagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_extensions(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineExtensionsOperations>`
* 2016-03-30: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineExtensionsOperations>`
* 2016-04-30-preview: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineExtensionsOperations>`
* 2017-03-30: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineExtensionsOperations>`
* 2017-12-01: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineExtensionsOperations>`
* 2018-04-01: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineExtensionsOperations>`
* 2018-06-01: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineExtensionsOperations>`
* 2018-10-01: :class:`VirtualMachineExtensionsOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineExtensionsOperations>`
"""
api_version = self._get_api_version('virtual_machine_extensions')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineExtensionsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineExtensionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_images(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineImagesOperations>`
* 2016-03-30: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineImagesOperations>`
* 2016-04-30-preview: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineImagesOperations>`
* 2017-03-30: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineImagesOperations>`
* 2017-12-01: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineImagesOperations>`
* 2018-04-01: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineImagesOperations>`
* 2018-06-01: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineImagesOperations>`
* 2018-10-01: :class:`VirtualMachineImagesOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineImagesOperations>`
"""
api_version = self._get_api_version('virtual_machine_images')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineImagesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineImagesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_run_commands(self):
"""Instance depends on the API version:
* 2017-03-30: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations>`
* 2017-12-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations>`
* 2018-04-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineRunCommandsOperations>`
* 2018-06-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations>`
* 2018-10-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineRunCommandsOperations>`
"""
api_version = self._get_api_version('virtual_machine_run_commands')
if api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineRunCommandsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_scale_set_extensions(self):
"""Instance depends on the API version:
* 2017-03-30: :class:`VirtualMachineScaleSetExtensionsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetExtensionsOperations>`
* 2017-12-01: :class:`VirtualMachineScaleSetExtensionsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetExtensionsOperations>`
* 2018-04-01: :class:`VirtualMachineScaleSetExtensionsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetExtensionsOperations>`
* 2018-06-01: :class:`VirtualMachineScaleSetExtensionsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetExtensionsOperations>`
* 2018-10-01: :class:`VirtualMachineScaleSetExtensionsOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetExtensionsOperations>`
"""
api_version = self._get_api_version('virtual_machine_scale_set_extensions')
if api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineScaleSetExtensionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_scale_set_rolling_upgrades(self):
"""Instance depends on the API version:
* 2017-03-30: :class:`VirtualMachineScaleSetRollingUpgradesOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetRollingUpgradesOperations>`
* 2017-12-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetRollingUpgradesOperations>`
* 2018-04-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetRollingUpgradesOperations>`
* 2018-06-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetRollingUpgradesOperations>`
* 2018-10-01: :class:`VirtualMachineScaleSetRollingUpgradesOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetRollingUpgradesOperations>`
"""
api_version = self._get_api_version('virtual_machine_scale_set_rolling_upgrades')
if api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineScaleSetRollingUpgradesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_scale_set_vms(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetVMsOperations>`
* 2016-03-30: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetVMsOperations>`
* 2016-04-30-preview: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetVMsOperations>`
* 2017-03-30: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetVMsOperations>`
* 2017-12-01: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetVMsOperations>`
* 2018-04-01: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetVMsOperations>`
* 2018-06-01: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetVMsOperations>`
* 2018-10-01: :class:`VirtualMachineScaleSetVMsOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetVMsOperations>`
"""
api_version = self._get_api_version('virtual_machine_scale_set_vms')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineScaleSetVMsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_scale_sets(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineScaleSetsOperations>`
* 2016-03-30: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineScaleSetsOperations>`
* 2016-04-30-preview: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineScaleSetsOperations>`
* 2017-03-30: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineScaleSetsOperations>`
* 2017-12-01: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineScaleSetsOperations>`
* 2018-04-01: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineScaleSetsOperations>`
* 2018-06-01: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetsOperations>`
* 2018-10-01: :class:`VirtualMachineScaleSetsOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineScaleSetsOperations>`
"""
api_version = self._get_api_version('virtual_machine_scale_sets')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineScaleSetsOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineScaleSetsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machine_sizes(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachineSizesOperations>`
* 2016-03-30: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachineSizesOperations>`
* 2016-04-30-preview: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachineSizesOperations>`
* 2017-03-30: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineSizesOperations>`
* 2017-12-01: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineSizesOperations>`
* 2018-04-01: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineSizesOperations>`
* 2018-06-01: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineSizesOperations>`
* 2018-10-01: :class:`VirtualMachineSizesOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachineSizesOperations>`
"""
api_version = self._get_api_version('virtual_machine_sizes')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachineSizesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachineSizesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@property
def virtual_machines(self):
"""Instance depends on the API version:
* 2015-06-15: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2015_06_15.operations.VirtualMachinesOperations>`
* 2016-03-30: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2016_03_30.operations.VirtualMachinesOperations>`
* 2016-04-30-preview: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2016_04_30_preview.operations.VirtualMachinesOperations>`
* 2017-03-30: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachinesOperations>`
* 2017-12-01: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachinesOperations>`
* 2018-04-01: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachinesOperations>`
* 2018-06-01: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachinesOperations>`
* 2018-10-01: :class:`VirtualMachinesOperations<azure.mgmt.compute.v2018_10_01.operations.VirtualMachinesOperations>`
"""
api_version = self._get_api_version('virtual_machines')
if api_version == '2015-06-15':
from .v2015_06_15.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2016-03-30':
from .v2016_03_30.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2016-04-30-preview':
from .v2016_04_30_preview.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2017-03-30':
from .v2017_03_30.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2017-12-01':
from .v2017_12_01.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2018-04-01':
from .v2018_04_01.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2018-06-01':
from .v2018_06_01.operations import VirtualMachinesOperations as OperationClass
elif api_version == '2018-10-01':
from .v2018_10_01.operations import VirtualMachinesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
|