From cf42fac1f787ec03caf57357b47e24bd2d3af07c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 7 Jan 2021 02:43:11 +0000 Subject: [PATCH] CodeGen from PR 12250 in Azure/azure-rest-api-specs Merge 8bd3db902701476d58988748c2cd6cc3ab59bc22 into 54e5466e96664f694b8a85d10626174f03c0bcae --- ...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 | 623 ++++++++++++++--- .../compute/v2020_06_01/models/_models_py3.py | 637 +++++++++++++++--- .../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, 2263 insertions(+), 224 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..b3e9229fd807 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. @@ -5730,6 +6008,9 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource): :param enable_accelerated_networking: Specifies whether the network interface is accelerated networking-enabled. :type enable_accelerated_networking: bool + :param enable_fpga: Specifies whether the network interface is FPGA + networking-enabled. + :type enable_fpga: bool :param network_security_group: The network security group. :type network_security_group: ~azure.mgmt.compute.v2020_06_01.models.SubResource @@ -5755,6 +6036,7 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_fpga': {'key': 'properties.enableFpga', 'type': 'bool'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, @@ -5766,6 +6048,7 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.primary = kwargs.get('primary', None) self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.enable_fpga = kwargs.get('enable_fpga', None) self.network_security_group = kwargs.get('network_security_group', None) self.dns_settings = kwargs.get('dns_settings', None) self.ip_configurations = kwargs.get('ip_configurations', None) @@ -6372,6 +6655,9 @@ class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): :param enable_accelerated_networking: Specifies whether the network interface is accelerated networking-enabled. :type enable_accelerated_networking: bool + :param enable_fpga: Specifies whether the network interface is FPGA + networking-enabled. + :type enable_fpga: bool :param network_security_group: The network security group. :type network_security_group: ~azure.mgmt.compute.v2020_06_01.models.SubResource @@ -6391,6 +6677,7 @@ class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_fpga': {'key': 'properties.enableFpga', 'type': 'bool'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, @@ -6402,6 +6689,7 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.primary = kwargs.get('primary', None) self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.enable_fpga = kwargs.get('enable_fpga', None) self.network_security_group = kwargs.get('network_security_group', None) self.dns_settings = kwargs.get('dns_settings', None) self.ip_configurations = kwargs.get('ip_configurations', None) @@ -6702,13 +6990,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 +7093,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 +7223,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 +7464,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 +7804,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..5227d9c94102 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. @@ -5730,6 +6008,9 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource): :param enable_accelerated_networking: Specifies whether the network interface is accelerated networking-enabled. :type enable_accelerated_networking: bool + :param enable_fpga: Specifies whether the network interface is FPGA + networking-enabled. + :type enable_fpga: bool :param network_security_group: The network security group. :type network_security_group: ~azure.mgmt.compute.v2020_06_01.models.SubResource @@ -5755,17 +6036,19 @@ class VirtualMachineScaleSetNetworkConfiguration(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_fpga': {'key': 'properties.enableFpga', 'type': 'bool'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetIPConfiguration]'}, 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, } - def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + def __init__(self, *, name: str, ip_configurations, id: str=None, primary: bool=None, enable_accelerated_networking: bool=None, enable_fpga: bool=None, network_security_group=None, dns_settings=None, enable_ip_forwarding: bool=None, **kwargs) -> None: super(VirtualMachineScaleSetNetworkConfiguration, self).__init__(id=id, **kwargs) self.name = name self.primary = primary self.enable_accelerated_networking = enable_accelerated_networking + self.enable_fpga = enable_fpga self.network_security_group = network_security_group self.dns_settings = dns_settings self.ip_configurations = ip_configurations @@ -6372,6 +6655,9 @@ class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): :param enable_accelerated_networking: Specifies whether the network interface is accelerated networking-enabled. :type enable_accelerated_networking: bool + :param enable_fpga: Specifies whether the network interface is FPGA + networking-enabled. + :type enable_fpga: bool :param network_security_group: The network security group. :type network_security_group: ~azure.mgmt.compute.v2020_06_01.models.SubResource @@ -6391,17 +6677,19 @@ class VirtualMachineScaleSetUpdateNetworkConfiguration(SubResource): 'name': {'key': 'name', 'type': 'str'}, 'primary': {'key': 'properties.primary', 'type': 'bool'}, 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_fpga': {'key': 'properties.enableFpga', 'type': 'bool'}, 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'SubResource'}, 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'VirtualMachineScaleSetNetworkConfigurationDnsSettings'}, 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualMachineScaleSetUpdateIPConfiguration]'}, 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, } - def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: + def __init__(self, *, id: str=None, name: str=None, primary: bool=None, enable_accelerated_networking: bool=None, enable_fpga: bool=None, network_security_group=None, dns_settings=None, ip_configurations=None, enable_ip_forwarding: bool=None, **kwargs) -> None: super(VirtualMachineScaleSetUpdateNetworkConfiguration, self).__init__(id=id, **kwargs) self.name = name self.primary = primary self.enable_accelerated_networking = enable_accelerated_networking + self.enable_fpga = enable_fpga self.network_security_group = network_security_group self.dns_settings = dns_settings self.ip_configurations = ip_configurations @@ -6702,13 +6990,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 +7093,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 +7223,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 +7464,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 +7804,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