From 7c0633a075675c1f843ac7fbf66d2b6ccbd81714 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Jan 2021 17:49:19 +0000 Subject: [PATCH] CodeGen from PR 12289 in Azure/azure-rest-api-specs Get latest master (#12289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Hub Generated] Review request for Microsoft.AlertsManagement to add version stable/2019-06-01 (#11833) * Changing Swagger file * Changing examples * Fixing tags example * Fixing tags example * Fixing tags example * prettier fix for white spaces * Enable azure-sdk-for-net-track2 (#12169) * Updating existing CRR APIs with zone restore feature (#12157) * - Added change for support of cross zone restores. * - updating example json * - Fixing prettier * lastUpdatedDate for templates (#11900) * lastUpdatedDate for templates * fix * [Hub Generated] Review request for Microsoft.AppPlatform to add version preview/2020-11-01-preview (#11823) * Adds base for updating Microsoft.AppPlatform from version stable/2020-07-01 to version 2020-11-01-preview * Updates readme * Updates API version in new specs and examples * Introduce additional change to 2020-11-01-preview. * Additional properties to monitoringSettings. * Readonly properties to requiredTraffics. Signed-off-by: Pan Li * Make credscan happy. Signed-off-by: Pan Li * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12113) * Fix linter and swagger warnings * Fix errors * Removed unneeded change * [ASC.Automations] Add new data type "RegulatoryComplianceAssessment" (#12185) * Add SubAssessment event source type and add more automations examples * Change Location isReadOnlu to false * Test * Add new read/write location and add new type TrackedResourceLocation * Minor * minor * prettier fixes * Change variable name to TrackedResourceLocation * Change type name TrackedResourceLocation to AzureTrackedResourceLocation * Update automations example * Add SecureScores & SecureScoreControls as new supported datatypes in Automations resource * [ASC.Automations] add new data type RegulatoryComplianceAssessment * add datalake store track2 config (#12186) * cleanup old pipeline dependencies (#11889) * cleanup pipeline deps * add rest-api-specs-scripts * Extending recovery network input in replication intent API to support new network creation (#12191) * [Hub Generated] Review request for Microsoft.Maps to add version preview/2020-02-01-preview (#12172) * Adding operations for Maps Creator resource. * Fixing typo. * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Adds suppression to readme * Resolving linter errors. * Minor update. * Updating all reference to v2 schema. * Marked private atlas as deprecated in description. * add operationsmanagement track2 config (#12141) * Update comment.yml (#12202) Add ARM traffic query link. When add breakingChangeReviewRequired * Adding new properties to response body (#12201) * adding new properties * updating examples * prettier fix * [Hub Generated] Review request for Microsoft.ContainerService to add version stable/2020-12-01 (#12064) * Add autorest.az configurations for azure monitor control service (#12090) * add AMCS config for codegen * reorganize command group * rename command group * Codegen modify try to rename DataCollectionRules create parameters * hide DataCollectionRules Create & Update commands and DataCollectionRuleAssociations Create command * use alias instand of rename in code-gen * use monitor-control-service as the extension name * Update readme.python.md * add logic track2 config (#12166) * add alertsmanagement track2 config (#11759) * Update comment.yml (#12213) * add mixedreality track2 confi (#12070) * add signalr track2 config (#11892) * add cognitiveservice track2 config (#11498) * add machinglearningservices track2 config (#12183) * add apimanagement track2 config (#12187) * add serialconsole track2 config (#12046) * Update TransparentDataEncryption Group Name (#12160) * update TransparentDataEncryption Group name * update reference of TransparentDataEncryption * Update readme.python.md (#12216) * Required changes for Azure HealthBot swagger (#12124) * Fixes for SDK generation files. * Fixes for SDK generation files. * Added GO. * Change Healthcare bot to Healthbot. * 1. Remove unused properties of SKU. 2. Removed unused CheckNameAvailability.json 3. Remove subgroup. * Sku is required. * [Hub Generated] Review request for Microsoft.IoTCentral to add version stable/2018-09-01 (#12224) * update to name * update * add api-version of guest configuration to go SDK (#12217) * add api-version for templatespecs (#12197) * Update specificationRepositoryConfiguration.json (#12218) * Adding new api version to devops RP (#11585) * Initial commit as per PR review * Actual changes to api spec for new version * Switching to multi-api build for python * Fix python spec to correct namespaces in multiapi mode * Revert changes to python generation * Add systemdata * Fix the path for sys data reference * Fix path once more * remove additional properties after including systemdata * Remove more addtional properties * Move system data to root * Fix wrong output-folder (#12229) * Remove swagger and examples because the controller will be used for private preview. (#12177) * Update pull_request_assignment.yml (#12230) * [Hub Generated] Review request for Microsoft.StorageCache to add version stable/2020-10-01 (#11407) * Init the next version so diffs can work better. * Updates readme * Updates API version in new specs and examples * Updates to StorageTargetProperties and added examples of cmk, mtu Add 202 to the storage cache and storage target create/update and update examples Fix ST no junction example's 202 response. add properties for nfs extended groups fix issues with extended groups properties found with autorest add properties and objects for Active Directory username download undo unintended change changes from comments in pull request AccessPolicy support. Example fixes for Access Policies. Fix attribute names to match latest RP. update to credential properties for LDAP and Active Directory marking password properties with x-ms-secret tag minor changes on extended groups and add examples Added blob NFS and some other validation fixes. Update required property for domainName from dnsName Updated blobNfs examples and some kpi fixes. Correct validation errors in examples. Added systemdata to resources. Remove x-ms-secret in keyvault reference due to linter error and common types not using it. Remove blobNfs from this version. Remove blobNfs from spec file. Remove x-ms-secret due to linter errors. Fix certificate spelling. Updating prettier and spell check errors. Used prettier on main spec file. Readded x-ms-secret that open api hub failed on but the PR pipeline allows. * Add prettier fix after rebase * Remove 202 bodies and add systemData to examples. * Update spec with prettier. * Address comments on spec for descriptions, readmes, and extendedGroupsEnabled. * Updating to address addition ldap and pattern comments. * Update version tag to include 01 * Restore changes that would be considered breaking changes matching 2020-03-01 * Address a few other comments. * Update netbios field names and some descriptions. * Fix s360 for missing debugInfo operation. * Fix credscan error in example file. * Update required fields, new validator failure on debugInfo return codes, and bindPassword example value. * Update debug info example with new return codes. * Update other credscan password errors. * Update Semantic-and-Model-Violations-Reference.md (#12199) Adding secret_property code, update some other codes. * ADP - add system metadata to dataPool (#12179) * Swagger Linting Fix (#12162) * Fix Linting Issuing * no message * fix description * add description and object back * test to resolve model validation test (cherry picked from commit ab273dfc0d5897683c128ee15da4babafa7a85ba) * [SQL][V20180601] Updating LocationCapabilities spec (#12032) * [SQL][V20180601] Updating LocationCapabilities spec * Fill 2020 versions * Rollback V2018 changes and bump LocationCapabilities in V4 to 2020-08-01-preview * update order for CI-FixRequiredOnFailure (#12227) * update rdbms track2 config (#12245) * ADT: refix path (#12161) * python track2 configure (#12150) * Add and remove owner for service principals (#12081) * [Hub Generated] Review request for Microsoft.MixedReality to add version stable/2020-05-01 (#11810) * fix spec * fix prettier * [Hub Generated] Review request for Microsoft.MixedReality to add version preview/2019-12-02-preview (#11769) * fix for swagger completeness * forgot curly brace * fix example * Api Management - make /tenant endpoints ARM compliant in 2020-06-01-preview version (#11549) * Adds base for updating Microsoft.ApiManagement from version stable/2019-12-01 to version 2020-06-01-preview * Updates readme * Updates API version in new specs and examples * Add support in API Management for Availability Zones (#10284) * apim in azs * fix prettier check * PATCH should return 200 OK (#10328) * add support for PATCH returning 200 OK * CI fixes prettier fix CI fixes part 2 * Password no longer a mandatory property when uploading Certificates * add missing x-ms-odata extension for filter support * +gatewayhostnameconfiguration protocol changes (#10292) * [2020-06-01-preview] Update Oauth Server secrets Contract (#10602) * Oauth server secrets contract * fix azureMonitor enum * API Management Service Deleted Services Resource (#10607) * API Management Service Deleted Services Resource * Path fix * Lint + custom-words fixes * Location URI parameter for deletedservices Resource * GET for deletedservices by service name * Remove resourceGroupName from resource path * fixes * schema for purge operation * perttier applied * 204 response code added Co-authored-by: REDMOND\glfeokti * OperationNameFormat property added to Diagnostic contract (#10641) * OperationNameFormat property added to Diagnostic contract * add azuremonitor to update contract Co-authored-by: REDMOND\glfeokti * [Microsoft.ApiManagement][2020-06-01-preview] Change Network Status response contract (#10331) * Change Network Status response contract * Update examples for network status contract * ApiManagement - tenant/settings endpoints * ApiManagement - tenant/settings endpoints fix * ApiManagement - tenant/settings endpoints fix prettier * ApiManagement - tenant/settings endpoints fix 3 * ApiManagement - tenant/settings endpoints fix 4 * ApiManagement - tenant/settings endpoints fix 5 Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin * Add "mail" parameter to UserUpdateParameters in graphrbac (#12127) This patch adds a single optional field "mail" to UserUpdateParameters schema. This makes it possible to update user's e-mail address using the (Go) Azure SDK. Currently this is not possible. I have curled the graphrbac API with the extra body parameter and it works as expected. Addition of the field will make it possible to support the mail property on the azuread_user resource in terraform-provider-azuread. Co-authored-by: David Čepelík * [Hub Generated] Review request for Microsoft.Advisor to add version stable/2020-01-01 (#12262) * add resourcegraph track2 config (#12122) * add reservations track2 config (#12027) * Removing a readonly tag from a property (#12254) * Fix swagger correctness errors (#12246) * Fix swagger correctness issues in Security for Iot service * changed int format from 32 to 64 * Add systemData to iotSecuritySolutions Co-authored-by: Liran Chen * [Hub Generated] Review request for Microsoft.Consumption to add version stable/2019-10-01 (#12196) * AAS - Swagger Linting and Correctness Fix (#12176) * Fix R4013 IntegerTypeMustHaveFormat * Fix R4010 RequiredDefaultResponse * Fix R4007 DefaultErrorResponseSchema * removed extra bracket * fix semantic issue * add type error * Fix linting issue * test to resolve model validation test * Revert "test to resolve model validation test" This reverts commit ab273dfc0d5897683c128ee15da4babafa7a85ba. * Resolve Model Validation Issue * Resolve Model Validation Issue v2 * test - add missing properties (cherry picked from commit 48ec27c51cc61f4b3c05b531618f40b7c2f77de6) * fix format * set default value * add x-ms-enum * fix nit * Add missing property * add missing properties * add missing bracket * change GatewayListStatusLive type * add missing "origin" property * fix model validation * Revert "change GatewayListStatusLive type" This reverts commit 4f3fa743d5ce91bea6bcf83474e6e3fc15bc3483. * Revert "fix model validation" This reverts commit 945bc233b9e623b2d90f7903b8b4dee94d873aa8. * add redhatopenshift track2 config (#12045) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-10-01 (#12194) * Adding nextLink and previousLink to Tags endpoint properties * moving properties out * prettier check fix Co-authored-by: Jorge Chavez Nieto * add relay track2 config (#11495) * update healthbot t2 config (#12269) * update healthbot t2 config * fix readme * add automation track2 config (#11628) * add automation track2 config * update config * Azure Remote Rendering REST API swagger file - for review (#12015) * Azure Remote Rendering API specifcation * fix schema issue * fix examples * fix request bodies integer values, :stop path * pointing readme.md to open api spec for ARR * fix typo, add custom words * add msvc to custom words * fix readme.md * ran prettifier * fix reference to json * reference sts from file as well * fix readme.md * changes to readme.md * remove example from error to fix error * add 200 OK status for retried PUT for conversions and sessiosn * ran prettier * make autorest linter not crash * fix casing of nextLinkName paramter * factor out conversion list response * add examples for conversions * adding examples for sessions, prettify files * [Hub Generated] Review request for Microsoft.Maps/Microsoft.Maps to add version preview/2.0 (#12175) * microsoft.imagery 512 not supported Adding micorosft.imagery to 512 tile not supported list * Updating Raster Tilesets to Have Max Zoom 22 Certain raster tilesets now support up to zoom level 22. * minor changes to swagger (#12253) * minor changes to swagger * reverting sdk definitions file * Add addons to AVS 2020-07-17-preview (#12236) * found missing AVS/privateclouds/addons commit, moving it to 2020-07-17-preview API from PR repo * fixed prettier errors * Fixed vladation warnings for x-ms-enum and missing description/title, related to addons * fixed validation error for missing systemData for addons responses * fixed prettier errors * fixed validation error for missing systemData for addons responses * systemData for any Resource * make sure systemData is readOnly * systemData needs to go in a new api version * suppress systemData error Co-authored-by: Cameron Taggart * Azs api bug fix (#12133) * Old api version for ComputeOperationResult * Api Bugfix for Azure Stack Fabric Admin * Fix for typo in readme * Add default reponse * Fix example issue for default error * Update comment.yml (#12273) * [Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-11-01 (#12031) * fix dataSet typo * fix dimensions and tags typo * more dimensions and tags to fix * one more miss on dimensions and tags * Add the includeMonetaryCommitment missing field * fix spell check error * make property read only * remove the not operation from query filters * New backup service api version (#12171) * Initial commit: adding new api version * - new api 2020-12-01 * updating the readme.md package reference * - adding the zone information for new api * - updating api-version in examples - added 'zone' in Get recoverypoint api example json * Fixing prettier issue * Revert "- updating api-version in examples" This reverts commit 80baa9fcec1293bd3a51875d793f2178964fce52. * - adding api-version in examples * adding new api version in package mds * [IotHub] Introducing networkRuleSets in IotHubProperties [2020-08-31 : preview and stable ] (#10853) * Adds base for updating Microsoft.Devices from version preview/2020-07-10-preview to version 2020-08-31-preview * Updates readme * Updates API version in new specs and examples * Adds base for updating Microsoft.Devices from version stable/2020-08-01 to version 2020-08-31 * Updates readme * Updates API version in new specs and examples * Adding networkRuleSets support for iothub * Adding networkRuleSets Support in preview version * Adding Examples, correcting order in iothub.json * Updating Readme to have stable and previe versions * Modifying Tag to package-2020-08-31 * Adding Arm identity properties from 2020-07-010-preview version * Removing creds * minor fix * swagger correctness fix (#12101) * swagger correctness fix * update preview version too * Revert change and add defaults (#12243) * Remove gallery preview version 2020-09-30 from stable release (#12222) * add managementpartner track2 config (#12043) * [Hub Generated] Review request for Microsoft.Insights to add version stable/2019-03-01 (#12232) * Fixed swagger validations for api version 2019 * reverted error response change and suppress * removed redundant error details * renamed suppression rule * fixed suppression Co-authored-by: napolish <67951636+napolish@users.noreply.github.com> Co-authored-by: Phoenix He Co-authored-by: arpja <46751982+arpja@users.noreply.github.com> Co-authored-by: ShaniFelig <74960756+ShaniFelig@users.noreply.github.com> Co-authored-by: Pan Li Co-authored-by: Zach Rathbun Co-authored-by: surashed <55134940+surashed@users.noreply.github.com> Co-authored-by: Kaihui (Kerwin) Sun Co-authored-by: Zhenglai Zhang Co-authored-by: om-nishant <50401171+om-nishant@users.noreply.github.com> Co-authored-by: Ihar Voitka Co-authored-by: Ruoxuan Wang <52271048+ruowan@users.noreply.github.com> Co-authored-by: Ju Hee Lee Co-authored-by: xiazhan Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com> Co-authored-by: Ji Wang Co-authored-by: Andy Zhang Co-authored-by: guy-microsoft <50947884+guy-microsoft@users.noreply.github.com> Co-authored-by: PoAn (Baron) Chen Co-authored-by: Arcturus Co-authored-by: suyash691 Co-authored-by: nemijato <68876730+nemijato@users.noreply.github.com> Co-authored-by: brpanask <64860651+brpanask@users.noreply.github.com> Co-authored-by: Ray Chen Co-authored-by: Eli Arbel Co-authored-by: David Han <76010854+david-msft@users.noreply.github.com> Co-authored-by: Roman Khotsyn Co-authored-by: David R. Williamson Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Xinyi Joffre Co-authored-by: roytan-microsoft <73565668+roytan-microsoft@users.noreply.github.com> Co-authored-by: Vitaliy Fedonkin Co-authored-by: Samir Solanki Co-authored-by: maksimkim Co-authored-by: promoisha Co-authored-by: REDMOND\glfeokti Co-authored-by: RupengLiu Co-authored-by: vfedonkin Co-authored-by: David Čepelík Co-authored-by: David Čepelík Co-authored-by: mudit794 <42189950+mudit794@users.noreply.github.com> Co-authored-by: Dhawal Jain <41853104+dhawal777@users.noreply.github.com> Co-authored-by: MichalHel <51286657+MichalHel@users.noreply.github.com> Co-authored-by: Liran Chen Co-authored-by: jochav <75458295+jochav@users.noreply.github.com> Co-authored-by: Jorge Chavez Nieto Co-authored-by: rikogeln <40666347+rikogeln@users.noreply.github.com> Co-authored-by: chgennar <56695749+chgennar@users.noreply.github.com> Co-authored-by: hivyas <61890270+hivyas@users.noreply.github.com> Co-authored-by: Douglas Lee <65295939+leedouglas@users.noreply.github.com> Co-authored-by: Cameron Taggart Co-authored-by: LingyunSu <33764806+LingyunSu@users.noreply.github.com> Co-authored-by: elabicha <61994320+elabicha@users.noreply.github.com> Co-authored-by: Nikhil Kumar Mengani <62704762+nimengan@users.noreply.github.com> Co-authored-by: Junbo Wang Co-authored-by: Daniel Orozco <64658732+dagoroz@users.noreply.github.com> Co-authored-by: Adam Sandor Co-authored-by: yashmuel <63585146+yashmuel@users.noreply.github.com> --- ...irtual_machine_scale_set_vms_operations.py | 4 +- .../_virtual_machines_operations.py | 11 +- ...irtual_machine_scale_set_vms_operations.py | 4 +- .../_virtual_machines_operations.py | 11 +- .../v2020_06_01/_compute_management_client.py | 5 + .../compute/v2020_06_01/models/__init__.py | 25 + .../_compute_management_client_enums.py | 11 + .../compute/v2020_06_01/models/_models.py | 613 ++++++++++++++--- .../compute/v2020_06_01/models/_models_py3.py | 623 +++++++++++++++--- .../v2020_06_01/models/_paged_models.py | 13 + .../v2020_06_01/operations/__init__.py | 2 + ...virtual_machine_run_commands_operations.py | 451 +++++++++++++ ...hine_scale_set_vm_extensions_operations.py | 52 +- ...ne_scale_set_vm_run_commands_operations.py | 505 ++++++++++++++ .../_virtual_machines_operations.py | 2 +- .../compute/v2020_09_30/models/__init__.py | 7 +- .../_compute_management_client_enums.py | 2 +- .../compute/v2020_09_30/models/_models.py | 58 +- .../compute/v2020_09_30/models/_models_py3.py | 62 +- .../operations/_galleries_operations.py | 2 +- 20 files changed, 2241 insertions(+), 222 deletions(-) create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_vms_operations.py index 967b86a4faf7..ee808695532c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_vms_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -1116,7 +1116,9 @@ def _perform_maintenance_initial( def perform_maintenance( self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. + """Shuts down the virtual machine in a VMScaleSet, moves it to an already + updated node, and powers it back on during the self-service phase of + planned maintenance. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py index fdd3f5f441fa..c09f8772c390 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_virtual_machines_operations.py @@ -676,7 +676,12 @@ def convert_to_managed_disks( self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): """Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this - operation. + operation.
For Windows, please refer to [Convert a virtual machine + from unmanaged disks to managed + disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).
For + Linux, please refer to [Convert a virtual machine from unmanaged disks + to managed + disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks). :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -1614,7 +1619,9 @@ def _perform_maintenance_initial( def perform_maintenance( self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. + """Shuts down the virtual machine, moves it to an already updated node, + and powers it back on during the self-service phase of planned + maintenance. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vms_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vms_operations.py index e64c9287bb78..19f13fb2b958 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vms_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machine_scale_set_vms_operations.py @@ -1116,7 +1116,9 @@ def _perform_maintenance_initial( def perform_maintenance( self, resource_group_name, vm_scale_set_name, instance_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Performs maintenance on a virtual machine in a VM scale set. + """Shuts down the virtual machine in a VMScaleSet, moves it to an already + updated node, and powers it back on during the self-service phase of + planned maintenance. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machines_operations.py index 7793786ae0ac..2daf67b2f2d7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_virtual_machines_operations.py @@ -676,7 +676,12 @@ def convert_to_managed_disks( self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): """Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this - operation. + operation.
For Windows, please refer to [Convert a virtual machine + from unmanaged disks to managed + disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-unmanaged-to-managed-disks).
For + Linux, please refer to [Convert a virtual machine from unmanaged disks + to managed + disks.](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/convert-unmanaged-to-managed-disks). :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -1614,7 +1619,9 @@ def _perform_maintenance_initial( def perform_maintenance( self, resource_group_name, vm_name, custom_headers=None, raw=False, polling=True, **operation_config): - """The operation to perform maintenance on a virtual machine. + """Shuts down the virtual machine, moves it to an already updated node, + and powers it back on during the self-service phase of planned + maintenance. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py index f6422e42a984..553e1facfe28 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py @@ -33,6 +33,7 @@ from .operations import VirtualMachineScaleSetVMsOperations from .operations import LogAnalyticsOperations from .operations import VirtualMachineRunCommandsOperations +from .operations import VirtualMachineScaleSetVMRunCommandsOperations from . import models @@ -82,6 +83,8 @@ class ComputeManagementClient(SDKClient): :vartype log_analytics: azure.mgmt.compute.v2020_06_01.operations.LogAnalyticsOperations :ivar virtual_machine_run_commands: VirtualMachineRunCommands operations :vartype virtual_machine_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineRunCommandsOperations + :ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommands operations + :vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMRunCommandsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -144,3 +147,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations( self._client, self.config, self._serialize, self._deserialize) + self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py index 4cf5e17b2d24..4724d3f8ed46 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py @@ -132,6 +132,10 @@ from ._models_py3 import VirtualMachineInstanceView from ._models_py3 import VirtualMachinePatchStatus from ._models_py3 import VirtualMachineReimageParameters + from ._models_py3 import VirtualMachineRunCommand + from ._models_py3 import VirtualMachineRunCommandInstanceView + from ._models_py3 import VirtualMachineRunCommandScriptSource + from ._models_py3 import VirtualMachineRunCommandUpdate from ._models_py3 import VirtualMachineScaleSet from ._models_py3 import VirtualMachineScaleSetDataDisk from ._models_py3 import VirtualMachineScaleSetExtension @@ -165,7 +169,10 @@ from ._models_py3 import VirtualMachineScaleSetUpdateStorageProfile from ._models_py3 import VirtualMachineScaleSetUpdateVMProfile from ._models_py3 import VirtualMachineScaleSetVM + from ._models_py3 import VirtualMachineScaleSetVMExtension + from ._models_py3 import VirtualMachineScaleSetVMExtensionsListResult from ._models_py3 import VirtualMachineScaleSetVMExtensionsSummary + from ._models_py3 import VirtualMachineScaleSetVMExtensionUpdate from ._models_py3 import VirtualMachineScaleSetVMInstanceIDs from ._models_py3 import VirtualMachineScaleSetVMInstanceRequiredIDs from ._models_py3 import VirtualMachineScaleSetVMInstanceView @@ -304,6 +311,10 @@ from ._models import VirtualMachineInstanceView from ._models import VirtualMachinePatchStatus from ._models import VirtualMachineReimageParameters + from ._models import VirtualMachineRunCommand + from ._models import VirtualMachineRunCommandInstanceView + from ._models import VirtualMachineRunCommandScriptSource + from ._models import VirtualMachineRunCommandUpdate from ._models import VirtualMachineScaleSet from ._models import VirtualMachineScaleSetDataDisk from ._models import VirtualMachineScaleSetExtension @@ -337,7 +348,10 @@ from ._models import VirtualMachineScaleSetUpdateStorageProfile from ._models import VirtualMachineScaleSetUpdateVMProfile from ._models import VirtualMachineScaleSetVM + from ._models import VirtualMachineScaleSetVMExtension + from ._models import VirtualMachineScaleSetVMExtensionsListResult from ._models import VirtualMachineScaleSetVMExtensionsSummary + from ._models import VirtualMachineScaleSetVMExtensionUpdate from ._models import VirtualMachineScaleSetVMInstanceIDs from ._models import VirtualMachineScaleSetVMInstanceRequiredIDs from ._models import VirtualMachineScaleSetVMInstanceView @@ -364,6 +378,7 @@ from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged from ._paged_models import UsagePaged from ._paged_models import VirtualMachinePaged +from ._paged_models import VirtualMachineRunCommandPaged from ._paged_models import VirtualMachineScaleSetExtensionPaged from ._paged_models import VirtualMachineScaleSetPaged from ._paged_models import VirtualMachineScaleSetSkuPaged @@ -410,6 +425,7 @@ RollingUpgradeActionType, IntervalInMins, OrchestrationServiceStateAction, + ExecutionState, InstanceViewTypes, ) @@ -536,6 +552,10 @@ 'VirtualMachineInstanceView', 'VirtualMachinePatchStatus', 'VirtualMachineReimageParameters', + 'VirtualMachineRunCommand', + 'VirtualMachineRunCommandInstanceView', + 'VirtualMachineRunCommandScriptSource', + 'VirtualMachineRunCommandUpdate', 'VirtualMachineScaleSet', 'VirtualMachineScaleSetDataDisk', 'VirtualMachineScaleSetExtension', @@ -569,7 +589,10 @@ 'VirtualMachineScaleSetUpdateStorageProfile', 'VirtualMachineScaleSetUpdateVMProfile', 'VirtualMachineScaleSetVM', + 'VirtualMachineScaleSetVMExtension', + 'VirtualMachineScaleSetVMExtensionsListResult', 'VirtualMachineScaleSetVMExtensionsSummary', + 'VirtualMachineScaleSetVMExtensionUpdate', 'VirtualMachineScaleSetVMInstanceIDs', 'VirtualMachineScaleSetVMInstanceRequiredIDs', 'VirtualMachineScaleSetVMInstanceView', @@ -601,6 +624,7 @@ 'VirtualMachineScaleSetExtensionPaged', 'VirtualMachineScaleSetVMPaged', 'RunCommandDocumentBasePaged', + 'VirtualMachineRunCommandPaged', 'VmDiskTypes', 'HyperVGenerationTypes', 'StatusLevelTypes', @@ -641,5 +665,6 @@ 'RollingUpgradeActionType', 'IntervalInMins', 'OrchestrationServiceStateAction', + 'ExecutionState', 'InstanceViewTypes', ] diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py index d29fbdf55093..028462385f4e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py @@ -444,6 +444,17 @@ class OrchestrationServiceStateAction(str, Enum): suspend = "Suspend" +class ExecutionState(str, Enum): + + unknown = "Unknown" + pending = "Pending" + running = "Running" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + canceled = "Canceled" + + class InstanceViewTypes(str, Enum): instance_view = "instanceView" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py index 99dafe0b6c18..23a13a11b98a 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py @@ -961,7 +961,7 @@ class DedicatedHostGroup(Resource): virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value - is defaulted to 'true' when not provided.

Minimum api-version: + is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. :type support_automatic_placement: bool :param zones: Availability Zone to use for this host group. Only single @@ -1048,7 +1048,7 @@ class DedicatedHostGroupUpdate(UpdateResource): virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value - is defaulted to 'true' when not provided.

Minimum api-version: + is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. :type support_automatic_placement: bool :param zones: Availability Zone to use for this host group. Only single @@ -1396,61 +1396,66 @@ class HardwareProfile(Model): :param vm_size: Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

[List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

[List all available virtual machine sizes in a region]( + https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' +

This list of sizes is no longer updated and the + **VirtualMachineSizeTypes** string constants will be removed from the + subsequent REST API specification. Use [List all available virtual machine + sizes in a region]( + https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) to + get the latest sizes. Possible values include: 'Basic_A0', 'Basic_A1', + 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', + 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', + 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', + 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', + 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', + 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', + 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', + 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', + 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', + 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', + 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', + 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', + 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', + 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', + 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', + 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', + 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', + 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', + 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', + 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', + 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', + 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', + 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', + 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', + 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', + 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', + 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', + 'Standard_NV6', 'Standard_NV12', 'Standard_NV24' :type vm_size: str or ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineSizeTypes """ @@ -2104,6 +2109,11 @@ class LogAnalyticsInputBase(Model): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool """ _validation = { @@ -2119,6 +2129,8 @@ class LogAnalyticsInputBase(Model): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -2129,6 +2141,8 @@ def __init__(self, **kwargs): self.group_by_throttle_policy = kwargs.get('group_by_throttle_policy', None) self.group_by_operation_name = kwargs.get('group_by_operation_name', None) self.group_by_resource_name = kwargs.get('group_by_resource_name', None) + self.group_by_client_application_id = kwargs.get('group_by_client_application_id', None) + self.group_by_user_agent = kwargs.get('group_by_user_agent', None) class LogAnalyticsOperationResult(Model): @@ -2816,6 +2830,11 @@ class RequestRateByIntervalInput(LogAnalyticsInputBase): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool :param interval_length: Required. Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' @@ -2837,6 +2856,8 @@ class RequestRateByIntervalInput(LogAnalyticsInputBase): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, } @@ -3692,6 +3713,11 @@ class ThrottledRequestsInput(LogAnalyticsInputBase): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool """ _validation = { @@ -3707,6 +3733,8 @@ class ThrottledRequestsInput(LogAnalyticsInputBase): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -4122,13 +4150,14 @@ class VirtualMachine(Resource): :vartype instance_view: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier @@ -5033,6 +5062,255 @@ def __init__(self, **kwargs): self.temp_disk = kwargs.get('temp_disk', None) +class VirtualMachineRunCommand(Resource): + """Describes a Virtual Machine run command. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source: The source of the run command script. + :type source: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param protected_parameters: The parameters used by the script. + :type protected_parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param async_execution: Optional. If set to true, provisioning will + complete as soon as the script starts and will not wait for script to + complete. Default value: False . + :type async_execution: bool + :param run_as_user: Specifies the user account on the VM when executing + the run command. + :type run_as_user: str + :param run_as_password: Specifies the user account password on the VM when + executing the run command. + :type run_as_password: str + :param timeout_in_seconds: The timeout in seconds to execute the run + command. + :type timeout_in_seconds: int + :param output_blob_uri: Specifies the Azure storage blob where script + output stream will be uploaded. + :type output_blob_uri: str + :param error_blob_uri: Specifies the Azure storage blob where script error + stream will be uploaded. + :type error_blob_uri: str + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine run command instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'VirtualMachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineRunCommandInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineRunCommand, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.parameters = kwargs.get('parameters', None) + self.protected_parameters = kwargs.get('protected_parameters', None) + self.async_execution = kwargs.get('async_execution', False) + self.run_as_user = kwargs.get('run_as_user', None) + self.run_as_password = kwargs.get('run_as_password', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.output_blob_uri = kwargs.get('output_blob_uri', None) + self.error_blob_uri = kwargs.get('error_blob_uri', None) + self.provisioning_state = None + self.instance_view = None + + +class VirtualMachineRunCommandInstanceView(Model): + """The instance view of a virtual machine run command. + + :param execution_state: Script execution status. Possible values include: + 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut', + 'Canceled' + :type execution_state: str or + ~azure.mgmt.compute.v2020_06_01.models.ExecutionState + :param execution_message: Communicate script configuration errors or + execution messages. + :type execution_message: str + :param exit_code: Exit code returned from script execution. + :type exit_code: int + :param output: Script output stream. + :type output: str + :param error: Script error stream. + :type error: str + :param start_time: Script start time. + :type start_time: datetime + :param end_time: Script end time. + :type end_time: datetime + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2020_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'execution_state': {'key': 'executionState', 'type': 'str'}, + 'execution_message': {'key': 'executionMessage', 'type': 'str'}, + 'exit_code': {'key': 'exitCode', 'type': 'int'}, + 'output': {'key': 'output', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineRunCommandInstanceView, self).__init__(**kwargs) + self.execution_state = kwargs.get('execution_state', None) + self.execution_message = kwargs.get('execution_message', None) + self.exit_code = kwargs.get('exit_code', None) + self.output = kwargs.get('output', None) + self.error = kwargs.get('error', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.statuses = kwargs.get('statuses', None) + + +class VirtualMachineRunCommandScriptSource(Model): + """Describes the script sources for run command. + + :param script: Specifies the script content to be executed on the VM. + :type script: str + :param script_uri: Specifies the script download location. + :type script_uri: str + :param command_id: Specifies a commandId of predefined built-in script. + :type command_id: str + """ + + _attribute_map = { + 'script': {'key': 'script', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'command_id': {'key': 'commandId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineRunCommandScriptSource, self).__init__(**kwargs) + self.script = kwargs.get('script', None) + self.script_uri = kwargs.get('script_uri', None) + self.command_id = kwargs.get('command_id', None) + + +class VirtualMachineRunCommandUpdate(UpdateResource): + """Describes a Virtual Machine run command. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source: The source of the run command script. + :type source: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param protected_parameters: The parameters used by the script. + :type protected_parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param async_execution: Optional. If set to true, provisioning will + complete as soon as the script starts and will not wait for script to + complete. Default value: False . + :type async_execution: bool + :param run_as_user: Specifies the user account on the VM when executing + the run command. + :type run_as_user: str + :param run_as_password: Specifies the user account password on the VM when + executing the run command. + :type run_as_password: str + :param timeout_in_seconds: The timeout in seconds to execute the run + command. + :type timeout_in_seconds: int + :param output_blob_uri: Specifies the Azure storage blob where script + output stream will be uploaded. + :type output_blob_uri: str + :param error_blob_uri: Specifies the Azure storage blob where script error + stream will be uploaded. + :type error_blob_uri: str + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine run command instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'VirtualMachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineRunCommandInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineRunCommandUpdate, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.parameters = kwargs.get('parameters', None) + self.protected_parameters = kwargs.get('protected_parameters', None) + self.async_execution = kwargs.get('async_execution', False) + self.run_as_user = kwargs.get('run_as_user', None) + self.run_as_password = kwargs.get('run_as_password', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.output_blob_uri = kwargs.get('output_blob_uri', None) + self.error_blob_uri = kwargs.get('error_blob_uri', None) + self.provisioning_state = None + self.instance_view = None + + class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. @@ -6702,13 +6980,14 @@ class VirtualMachineScaleSetVM(Resource): the response. :vartype provisioning_state: str :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar model_definition_applied: Specifies whether the model applied to the @@ -6804,6 +7083,107 @@ def __init__(self, **kwargs): self.zones = None +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): + """Describes a VMSS VM Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtension, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type1 = kwargs.get('type1', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + self.provisioning_state = None + self.instance_view = kwargs.get('instance_view', None) + + +class VirtualMachineScaleSetVMExtensionsListResult(Model): + """The List VMSS VM Extension operation response. + + :param value: The list of VMSS VM extensions + :type value: + list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineScaleSetVMExtension]'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class VirtualMachineScaleSetVMExtensionsSummary(Model): """Extensions summary for virtual machines of a virtual machine scale set. @@ -6833,6 +7213,79 @@ def __init__(self, **kwargs): self.statuses_summary = None +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): + """Describes a VMSS VM Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineScaleSetVMExtensionUpdate, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = kwargs.get('force_update_tag', None) + self.publisher = kwargs.get('publisher', None) + self.type1 = kwargs.get('type1', None) + self.type_handler_version = kwargs.get('type_handler_version', None) + self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) + self.enable_automatic_upgrade = kwargs.get('enable_automatic_upgrade', None) + self.settings = kwargs.get('settings', None) + self.protected_settings = kwargs.get('protected_settings', None) + + class VirtualMachineScaleSetVMInstanceIDs(Model): """Specifies a list of virtual machine instance IDs from the VM scale set. @@ -7001,13 +7454,14 @@ class VirtualMachineScaleSetVMProfile(Model): :type extension_profile: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtensionProfile :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :param priority: Specifies the priority for the virtual machines in the @@ -7340,13 +7794,14 @@ class VirtualMachineUpdate(UpdateResource): :vartype instance_view: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py index b7b792891fc6..5d6cd95c62b7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models_py3.py @@ -961,7 +961,7 @@ class DedicatedHostGroup(Resource): virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value - is defaulted to 'true' when not provided.

Minimum api-version: + is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. :type support_automatic_placement: bool :param zones: Availability Zone to use for this host group. Only single @@ -1048,7 +1048,7 @@ class DedicatedHostGroupUpdate(UpdateResource): virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value - is defaulted to 'true' when not provided.

Minimum api-version: + is defaulted to 'false' when not provided.

Minimum api-version: 2020-06-01. :type support_automatic_placement: bool :param zones: Availability Zone to use for this host group. Only single @@ -1396,61 +1396,66 @@ class HardwareProfile(Model): :param vm_size: Specifies the size of the virtual machine. For more information about virtual machine sizes, see [Sizes for virtual - machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. For a list of available sizes use these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

[List all available virtual machine sizes in a - region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) +

[List all available virtual machine sizes in a region]( + https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', - 'Basic_A4', 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', - 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', 'Standard_A8', - 'Standard_A9', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', - 'Standard_A2_v2', 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', - 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', - 'Standard_D1', 'Standard_D2', 'Standard_D3', 'Standard_D4', - 'Standard_D11', 'Standard_D12', 'Standard_D13', 'Standard_D14', - 'Standard_D1_v2', 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', - 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', 'Standard_DS2', - 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', 'Standard_DS12', - 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', 'Standard_DS2_v2', - 'Standard_DS3_v2', 'Standard_DS4_v2', 'Standard_DS5_v2', - 'Standard_DS11_v2', 'Standard_DS12_v2', 'Standard_DS13_v2', - 'Standard_DS14_v2', 'Standard_DS15_v2', 'Standard_DS13-4_v2', - 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', 'Standard_DS14-4_v2', - 'Standard_E2_v3', 'Standard_E4_v3', 'Standard_E8_v3', 'Standard_E16_v3', - 'Standard_E32_v3', 'Standard_E64_v3', 'Standard_E2s_v3', - 'Standard_E4s_v3', 'Standard_E8s_v3', 'Standard_E16s_v3', - 'Standard_E32s_v3', 'Standard_E64s_v3', 'Standard_E32-16_v3', - 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', 'Standard_E64-16s_v3', - 'Standard_F1', 'Standard_F2', 'Standard_F4', 'Standard_F8', - 'Standard_F16', 'Standard_F1s', 'Standard_F2s', 'Standard_F4s', - 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', 'Standard_F4s_v2', - 'Standard_F8s_v2', 'Standard_F16s_v2', 'Standard_F32s_v2', - 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', 'Standard_G2', - 'Standard_G3', 'Standard_G4', 'Standard_G5', 'Standard_GS1', - 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', 'Standard_GS5', - 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', 'Standard_GS5-8', - 'Standard_H8', 'Standard_H16', 'Standard_H8m', 'Standard_H16m', - 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', 'Standard_L8s', - 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', 'Standard_M64ms', - 'Standard_M128s', 'Standard_M128ms', 'Standard_M64-32ms', - 'Standard_M64-16ms', 'Standard_M128-64ms', 'Standard_M128-32ms', - 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', 'Standard_NC24r', - 'Standard_NC6s_v2', 'Standard_NC12s_v2', 'Standard_NC24s_v2', - 'Standard_NC24rs_v2', 'Standard_NC6s_v3', 'Standard_NC12s_v3', - 'Standard_NC24s_v3', 'Standard_NC24rs_v3', 'Standard_ND6s', - 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', 'Standard_NV6', - 'Standard_NV12', 'Standard_NV24' +

This list of sizes is no longer updated and the + **VirtualMachineSizeTypes** string constants will be removed from the + subsequent REST API specification. Use [List all available virtual machine + sizes in a region]( + https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) to + get the latest sizes. Possible values include: 'Basic_A0', 'Basic_A1', + 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', + 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', 'Standard_A6', + 'Standard_A7', 'Standard_A8', 'Standard_A9', 'Standard_A10', + 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', + 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', 'Standard_A8m_v2', + 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', + 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D2_v3', + 'Standard_D4_v3', 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', + 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', + 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', + 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', + 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', 'Standard_DS1_v2', + 'Standard_DS2_v2', 'Standard_DS3_v2', 'Standard_DS4_v2', + 'Standard_DS5_v2', 'Standard_DS11_v2', 'Standard_DS12_v2', + 'Standard_DS13_v2', 'Standard_DS14_v2', 'Standard_DS15_v2', + 'Standard_DS13-4_v2', 'Standard_DS13-2_v2', 'Standard_DS14-8_v2', + 'Standard_DS14-4_v2', 'Standard_E2_v3', 'Standard_E4_v3', + 'Standard_E8_v3', 'Standard_E16_v3', 'Standard_E32_v3', 'Standard_E64_v3', + 'Standard_E2s_v3', 'Standard_E4s_v3', 'Standard_E8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E64s_v3', + 'Standard_E32-16_v3', 'Standard_E32-8s_v3', 'Standard_E64-32s_v3', + 'Standard_E64-16s_v3', 'Standard_F1', 'Standard_F2', 'Standard_F4', + 'Standard_F8', 'Standard_F16', 'Standard_F1s', 'Standard_F2s', + 'Standard_F4s', 'Standard_F8s', 'Standard_F16s', 'Standard_F2s_v2', + 'Standard_F4s_v2', 'Standard_F8s_v2', 'Standard_F16s_v2', + 'Standard_F32s_v2', 'Standard_F64s_v2', 'Standard_F72s_v2', 'Standard_G1', + 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS5', 'Standard_GS4-8', 'Standard_GS4-4', 'Standard_GS5-16', + 'Standard_GS5-8', 'Standard_H8', 'Standard_H16', 'Standard_H8m', + 'Standard_H16m', 'Standard_H16r', 'Standard_H16mr', 'Standard_L4s', + 'Standard_L8s', 'Standard_L16s', 'Standard_L32s', 'Standard_M64s', + 'Standard_M64ms', 'Standard_M128s', 'Standard_M128ms', + 'Standard_M64-32ms', 'Standard_M64-16ms', 'Standard_M128-64ms', + 'Standard_M128-32ms', 'Standard_NC6', 'Standard_NC12', 'Standard_NC24', + 'Standard_NC24r', 'Standard_NC6s_v2', 'Standard_NC12s_v2', + 'Standard_NC24s_v2', 'Standard_NC24rs_v2', 'Standard_NC6s_v3', + 'Standard_NC12s_v3', 'Standard_NC24s_v3', 'Standard_NC24rs_v3', + 'Standard_ND6s', 'Standard_ND12s', 'Standard_ND24s', 'Standard_ND24rs', + 'Standard_NV6', 'Standard_NV12', 'Standard_NV24' :type vm_size: str or ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineSizeTypes """ @@ -2104,6 +2109,11 @@ class LogAnalyticsInputBase(Model): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool """ _validation = { @@ -2119,9 +2129,11 @@ class LogAnalyticsInputBase(Model): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, } - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, group_by_client_application_id: bool=None, group_by_user_agent: bool=None, **kwargs) -> None: super(LogAnalyticsInputBase, self).__init__(**kwargs) self.blob_container_sas_uri = blob_container_sas_uri self.from_time = from_time @@ -2129,6 +2141,8 @@ def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_ self.group_by_throttle_policy = group_by_throttle_policy self.group_by_operation_name = group_by_operation_name self.group_by_resource_name = group_by_resource_name + self.group_by_client_application_id = group_by_client_application_id + self.group_by_user_agent = group_by_user_agent class LogAnalyticsOperationResult(Model): @@ -2816,6 +2830,11 @@ class RequestRateByIntervalInput(LogAnalyticsInputBase): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool :param interval_length: Required. Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins' @@ -2837,11 +2856,13 @@ class RequestRateByIntervalInput(LogAnalyticsInputBase): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, 'interval_length': {'key': 'intervalLength', 'type': 'IntervalInMins'}, } - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, interval_length, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, group_by_client_application_id: bool=None, group_by_user_agent: bool=None, **kwargs) -> None: + super(RequestRateByIntervalInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, group_by_client_application_id=group_by_client_application_id, group_by_user_agent=group_by_user_agent, **kwargs) self.interval_length = interval_length @@ -3692,6 +3713,11 @@ class ThrottledRequestsInput(LogAnalyticsInputBase): :type group_by_operation_name: bool :param group_by_resource_name: Group query result by Resource Name. :type group_by_resource_name: bool + :param group_by_client_application_id: Group query result by Client + Application ID. + :type group_by_client_application_id: bool + :param group_by_user_agent: Group query result by User Agent. + :type group_by_user_agent: bool """ _validation = { @@ -3707,10 +3733,12 @@ class ThrottledRequestsInput(LogAnalyticsInputBase): 'group_by_throttle_policy': {'key': 'groupByThrottlePolicy', 'type': 'bool'}, 'group_by_operation_name': {'key': 'groupByOperationName', 'type': 'bool'}, 'group_by_resource_name': {'key': 'groupByResourceName', 'type': 'bool'}, + 'group_by_client_application_id': {'key': 'groupByClientApplicationId', 'type': 'bool'}, + 'group_by_user_agent': {'key': 'groupByUserAgent', 'type': 'bool'}, } - def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, **kwargs) -> None: - super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, **kwargs) + def __init__(self, *, blob_container_sas_uri: str, from_time, to_time, group_by_throttle_policy: bool=None, group_by_operation_name: bool=None, group_by_resource_name: bool=None, group_by_client_application_id: bool=None, group_by_user_agent: bool=None, **kwargs) -> None: + super(ThrottledRequestsInput, self).__init__(blob_container_sas_uri=blob_container_sas_uri, from_time=from_time, to_time=to_time, group_by_throttle_policy=group_by_throttle_policy, group_by_operation_name=group_by_operation_name, group_by_resource_name=group_by_resource_name, group_by_client_application_id=group_by_client_application_id, group_by_user_agent=group_by_user_agent, **kwargs) class UpgradeOperationHistoricalStatusInfo(Model): @@ -4122,13 +4150,14 @@ class VirtualMachine(Resource): :vartype instance_view: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier @@ -5033,6 +5062,255 @@ def __init__(self, *, temp_disk: bool=None, **kwargs) -> None: self.temp_disk = temp_disk +class VirtualMachineRunCommand(Resource): + """Describes a Virtual Machine run command. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param source: The source of the run command script. + :type source: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param protected_parameters: The parameters used by the script. + :type protected_parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param async_execution: Optional. If set to true, provisioning will + complete as soon as the script starts and will not wait for script to + complete. Default value: False . + :type async_execution: bool + :param run_as_user: Specifies the user account on the VM when executing + the run command. + :type run_as_user: str + :param run_as_password: Specifies the user account password on the VM when + executing the run command. + :type run_as_password: str + :param timeout_in_seconds: The timeout in seconds to execute the run + command. + :type timeout_in_seconds: int + :param output_blob_uri: Specifies the Azure storage blob where script + output stream will be uploaded. + :type output_blob_uri: str + :param error_blob_uri: Specifies the Azure storage blob where script error + stream will be uploaded. + :type error_blob_uri: str + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine run command instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'VirtualMachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineRunCommandInstanceView'}, + } + + def __init__(self, *, location: str, tags=None, source=None, parameters=None, protected_parameters=None, async_execution: bool=False, run_as_user: str=None, run_as_password: str=None, timeout_in_seconds: int=None, output_blob_uri: str=None, error_blob_uri: str=None, **kwargs) -> None: + super(VirtualMachineRunCommand, self).__init__(location=location, tags=tags, **kwargs) + self.source = source + self.parameters = parameters + self.protected_parameters = protected_parameters + self.async_execution = async_execution + self.run_as_user = run_as_user + self.run_as_password = run_as_password + self.timeout_in_seconds = timeout_in_seconds + self.output_blob_uri = output_blob_uri + self.error_blob_uri = error_blob_uri + self.provisioning_state = None + self.instance_view = None + + +class VirtualMachineRunCommandInstanceView(Model): + """The instance view of a virtual machine run command. + + :param execution_state: Script execution status. Possible values include: + 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut', + 'Canceled' + :type execution_state: str or + ~azure.mgmt.compute.v2020_06_01.models.ExecutionState + :param execution_message: Communicate script configuration errors or + execution messages. + :type execution_message: str + :param exit_code: Exit code returned from script execution. + :type exit_code: int + :param output: Script output stream. + :type output: str + :param error: Script error stream. + :type error: str + :param start_time: Script start time. + :type start_time: datetime + :param end_time: Script end time. + :type end_time: datetime + :param statuses: The resource status information. + :type statuses: + list[~azure.mgmt.compute.v2020_06_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'execution_state': {'key': 'executionState', 'type': 'str'}, + 'execution_message': {'key': 'executionMessage', 'type': 'str'}, + 'exit_code': {'key': 'exitCode', 'type': 'int'}, + 'output': {'key': 'output', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__(self, *, execution_state=None, execution_message: str=None, exit_code: int=None, output: str=None, error: str=None, start_time=None, end_time=None, statuses=None, **kwargs) -> None: + super(VirtualMachineRunCommandInstanceView, self).__init__(**kwargs) + self.execution_state = execution_state + self.execution_message = execution_message + self.exit_code = exit_code + self.output = output + self.error = error + self.start_time = start_time + self.end_time = end_time + self.statuses = statuses + + +class VirtualMachineRunCommandScriptSource(Model): + """Describes the script sources for run command. + + :param script: Specifies the script content to be executed on the VM. + :type script: str + :param script_uri: Specifies the script download location. + :type script_uri: str + :param command_id: Specifies a commandId of predefined built-in script. + :type command_id: str + """ + + _attribute_map = { + 'script': {'key': 'script', 'type': 'str'}, + 'script_uri': {'key': 'scriptUri', 'type': 'str'}, + 'command_id': {'key': 'commandId', 'type': 'str'}, + } + + def __init__(self, *, script: str=None, script_uri: str=None, command_id: str=None, **kwargs) -> None: + super(VirtualMachineRunCommandScriptSource, self).__init__(**kwargs) + self.script = script + self.script_uri = script_uri + self.command_id = command_id + + +class VirtualMachineRunCommandUpdate(UpdateResource): + """Describes a Virtual Machine run command. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags + :type tags: dict[str, str] + :param source: The source of the run command script. + :type source: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource + :param parameters: The parameters used by the script. + :type parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param protected_parameters: The parameters used by the script. + :type protected_parameters: + list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter] + :param async_execution: Optional. If set to true, provisioning will + complete as soon as the script starts and will not wait for script to + complete. Default value: False . + :type async_execution: bool + :param run_as_user: Specifies the user account on the VM when executing + the run command. + :type run_as_user: str + :param run_as_password: Specifies the user account password on the VM when + executing the run command. + :type run_as_password: str + :param timeout_in_seconds: The timeout in seconds to execute the run + command. + :type timeout_in_seconds: int + :param output_blob_uri: Specifies the Azure storage blob where script + output stream will be uploaded. + :type output_blob_uri: str + :param error_blob_uri: Specifies the Azure storage blob where script error + stream will be uploaded. + :type error_blob_uri: str + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :ivar instance_view: The virtual machine run command instance view. + :vartype instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'instance_view': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'VirtualMachineRunCommandScriptSource'}, + 'parameters': {'key': 'properties.parameters', 'type': '[RunCommandInputParameter]'}, + 'protected_parameters': {'key': 'properties.protectedParameters', 'type': '[RunCommandInputParameter]'}, + 'async_execution': {'key': 'properties.asyncExecution', 'type': 'bool'}, + 'run_as_user': {'key': 'properties.runAsUser', 'type': 'str'}, + 'run_as_password': {'key': 'properties.runAsPassword', 'type': 'str'}, + 'timeout_in_seconds': {'key': 'properties.timeoutInSeconds', 'type': 'int'}, + 'output_blob_uri': {'key': 'properties.outputBlobUri', 'type': 'str'}, + 'error_blob_uri': {'key': 'properties.errorBlobUri', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineRunCommandInstanceView'}, + } + + def __init__(self, *, tags=None, source=None, parameters=None, protected_parameters=None, async_execution: bool=False, run_as_user: str=None, run_as_password: str=None, timeout_in_seconds: int=None, output_blob_uri: str=None, error_blob_uri: str=None, **kwargs) -> None: + super(VirtualMachineRunCommandUpdate, self).__init__(tags=tags, **kwargs) + self.source = source + self.parameters = parameters + self.protected_parameters = protected_parameters + self.async_execution = async_execution + self.run_as_user = run_as_user + self.run_as_password = run_as_password + self.timeout_in_seconds = timeout_in_seconds + self.output_blob_uri = output_blob_uri + self.error_blob_uri = error_blob_uri + self.provisioning_state = None + self.instance_view = None + + class VirtualMachineScaleSet(Resource): """Describes a Virtual Machine Scale Set. @@ -6702,13 +6980,14 @@ class VirtualMachineScaleSetVM(Resource): the response. :vartype provisioning_state: str :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar model_definition_applied: Specifies whether the model applied to the @@ -6804,6 +7083,107 @@ def __init__(self, *, location: str, tags=None, hardware_profile=None, storage_p self.zones = None +class VirtualMachineScaleSetVMExtension(SubResourceReadOnly): + """Describes a VMSS VM Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + :ivar provisioning_state: The provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param instance_view: The virtual machine extension instance view. + :type instance_view: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionInstanceView + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'instance_view': {'key': 'properties.instanceView', 'type': 'VirtualMachineExtensionInstanceView'}, + } + + def __init__(self, *, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, enable_automatic_upgrade: bool=None, settings=None, protected_settings=None, instance_view=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtension, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type1 = type1 + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.enable_automatic_upgrade = enable_automatic_upgrade + self.settings = settings + self.protected_settings = protected_settings + self.provisioning_state = None + self.instance_view = instance_view + + +class VirtualMachineScaleSetVMExtensionsListResult(Model): + """The List VMSS VM Extension operation response. + + :param value: The list of VMSS VM extensions + :type value: + list[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachineScaleSetVMExtension]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionsListResult, self).__init__(**kwargs) + self.value = value + + class VirtualMachineScaleSetVMExtensionsSummary(Model): """Extensions summary for virtual machines of a virtual machine scale set. @@ -6833,6 +7213,79 @@ def __init__(self, **kwargs) -> None: self.statuses_summary = None +class VirtualMachineScaleSetVMExtensionUpdate(SubResourceReadOnly): + """Describes a VMSS VM Extension. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: The name of the extension. + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param force_update_tag: How the extension handler should be forced to + update even if the extension configuration has not changed. + :type force_update_tag: str + :param publisher: The name of the extension handler publisher. + :type publisher: str + :param type1: Specifies the type of the extension; an example is + "CustomScriptExtension". + :type type1: str + :param type_handler_version: Specifies the version of the script handler. + :type type_handler_version: str + :param auto_upgrade_minor_version: Indicates whether the extension should + use a newer minor version if one is available at deployment time. Once + deployed, however, the extension will not upgrade minor versions unless + redeployed, even with this property set to true. + :type auto_upgrade_minor_version: bool + :param enable_automatic_upgrade: Indicates whether the extension should be + automatically upgraded by the platform if there is a newer version of the + extension available. + :type enable_automatic_upgrade: bool + :param settings: Json formatted public settings for the extension. + :type settings: object + :param protected_settings: The extension can contain either + protectedSettings or protectedSettingsFromKeyVault or no protected + settings at all. + :type protected_settings: object + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'type1': {'key': 'properties.type', 'type': 'str'}, + 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, + 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, + 'enable_automatic_upgrade': {'key': 'properties.enableAutomaticUpgrade', 'type': 'bool'}, + 'settings': {'key': 'properties.settings', 'type': 'object'}, + 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, + } + + def __init__(self, *, force_update_tag: str=None, publisher: str=None, type1: str=None, type_handler_version: str=None, auto_upgrade_minor_version: bool=None, enable_automatic_upgrade: bool=None, settings=None, protected_settings=None, **kwargs) -> None: + super(VirtualMachineScaleSetVMExtensionUpdate, self).__init__(**kwargs) + self.name = None + self.type = None + self.force_update_tag = force_update_tag + self.publisher = publisher + self.type1 = type1 + self.type_handler_version = type_handler_version + self.auto_upgrade_minor_version = auto_upgrade_minor_version + self.enable_automatic_upgrade = enable_automatic_upgrade + self.settings = settings + self.protected_settings = protected_settings + + class VirtualMachineScaleSetVMInstanceIDs(Model): """Specifies a list of virtual machine instance IDs from the VM scale set. @@ -7001,13 +7454,14 @@ class VirtualMachineScaleSetVMProfile(Model): :type extension_profile: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetExtensionProfile :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :param priority: Specifies the priority for the virtual machines in the @@ -7340,13 +7794,14 @@ class VirtualMachineUpdate(UpdateResource): :vartype instance_view: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineInstanceView :param license_type: Specifies that the image or disk that is being used - was licensed on-premises. This element is only used for images that - contain the Windows Server operating system.

Possible values are: -

Windows_Client

Windows_Server

If this element - is included in a request for an update, the value must match the initial - value. This value cannot be updated.

For more information, see - [Azure Hybrid Use Benefit for Windows - Server](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-hybrid-use-benefit-licensing?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) + was licensed on-premises.

Possible values for Windows Server + operating system are:

Windows_Client

Windows_Server +

Possible values for Linux Server operating system are:

+ RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more + information, see [Azure Hybrid Use Benefit for Windows + Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) +

[Azure Hybrid Use Benefit for Linux + Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15 :type license_type: str :ivar vm_id: Specifies the VM unique ID which is a 128-bits identifier diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_paged_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_paged_models.py index c3788b9e2406..0249609b7b25 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_paged_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_paged_models.py @@ -220,3 +220,16 @@ class RunCommandDocumentBasePaged(Paged): def __init__(self, *args, **kwargs): super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs) +class VirtualMachineRunCommandPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualMachineRunCommand ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualMachineRunCommand]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualMachineRunCommandPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py index 4aed70a72e37..3a55f9ff9cf2 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/__init__.py @@ -29,6 +29,7 @@ from ._virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations from ._log_analytics_operations import LogAnalyticsOperations from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations +from ._virtual_machine_scale_set_vm_run_commands_operations import VirtualMachineScaleSetVMRunCommandsOperations __all__ = [ 'Operations', @@ -51,4 +52,5 @@ 'VirtualMachineScaleSetVMsOperations', 'LogAnalyticsOperations', 'VirtualMachineRunCommandsOperations', + 'VirtualMachineScaleSetVMRunCommandsOperations', ] diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_run_commands_operations.py index eb666484cd1c..8e1a1e0b880c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_run_commands_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_run_commands_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -168,3 +170,452 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}'} + + + def _create_or_update_initial( + self, resource_group_name, vm_name, run_command_name, run_command, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_command, 'VirtualMachineRunCommand') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_name, run_command_name, run_command, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the run command + should be created or updated. + :type vm_name: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param run_command: Parameters supplied to the Create Virtual Machine + RunCommand operation. + :type run_command: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineRunCommand or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + run_command_name=run_command_name, + run_command=run_command, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'} + + + def _update_initial( + self, resource_group_name, vm_name, run_command_name, run_command, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_command, 'VirtualMachineRunCommandUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_name, run_command_name, run_command, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the run command + should be updated. + :type vm_name: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param run_command: Parameters supplied to the Update Virtual Machine + RunCommand operation. + :type run_command: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineRunCommand or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + run_command_name=run_command_name, + run_command=run_command, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'} + + + def _delete_initial( + self, resource_group_name, vm_name, run_command_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_name, run_command_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine where the run command + should be deleted. + :type vm_name: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_name=vm_name, + run_command_name=run_command_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'} + + def get_by_virtual_machine( + self, resource_group_name, vm_name, run_command_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the run + command. + :type vm_name: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineRunCommand or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_by_virtual_machine.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_virtual_machine.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}'} + + def list_by_virtual_machine( + self, resource_group_name, vm_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all run commands of a Virtual Machine. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine containing the run + command. + :type vm_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineRunCommand + :rtype: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandPaged[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_virtual_machine.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineRunCommandPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_virtual_machine.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py index cd27ae6a1a3e..76c539f7e428 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_extensions_operations.py @@ -71,7 +71,7 @@ def _create_or_update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtension') + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetVMExtension') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -85,9 +85,9 @@ def _create_or_update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if response.status_code == 201: - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -110,18 +110,19 @@ def create_or_update( :param extension_parameters: Parameters supplied to the Create Virtual Machine Extension operation. :type extension_parameters: - ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVMExtension or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension]] :raises: :class:`CloudError` """ raw_result = self._create_or_update_initial( @@ -136,7 +137,7 @@ def create_or_update( ) def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -183,7 +184,7 @@ def _update_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(extension_parameters, 'VirtualMachineExtensionUpdate') + body_content = self._serialize.body(extension_parameters, 'VirtualMachineScaleSetVMExtensionUpdate') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -197,7 +198,7 @@ def _update_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -220,18 +221,19 @@ def update( :param extension_parameters: Parameters supplied to the Update Virtual Machine Extension operation. :type extension_parameters: - ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionUpdate + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionUpdate :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns VirtualMachineExtension - or ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + VirtualMachineScaleSetVMExtension or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension]] :raises: :class:`CloudError` """ raw_result = self._update_initial( @@ -246,7 +248,7 @@ def update( ) def get_long_running_output(response): - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -369,8 +371,10 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: VirtualMachineExtension or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtension + :return: VirtualMachineScaleSetVMExtension or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtension or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -412,7 +416,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtension', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtension', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -439,10 +443,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: VirtualMachineExtensionsListResult or ClientRawResponse if - raw=true + :return: VirtualMachineScaleSetVMExtensionsListResult or + ClientRawResponse if raw=true :rtype: - ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineExtensionsListResult + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineScaleSetVMExtensionsListResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -483,7 +487,7 @@ def list( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualMachineExtensionsListResult', response) + deserialized = self._deserialize('VirtualMachineScaleSetVMExtensionsListResult', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py new file mode 100644 index 000000000000..f54068cd0d04 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machine_scale_set_vm_run_commands_operations.py @@ -0,0 +1,505 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VirtualMachineScaleSetVMRunCommandsOperations(object): + """VirtualMachineScaleSetVMRunCommandsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, run_command, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_command, 'VirtualMachineRunCommand') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, run_command, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to create or update the VMSS VM run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param run_command: Parameters supplied to the Create Virtual Machine + RunCommand operation. + :type run_command: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineRunCommand or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + run_command_name=run_command_name, + run_command=run_command, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'} + + + def _update_initial( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, run_command, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(run_command, 'VirtualMachineRunCommandUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, run_command, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to update the VMSS VM run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param run_command: Parameters supplied to the Update Virtual Machine + RunCommand operation. + :type run_command: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandUpdate + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + VirtualMachineRunCommand or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand]] + :raises: :class:`CloudError` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + run_command_name=run_command_name, + run_command=run_command, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'} + + + def _delete_initial( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, custom_headers=None, raw=False, polling=True, **operation_config): + """The operation to delete the VMSS VM run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vm_scale_set_name=vm_scale_set_name, + instance_id=instance_id, + run_command_name=run_command_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'} + + def get( + self, resource_group_name, vm_scale_set_name, instance_id, run_command_name, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get the VMSS VM run command. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param run_command_name: The name of the virtual machine run command. + :type run_command_name: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualMachineRunCommand or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'runCommandName': self._serialize.url("run_command_name", run_command_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualMachineRunCommand', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}'} + + def list( + self, resource_group_name, vm_scale_set_name, instance_id, expand=None, custom_headers=None, raw=False, **operation_config): + """The operation to get all run commands of an instance in Virtual Machine + Scaleset. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_scale_set_name: The name of the VM scale set. + :type vm_scale_set_name: str + :param instance_id: The instance ID of the virtual machine. + :type instance_id: str + :param expand: The expand expression to apply on the operation. + :type expand: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualMachineRunCommand + :rtype: + ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandPaged[~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommand] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmScaleSetName': self._serialize.url("vm_scale_set_name", vm_scale_set_name, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualMachineRunCommandPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands'} diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py index 11e729fb992b..6f9d41afcf9c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/operations/_virtual_machines_operations.py @@ -474,7 +474,7 @@ def delete( :param vm_name: The name of the virtual machine. :type vm_name: str :param force_deletion: Optional parameter to force delete virtual - machines. + machines.(Feature in Preview) :type force_deletion: bool :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py index d6bc2888eb97..9e98b2edcfa0 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/__init__.py @@ -57,6 +57,7 @@ from ._models_py3 import SharingUpdate from ._models_py3 import TargetRegion from ._models_py3 import UpdateResourceDefinition + from ._models_py3 import UserArtifactManage from ._models_py3 import UserArtifactSource except (SyntaxError, ImportError): from ._models import ApiError @@ -106,6 +107,7 @@ from ._models import SharingUpdate from ._models import TargetRegion from ._models import UpdateResourceDefinition + from ._models import UserArtifactManage from ._models import UserArtifactSource from ._paged_models import GalleryApplicationPaged from ._paged_models import GalleryApplicationVersionPaged @@ -126,7 +128,7 @@ StorageAccountType, HostCaching, SharingUpdateOperationTypes, - Permissions, + SelectPermissions, ReplicationStatusTypes, SharedToValues, ) @@ -179,6 +181,7 @@ 'SharingUpdate', 'TargetRegion', 'UpdateResourceDefinition', + 'UserArtifactManage', 'UserArtifactSource', 'GalleryPaged', 'GalleryImagePaged', @@ -198,7 +201,7 @@ 'StorageAccountType', 'HostCaching', 'SharingUpdateOperationTypes', - 'Permissions', + 'SelectPermissions', 'ReplicationStatusTypes', 'SharedToValues', ] diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_compute_management_client_enums.py index df2002c9fbb6..633c361ecfd7 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_compute_management_client_enums.py @@ -79,7 +79,7 @@ class SharingUpdateOperationTypes(str, Enum): reset = "Reset" -class Permissions(str, Enum): +class SelectPermissions(str, Enum): permissions = "Permissions" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models.py index 9ea0ac58e964..5c0a1dce1bf3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models.py @@ -615,9 +615,9 @@ class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfil ~azure.mgmt.compute.v2020_09_30.models.StorageAccountType :param source: Required. :type source: ~azure.mgmt.compute.v2020_09_30.models.UserArtifactSource - :param content_type: Optional. May be used to help process this file. The - type of file contained in the source, e.g. zip, json, etc. - :type content_type: str + :param manage_actions: + :type manage_actions: + ~azure.mgmt.compute.v2020_09_30.models.UserArtifactManage :param enable_health_check: Optional. Whether or not this application reports health. :type enable_health_check: bool @@ -636,14 +636,14 @@ class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfil 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, 'source': {'key': 'source', 'type': 'UserArtifactSource'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + 'manage_actions': {'key': 'manageActions', 'type': 'UserArtifactManage'}, 'enable_health_check': {'key': 'enableHealthCheck', 'type': 'bool'}, } def __init__(self, **kwargs): super(GalleryApplicationVersionPublishingProfile, self).__init__(**kwargs) self.source = kwargs.get('source', None) - self.content_type = kwargs.get('content_type', None) + self.manage_actions = kwargs.get('manage_actions', None) self.enable_health_check = kwargs.get('enable_health_check', None) @@ -1971,29 +1971,65 @@ def __init__(self, **kwargs): self.encryption = kwargs.get('encryption', None) +class UserArtifactManage(Model): + """UserArtifactManage. + + All required parameters must be populated in order to send to Azure. + + :param install: Required. Required. The path and arguments to install the + gallery application. This is limited to 4096 characters. + :type install: str + :param remove: Required. Required. The path and arguments to remove the + gallery application. This is limited to 4096 characters. + :type remove: str + :param update: Optional. The path and arguments to update the gallery + application. If not present, then update operation will invoke remove + command on the previous version and install command on the current version + of the gallery application. This is limited to 4096 characters. + :type update: str + """ + + _validation = { + 'install': {'required': True}, + 'remove': {'required': True}, + } + + _attribute_map = { + 'install': {'key': 'install', 'type': 'str'}, + 'remove': {'key': 'remove', 'type': 'str'}, + 'update': {'key': 'update', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserArtifactManage, self).__init__(**kwargs) + self.install = kwargs.get('install', None) + self.remove = kwargs.get('remove', None) + self.update = kwargs.get('update', None) + + class UserArtifactSource(Model): """The source image from which the Image Version is going to be created. All required parameters must be populated in order to send to Azure. - :param file_name: Required. Required. The fileName of the artifact. - :type file_name: str :param media_link: Required. Required. The mediaLink of the artifact, must - be a readable storage blob. + be a readable storage page blob. :type media_link: str + :param default_configuration_link: Optional. The defaultConfigurationLink + of the artifact, must be a readable storage page blob. + :type default_configuration_link: str """ _validation = { - 'file_name': {'required': True}, 'media_link': {'required': True}, } _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, 'media_link': {'key': 'mediaLink', 'type': 'str'}, + 'default_configuration_link': {'key': 'defaultConfigurationLink', 'type': 'str'}, } def __init__(self, **kwargs): super(UserArtifactSource, self).__init__(**kwargs) - self.file_name = kwargs.get('file_name', None) self.media_link = kwargs.get('media_link', None) + self.default_configuration_link = kwargs.get('default_configuration_link', None) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py index ba4a72235bee..6800620f24fb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/models/_models_py3.py @@ -615,9 +615,9 @@ class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfil ~azure.mgmt.compute.v2020_09_30.models.StorageAccountType :param source: Required. :type source: ~azure.mgmt.compute.v2020_09_30.models.UserArtifactSource - :param content_type: Optional. May be used to help process this file. The - type of file contained in the source, e.g. zip, json, etc. - :type content_type: str + :param manage_actions: + :type manage_actions: + ~azure.mgmt.compute.v2020_09_30.models.UserArtifactManage :param enable_health_check: Optional. Whether or not this application reports health. :type enable_health_check: bool @@ -636,14 +636,14 @@ class GalleryApplicationVersionPublishingProfile(GalleryArtifactPublishingProfil 'end_of_life_date': {'key': 'endOfLifeDate', 'type': 'iso-8601'}, 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, 'source': {'key': 'source', 'type': 'UserArtifactSource'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, + 'manage_actions': {'key': 'manageActions', 'type': 'UserArtifactManage'}, 'enable_health_check': {'key': 'enableHealthCheck', 'type': 'bool'}, } - def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, content_type: str=None, enable_health_check: bool=None, **kwargs) -> None: + def __init__(self, *, source, target_regions=None, replica_count: int=None, exclude_from_latest: bool=None, end_of_life_date=None, storage_account_type=None, manage_actions=None, enable_health_check: bool=None, **kwargs) -> None: super(GalleryApplicationVersionPublishingProfile, self).__init__(target_regions=target_regions, replica_count=replica_count, exclude_from_latest=exclude_from_latest, end_of_life_date=end_of_life_date, storage_account_type=storage_account_type, **kwargs) self.source = source - self.content_type = content_type + self.manage_actions = manage_actions self.enable_health_check = enable_health_check @@ -1971,29 +1971,65 @@ def __init__(self, *, name: str, regional_replica_count: int=None, storage_accou self.encryption = encryption +class UserArtifactManage(Model): + """UserArtifactManage. + + All required parameters must be populated in order to send to Azure. + + :param install: Required. Required. The path and arguments to install the + gallery application. This is limited to 4096 characters. + :type install: str + :param remove: Required. Required. The path and arguments to remove the + gallery application. This is limited to 4096 characters. + :type remove: str + :param update: Optional. The path and arguments to update the gallery + application. If not present, then update operation will invoke remove + command on the previous version and install command on the current version + of the gallery application. This is limited to 4096 characters. + :type update: str + """ + + _validation = { + 'install': {'required': True}, + 'remove': {'required': True}, + } + + _attribute_map = { + 'install': {'key': 'install', 'type': 'str'}, + 'remove': {'key': 'remove', 'type': 'str'}, + 'update': {'key': 'update', 'type': 'str'}, + } + + def __init__(self, *, install: str, remove: str, update: str=None, **kwargs) -> None: + super(UserArtifactManage, self).__init__(**kwargs) + self.install = install + self.remove = remove + self.update = update + + class UserArtifactSource(Model): """The source image from which the Image Version is going to be created. All required parameters must be populated in order to send to Azure. - :param file_name: Required. Required. The fileName of the artifact. - :type file_name: str :param media_link: Required. Required. The mediaLink of the artifact, must - be a readable storage blob. + be a readable storage page blob. :type media_link: str + :param default_configuration_link: Optional. The defaultConfigurationLink + of the artifact, must be a readable storage page blob. + :type default_configuration_link: str """ _validation = { - 'file_name': {'required': True}, 'media_link': {'required': True}, } _attribute_map = { - 'file_name': {'key': 'fileName', 'type': 'str'}, 'media_link': {'key': 'mediaLink', 'type': 'str'}, + 'default_configuration_link': {'key': 'defaultConfigurationLink', 'type': 'str'}, } - def __init__(self, *, file_name: str, media_link: str, **kwargs) -> None: + def __init__(self, *, media_link: str, default_configuration_link: str=None, **kwargs) -> None: super(UserArtifactSource, self).__init__(**kwargs) - self.file_name = file_name self.media_link = media_link + self.default_configuration_link = default_configuration_link diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_galleries_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_galleries_operations.py index 67635d3718fe..2d5d2f086352 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_galleries_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_galleries_operations.py @@ -262,7 +262,7 @@ def get( :param select: The select expression to apply on the operation. Possible values include: 'Permissions' :type select: str or - ~azure.mgmt.compute.v2020_09_30.models.Permissions + ~azure.mgmt.compute.v2020_09_30.models.SelectPermissions :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response