From 3746eb0329ffc00bc9adc54262f76d94833ea155 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 6 May 2026 17:53:47 +0000 Subject: [PATCH] Configurations: 'specification/computeschedule/ComputeSchedule.Management/tspconfig.yaml', API Version: 2026-04-15-preview, SDK Release Type: beta, and CommitSHA: '13d51ee484703ea6845668fbf4b9de13f41bf5c2' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6259127 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-mgmt-computeschedule/CHANGELOG.md | 168 + .../azure-mgmt-computeschedule/MANIFEST.in | 8 +- .../azure-mgmt-computeschedule/README.md | 4 +- .../azure-mgmt-computeschedule/_metadata.json | 9 +- .../apiview-properties.json | 143 +- .../azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- .../azure/mgmt/computeschedule/_client.py | 21 +- .../mgmt/computeschedule/_configuration.py | 16 +- .../azure/mgmt/computeschedule/_patch.py | 4 +- .../mgmt/computeschedule/_utils/model_base.py | 421 +- .../computeschedule/_utils/serialization.py | 43 +- .../azure/mgmt/computeschedule/_version.py | 2 +- .../azure/mgmt/computeschedule/aio/_client.py | 21 +- .../computeschedule/aio/_configuration.py | 16 +- .../azure/mgmt/computeschedule/aio/_patch.py | 4 +- .../aio/operations/_operations.py | 673 +- .../computeschedule/aio/operations/_patch.py | 4 +- .../mgmt/computeschedule/models/__init__.py | 282 +- .../mgmt/computeschedule/models/_enums.py | 568 +- .../mgmt/computeschedule/models/_models.py | 7354 +++++++++++++---- .../mgmt/computeschedule/models/_patch.py | 4 +- .../computeschedule/operations/_operations.py | 792 +- .../mgmt/computeschedule/operations/_patch.py | 4 +- ..._list_occurrence_by_vms_maximum_set_gen.py | 5 +- ..._list_occurrence_by_vms_minimum_set_gen.py | 43 + .../occurrences_cancel_maximum_set_gen.py | 8 +- .../occurrences_delay_maximum_set_gen.py | 10 +- .../occurrences_get_maximum_set_gen.py | 6 +- ...ist_by_scheduled_action_maximum_set_gen.py | 4 +- ...urrences_list_resources_maximum_set_gen.py | 6 +- .../operations_list_maximum_set_gen.py | 2 +- .../operations_list_minimum_set_gen.py | 2 +- ...n_extension_list_by_vms_maximum_set_gen.py | 5 +- ...n_extension_list_by_vms_minimum_set_gen.py | 5 +- ...ctions_attach_resources_maximum_set_gen.py | 11 +- ..._cancel_next_occurrence_maximum_set_gen.py | 6 +- ...ctions_create_or_update_maximum_set_gen.py | 22 +- ...cheduled_actions_delete_maximum_set_gen.py | 4 +- ...ctions_detach_resources_maximum_set_gen.py | 6 +- ...heduled_actions_disable_maximum_set_gen.py | 4 +- ...cheduled_actions_enable_maximum_set_gen.py | 4 +- .../scheduled_actions_get_maximum_set_gen.py | 4 +- ..._list_by_resource_group_maximum_set_gen.py | 2 +- ..._list_by_resource_group_minimum_set_gen.py | 2 +- ...ns_list_by_subscription_maximum_set_gen.py | 2 +- ...ns_list_by_subscription_minimum_set_gen.py | 2 +- ..._actions_list_resources_maximum_set_gen.py | 4 +- ...actions_patch_resources_maximum_set_gen.py | 11 +- ...igger_manual_occurrence_maximum_set_gen.py | 4 +- ...cheduled_actions_update_maximum_set_gen.py | 20 +- ...hines_cancel_operations_maximum_set_gen.py | 8 +- ...hines_cancel_operations_minimum_set_gen.py | 8 +- ...nes_execute_create_flex_maximum_set_gen.py | 182 + ...nes_execute_create_flex_minimum_set_gen.py | 55 + ...machines_execute_create_maximum_set_gen.py | 170 +- ...machines_execute_create_minimum_set_gen.py | 74 +- ...ines_execute_deallocate_maximum_set_gen.py | 10 +- ...ines_execute_deallocate_minimum_set_gen.py | 8 +- ...machines_execute_delete_maximum_set_gen.py | 16 +- ...machines_execute_delete_minimum_set_gen.py | 7 +- ...hines_execute_hibernate_maximum_set_gen.py | 10 +- ...hines_execute_hibernate_minimum_set_gen.py | 8 +- ..._machines_execute_start_maximum_set_gen.py | 10 +- ..._machines_execute_start_minimum_set_gen.py | 8 +- ...es_get_operation_errors_maximum_set_gen.py | 6 +- ...es_get_operation_errors_minimum_set_gen.py | 6 +- ...es_get_operation_status_maximum_set_gen.py | 8 +- ...es_get_operation_status_minimum_set_gen.py | 8 +- ...hines_submit_deallocate_maximum_set_gen.py | 16 +- ...hines_submit_deallocate_minimum_set_gen.py | 14 +- ...chines_submit_hibernate_maximum_set_gen.py | 16 +- ...chines_submit_hibernate_minimum_set_gen.py | 14 +- ...l_machines_submit_start_maximum_set_gen.py | 16 +- ...l_machines_submit_start_minimum_set_gen.py | 14 +- ...edule_mgmt_scheduled_actions_operations.py | 1113 ++- ...mgmt_scheduled_actions_operations_async.py | 1113 ++- .../azure-mgmt-computeschedule/pyproject.toml | 82 + .../sdk_packaging.toml | 12 - .../azure-mgmt-computeschedule/setup.py | 82 - .../tsp-location.yaml | 2 +- 81 files changed, 11329 insertions(+), 2536 deletions(-) create mode 100644 sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_minimum_set_gen.py create mode 100644 sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_maximum_set_gen.py create mode 100644 sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_minimum_set_gen.py delete mode 100644 sdk/computeschedule/azure-mgmt-computeschedule/sdk_packaging.toml delete mode 100644 sdk/computeschedule/azure-mgmt-computeschedule/setup.py diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/CHANGELOG.md b/sdk/computeschedule/azure-mgmt-computeschedule/CHANGELOG.md index 92070b02c488..9c47247bd8de 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/CHANGELOG.md +++ b/sdk/computeschedule/azure-mgmt-computeschedule/CHANGELOG.md @@ -1,5 +1,173 @@ # Release History +## 1.2.0b2 (2026-05-06) + +### Features Added + + - Model `ComputeScheduleMgmtClient` added parameter `cloud_setting` in method `__init__` + - Enum `ActionType` added member `INTERNAL` + - Model `ResourceOperationDetails` added property `fallback_operation_info` + - Enum `ResourceOperationType` added member `CREATE` + - Enum `ResourceOperationType` added member `DELETE` + - Model `ResourceProvisionPayload` added property `virtual_machine_base_profile` + - Model `ResourceProvisionPayload` added property `virtual_machine_overrides` + - Model `RetryPolicy` added property `on_failure_action` + - Added model `AdditionalCapabilities` + - Added model `AdditionalUnattendContent` + - Added model `AllInstancesDown` + - Added enum `AllocationStrategy` + - Added model `ApiEntityReference` + - Added model `ApplicationProfile` + - Added model `BootDiagnostics` + - Added model `BulkActionVMExtension` + - Added model `BulkActionVMProperties` + - Added model `BulkActionVmExtensionProperties` + - Added model `BulkVMConfiguration` + - Added enum `CachingTypes` + - Added model `CancelOperationsContent` + - Added model `CapacityReservationProfile` + - Added model `CreateFlexResourceOperationResponse` + - Added model `DataDisk` + - Added enum `DeleteOptions` + - Added model `DiagnosticsProfile` + - Added enum `DiffDiskOptions` + - Added enum `DiffDiskPlacement` + - Added model `DiffDiskSettings` + - Added enum `DiskControllerTypes` + - Added enum `DiskCreateOptionTypes` + - Added enum `DiskDeleteOptionTypes` + - Added enum `DiskDetachOptionTypes` + - Added model `DiskEncryptionSetParameters` + - Added model `DiskEncryptionSettings` + - Added enum `DistributionStrategy` + - Added enum `DomainNameLabelScopeTypes` + - Added model `EncryptionIdentity` + - Added model `EventGridAndResourceGraph` + - Added model `ExecuteCreateContent` + - Added model `ExecuteCreateFlexContent` + - Added model `ExecuteDeallocateContent` + - Added model `ExecuteDeleteContent` + - Added model `ExecuteHibernateContent` + - Added model `ExecuteStartContent` + - Added model `ExtendedLocation` + - Added enum `ExtendedLocationType` + - Added model `FallbackOperationInfo` + - Added model `FlexProperties` + - Added model `GetOperationErrorsContent` + - Added model `GetOperationStatusContent` + - Added model `HardwareProfile` + - Added model `HostEndpointSettings` + - Added enum `IPVersions` + - Added model `ImageReference` + - Added model `KeyVaultKeyReference` + - Added model `KeyVaultSecretReference` + - Added model `LinuxConfiguration` + - Added enum `LinuxPatchAssessmentMode` + - Added model `LinuxPatchSettings` + - Added enum `LinuxVMGuestPatchAutomaticByPlatformRebootSetting` + - Added model `LinuxVMGuestPatchAutomaticByPlatformSettings` + - Added enum `LinuxVMGuestPatchMode` + - Added model `ManagedDiskParameters` + - Added enum `Mode` + - Added enum `Modes` + - Added enum `NetworkApiVersion` + - Added enum `NetworkInterfaceAuxiliaryMode` + - Added enum `NetworkInterfaceAuxiliarySku` + - Added model `NetworkInterfaceReference` + - Added model `NetworkInterfaceReferenceProperties` + - Added model `NetworkProfile` + - Added model `OSDisk` + - Added model `OSImageNotificationProfile` + - Added model `OSProfile` + - Added enum `OperatingSystemTypes` + - Added enum `OsType` + - Added model `PatchSettings` + - Added model `Placement` + - Added model `Plan` + - Added model `PriorityProfile` + - Added enum `PriorityType` + - Added enum `ProtocolTypes` + - Added model `ProxyAgentSettings` + - Added model `PublicIPAddressSku` + - Added enum `PublicIPAddressSkuName` + - Added enum `PublicIPAddressSkuTier` + - Added enum `PublicIPAllocationMethod` + - Added model `RecurringActionsResourceOperationResult` + - Added enum `ResourceIdentityType` + - Added model `ResourceProvisionFlexPayload` + - Added enum `ScheduledActionType` + - Added model `ScheduledActionUpdate` + - Added model `ScheduledActionUpdateProperties` + - Added model `ScheduledActionsExtensionProperties` + - Added model `ScheduledEventsAdditionalPublishingTargets` + - Added model `ScheduledEventsPolicy` + - Added model `ScheduledEventsProfile` + - Added enum `SecurityEncryptionTypes` + - Added model `SecurityProfile` + - Added enum `SecurityTypes` + - Added enum `SettingNames` + - Added model `SshConfiguration` + - Added model `SshPublicKey` + - Added enum `StorageAccountTypes` + - Added model `StorageProfile` + - Added model `SubResource` + - Added model `SubmitDeallocateContent` + - Added model `SubmitHibernateContent` + - Added model `SubmitStartContent` + - Added model `TerminateNotificationProfile` + - Added model `UefiSettings` + - Added model `UserAssignedIdentitiesValue` + - Added model `UserInitiatedReboot` + - Added model `UserInitiatedRedeploy` + - Added model `VMDiskSecurityProfile` + - Added model `VMGalleryApplication` + - Added model `VaultCertificate` + - Added model `VaultSecretGroup` + - Added model `VirtualHardDisk` + - Added model `VirtualMachineIdentity` + - Added model `VirtualMachineIpTag` + - Added model `VirtualMachineNetworkInterfaceConfiguration` + - Added model `VirtualMachineNetworkInterfaceConfigurationProperties` + - Added model `VirtualMachineNetworkInterfaceDnsSettingsConfiguration` + - Added model `VirtualMachineNetworkInterfaceIPConfiguration` + - Added model `VirtualMachineNetworkInterfaceIPConfigurationProperties` + - Added model `VirtualMachinePublicIPAddressConfiguration` + - Added model `VirtualMachinePublicIPAddressConfigurationProperties` + - Added model `VirtualMachinePublicIPAddressDnsSettingsConfiguration` + - Added model `VmSizeProfile` + - Added model `VmSizeProperties` + - Added model `WinRMConfiguration` + - Added model `WinRMListener` + - Added model `WindowsConfiguration` + - Added enum `WindowsPatchAssessmentMode` + - Added enum `WindowsVMGuestPatchAutomaticByPlatformRebootSetting` + - Added model `WindowsVMGuestPatchAutomaticByPlatformSettings` + - Added enum `WindowsVMGuestPatchMode` + - Added model `ZoneAllocationPolicy` + - Added enum `ZonePlacementPolicyType` + - Added model `ZonePreference` + - Model `ScheduledActionsOperations` added method `virtual_machines_execute_create_flex` + +### Breaking Changes + + - Deleted or renamed enum value `ActionType.DEALLOCATE` + - Deleted or renamed enum value `ActionType.HIBERNATE` + - Deleted or renamed enum value `ActionType.START` + - Model `ResourceProvisionPayload` deleted or renamed its instance variable `base_profile` + - Model `ResourceProvisionPayload` deleted or renamed its instance variable `resource_overrides` + - Deleted or renamed model `CancelOperationsRequest` + - Deleted or renamed model `ExecuteCreateRequest` + - Deleted or renamed model `ExecuteDeallocateRequest` + - Deleted or renamed model `ExecuteDeleteRequest` + - Deleted or renamed model `ExecuteHibernateRequest` + - Deleted or renamed model `ExecuteStartRequest` + - Deleted or renamed model `GetOperationErrorsRequest` + - Deleted or renamed model `GetOperationStatusRequest` + - Deleted or renamed model `ResourceOperationResponse` + - Deleted or renamed model `SubmitDeallocateRequest` + - Deleted or renamed model `SubmitHibernateRequest` + - Deleted or renamed model `SubmitStartRequest` + ## 1.2.0b1 (2025-07-24) ### Features Added diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/MANIFEST.in b/sdk/computeschedule/azure-mgmt-computeschedule/MANIFEST.in index 4ce078d2d688..10439f5f3698 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/MANIFEST.in +++ b/sdk/computeschedule/azure-mgmt-computeschedule/MANIFEST.in @@ -1,7 +1,7 @@ -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/computeschedule/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/README.md b/sdk/computeschedule/azure-mgmt-computeschedule/README.md index a94de05d4902..26fea25aaf53 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/README.md +++ b/sdk/computeschedule/azure-mgmt-computeschedule/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Computeschedule Management Client Library. -This package has been tested with Python 3.9+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.9+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/_metadata.json b/sdk/computeschedule/azure-mgmt-computeschedule/_metadata.json index eeb144c1f469..1405275ab94c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/_metadata.json +++ b/sdk/computeschedule/azure-mgmt-computeschedule/_metadata.json @@ -1,7 +1,10 @@ { - "apiVersion": "2025-04-15-preview", - "commit": "a9b095e39f774899a97d857d92a34c7715dc3f42", + "apiVersion": "2026-04-15-preview", + "apiVersions": { + "Microsoft.ComputeSchedule": "2026-04-15-preview" + }, + "commit": "13d51ee484703ea6845668fbf4b9de13f41bf5c2", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/computeschedule/ComputeSchedule.Management", - "emitterVersion": "0.47.0" + "emitterVersion": "0.61.3" } \ No newline at end of file diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json b/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json index 919242b06627..315ca1472006 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json +++ b/sdk/computeschedule/azure-mgmt-computeschedule/apiview-properties.json @@ -1,29 +1,65 @@ { "CrossLanguagePackageId": "Microsoft.ComputeSchedule", "CrossLanguageDefinitionId": { + "azure.mgmt.computeschedule.models.AdditionalCapabilities": "Microsoft.ComputeSchedule.AdditionalCapabilities", + "azure.mgmt.computeschedule.models.AdditionalUnattendContent": "Microsoft.ComputeSchedule.AdditionalUnattendContent", + "azure.mgmt.computeschedule.models.AllInstancesDown": "Microsoft.ComputeSchedule.AllInstancesDown", + "azure.mgmt.computeschedule.models.ApiEntityReference": "Microsoft.ComputeSchedule.ApiEntityReference", + "azure.mgmt.computeschedule.models.ApplicationProfile": "Microsoft.ComputeSchedule.ApplicationProfile", + "azure.mgmt.computeschedule.models.BootDiagnostics": "Microsoft.ComputeSchedule.BootDiagnostics", + "azure.mgmt.computeschedule.models.BulkActionVMExtension": "Microsoft.ComputeSchedule.BulkActionVMExtension", + "azure.mgmt.computeschedule.models.BulkActionVmExtensionProperties": "Microsoft.ComputeSchedule.BulkActionVmExtensionProperties", + "azure.mgmt.computeschedule.models.BulkActionVMProperties": "Microsoft.ComputeSchedule.BulkActionVMProperties", + "azure.mgmt.computeschedule.models.BulkVMConfiguration": "Microsoft.ComputeSchedule.BulkVMConfiguration", "azure.mgmt.computeschedule.models.CancelOccurrenceRequest": "Microsoft.ComputeSchedule.CancelOccurrenceRequest", - "azure.mgmt.computeschedule.models.CancelOperationsRequest": "Microsoft.ComputeSchedule.CancelOperationsRequest", + "azure.mgmt.computeschedule.models.CancelOperationsContent": "Microsoft.ComputeSchedule.CancelOperationsRequest", "azure.mgmt.computeschedule.models.CancelOperationsResponse": "Microsoft.ComputeSchedule.CancelOperationsResponse", + "azure.mgmt.computeschedule.models.CapacityReservationProfile": "Microsoft.ComputeSchedule.CapacityReservationProfile", + "azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse": "Microsoft.ComputeSchedule.CreateFlexResourceOperationResponse", "azure.mgmt.computeschedule.models.CreateResourceOperationResponse": "Microsoft.ComputeSchedule.CreateResourceOperationResponse", + "azure.mgmt.computeschedule.models.DataDisk": "Microsoft.ComputeSchedule.DataDisk", "azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse", "azure.mgmt.computeschedule.models.DelayRequest": "Microsoft.ComputeSchedule.DelayRequest", "azure.mgmt.computeschedule.models.DeleteResourceOperationResponse": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse", + "azure.mgmt.computeschedule.models.DiagnosticsProfile": "Microsoft.ComputeSchedule.DiagnosticsProfile", + "azure.mgmt.computeschedule.models.DiffDiskSettings": "Microsoft.ComputeSchedule.DiffDiskSettings", + "azure.mgmt.computeschedule.models.SubResource": "Microsoft.ComputeSchedule.SubResource", + "azure.mgmt.computeschedule.models.DiskEncryptionSetParameters": "Microsoft.ComputeSchedule.DiskEncryptionSetParameters", + "azure.mgmt.computeschedule.models.DiskEncryptionSettings": "Microsoft.ComputeSchedule.DiskEncryptionSettings", + "azure.mgmt.computeschedule.models.EncryptionIdentity": "Microsoft.ComputeSchedule.EncryptionIdentity", "azure.mgmt.computeschedule.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", "azure.mgmt.computeschedule.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", "azure.mgmt.computeschedule.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "azure.mgmt.computeschedule.models.ExecuteCreateRequest": "Microsoft.ComputeSchedule.ExecuteCreateRequest", - "azure.mgmt.computeschedule.models.ExecuteDeallocateRequest": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest", - "azure.mgmt.computeschedule.models.ExecuteDeleteRequest": "Microsoft.ComputeSchedule.ExecuteDeleteRequest", - "azure.mgmt.computeschedule.models.ExecuteHibernateRequest": "Microsoft.ComputeSchedule.ExecuteHibernateRequest", - "azure.mgmt.computeschedule.models.ExecuteStartRequest": "Microsoft.ComputeSchedule.ExecuteStartRequest", + "azure.mgmt.computeschedule.models.EventGridAndResourceGraph": "Microsoft.ComputeSchedule.EventGridAndResourceGraph", + "azure.mgmt.computeschedule.models.ExecuteCreateContent": "Microsoft.ComputeSchedule.ExecuteCreateRequest", + "azure.mgmt.computeschedule.models.ExecuteCreateFlexContent": "Microsoft.ComputeSchedule.ExecuteCreateFlexRequest", + "azure.mgmt.computeschedule.models.ExecuteDeallocateContent": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest", + "azure.mgmt.computeschedule.models.ExecuteDeleteContent": "Microsoft.ComputeSchedule.ExecuteDeleteRequest", + "azure.mgmt.computeschedule.models.ExecuteHibernateContent": "Microsoft.ComputeSchedule.ExecuteHibernateRequest", + "azure.mgmt.computeschedule.models.ExecuteStartContent": "Microsoft.ComputeSchedule.ExecuteStartRequest", "azure.mgmt.computeschedule.models.ExecutionParameters": "Microsoft.ComputeSchedule.ExecutionParameters", + "azure.mgmt.computeschedule.models.ExtendedLocation": "Azure.ResourceManager.CommonTypes.ExtendedLocation", "azure.mgmt.computeschedule.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", "azure.mgmt.computeschedule.models.ExtensionResource": "Azure.ResourceManager.CommonTypes.ExtensionResource", - "azure.mgmt.computeschedule.models.GetOperationErrorsRequest": "Microsoft.ComputeSchedule.GetOperationErrorsRequest", + "azure.mgmt.computeschedule.models.FallbackOperationInfo": "Microsoft.ComputeSchedule.FallbackOperationInfo", + "azure.mgmt.computeschedule.models.FlexProperties": "Microsoft.ComputeSchedule.FlexProperties", + "azure.mgmt.computeschedule.models.GetOperationErrorsContent": "Microsoft.ComputeSchedule.GetOperationErrorsRequest", "azure.mgmt.computeschedule.models.GetOperationErrorsResponse": "Microsoft.ComputeSchedule.GetOperationErrorsResponse", - "azure.mgmt.computeschedule.models.GetOperationStatusRequest": "Microsoft.ComputeSchedule.GetOperationStatusRequest", + "azure.mgmt.computeschedule.models.GetOperationStatusContent": "Microsoft.ComputeSchedule.GetOperationStatusRequest", "azure.mgmt.computeschedule.models.GetOperationStatusResponse": "Microsoft.ComputeSchedule.GetOperationStatusResponse", + "azure.mgmt.computeschedule.models.HardwareProfile": "Microsoft.ComputeSchedule.HardwareProfile", "azure.mgmt.computeschedule.models.HibernateResourceOperationResponse": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse", + "azure.mgmt.computeschedule.models.HostEndpointSettings": "Microsoft.ComputeSchedule.HostEndpointSettings", + "azure.mgmt.computeschedule.models.ImageReference": "Microsoft.ComputeSchedule.ImageReference", + "azure.mgmt.computeschedule.models.KeyVaultKeyReference": "Microsoft.ComputeSchedule.KeyVaultKeyReference", + "azure.mgmt.computeschedule.models.KeyVaultSecretReference": "Microsoft.ComputeSchedule.KeyVaultSecretReference", + "azure.mgmt.computeschedule.models.LinuxConfiguration": "Microsoft.ComputeSchedule.LinuxConfiguration", + "azure.mgmt.computeschedule.models.LinuxPatchSettings": "Microsoft.ComputeSchedule.LinuxPatchSettings", + "azure.mgmt.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings": "Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.computeschedule.models.ManagedDiskParameters": "Microsoft.ComputeSchedule.ManagedDiskParameters", + "azure.mgmt.computeschedule.models.NetworkInterfaceReference": "Microsoft.ComputeSchedule.NetworkInterfaceReference", + "azure.mgmt.computeschedule.models.NetworkInterfaceReferenceProperties": "Microsoft.ComputeSchedule.NetworkInterfaceReferenceProperties", + "azure.mgmt.computeschedule.models.NetworkProfile": "Microsoft.ComputeSchedule.NetworkProfile", "azure.mgmt.computeschedule.models.NotificationProperties": "Microsoft.ComputeSchedule.NotificationProperties", "azure.mgmt.computeschedule.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", "azure.mgmt.computeschedule.models.Occurrence": "Microsoft.ComputeSchedule.Occurrence", @@ -36,6 +72,15 @@ "azure.mgmt.computeschedule.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", "azure.mgmt.computeschedule.models.OperationErrorDetails": "Microsoft.ComputeSchedule.OperationErrorDetails", "azure.mgmt.computeschedule.models.OperationErrorsResult": "Microsoft.ComputeSchedule.OperationErrorsResult", + "azure.mgmt.computeschedule.models.OSDisk": "Microsoft.ComputeSchedule.OSDisk", + "azure.mgmt.computeschedule.models.OSImageNotificationProfile": "Microsoft.ComputeSchedule.OSImageNotificationProfile", + "azure.mgmt.computeschedule.models.OSProfile": "Microsoft.ComputeSchedule.OSProfile", + "azure.mgmt.computeschedule.models.PatchSettings": "Microsoft.ComputeSchedule.PatchSettings", + "azure.mgmt.computeschedule.models.Placement": "Microsoft.ComputeSchedule.Placement", + "azure.mgmt.computeschedule.models.Plan": "Azure.ResourceManager.CommonTypes.Plan", + "azure.mgmt.computeschedule.models.PriorityProfile": "Microsoft.ComputeSchedule.PriorityProfile", + "azure.mgmt.computeschedule.models.ProxyAgentSettings": "Microsoft.ComputeSchedule.ProxyAgentSettings", + "azure.mgmt.computeschedule.models.PublicIPAddressSku": "Microsoft.ComputeSchedule.PublicIPAddressSku", "azure.mgmt.computeschedule.models.RecurringActionsResourceOperationResult": "Microsoft.ComputeSchedule.ResourceOperationResponse", "azure.mgmt.computeschedule.models.ResourceAttachRequest": "Microsoft.ComputeSchedule.ResourceAttachRequest", "azure.mgmt.computeschedule.models.ResourceDetachRequest": "Microsoft.ComputeSchedule.ResourceDetachRequest", @@ -43,6 +88,7 @@ "azure.mgmt.computeschedule.models.ResourceOperationDetails": "Microsoft.ComputeSchedule.ResourceOperationDetails", "azure.mgmt.computeschedule.models.ResourceOperationError": "Microsoft.ComputeSchedule.ResourceOperationError", "azure.mgmt.computeschedule.models.ResourcePatchRequest": "Microsoft.ComputeSchedule.ResourcePatchRequest", + "azure.mgmt.computeschedule.models.ResourceProvisionFlexPayload": "Microsoft.ComputeSchedule.ResourceProvisionFlexPayload", "azure.mgmt.computeschedule.models.ResourceProvisionPayload": "Microsoft.ComputeSchedule.ResourceProvisionPayload", "azure.mgmt.computeschedule.models.ResourceResultSummary": "Microsoft.ComputeSchedule.ResourceResultSummary", "azure.mgmt.computeschedule.models.Resources": "Microsoft.ComputeSchedule.Resources", @@ -54,20 +100,93 @@ "azure.mgmt.computeschedule.models.ScheduledActionProperties": "Microsoft.ComputeSchedule.ScheduledActionProperties", "azure.mgmt.computeschedule.models.ScheduledActionResource": "Microsoft.ComputeSchedule.ScheduledActionResource", "azure.mgmt.computeschedule.models.ScheduledActionResources": "Microsoft.ComputeSchedule.ScheduledActionResources", + "azure.mgmt.computeschedule.models.ScheduledActionsExtensionProperties": "Microsoft.ComputeSchedule.ScheduledActionsExtensionProperties", "azure.mgmt.computeschedule.models.ScheduledActionsSchedule": "Microsoft.ComputeSchedule.ScheduledActionsSchedule", "azure.mgmt.computeschedule.models.ScheduledActionUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", "azure.mgmt.computeschedule.models.ScheduledActionUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "azure.mgmt.computeschedule.models.ScheduledEventsAdditionalPublishingTargets": "Microsoft.ComputeSchedule.ScheduledEventsAdditionalPublishingTargets", + "azure.mgmt.computeschedule.models.ScheduledEventsPolicy": "Microsoft.ComputeSchedule.ScheduledEventsPolicy", + "azure.mgmt.computeschedule.models.ScheduledEventsProfile": "Microsoft.ComputeSchedule.ScheduledEventsProfile", + "azure.mgmt.computeschedule.models.SecurityProfile": "Microsoft.ComputeSchedule.SecurityProfile", + "azure.mgmt.computeschedule.models.SshConfiguration": "Microsoft.ComputeSchedule.SshConfiguration", + "azure.mgmt.computeschedule.models.SshPublicKey": "Microsoft.ComputeSchedule.SshPublicKey", "azure.mgmt.computeschedule.models.StartResourceOperationResponse": "Microsoft.ComputeSchedule.StartResourceOperationResponse", - "azure.mgmt.computeschedule.models.SubmitDeallocateRequest": "Microsoft.ComputeSchedule.SubmitDeallocateRequest", - "azure.mgmt.computeschedule.models.SubmitHibernateRequest": "Microsoft.ComputeSchedule.SubmitHibernateRequest", - "azure.mgmt.computeschedule.models.SubmitStartRequest": "Microsoft.ComputeSchedule.SubmitStartRequest", + "azure.mgmt.computeschedule.models.StorageProfile": "Microsoft.ComputeSchedule.StorageProfile", + "azure.mgmt.computeschedule.models.SubmitDeallocateContent": "Microsoft.ComputeSchedule.SubmitDeallocateRequest", + "azure.mgmt.computeschedule.models.SubmitHibernateContent": "Microsoft.ComputeSchedule.SubmitHibernateRequest", + "azure.mgmt.computeschedule.models.SubmitStartContent": "Microsoft.ComputeSchedule.SubmitStartRequest", "azure.mgmt.computeschedule.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.computeschedule.models.TerminateNotificationProfile": "Microsoft.ComputeSchedule.TerminateNotificationProfile", + "azure.mgmt.computeschedule.models.UefiSettings": "Microsoft.ComputeSchedule.UefiSettings", + "azure.mgmt.computeschedule.models.UserAssignedIdentitiesValue": "Microsoft.ComputeSchedule.UserAssignedIdentitiesValue", + "azure.mgmt.computeschedule.models.UserInitiatedReboot": "Microsoft.ComputeSchedule.UserInitiatedReboot", + "azure.mgmt.computeschedule.models.UserInitiatedRedeploy": "Microsoft.ComputeSchedule.UserInitiatedRedeploy", + "azure.mgmt.computeschedule.models.VaultCertificate": "Microsoft.ComputeSchedule.VaultCertificate", + "azure.mgmt.computeschedule.models.VaultSecretGroup": "Microsoft.ComputeSchedule.VaultSecretGroup", + "azure.mgmt.computeschedule.models.VirtualHardDisk": "Microsoft.ComputeSchedule.VirtualHardDisk", + "azure.mgmt.computeschedule.models.VirtualMachineIdentity": "Microsoft.ComputeSchedule.VirtualMachineIdentity", + "azure.mgmt.computeschedule.models.VirtualMachineIpTag": "Microsoft.ComputeSchedule.VirtualMachineIpTag", + "azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration": "Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfiguration", + "azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties": "Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceConfigurationProperties", + "azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration": "Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + "azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration": "Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfiguration", + "azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties": "Microsoft.ComputeSchedule.VirtualMachineNetworkInterfaceIPConfigurationProperties", + "azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressConfiguration": "Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfiguration", + "azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties": "Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressConfigurationProperties", + "azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration": "Microsoft.ComputeSchedule.VirtualMachinePublicIPAddressDnsSettingsConfiguration", + "azure.mgmt.computeschedule.models.VMDiskSecurityProfile": "Microsoft.ComputeSchedule.VMDiskSecurityProfile", + "azure.mgmt.computeschedule.models.VMGalleryApplication": "Microsoft.ComputeSchedule.VMGalleryApplication", + "azure.mgmt.computeschedule.models.VmSizeProfile": "Microsoft.ComputeSchedule.VmSizeProfile", + "azure.mgmt.computeschedule.models.VmSizeProperties": "Microsoft.ComputeSchedule.VmSizeProperties", + "azure.mgmt.computeschedule.models.WindowsConfiguration": "Microsoft.ComputeSchedule.WindowsConfiguration", + "azure.mgmt.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings": "Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformSettings", + "azure.mgmt.computeschedule.models.WinRMConfiguration": "Microsoft.ComputeSchedule.WinRMConfiguration", + "azure.mgmt.computeschedule.models.WinRMListener": "Microsoft.ComputeSchedule.WinRMListener", + "azure.mgmt.computeschedule.models.ZoneAllocationPolicy": "Microsoft.ComputeSchedule.ZoneAllocationPolicy", + "azure.mgmt.computeschedule.models.ZonePreference": "Microsoft.ComputeSchedule.ZonePreference", "azure.mgmt.computeschedule.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", "azure.mgmt.computeschedule.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", "azure.mgmt.computeschedule.models.ResourceOperationType": "Microsoft.ComputeSchedule.ResourceOperationType", "azure.mgmt.computeschedule.models.DeadlineType": "Microsoft.ComputeSchedule.DeadlineType", "azure.mgmt.computeschedule.models.OperationState": "Microsoft.ComputeSchedule.OperationState", "azure.mgmt.computeschedule.models.OptimizationPreference": "Microsoft.ComputeSchedule.OptimizationPreference", + "azure.mgmt.computeschedule.models.ResourceIdentityType": "Microsoft.ComputeSchedule.ResourceIdentityType", + "azure.mgmt.computeschedule.models.ExtendedLocationType": "Azure.ResourceManager.CommonTypes.ExtendedLocationType", + "azure.mgmt.computeschedule.models.ZonePlacementPolicyType": "Microsoft.ComputeSchedule.ZonePlacementPolicyType", + "azure.mgmt.computeschedule.models.OperatingSystemTypes": "Microsoft.ComputeSchedule.OperatingSystemTypes", + "azure.mgmt.computeschedule.models.CachingTypes": "Microsoft.ComputeSchedule.CachingTypes", + "azure.mgmt.computeschedule.models.DiffDiskOptions": "Microsoft.ComputeSchedule.DiffDiskOptions", + "azure.mgmt.computeschedule.models.DiffDiskPlacement": "Microsoft.ComputeSchedule.DiffDiskPlacement", + "azure.mgmt.computeschedule.models.DiskCreateOptionTypes": "Microsoft.ComputeSchedule.DiskCreateOptionTypes", + "azure.mgmt.computeschedule.models.StorageAccountTypes": "Microsoft.ComputeSchedule.StorageAccountTypes", + "azure.mgmt.computeschedule.models.SecurityEncryptionTypes": "Microsoft.ComputeSchedule.SecurityEncryptionTypes", + "azure.mgmt.computeschedule.models.DiskDeleteOptionTypes": "Microsoft.ComputeSchedule.DiskDeleteOptionTypes", + "azure.mgmt.computeschedule.models.DiskDetachOptionTypes": "Microsoft.ComputeSchedule.DiskDetachOptionTypes", + "azure.mgmt.computeschedule.models.DiskControllerTypes": "Microsoft.ComputeSchedule.DiskControllerTypes", + "azure.mgmt.computeschedule.models.SettingNames": "Microsoft.ComputeSchedule.SettingNames", + "azure.mgmt.computeschedule.models.WindowsVMGuestPatchMode": "Microsoft.ComputeSchedule.WindowsVMGuestPatchMode", + "azure.mgmt.computeschedule.models.WindowsPatchAssessmentMode": "Microsoft.ComputeSchedule.WindowsPatchAssessmentMode", + "azure.mgmt.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.ComputeSchedule.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.computeschedule.models.ProtocolTypes": "Microsoft.ComputeSchedule.ProtocolTypes", + "azure.mgmt.computeschedule.models.LinuxVMGuestPatchMode": "Microsoft.ComputeSchedule.LinuxVMGuestPatchMode", + "azure.mgmt.computeschedule.models.LinuxPatchAssessmentMode": "Microsoft.ComputeSchedule.LinuxPatchAssessmentMode", + "azure.mgmt.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting": "Microsoft.ComputeSchedule.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "azure.mgmt.computeschedule.models.DeleteOptions": "Microsoft.ComputeSchedule.DeleteOptions", + "azure.mgmt.computeschedule.models.NetworkApiVersion": "Microsoft.ComputeSchedule.NetworkApiVersion", + "azure.mgmt.computeschedule.models.DomainNameLabelScopeTypes": "Microsoft.ComputeSchedule.DomainNameLabelScopeTypes", + "azure.mgmt.computeschedule.models.IPVersions": "Microsoft.ComputeSchedule.IPVersions", + "azure.mgmt.computeschedule.models.PublicIPAllocationMethod": "Microsoft.ComputeSchedule.PublicIPAllocationMethod", + "azure.mgmt.computeschedule.models.PublicIPAddressSkuName": "Microsoft.ComputeSchedule.PublicIPAddressSkuName", + "azure.mgmt.computeschedule.models.PublicIPAddressSkuTier": "Microsoft.ComputeSchedule.PublicIPAddressSkuTier", + "azure.mgmt.computeschedule.models.NetworkInterfaceAuxiliaryMode": "Microsoft.ComputeSchedule.NetworkInterfaceAuxiliaryMode", + "azure.mgmt.computeschedule.models.NetworkInterfaceAuxiliarySku": "Microsoft.ComputeSchedule.NetworkInterfaceAuxiliarySku", + "azure.mgmt.computeschedule.models.SecurityTypes": "Microsoft.ComputeSchedule.SecurityTypes", + "azure.mgmt.computeschedule.models.Mode": "Microsoft.ComputeSchedule.Mode", + "azure.mgmt.computeschedule.models.Modes": "Microsoft.ComputeSchedule.Modes", + "azure.mgmt.computeschedule.models.OsType": "Microsoft.ComputeSchedule.OsType", + "azure.mgmt.computeschedule.models.PriorityType": "Microsoft.ComputeSchedule.PriorityType", + "azure.mgmt.computeschedule.models.AllocationStrategy": "Microsoft.ComputeSchedule.AllocationStrategy", + "azure.mgmt.computeschedule.models.DistributionStrategy": "Microsoft.ComputeSchedule.DistributionStrategy", "azure.mgmt.computeschedule.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", "azure.mgmt.computeschedule.models.ResourceType": "Microsoft.ComputeSchedule.ResourceType", "azure.mgmt.computeschedule.models.ScheduledActionType": "Microsoft.ComputeSchedule.ActionType", @@ -93,6 +212,8 @@ "azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate", "azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart", "azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart", + "azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_create_flex": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex", + "azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_create_flex": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreateFlex", "azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_create": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate", "azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_create": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate", "azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_delete": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete", diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py index 4bc6257d8a87..38002f4e6b02 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py @@ -28,6 +28,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -52,19 +53,28 @@ class ComputeScheduleMgmtClient: :type subscription_id: str :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2025-04-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are + "2026-04-15-preview". Default value is "2026-04-15-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: _endpoint = "{endpoint}" - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] @@ -73,6 +83,7 @@ def __init__( credential=credential, subscription_id=subscription_id, base_url=cast(str, base_url), + cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs ) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py index 4a9cbf0fa48e..1c5467773157 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -29,9 +30,12 @@ class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2025-04-15-preview". Note that overriding this default value may result in unsupported - behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are + "2026-04-15-preview". Default value is "2026-04-15-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,9 +44,10 @@ def __init__( credential: "TokenCredential", subscription_id: str, base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-04-15-preview") + api_version: str = kwargs.pop("api_version", "2026-04-15-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +57,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-computeschedule/{}".format(VERSION)) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/model_base.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/model_base.py index 49d5c7259389..db24930fdca9 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/model_base.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/model_base.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -29,6 +29,7 @@ from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null +from azure.core.rest import HttpResponse _LOGGER = logging.getLogger(__name__) @@ -36,6 +37,7 @@ TZ_UTC = timezone.utc _T = typing.TypeVar("_T") +_NONE_TYPE = type(None) def _timedelta_as_isostr(td: timedelta) -> str: @@ -170,6 +172,21 @@ def default(self, o): # pylint: disable=too-many-return-statements r"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{4}\s\d{2}:\d{2}:\d{2}\sGMT" ) +_ARRAY_ENCODE_MAPPING = { + "pipeDelimited": "|", + "spaceDelimited": " ", + "commaDelimited": ",", + "newlineDelimited": "\n", +} + + +def _deserialize_array_encoded(delimit: str, attr): + if isinstance(attr, str): + if attr == "": + return [] + return attr.split(delimit) + return attr + def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: """Deserialize ISO-8601 formatted string into Datetime object. @@ -201,7 +218,7 @@ def _deserialize_datetime(attr: typing.Union[str, datetime]) -> datetime: test_utc = date_obj.utctimetuple() if test_utc.tm_year > 9999 or test_utc.tm_year < 1: raise OverflowError("Hit max or min date") - return date_obj + return date_obj # type: ignore[no-any-return] def _deserialize_datetime_rfc7231(attr: typing.Union[str, datetime]) -> datetime: @@ -255,7 +272,7 @@ def _deserialize_time(attr: typing.Union[str, time]) -> time: """ if isinstance(attr, time): return attr - return isodate.parse_time(attr) + return isodate.parse_time(attr) # type: ignore[no-any-return] def _deserialize_bytes(attr): @@ -314,6 +331,8 @@ def _deserialize_int_as_str(attr): def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None): if annotation is int and rf and rf._format == "str": return _deserialize_int_as_str + if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING: + return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format]) if rf and rf._format: return _DESERIALIZE_MAPPING_WITHFORMAT.get(rf._format) return _DESERIALIZE_MAPPING.get(annotation) # pyright: ignore @@ -345,16 +364,46 @@ def _get_model(module_name: str, model_name: str): class _MyMutableMapping(MutableMapping[str, typing.Any]): - def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + def __init__(self, data: dict[str, typing.Any]) -> None: self._data = data def __contains__(self, key: typing.Any) -> bool: return key in self._data def __getitem__(self, key: str) -> typing.Any: + # If this key has been deserialized (for mutable types), we need to handle serialization + if hasattr(self, "_attr_to_rest_field"): + cache_attr = f"_deserialized_{key}" + if hasattr(self, cache_attr): + rf = _get_rest_field(getattr(self, "_attr_to_rest_field"), key) + if rf: + value = self._data.get(key) + if isinstance(value, (dict, list, set)): + # For mutable types, serialize and return + # But also update _data with serialized form and clear flag + # so mutations via this returned value affect _data + serialized = _serialize(value, rf._format) + # If serialized form is same type (no transformation needed), + # return _data directly so mutations work + if isinstance(serialized, type(value)) and serialized == value: + return self._data.get(key) + # Otherwise return serialized copy and clear flag + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass + # Store serialized form back + self._data[key] = serialized + return serialized return self._data.__getitem__(key) def __setitem__(self, key: str, value: typing.Any) -> None: + # Clear any cached deserialized value when setting through dictionary access + cache_attr = f"_deserialized_{key}" + try: + object.__delattr__(self, cache_attr) + except AttributeError: + pass self._data.__setitem__(key, value) def __delitem__(self, key: str) -> None: @@ -425,7 +474,7 @@ def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: return self._data.pop(key) return self._data.pop(key, default) - def popitem(self) -> typing.Tuple[str, typing.Any]: + def popitem(self) -> tuple[str, typing.Any]: """ Removes and returns some (key, value) pair :returns: The (key, value) pair. @@ -466,6 +515,8 @@ def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: return self._data.setdefault(key, default) def __eq__(self, other: typing.Any) -> bool: + if isinstance(other, _MyMutableMapping): + return self._data == other._data try: other_model = self.__class__(other) except Exception: @@ -482,6 +533,8 @@ def _is_model(obj: typing.Any) -> bool: def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-many-return-statements if isinstance(o, list): + if format in _ARRAY_ENCODE_MAPPING and all(isinstance(x, str) for x in o): + return _ARRAY_ENCODE_MAPPING[format].join(o) return [_serialize(x, format) for x in o] if isinstance(o, dict): return {k: _serialize(v, format) for k, v in o.items()} @@ -513,9 +566,7 @@ def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-m return o -def _get_rest_field( - attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: try: return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) except StopIteration: @@ -538,7 +589,7 @@ class Model(_MyMutableMapping): _is_model = True # label whether current class's _attr_to_rest_field has been calculated # could not see _attr_to_rest_field directly because subclass inherits it from parent class - _calculated: typing.Set[str] = set() + _calculated: set[str] = set() def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ @@ -549,54 +600,9 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: for rest_field in self._attr_to_rest_field.values() if rest_field._default is not _UNSET } - if args: # pylint: disable=too-many-nested-blocks + if args: if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) + dict_to_pass.update(self._init_from_xml(args[0])) else: dict_to_pass.update( {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} @@ -615,6 +621,69 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: ) super().__init__(dict_to_pass) + def _init_from_xml(self, element: ET.Element) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + model_meta = getattr(self, "_xml", {}) + existed_attr_keys: list[str] = [] + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + def copy(self) -> "Model": return Model(self.__dict__) @@ -623,7 +692,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") } annotations = { @@ -638,7 +707,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) if not rf._rest_name_input: rf._rest_name_input = attr - cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") return super().__new__(cls) @@ -667,7 +736,7 @@ def _deserialize(cls, data, exist_discriminators): model_meta = getattr(cls, "_xml", {}) prop_meta = getattr(discriminator, "_xml", {}) xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) if xml_ns: xml_name = "{" + xml_ns + "}" + xml_name @@ -680,7 +749,7 @@ def _deserialize(cls, data, exist_discriminators): mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) - def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. @@ -740,7 +809,7 @@ def _deserialize_with_union(deserializers, obj): def _deserialize_dict( value_deserializer: typing.Optional[typing.Callable], module: typing.Optional[str], - obj: typing.Dict[typing.Any, typing.Any], + obj: dict[typing.Any, typing.Any], ): if obj is None: return obj @@ -750,7 +819,7 @@ def _deserialize_dict( def _deserialize_multiple_sequence( - entry_deserializers: typing.List[typing.Optional[typing.Callable]], + entry_deserializers: list[typing.Optional[typing.Callable]], module: typing.Optional[str], obj, ): @@ -759,6 +828,14 @@ def _deserialize_multiple_sequence( return type(obj)(_deserialize(deserializer, entry, module) for entry, deserializer in zip(obj, entry_deserializers)) +def _is_array_encoded_deserializer(deserializer: functools.partial) -> bool: + return ( + isinstance(deserializer, functools.partial) + and isinstance(deserializer.args[0], functools.partial) + and deserializer.args[0].func == _deserialize_array_encoded # pylint: disable=comparison-with-callable + ) + + def _deserialize_sequence( deserializer: typing.Optional[typing.Callable], module: typing.Optional[str], @@ -768,17 +845,30 @@ def _deserialize_sequence( return obj if isinstance(obj, ET.Element): obj = list(obj) + + # encoded string may be deserialized to sequence + if isinstance(obj, str) and isinstance(deserializer, functools.partial): + # for list[str] + if _is_array_encoded_deserializer(deserializer): + return deserializer(obj) + + # for list[Union[...]] + if isinstance(deserializer.args[0], list): + for sub_deserializer in deserializer.args[0]: + if _is_array_encoded_deserializer(sub_deserializer): + return sub_deserializer(obj) + return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) -def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: return sorted( types, key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), ) -def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, @@ -818,16 +908,18 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur # is it optional? try: - if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore + if any(a is _NONE_TYPE for a in annotation.__args__): # pyright: ignore + if rf: + rf._is_optional = True if len(annotation.__args__) <= 2: # pyright: ignore if_obj_deserializer = _get_deserialize_callable_from_annotation( - next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore + next(a for a in annotation.__args__ if a is not _NONE_TYPE), module, rf # pyright: ignore ) return functools.partial(_deserialize_with_optional, if_obj_deserializer) # the type is Optional[Union[...]], we need to remove the None type from the Union annotation_copy = copy.copy(annotation) - annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore + annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a is not _NONE_TYPE] # pyright: ignore return _get_deserialize_callable_from_annotation(annotation_copy, module, rf) except AttributeError: pass @@ -843,7 +935,10 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur return functools.partial(_deserialize_with_union, deserializers) try: - if annotation._name == "Dict": # pyright: ignore + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": value_deserializer = _get_deserialize_callable_from_annotation( annotation.__args__[1], module, rf # pyright: ignore ) @@ -856,7 +951,10 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur except (AttributeError, IndexError): pass try: - if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: if len(annotation.__args__) > 1: # pyright: ignore entry_deserializers = [ _get_deserialize_callable_from_annotation(dt, module, rf) @@ -905,16 +1003,20 @@ def _deserialize_with_callable( return float(value.text) if value.text else None if deserializer is bool: return value.text == "true" if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING.values(): + return deserializer(value.text) if value.text else None + if deserializer and deserializer in _DESERIALIZE_MAPPING_WITHFORMAT.values(): + return deserializer(value.text) if value.text else None if deserializer is None: return value if deserializer in [int, float, bool]: return deserializer(value) if isinstance(deserializer, CaseInsensitiveEnumMeta): try: - return deserializer(value) + return deserializer(value.text if isinstance(value, ET.Element) else value) except ValueError: # for unknown value, return raw value - return value + return value.text if isinstance(value, ET.Element) else value if isinstance(deserializer, type) and issubclass(deserializer, Model): return deserializer._deserialize(value, []) return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value) @@ -940,14 +1042,14 @@ def _deserialize( def _failsafe_deserialize( deserializer: typing.Any, - value: typing.Any, + response: HttpResponse, module: typing.Optional[str] = None, rf: typing.Optional["_RestField"] = None, format: typing.Optional[str] = None, ) -> typing.Any: try: - return _deserialize(deserializer, value, module, rf, format) - except DeserializationError: + return _deserialize(deserializer, response.json(), module, rf, format) + except Exception: # pylint: disable=broad-except _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -956,17 +1058,18 @@ def _failsafe_deserialize( def _failsafe_deserialize_xml( deserializer: typing.Any, - value: typing.Any, + response: HttpResponse, ) -> typing.Any: try: - return _deserialize_xml(deserializer, value) - except DeserializationError: + return _deserialize_xml(deserializer, response.text()) + except Exception: # pylint: disable=broad-except _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) return None +# pylint: disable=too-many-instance-attributes class _RestField: def __init__( self, @@ -974,11 +1077,11 @@ def __init__( name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, - visibility: typing.Optional[typing.List[str]] = None, + visibility: typing.Optional[list[str]] = None, default: typing.Any = _UNSET, format: typing.Optional[str] = None, is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ): self._type = type self._rest_name_input = name @@ -986,6 +1089,7 @@ def __init__( self._is_discriminator = is_discriminator self._visibility = visibility self._is_model = False + self._is_optional = False self._default = default self._format = format self._is_multipart_file_input = is_multipart_file_input @@ -993,7 +1097,11 @@ def __init__( @property def _class_type(self) -> typing.Any: - return getattr(self._type, "args", [None])[0] + result = getattr(self._type, "args", [None])[0] + # type may be wrapped by nested functools.partial so we need to check for that + if isinstance(result, functools.partial): + return getattr(result, "args", [None])[0] + return result @property def _rest_name(self) -> str: @@ -1004,14 +1112,37 @@ def _rest_name(self) -> str: def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class - item = obj.get(self._rest_name) + # Use _data.get() directly to avoid triggering __getitem__ which clears the cache + item = obj._data.get(self._rest_name) if item is None: return item if self._is_model: return item - return _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, we want mutations to directly affect _data + # Check if we've already deserialized this value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + # Return the value from _data directly (it's been deserialized in place) + return obj._data.get(self._rest_name) + + deserialized = _deserialize(self._type, _serialize(item, self._format), rf=self) + + # For mutable types, store the deserialized value back in _data + # so mutations directly affect _data + if isinstance(deserialized, (dict, list, set)): + obj._data[self._rest_name] = deserialized + object.__setattr__(obj, cache_attr, True) # Mark as deserialized + return deserialized + + return deserialized def __set__(self, obj: Model, value) -> None: + # Clear the cached deserialized object when setting a new value + cache_attr = f"_deserialized_{self._rest_name}" + if hasattr(obj, cache_attr): + object.__delattr__(obj, cache_attr) + if value is None: # we want to wipe out entries if users set attr to None try: @@ -1036,11 +1167,11 @@ def rest_field( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, + visibility: typing.Optional[list[str]] = None, default: typing.Any = _UNSET, format: typing.Optional[str] = None, is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ) -> typing.Any: return _RestField( name=name, @@ -1057,8 +1188,8 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) @@ -1074,21 +1205,77 @@ def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + def _get_element( o: typing.Any, exclude_readonly: bool = False, - parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, wrapped_element: typing.Optional[ET.Element] = None, -) -> typing.Union[ET.Element, typing.List[ET.Element]]: +) -> typing.Union[ET.Element, list[ET.Element]]: if _is_model(o): model_meta = getattr(o, "_xml", {}) # if prop is a model, then use the prop element directly, else generate a wrapper of model if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), + element_name, model_meta.get("prefix"), - model_meta.get("ns"), + _model_ns, ) readonly_props = [] @@ -1110,7 +1297,9 @@ def _get_element( # additional properties will not have rest field, use the wire name as xml name prop_meta = {"name": k} - # if no ns for prop, use model's + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. if prop_meta.get("ns") is None and model_meta.get("ns"): prop_meta["ns"] = model_meta.get("ns") prop_meta["prefix"] = model_meta.get("prefix") @@ -1122,12 +1311,7 @@ def _get_element( # text could only set on primitive type wrapped_element.text = _get_primitive_type_value(v) elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) + _set_xml_attribute(wrapped_element, k, v, prop_meta) else: # other wrapped prop element wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) @@ -1136,6 +1320,7 @@ def _get_element( return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore if isinstance(o, dict): result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None for k, v in o.items(): result.append( _get_wrapped_element( @@ -1143,7 +1328,7 @@ def _get_element( exclude_readonly, { "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, + "ns": _dict_ns, "prefix": parent_meta.get("prefix") if parent_meta else None, }, ) @@ -1152,13 +1337,16 @@ def _get_element( # primitive case need to create element based on parent_meta if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) return _get_wrapped_element( o, exclude_readonly, { "name": parent_meta.get("itemsName", parent_meta.get("name")), "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + "ns": _items_ns, }, ) @@ -1168,10 +1356,11 @@ def _get_element( def _get_wrapped_element( v: typing.Any, exclude_readonly: bool, - meta: typing.Optional[typing.Dict[str, typing.Any]], + meta: typing.Optional[dict[str, typing.Any]], ) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None wrapped_element = _create_xml_element( - meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns ) if isinstance(v, (dict, list)): wrapped_element.extend(_get_element(v, exclude_readonly, meta)) @@ -1179,7 +1368,7 @@ def _get_wrapped_element( _get_element(v, exclude_readonly, meta, wrapped_element) else: wrapped_element.text = _get_primitive_type_value(v) - return wrapped_element + return wrapped_element # type: ignore[no-any-return] def _get_primitive_type_value(v) -> str: @@ -1192,9 +1381,29 @@ def _get_primitive_type_value(v) -> str: return str(v) -def _create_xml_element(tag, prefix=None, ns=None): - if prefix and ns: +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + +def _create_xml_element( + tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None +) -> ET.Element: + if prefix and ns: + _safe_register_namespace(prefix, ns) if ns: return ET.Element("{" + ns + "}" + tag) return ET.Element(tag) @@ -1211,7 +1420,7 @@ def _deserialize_xml( def _convert_element(e: ET.Element): # dict case if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: - dict_result: typing.Dict[str, typing.Any] = {} + dict_result: dict[str, typing.Any] = {} for child in e: if dict_result.get(child.tag) is not None: if isinstance(dict_result[child.tag], list): @@ -1224,7 +1433,7 @@ def _convert_element(e: ET.Element): return dict_result # array case if len(e) > 0: - array_result: typing.List[typing.Any] = [] + array_result: list[typing.Any] = [] for child in e: array_result.append(_convert_element(child)) return array_result diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/serialization.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/serialization.py index eb86ea23c965..81ec1de5922b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/serialization.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_utils/serialization.py @@ -21,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -31,7 +30,6 @@ Mapping, Callable, MutableMapping, - List, ) try: @@ -229,12 +227,12 @@ class Model: serialization and deserialization. """ - _subtype_map: Dict[str, Dict[str, Any]] = {} - _attribute_map: Dict[str, Dict[str, Any]] = {} - _validation: Dict[str, Dict[str, Any]] = {} + _subtype_map: dict[str, dict[str, Any]] = {} + _attribute_map: dict[str, dict[str, Any]] = {} + _validation: dict[str, dict[str, Any]] = {} def __init__(self, **kwargs: Any) -> None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: def from_dict( cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, ) -> Self: """Parse a dict using given key extractor return a model. @@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -823,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs): :param str data_type: Type of object in the iterable. :rtype: str, int, float, bool :return: serialized object + :raises TypeError: raise if data_type is not one of str, int, float, bool. """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(data) + if data_type == "float": + return float(data) + if data_type == "bool": + return bool(data) + raise TypeError("Unknown basic data type: {}".format(data_type)) @classmethod def serialize_unicode(cls, data): @@ -1184,7 +1189,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1386,7 +1391,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1759,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises TypeError: if string format is not valid. + :raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1785,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec # pylint: disable=eval-used + if data_type == "int": + return int(attr) + if data_type == "float": + return float(attr) + raise TypeError("Unknown basic data type: {}".format(data_type)) @staticmethod def deserialize_unicode(data): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py index 5bf479b145f7..a8cca866f40a 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.2.0b1" +VERSION = "1.2.0b2" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py index 72f9b1931d9e..8bb6bc97634d 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py @@ -28,6 +28,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -53,19 +54,28 @@ class ComputeScheduleMgmtClient: :type subscription_id: str :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2025-04-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are + "2026-04-15-preview". Default value is "2026-04-15-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: _endpoint = "{endpoint}" - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] @@ -74,6 +84,7 @@ def __init__( credential=credential, subscription_id=subscription_id, base_url=cast(str, base_url), + cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs ) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py index d9853890ac34..629e79950367 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -29,9 +30,12 @@ class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2025-04-15-preview". Note that overriding this default value may result in unsupported - behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Known values are + "2026-04-15-preview". Default value is "2026-04-15-preview". Note that overriding this default + value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,9 +44,10 @@ def __init__( credential: "AsyncTokenCredential", subscription_id: str, base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-04-15-preview") + api_version: str = kwargs.pop("api_version", "2026-04-15-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +57,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-computeschedule/{}".format(VERSION)) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py index 6adc8f3234f6..dcb865265783 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -61,6 +61,7 @@ build_scheduled_actions_trigger_manual_occurrence_request, build_scheduled_actions_update_request, build_scheduled_actions_virtual_machines_cancel_operations_request, + build_scheduled_actions_virtual_machines_execute_create_flex_request, build_scheduled_actions_virtual_machines_execute_create_request, build_scheduled_actions_virtual_machines_execute_deallocate_request, build_scheduled_actions_virtual_machines_execute_delete_request, @@ -75,8 +76,9 @@ from .._configuration import ComputeScheduleMgmtClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] JSON = MutableMapping[str, Any] +List = list class Operations: @@ -156,7 +158,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -172,7 +177,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -201,7 +209,7 @@ def __init__(self, *args, **kwargs) -> None: async def virtual_machines_submit_deallocate( self, locationparameter: str, - request_body: _models.SubmitDeallocateRequest, + request_body: _models.SubmitDeallocateContent, *, content_type: str = "application/json", **kwargs: Any @@ -212,7 +220,7 @@ async def virtual_machines_submit_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -266,7 +274,7 @@ async def virtual_machines_submit_deallocate( async def virtual_machines_submit_deallocate( self, locationparameter: str, - request_body: Union[_models.SubmitDeallocateRequest, JSON, IO[bytes]], + request_body: Union[_models.SubmitDeallocateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines @@ -274,9 +282,9 @@ async def virtual_machines_submit_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitDeallocateRequest, + :param request_body: The request body. Is one of the following types: SubmitDeallocateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateContent or JSON or IO[bytes] :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is compatible with MutableMapping @@ -318,6 +326,7 @@ async def virtual_machines_submit_deallocate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -332,11 +341,14 @@ async def virtual_machines_submit_deallocate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeallocateResourceOperationResponse, response.json()) @@ -349,7 +361,7 @@ async def virtual_machines_submit_deallocate( async def virtual_machines_submit_hibernate( self, locationparameter: str, - request_body: _models.SubmitHibernateRequest, + request_body: _models.SubmitHibernateContent, *, content_type: str = "application/json", **kwargs: Any @@ -360,7 +372,7 @@ async def virtual_machines_submit_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -414,7 +426,7 @@ async def virtual_machines_submit_hibernate( async def virtual_machines_submit_hibernate( self, locationparameter: str, - request_body: Union[_models.SubmitHibernateRequest, JSON, IO[bytes]], + request_body: Union[_models.SubmitHibernateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at @@ -422,9 +434,9 @@ async def virtual_machines_submit_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitHibernateRequest, + :param request_body: The request body. Is one of the following types: SubmitHibernateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateContent or JSON or IO[bytes] :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is compatible with MutableMapping @@ -466,6 +478,7 @@ async def virtual_machines_submit_hibernate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -480,11 +493,14 @@ async def virtual_machines_submit_hibernate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.HibernateResourceOperationResponse, response.json()) @@ -497,7 +513,7 @@ async def virtual_machines_submit_hibernate( async def virtual_machines_submit_start( self, locationparameter: str, - request_body: _models.SubmitStartRequest, + request_body: _models.SubmitStartContent, *, content_type: str = "application/json", **kwargs: Any @@ -508,7 +524,7 @@ async def virtual_machines_submit_start( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -560,16 +576,16 @@ async def virtual_machines_submit_start( @distributed_trace_async async def virtual_machines_submit_start( - self, locationparameter: str, request_body: Union[_models.SubmitStartRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.SubmitStartContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitStartRequest, JSON, + :param request_body: The request body. Is one of the following types: SubmitStartContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartRequest or JSON or IO[bytes] + :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartContent or JSON or IO[bytes] :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with MutableMapping :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse @@ -610,6 +626,7 @@ async def virtual_machines_submit_start( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -624,11 +641,14 @@ async def virtual_machines_submit_start( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.StartResourceOperationResponse, response.json()) @@ -641,7 +661,7 @@ async def virtual_machines_submit_start( async def virtual_machines_execute_deallocate( self, locationparameter: str, - request_body: _models.ExecuteDeallocateRequest, + request_body: _models.ExecuteDeallocateContent, *, content_type: str = "application/json", **kwargs: Any @@ -652,7 +672,7 @@ async def virtual_machines_execute_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -706,7 +726,7 @@ async def virtual_machines_execute_deallocate( async def virtual_machines_execute_deallocate( self, locationparameter: str, - request_body: Union[_models.ExecuteDeallocateRequest, JSON, IO[bytes]], + request_body: Union[_models.ExecuteDeallocateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, @@ -714,9 +734,9 @@ async def virtual_machines_execute_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteDeallocateRequest, + :param request_body: The request body. Is one of the following types: ExecuteDeallocateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateContent or JSON or IO[bytes] :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is compatible with MutableMapping @@ -758,6 +778,7 @@ async def virtual_machines_execute_deallocate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -772,11 +793,14 @@ async def virtual_machines_execute_deallocate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeallocateResourceOperationResponse, response.json()) @@ -789,7 +813,7 @@ async def virtual_machines_execute_deallocate( async def virtual_machines_execute_hibernate( self, locationparameter: str, - request_body: _models.ExecuteHibernateRequest, + request_body: _models.ExecuteHibernateContent, *, content_type: str = "application/json", **kwargs: Any @@ -800,7 +824,7 @@ async def virtual_machines_execute_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -854,7 +878,7 @@ async def virtual_machines_execute_hibernate( async def virtual_machines_execute_hibernate( self, locationparameter: str, - request_body: Union[_models.ExecuteHibernateRequest, JSON, IO[bytes]], + request_body: Union[_models.ExecuteHibernateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, @@ -862,9 +886,9 @@ async def virtual_machines_execute_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteHibernateRequest, + :param request_body: The request body. Is one of the following types: ExecuteHibernateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateContent or JSON or IO[bytes] :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is compatible with MutableMapping @@ -906,6 +930,7 @@ async def virtual_machines_execute_hibernate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -920,11 +945,14 @@ async def virtual_machines_execute_hibernate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.HibernateResourceOperationResponse, response.json()) @@ -937,7 +965,7 @@ async def virtual_machines_execute_hibernate( async def virtual_machines_execute_start( self, locationparameter: str, - request_body: _models.ExecuteStartRequest, + request_body: _models.ExecuteStartContent, *, content_type: str = "application/json", **kwargs: Any @@ -948,7 +976,7 @@ async def virtual_machines_execute_start( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1000,16 +1028,16 @@ async def virtual_machines_execute_start( @distributed_trace_async async def virtual_machines_execute_start( - self, locationparameter: str, request_body: Union[_models.ExecuteStartRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteStartContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteStartRequest, + :param request_body: The request body. Is one of the following types: ExecuteStartContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartRequest or JSON or IO[bytes] + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartContent or JSON or IO[bytes] :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with MutableMapping :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse @@ -1050,6 +1078,7 @@ async def virtual_machines_execute_start( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1064,11 +1093,14 @@ async def virtual_machines_execute_start( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.StartResourceOperationResponse, response.json()) @@ -1077,22 +1109,177 @@ async def virtual_machines_execute_start( return deserialized # type: ignore + @overload + async def virtual_machines_execute_create_flex( + self, + locationparameter: str, + body: _models.ExecuteCreateFlexContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: ~azure.mgmt.computeschedule.models.ExecuteCreateFlexContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def virtual_machines_execute_create_flex( + self, locationparameter: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def virtual_machines_execute_create_flex( + self, locationparameter: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + @api_version_validation( + method_added_on="2026-03-01-preview", + params_added_on={ + "2026-03-01-preview": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] + }, + api_versions_list=["2026-03-01-preview", "2026-04-15-preview"], + ) + async def virtual_machines_execute_create_flex( + self, locationparameter: str, body: Union[_models.ExecuteCreateFlexContent, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Is one of the following types: ExecuteCreateFlexContent, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.computeschedule.models.ExecuteCreateFlexContent or JSON or IO[bytes] + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CreateFlexResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_virtual_machines_execute_create_flex_request( + locationparameter=locationparameter, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CreateFlexResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + @overload async def virtual_machines_execute_create( self, locationparameter: str, - request_body: _models.ExecuteCreateRequest, + request_body: _models.ExecuteCreateContent, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1106,8 +1293,8 @@ async def virtual_machines_execute_create( async def virtual_machines_execute_create( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1126,8 +1313,8 @@ async def virtual_machines_execute_create( async def virtual_machines_execute_create( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1148,19 +1335,25 @@ async def virtual_machines_execute_create( params_added_on={ "2025-05-01": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] }, - api_versions_list=["2025-05-01", "2025-04-15-preview"], + api_versions_list=[ + "2025-05-01", + "2025-04-15-preview", + "2026-01-01-preview", + "2026-03-01-preview", + "2026-04-15-preview", + ], ) async def virtual_machines_execute_create( - self, locationparameter: str, request_body: Union[_models.ExecuteCreateRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteCreateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteCreateRequest, + :param request_body: The request body. Is one of the following types: ExecuteCreateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateContent or JSON or IO[bytes] :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping @@ -1202,6 +1395,7 @@ async def virtual_machines_execute_create( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1216,11 +1410,14 @@ async def virtual_machines_execute_create( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.CreateResourceOperationResponse, response.json()) @@ -1233,18 +1430,18 @@ async def virtual_machines_execute_create( async def virtual_machines_execute_delete( self, locationparameter: str, - request_body: _models.ExecuteDeleteRequest, + request_body: _models.ExecuteDeleteContent, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1258,8 +1455,8 @@ async def virtual_machines_execute_delete( async def virtual_machines_execute_delete( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1278,8 +1475,8 @@ async def virtual_machines_execute_delete( async def virtual_machines_execute_delete( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1300,19 +1497,25 @@ async def virtual_machines_execute_delete( params_added_on={ "2025-05-01": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] }, - api_versions_list=["2025-05-01", "2025-04-15-preview"], + api_versions_list=[ + "2025-05-01", + "2025-04-15-preview", + "2026-01-01-preview", + "2026-03-01-preview", + "2026-04-15-preview", + ], ) async def virtual_machines_execute_delete( - self, locationparameter: str, request_body: Union[_models.ExecuteDeleteRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteDeleteContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteDeleteRequest, + :param request_body: The request body. Is one of the following types: ExecuteDeleteContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteContent or JSON or IO[bytes] :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible with MutableMapping @@ -1354,6 +1557,7 @@ async def virtual_machines_execute_delete( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1368,11 +1572,14 @@ async def virtual_machines_execute_delete( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeleteResourceOperationResponse, response.json()) @@ -1385,7 +1592,7 @@ async def virtual_machines_execute_delete( async def virtual_machines_get_operation_status( self, locationparameter: str, - request_body: _models.GetOperationStatusRequest, + request_body: _models.GetOperationStatusContent, *, content_type: str = "application/json", **kwargs: Any @@ -1396,7 +1603,7 @@ async def virtual_machines_get_operation_status( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusRequest + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1450,7 +1657,7 @@ async def virtual_machines_get_operation_status( async def virtual_machines_get_operation_status( self, locationparameter: str, - request_body: Union[_models.GetOperationStatusRequest, JSON, IO[bytes]], + request_body: Union[_models.GetOperationStatusContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationStatusResponse: """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on @@ -1459,8 +1666,8 @@ async def virtual_machines_get_operation_status( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Is one of the following types: - GetOperationStatusRequest, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusRequest or JSON or + GetOperationStatusContent, JSON, IO[bytes] Required. + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusContent or JSON or IO[bytes] :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with MutableMapping @@ -1502,6 +1709,7 @@ async def virtual_machines_get_operation_status( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1516,11 +1724,14 @@ async def virtual_machines_get_operation_status( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.GetOperationStatusResponse, response.json()) @@ -1533,7 +1744,7 @@ async def virtual_machines_get_operation_status( async def virtual_machines_cancel_operations( self, locationparameter: str, - request_body: _models.CancelOperationsRequest, + request_body: _models.CancelOperationsContent, *, content_type: str = "application/json", **kwargs: Any @@ -1544,7 +1755,7 @@ async def virtual_machines_cancel_operations( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsRequest + :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1598,7 +1809,7 @@ async def virtual_machines_cancel_operations( async def virtual_machines_cancel_operations( self, locationparameter: str, - request_body: Union[_models.CancelOperationsRequest, JSON, IO[bytes]], + request_body: Union[_models.CancelOperationsContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.CancelOperationsResponse: """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) @@ -1606,9 +1817,9 @@ async def virtual_machines_cancel_operations( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: CancelOperationsRequest, + :param request_body: The request body. Is one of the following types: CancelOperationsContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsContent or JSON or IO[bytes] :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with MutableMapping @@ -1650,6 +1861,7 @@ async def virtual_machines_cancel_operations( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1664,11 +1876,14 @@ async def virtual_machines_cancel_operations( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.CancelOperationsResponse, response.json()) @@ -1681,7 +1896,7 @@ async def virtual_machines_cancel_operations( async def virtual_machines_get_operation_errors( self, locationparameter: str, - request_body: _models.GetOperationErrorsRequest, + request_body: _models.GetOperationErrorsContent, *, content_type: str = "application/json", **kwargs: Any @@ -1692,7 +1907,7 @@ async def virtual_machines_get_operation_errors( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsRequest + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1746,7 +1961,7 @@ async def virtual_machines_get_operation_errors( async def virtual_machines_get_operation_errors( self, locationparameter: str, - request_body: Union[_models.GetOperationErrorsRequest, JSON, IO[bytes]], + request_body: Union[_models.GetOperationErrorsContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationErrorsResponse: """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors @@ -1755,8 +1970,8 @@ async def virtual_machines_get_operation_errors( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Is one of the following types: - GetOperationErrorsRequest, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsRequest or JSON or + GetOperationErrorsContent, JSON, IO[bytes] Required. + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsContent or JSON or IO[bytes] :return: GetOperationErrorsResponse. The GetOperationErrorsResponse is compatible with MutableMapping @@ -1798,6 +2013,7 @@ async def virtual_machines_get_operation_errors( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1812,11 +2028,14 @@ async def virtual_machines_get_operation_errors( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.GetOperationErrorsResponse, response.json()) @@ -1837,7 +2056,7 @@ async def virtual_machines_get_operation_errors( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> _models.ScheduledAction: """Get a ScheduledAction. @@ -1877,6 +2096,7 @@ async def get(self, resource_group_name: str, scheduled_action_name: str, **kwar } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1891,11 +2111,14 @@ async def get(self, resource_group_name: str, scheduled_action_name: str, **kwar except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.ScheduledAction, response.json()) @@ -1916,7 +2139,7 @@ async def get(self, resource_group_name: str, scheduled_action_name: str, **kwar "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def _create_or_update_initial( self, @@ -1961,6 +2184,7 @@ async def _create_or_update_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1974,7 +2198,10 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1984,7 +2211,7 @@ async def _create_or_update_initial( ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -2088,7 +2315,7 @@ async def begin_create_or_update( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def begin_create_or_update( self, @@ -2258,7 +2485,7 @@ async def update( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def update( self, @@ -2317,6 +2544,7 @@ async def update( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2331,11 +2559,14 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.ScheduledAction, response.json()) @@ -2347,15 +2578,9 @@ async def update( @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def _delete_initial( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -2386,6 +2611,7 @@ async def _delete_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2399,7 +2625,10 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2407,7 +2636,7 @@ async def _delete_initial( response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -2418,15 +2647,9 @@ async def _delete_initial( @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def begin_delete( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -2490,7 +2713,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any @@ -2559,7 +2782,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledAction], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2575,7 +2801,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2586,7 +2815,7 @@ async def get_next(next_link=None): @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_subscription(self, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledAction"]: """List ScheduledAction resources by subscription ID. @@ -2649,7 +2878,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledAction], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2665,7 +2897,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2684,7 +2919,7 @@ async def get_next(next_link=None): "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_resources( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -2756,7 +2991,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledActionResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledActionResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2772,7 +3010,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2876,7 +3117,7 @@ async def attach_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def attach_resources( self, @@ -2936,6 +3177,7 @@ async def attach_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2950,11 +3192,14 @@ async def attach_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -3060,7 +3305,7 @@ async def detach_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def detach_resources( self, @@ -3120,6 +3365,7 @@ async def detach_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3134,11 +3380,14 @@ async def detach_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -3244,7 +3493,7 @@ async def patch_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def patch_resources( self, @@ -3304,6 +3553,7 @@ async def patch_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3318,11 +3568,14 @@ async def patch_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -3335,15 +3588,9 @@ async def patch_resources( @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def disable(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> None: """A synchronous resource action. @@ -3392,7 +3639,10 @@ async def disable(self, resource_group_name: str, scheduled_action_name: str, ** if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3402,15 +3652,9 @@ async def disable(self, resource_group_name: str, scheduled_action_name: str, ** @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def enable(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> None: """A synchronous resource action. @@ -3459,7 +3703,10 @@ async def enable(self, resource_group_name: str, scheduled_action_name: str, **k if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3562,7 +3809,7 @@ async def cancel_next_occurrence( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def cancel_next_occurrence( self, @@ -3622,6 +3869,7 @@ async def cancel_next_occurrence( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3636,11 +3884,14 @@ async def cancel_next_occurrence( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -3661,7 +3912,7 @@ async def cancel_next_occurrence( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def trigger_manual_occurrence( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -3703,6 +3954,7 @@ async def trigger_manual_occurrence( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3717,11 +3969,14 @@ async def trigger_manual_occurrence( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.Occurrence, response.json()) @@ -3752,7 +4007,7 @@ def __init__(self, *args, **kwargs) -> None: @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "resource_uri", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_vms(self, resource_uri: str, **kwargs: Any) -> AsyncItemPaged["_models.ScheduledActionResources"]: """List ScheduledActionResources resources by parent. @@ -3818,7 +4073,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledActionResources], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledActionResources], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -3834,7 +4092,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3872,7 +4133,7 @@ def __init__(self, *args, **kwargs) -> None: "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def get( self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any @@ -3917,6 +4178,7 @@ async def get( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3931,11 +4193,14 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.Occurrence, response.json()) @@ -3956,7 +4221,7 @@ async def get( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_scheduled_action( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -4027,7 +4292,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Occurrence], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.Occurrence], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4043,7 +4311,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4063,7 +4334,7 @@ async def get_next(next_link=None): "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_resources( self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any @@ -4138,7 +4409,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.OccurrenceResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.OccurrenceResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4154,7 +4428,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4268,7 +4545,7 @@ async def cancel( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def cancel( self, @@ -4332,6 +4609,7 @@ async def cancel( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4346,11 +4624,14 @@ async def cancel( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -4372,7 +4653,7 @@ async def cancel( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def _delay_initial( self, @@ -4419,6 +4700,7 @@ async def _delay_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4432,7 +4714,10 @@ async def _delay_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4440,7 +4725,7 @@ async def _delay_initial( response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -4557,7 +4842,7 @@ async def begin_delay( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) async def begin_delay( self, @@ -4664,7 +4949,7 @@ def __init__(self, *args, **kwargs) -> None: @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "resource_uri", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_occurrence_by_vms( self, resource_uri: str, **kwargs: Any @@ -4732,7 +5017,10 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.OccurrenceExtensionResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.OccurrenceExtensionResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -4748,7 +5036,10 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py index d69b77c1f9a0..645735575ea0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py @@ -14,29 +14,67 @@ from ._models import ( # type: ignore + AdditionalCapabilities, + AdditionalUnattendContent, + AllInstancesDown, + ApiEntityReference, + ApplicationProfile, + BootDiagnostics, + BulkActionVMExtension, + BulkActionVMProperties, + BulkActionVmExtensionProperties, + BulkVMConfiguration, CancelOccurrenceRequest, - CancelOperationsRequest, + CancelOperationsContent, CancelOperationsResponse, + CapacityReservationProfile, + CreateFlexResourceOperationResponse, CreateResourceOperationResponse, + DataDisk, DeallocateResourceOperationResponse, DelayRequest, DeleteResourceOperationResponse, + DiagnosticsProfile, + DiffDiskSettings, + DiskEncryptionSetParameters, + DiskEncryptionSettings, + EncryptionIdentity, ErrorAdditionalInfo, ErrorDetail, ErrorResponse, - ExecuteCreateRequest, - ExecuteDeallocateRequest, - ExecuteDeleteRequest, - ExecuteHibernateRequest, - ExecuteStartRequest, + EventGridAndResourceGraph, + ExecuteCreateContent, + ExecuteCreateFlexContent, + ExecuteDeallocateContent, + ExecuteDeleteContent, + ExecuteHibernateContent, + ExecuteStartContent, ExecutionParameters, + ExtendedLocation, ExtensionResource, - GetOperationErrorsRequest, + FallbackOperationInfo, + FlexProperties, + GetOperationErrorsContent, GetOperationErrorsResponse, - GetOperationStatusRequest, + GetOperationStatusContent, GetOperationStatusResponse, + HardwareProfile, HibernateResourceOperationResponse, + HostEndpointSettings, + ImageReference, + KeyVaultKeyReference, + KeyVaultSecretReference, + LinuxConfiguration, + LinuxPatchSettings, + LinuxVMGuestPatchAutomaticByPlatformSettings, + ManagedDiskParameters, + NetworkInterfaceReference, + NetworkInterfaceReferenceProperties, + NetworkProfile, NotificationProperties, + OSDisk, + OSImageNotificationProfile, + OSProfile, Occurrence, OccurrenceExtensionProperties, OccurrenceExtensionResource, @@ -47,7 +85,13 @@ OperationDisplay, OperationErrorDetails, OperationErrorsResult, + PatchSettings, + Placement, + Plan, + PriorityProfile, + ProxyAgentSettings, ProxyResource, + PublicIPAddressSku, RecurringActionsResourceOperationResult, Resource, ResourceAttachRequest, @@ -56,6 +100,7 @@ ResourceOperationDetails, ResourceOperationError, ResourcePatchRequest, + ResourceProvisionFlexPayload, ResourceProvisionPayload, ResourceResultSummary, ResourceStatus, @@ -68,62 +113,174 @@ ScheduledActionResources, ScheduledActionUpdate, ScheduledActionUpdateProperties, + ScheduledActionsExtensionProperties, ScheduledActionsSchedule, + ScheduledEventsAdditionalPublishingTargets, + ScheduledEventsPolicy, + ScheduledEventsProfile, + SecurityProfile, + SshConfiguration, + SshPublicKey, StartResourceOperationResponse, - SubmitDeallocateRequest, - SubmitHibernateRequest, - SubmitStartRequest, + StorageProfile, + SubResource, + SubmitDeallocateContent, + SubmitHibernateContent, + SubmitStartContent, SystemData, + TerminateNotificationProfile, TrackedResource, + UefiSettings, + UserAssignedIdentitiesValue, + UserInitiatedReboot, + UserInitiatedRedeploy, + VMDiskSecurityProfile, + VMGalleryApplication, + VaultCertificate, + VaultSecretGroup, + VirtualHardDisk, + VirtualMachineIdentity, + VirtualMachineIpTag, + VirtualMachineNetworkInterfaceConfiguration, + VirtualMachineNetworkInterfaceConfigurationProperties, + VirtualMachineNetworkInterfaceDnsSettingsConfiguration, + VirtualMachineNetworkInterfaceIPConfiguration, + VirtualMachineNetworkInterfaceIPConfigurationProperties, + VirtualMachinePublicIPAddressConfiguration, + VirtualMachinePublicIPAddressConfigurationProperties, + VirtualMachinePublicIPAddressDnsSettingsConfiguration, + VmSizeProfile, + VmSizeProperties, + WinRMConfiguration, + WinRMListener, + WindowsConfiguration, + WindowsVMGuestPatchAutomaticByPlatformSettings, + ZoneAllocationPolicy, + ZonePreference, ) from ._enums import ( # type: ignore ActionType, + AllocationStrategy, + CachingTypes, CreatedByType, DeadlineType, + DeleteOptions, + DiffDiskOptions, + DiffDiskPlacement, + DiskControllerTypes, + DiskCreateOptionTypes, + DiskDeleteOptionTypes, + DiskDetachOptionTypes, + DistributionStrategy, + DomainNameLabelScopeTypes, + ExtendedLocationType, + IPVersions, Language, + LinuxPatchAssessmentMode, + LinuxVMGuestPatchAutomaticByPlatformRebootSetting, + LinuxVMGuestPatchMode, + Mode, + Modes, Month, + NetworkApiVersion, + NetworkInterfaceAuxiliaryMode, + NetworkInterfaceAuxiliarySku, NotificationType, OccurrenceState, + OperatingSystemTypes, OperationState, OptimizationPreference, Origin, + OsType, + PriorityType, + ProtocolTypes, ProvisioningState, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPAllocationMethod, + ResourceIdentityType, ResourceOperationStatus, ResourceOperationType, ResourceProvisioningState, ResourceType, ScheduledActionType, + SecurityEncryptionTypes, + SecurityTypes, + SettingNames, + StorageAccountTypes, WeekDay, + WindowsPatchAssessmentMode, + WindowsVMGuestPatchAutomaticByPlatformRebootSetting, + WindowsVMGuestPatchMode, + ZonePlacementPolicyType, ) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "AdditionalCapabilities", + "AdditionalUnattendContent", + "AllInstancesDown", + "ApiEntityReference", + "ApplicationProfile", + "BootDiagnostics", + "BulkActionVMExtension", + "BulkActionVMProperties", + "BulkActionVmExtensionProperties", + "BulkVMConfiguration", "CancelOccurrenceRequest", - "CancelOperationsRequest", + "CancelOperationsContent", "CancelOperationsResponse", + "CapacityReservationProfile", + "CreateFlexResourceOperationResponse", "CreateResourceOperationResponse", + "DataDisk", "DeallocateResourceOperationResponse", "DelayRequest", "DeleteResourceOperationResponse", + "DiagnosticsProfile", + "DiffDiskSettings", + "DiskEncryptionSetParameters", + "DiskEncryptionSettings", + "EncryptionIdentity", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", - "ExecuteCreateRequest", - "ExecuteDeallocateRequest", - "ExecuteDeleteRequest", - "ExecuteHibernateRequest", - "ExecuteStartRequest", + "EventGridAndResourceGraph", + "ExecuteCreateContent", + "ExecuteCreateFlexContent", + "ExecuteDeallocateContent", + "ExecuteDeleteContent", + "ExecuteHibernateContent", + "ExecuteStartContent", "ExecutionParameters", + "ExtendedLocation", "ExtensionResource", - "GetOperationErrorsRequest", + "FallbackOperationInfo", + "FlexProperties", + "GetOperationErrorsContent", "GetOperationErrorsResponse", - "GetOperationStatusRequest", + "GetOperationStatusContent", "GetOperationStatusResponse", + "HardwareProfile", "HibernateResourceOperationResponse", + "HostEndpointSettings", + "ImageReference", + "KeyVaultKeyReference", + "KeyVaultSecretReference", + "LinuxConfiguration", + "LinuxPatchSettings", + "LinuxVMGuestPatchAutomaticByPlatformSettings", + "ManagedDiskParameters", + "NetworkInterfaceReference", + "NetworkInterfaceReferenceProperties", + "NetworkProfile", "NotificationProperties", + "OSDisk", + "OSImageNotificationProfile", + "OSProfile", "Occurrence", "OccurrenceExtensionProperties", "OccurrenceExtensionResource", @@ -134,7 +291,13 @@ "OperationDisplay", "OperationErrorDetails", "OperationErrorsResult", + "PatchSettings", + "Placement", + "Plan", + "PriorityProfile", + "ProxyAgentSettings", "ProxyResource", + "PublicIPAddressSku", "RecurringActionsResourceOperationResult", "Resource", "ResourceAttachRequest", @@ -143,6 +306,7 @@ "ResourceOperationDetails", "ResourceOperationError", "ResourcePatchRequest", + "ResourceProvisionFlexPayload", "ResourceProvisionPayload", "ResourceResultSummary", "ResourceStatus", @@ -155,30 +319,104 @@ "ScheduledActionResources", "ScheduledActionUpdate", "ScheduledActionUpdateProperties", + "ScheduledActionsExtensionProperties", "ScheduledActionsSchedule", + "ScheduledEventsAdditionalPublishingTargets", + "ScheduledEventsPolicy", + "ScheduledEventsProfile", + "SecurityProfile", + "SshConfiguration", + "SshPublicKey", "StartResourceOperationResponse", - "SubmitDeallocateRequest", - "SubmitHibernateRequest", - "SubmitStartRequest", + "StorageProfile", + "SubResource", + "SubmitDeallocateContent", + "SubmitHibernateContent", + "SubmitStartContent", "SystemData", + "TerminateNotificationProfile", "TrackedResource", + "UefiSettings", + "UserAssignedIdentitiesValue", + "UserInitiatedReboot", + "UserInitiatedRedeploy", + "VMDiskSecurityProfile", + "VMGalleryApplication", + "VaultCertificate", + "VaultSecretGroup", + "VirtualHardDisk", + "VirtualMachineIdentity", + "VirtualMachineIpTag", + "VirtualMachineNetworkInterfaceConfiguration", + "VirtualMachineNetworkInterfaceConfigurationProperties", + "VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + "VirtualMachineNetworkInterfaceIPConfiguration", + "VirtualMachineNetworkInterfaceIPConfigurationProperties", + "VirtualMachinePublicIPAddressConfiguration", + "VirtualMachinePublicIPAddressConfigurationProperties", + "VirtualMachinePublicIPAddressDnsSettingsConfiguration", + "VmSizeProfile", + "VmSizeProperties", + "WinRMConfiguration", + "WinRMListener", + "WindowsConfiguration", + "WindowsVMGuestPatchAutomaticByPlatformSettings", + "ZoneAllocationPolicy", + "ZonePreference", "ActionType", + "AllocationStrategy", + "CachingTypes", "CreatedByType", "DeadlineType", + "DeleteOptions", + "DiffDiskOptions", + "DiffDiskPlacement", + "DiskControllerTypes", + "DiskCreateOptionTypes", + "DiskDeleteOptionTypes", + "DiskDetachOptionTypes", + "DistributionStrategy", + "DomainNameLabelScopeTypes", + "ExtendedLocationType", + "IPVersions", "Language", + "LinuxPatchAssessmentMode", + "LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "LinuxVMGuestPatchMode", + "Mode", + "Modes", "Month", + "NetworkApiVersion", + "NetworkInterfaceAuxiliaryMode", + "NetworkInterfaceAuxiliarySku", "NotificationType", "OccurrenceState", + "OperatingSystemTypes", "OperationState", "OptimizationPreference", "Origin", + "OsType", + "PriorityType", + "ProtocolTypes", "ProvisioningState", + "PublicIPAddressSkuName", + "PublicIPAddressSkuTier", + "PublicIPAllocationMethod", + "ResourceIdentityType", "ResourceOperationStatus", "ResourceOperationType", "ResourceProvisioningState", "ResourceType", "ScheduledActionType", + "SecurityEncryptionTypes", + "SecurityTypes", + "SettingNames", + "StorageAccountTypes", "WeekDay", + "WindowsPatchAssessmentMode", + "WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "WindowsVMGuestPatchMode", + "ZonePlacementPolicyType", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py index 74cc53c00996..1238fb9dc30e 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py @@ -19,6 +19,30 @@ class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Actions are for internal-only APIs.""" +class AllocationStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The allocation strategy for VM size selection.""" + + LOWEST_PRICE = "LowestPrice" + """Platform prioritizes VM sizes with the lowest hourly cost.""" + PRIORITIZED = "Prioritized" + """Customer specifies a rank for each VM size, platform uses VM sizes in rank order.""" + CAPACITY_OPTIMIZED = "CapacityOptimized" + """Platform prioritizes VM sizes with the highest available capacity first.""" + + +class CachingTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** + The default values are: **None for Standard storage. ReadOnly for Premium storage**. + """ + + NONE = "None" + """Caching type:None.""" + READ_ONLY = "ReadOnly" + """Caching type:ReadOnly.""" + READ_WRITE = "ReadWrite" + """Caching type:ReadWrite.""" + + class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of entity that created the resource.""" @@ -43,11 +67,240 @@ class DeadlineType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Complete the operation by the given deadline.""" +class DeleteOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify what happens to the network interface when the VM is deleted.""" + + DELETE = "Delete" + """Delete network interface when the VM is deleted.""" + DETACH = "Detach" + """Detach network interface when the VM is deleted.""" + + +class DiffDiskOptions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the ephemeral disk option for operating system disk.""" + + LOCAL = "Local" + """Local Ephemeral disk option: Local.""" + + +class DiffDiskPlacement(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the ephemeral disk placement for operating system disk. This property can be used by + user in the request to choose the location i.e, cache disk, resource disk or nvme disk space + for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size + requirements, please refer Ephemeral OS disk size requirements for Windows VM at + `https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements + `_ + and Linux VM at + `https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements + `_. + Minimum api-version for NvmeDisk: 2024-03-01. + """ + + CACHE_DISK = "CacheDisk" + """CacheDisk disk placement.""" + RESOURCE_DISK = "ResourceDisk" + """ResourceDisk disk placement.""" + NVME_DISK = "NvmeDisk" + """NvmeDisk disk placement.""" + + +class DiskControllerTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This + property is only supported for virtual machines whose operating system disk and VM sku supports + Generation 2 (`https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2 + `_), please check the + HyperVGenerations capability returned as part of VM sku capabilities in the response of + Microsoft.Compute SKUs api for the region contains V2 + (`https://docs.microsoft.com/rest/api/compute/resourceskus/list + `_). For more information about + Disk Controller Types supported please refer to `https://aka.ms/azure-diskcontrollertypes + `_. + """ + + SCSI = "SCSI" + """SCSI disk controller type.""" + NV_ME = "NVMe" + """NVMe disk controller type.""" + + +class DiskCreateOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies how the virtual machine disk should be created. Possible values are **Attach:** This + value is used when you are using a specialized disk to create the virtual machine. + **FromImage:** This value is used when you are using an image to create the virtual machine. If + you are using a platform image, you should also use the imageReference element described above. + If you are using a marketplace image, you should also use the plan element previously + described. **Empty:** This value is used when creating an empty data disk. **Copy:** This value + is used to create a data disk from a snapshot or another disk. **Restore:** This value is used + to create a data disk from a disk restore point. + """ + + FROM_IMAGE = "FromImage" + """Create disk FromImage.""" + EMPTY = "Empty" + """Empty value.""" + ATTACH = "Attach" + """Create disk by Attach.""" + COPY = "Copy" + """Create disk by Copy.""" + RESTORE = "Restore" + """Create disk by Restore.""" + + +class DiskDeleteOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the behavior of the managed disk when the VM gets deleted, for example whether the + managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, + the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the + managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01. + """ + + DELETE = "Delete" + """Delete the disk upon VM deletion.""" + DETACH = "Detach" + """Detach the disk upon VM deletion.""" + + +class DiskDetachOptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the detach behavior to be used while detaching a disk or which is already in the + process of detachment from the virtual machine. Supported values are: **ForceDetach.** + detachOption: **ForceDetach** is applicable only for managed data disks. If a previous + detachment attempt of the data disk did not complete due to an unexpected failure from the + virtual machine and the disk is still not released then use force-detach as a last resort + option to detach the disk forcibly from the VM. All writes might not have been flushed when + using this detach behavior. **This feature is still in preview**. To force-detach a data disk + update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + """ + + FORCE_DETACH = "ForceDetach" + """ForceDetach the disk.""" + + +class DistributionStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The distribution strategy for zone allocation.""" + + BEST_EFFORT_SINGLE_ZONE = "BestEffortSingleZone" + """Platform attempts to place as many VMs as possible in a single zone, falls back to multiple + zones if needed.""" + PRIORITIZED = "Prioritized" + """Platform uses customer-provided zone rankings to allocate VMs.""" + BEST_EFFORT_BALANCED = "BestEffortBalanced" + """Platform attempts to evenly distribute VMs across all available zones with best effort.""" + STRICT_BALANCED = "StrictBalanced" + """Platform must evenly distribute VMs across zones, request is rejected if exact balance cannot + be achieved.""" + + +class DomainNameLabelScopeTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The Domain name label scope.The concatenation of the hashed domain name label that generated + according to the policy from domain name label scope and vm index will be the domain name + labels of the PublicIPAddress resources that will be created. + """ + + TENANT_REUSE = "TenantReuse" + """TenantReuse scope type.""" + SUBSCRIPTION_REUSE = "SubscriptionReuse" + """SubscriptionReuse scope type.""" + RESOURCE_GROUP_REUSE = "ResourceGroupReuse" + """ResourceGroupReuse scope type.""" + NO_REUSE = "NoReuse" + """NoReuse scope type.""" + + +class ExtendedLocationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The supported ExtendedLocation types.""" + + EDGE_ZONE = "EdgeZone" + """Azure Edge Zones location type.""" + CUSTOM_LOCATION = "CustomLocation" + """Azure Custom Locations type.""" + + +class IPVersions(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Available from compute Api-Version 2017-03-30 onwards, it represents whether the specific + ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and + 'IPv6'. + """ + + I_PV4 = "IPv4" + """IPv4 version.""" + I_PV6 = "IPv6" + """IPv6 version.""" + + class Language(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The notification languages currently supported.""" EN_US = "en-us" - """American english language""" + """American english language.""" + + +class LinuxPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

+ Possible values are:

**ImageDefault** - You control the timing of patch assessments + on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic + patch assessments. The property provisionVMAgent must be true. + """ + + IMAGE_DEFAULT = "ImageDefault" + """ImageDefault mode.""" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + """AutomaticByPlatform mode.""" + + +class LinuxVMGuestPatchAutomaticByPlatformRebootSetting( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations.""" + + UNKNOWN = "Unknown" + """Unknown reboot setting.""" + IF_REQUIRED = "IfRequired" + """Reboot if required.""" + NEVER = "Never" + """Never reboot.""" + ALWAYS = "Always" + """Always reboot.""" + + +class LinuxVMGuestPatchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated + to virtual machine scale set with OrchestrationMode as Flexible.

Possible values + are:

**ImageDefault** - The virtual machine's default patching configuration is + used.

**AutomaticByPlatform** - The virtual machine will be automatically updated + by the platform. The property provisionVMAgent must be true. + """ + + IMAGE_DEFAULT = "ImageDefault" + """ImageDefault linux VM guest patch mode.""" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + """AutomaticByPlatform linux VM guest patch mode.""" + + +class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the mode that ProxyAgent will execute on if the feature is enabled. ProxyAgent will + start to audit or monitor but not enforce access control over requests to host endpoints in + Audit mode, while in Enforce mode it will enforce access control. The default value is Enforce + mode. + """ + + AUDIT = "Audit" + """Audit mode.""" + ENFORCE = "Enforce" + """Enforce mode.""" + + +class Modes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access + control policy, including emitting access denial entries in the logs but it does not actually + deny any requests to host endpoints. In Enforce mode, the system will enforce the access + control and it is the recommended mode of operation. + """ + + AUDIT = "Audit" + """Audit mode.""" + ENFORCE = "Enforce" + """Enforce mode.""" + DISABLED = "Disabled" + """Disabled mode.""" class Month(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -78,67 +331,115 @@ class Month(str, Enum, metaclass=CaseInsensitiveEnumMeta): DECEMBER = "December" """The December month.""" ALL = "All" - """All months""" + """All months.""" + + +class NetworkApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the Microsoft.Network API version used when creating networking resources in the + Network Interface Configurations. + """ + + V2020_11_01 = "2020-11-01" + """2020-11-01 version.""" + V2022_11_01 = "2022-11-01" + """2022-11-01 version.""" + + +class NetworkInterfaceAuxiliaryMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies whether the Auxiliary mode is enabled for the Network Interface resource.""" + + NONE = "None" + """None mode.""" + ACCELERATED_CONNECTIONS = "AcceleratedConnections" + """AcceleratedConnections mode.""" + FLOATING = "Floating" + """Floating mode.""" + + +class NetworkInterfaceAuxiliarySku(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies whether the Auxiliary sku is enabled for the Network Interface resource.""" + + NONE = "None" + """None: None sku.""" + A1 = "A1" + """A1 sku.""" + A2 = "A2" + """A2 sku.""" + A4 = "A4" + """A4 sku.""" + A8 = "A8" + """A8 sku.""" class NotificationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of notification supported.""" EMAIL = "Email" - """Notify through e-mail""" + """Notify through e-mail.""" class OccurrenceState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The state the occurrence is at a given time.""" CREATED = "Created" - """The occurrence was created""" + """The occurrence was created.""" RESCHEDULING = "Rescheduling" - """The occurrence is being rescheduled""" + """The occurrence is being rescheduled.""" SCHEDULED = "Scheduled" - """The occurrence has been scheduled""" + """The occurrence has been scheduled.""" SUCCEEDED = "Succeeded" - """The occurrence has successfully ran""" + """The occurrence has successfully ran.""" FAILED = "Failed" - """The occurrence has failed during its scheduling""" + """The occurrence has failed during its scheduling.""" CANCELLING = "Cancelling" - """The occurrence is going through cancellation""" + """The occurrence is going through cancellation.""" CANCELED = "Canceled" - """The occurrence has been canceled""" + """The occurrence has been canceled.""" + + +class OperatingSystemTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This property allows you to specify the supported type of the OS that application is built for. + Possible values are: **Windows,** **Linux.**. + """ + + WINDOWS = "Windows" + """Windows OS.""" + LINUX = "Linux" + """Linux OS.""" class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Values that define the states of operations in Scheduled Actions.""" UNKNOWN = "Unknown" - """The default value for the operation state enum""" + """The default value for the operation state enum.""" PENDING_SCHEDULING = "PendingScheduling" - """Operations that are pending scheduling""" + """Operations that are pending scheduling.""" SCHEDULED = "Scheduled" - """Operations that have been scheduled""" + """Operations that have been scheduled.""" PENDING_EXECUTION = "PendingExecution" - """Operations that are waiting to be executed""" + """Operations that are waiting to be executed.""" EXECUTING = "Executing" - """Operations that are in the process of being executed""" + """Operations that are in the process of being executed.""" SUCCEEDED = "Succeeded" - """Operations that suceeded""" + """Operations that suceeded.""" FAILED = "Failed" - """Operations that have failed""" + """Operations that have failed.""" CANCELLED = "Cancelled" - """Operations that have been Cancelled by the user""" + """Operations that have been Cancelled by the user.""" BLOCKED = "Blocked" - """Operations that are blocked""" + """Operations that are blocked.""" class OptimizationPreference(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The preferences customers can select to optimize their requests to ScheduledActions.""" COST = "Cost" - """Optimize while considering cost savings""" + """Optimize while considering cost savings.""" AVAILABILITY = "Availability" - """Optimize while considering availability of resources""" + """Optimize while considering availability of resources.""" COST_AVAILABILITY_BALANCED = "CostAvailabilityBalanced" - """Optimize while considering a balance of cost and availability""" + """Optimize while considering a balance of cost and availability.""" class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -154,6 +455,33 @@ class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the operation is initiated by a user or system.""" +class OsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The supported operating system types for flex VM creation.""" + + WINDOWS = "Windows" + """Windows operating system.""" + LINUX = "Linux" + """Linux operating system.""" + + +class PriorityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The priority type for VM allocation.""" + + REGULAR = "Regular" + """Regular priority VMs.""" + SPOT = "Spot" + """Spot priority VMs.""" + + +class ProtocolTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**.""" + + HTTP = "Http" + """Http protocol.""" + HTTPS = "Https" + """Https protocol.""" + + class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning state.""" @@ -167,11 +495,54 @@ class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Resource is being deleted.""" +class PublicIPAddressSkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify public IP sku name.""" + + BASIC = "Basic" + """Basic IP sku name.""" + STANDARD = "Standard" + """Standard IP sku name.""" + + +class PublicIPAddressSkuTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify public IP sku tier.""" + + REGIONAL = "Regional" + """Regional IP address sku tier.""" + GLOBAL = "Global" + """Global IP address sku tier.""" + + +class PublicIPAllocationMethod(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specify the public IP allocation type.""" + + DYNAMIC = "Dynamic" + """Dynamic IP allocation.""" + STATIC = "Static" + """Static IP allocation.""" + + +class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The type of identity used for the virtual machine scale set. The type 'SystemAssigned, + UserAssigned' includes both an implicitly created identity and a set of user assigned + identities. The type 'None' will remove any identities from the virtual machine scale set. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + """SYSTEM_ASSIGNED.""" + USER_ASSIGNED = "UserAssigned" + """USER_ASSIGNED.""" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + """SYSTEM_ASSIGNED_USER_ASSIGNED.""" + NONE = "None" + """NONE.""" + + class ResourceOperationStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The state the resource is on after the resource operation is applied.""" SUCCEEDED = "Succeeded" - """The resource operation was successful""" + """The resource operation was successful.""" FAILED = "Failed" """The resource operation has failed.""" @@ -180,13 +551,17 @@ class ResourceOperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of operation types that can be performed on resources using ScheduledActions.""" UNKNOWN = "Unknown" - """The default value for this enum type""" + """The default value for this enum type.""" START = "Start" - """Start operations on the resources""" + """Start operations on the resources.""" DEALLOCATE = "Deallocate" - """Deallocate operations on the resources""" + """Deallocate operations on the resources.""" HIBERNATE = "Hibernate" - """Hibernate operations on the resources""" + """Hibernate operations on the resources.""" + CREATE = "Create" + """Create operations on the resources.""" + DELETE = "Delete" + """Delete operations on the resources.""" class ResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -204,20 +579,87 @@ class ResourceType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The type of resource being targeted.""" VIRTUAL_MACHINE = "VirtualMachine" - """Resources defined are Virtual Machines""" + """Resources defined are Virtual Machines.""" VIRTUAL_MACHINE_SCALE_SET = "VirtualMachineScaleSet" - """Resources defined are Virtual Machines Scale Sets""" + """Resources defined are Virtual Machines Scale Sets.""" class ScheduledActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Specify which action user wants to be performed on the resources.""" START = "Start" - """Perform a start action on the specified resources""" + """Perform a start action on the specified resources.""" DEALLOCATE = "Deallocate" - """Perform a deallocate action on the specified resources""" + """Perform a deallocate action on the specified resources.""" HIBERNATE = "Hibernate" - """Perform hibernate and deallocate on the specified resources""" + """Perform hibernate and deallocate on the specified resources.""" + + +class SecurityEncryptionTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for + encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for encryption of + just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the + VMGuestState blob.. **Note:** It can be set for only Confidential VMs. + """ + + VM_GUEST_STATE_ONLY = "VMGuestStateOnly" + """VMGuestStateOnly encryption.""" + DISK_WITH_VM_GUEST_STATE = "DiskWithVMGuestState" + """DiskWithVMGuestState encryption.""" + NON_PERSISTED_TPM = "NonPersistedTPM" + """NonPersistedTPM encryption.""" + + +class SecurityTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the SecurityType of the virtual machine. It has to be set to any specified value to + enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this + property is set. + """ + + TRUSTED_LAUNCH = "TrustedLaunch" + """TrustedLaunch security type.""" + CONFIDENTIAL_VM = "ConfidentialVM" + """ConfidentialVM security type.""" + + +class SettingNames(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the name of the setting to which the content applies. Possible values are: + FirstLogonCommands and AutoLogon. + """ + + AUTO_LOGON = "AutoLogon" + """AutoLogon mode.""" + FIRST_LOGON_COMMANDS = "FirstLogonCommands" + """FirstLogonCommands mode.""" + + +class StorageAccountTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the storage account type for the managed disk. Managed OS disk storage account type + can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data + disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses + Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses + Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. + For more information regarding disks supported for Windows Virtual Machines, refer to + `https://docs.microsoft.com/azure/virtual-machines/windows/disks-types + `_ and, for Linux + Virtual Machines, refer to `https://docs.microsoft.com/azure/virtual-machines/linux/disks-types + `_. + """ + + STANDARD_LRS = "Standard_LRS" + """Standard_LRS storage account type.""" + PREMIUM_LRS = "Premium_LRS" + """Premium_LRS storage account type.""" + STANDARD_SSD_LRS = "StandardSSD_LRS" + """StandardSSD_LRS storage account type.""" + ULTRA_SSD_LRS = "UltraSSD_LRS" + """UltraSSD_LRS storage account type.""" + PREMIUM_ZRS = "Premium_ZRS" + """Premium_ZRS storage account type.""" + STANDARD_SSD_ZRS = "StandardSSD_ZRS" + """StandardSSD_ZRS storage account type.""" + PREMIUM_V2_LRS = "PremiumV2_LRS" + """PremiumV2_LRS storage account type.""" class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -238,4 +680,64 @@ class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): SUNDAY = "Sunday" """Sunday weekday.""" ALL = "All" - """All week days""" + """All week days.""" + + +class WindowsPatchAssessmentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

+ Possible values are:

**ImageDefault** - You control the timing of patch assessments + on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic + patch assessments. The property provisionVMAgent must be true. + """ + + IMAGE_DEFAULT = "ImageDefault" + """ImageDefault patch assessment mode.""" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + """AutomaticByPlatform patch assessment mode.""" + + +class WindowsVMGuestPatchAutomaticByPlatformRebootSetting( # pylint: disable=name-too-long + str, Enum, metaclass=CaseInsensitiveEnumMeta +): + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations.""" + + UNKNOWN = "Unknown" + """Reboot setting for Unknown.""" + IF_REQUIRED = "IfRequired" + """Reboot setting for IfRequired.""" + NEVER = "Never" + """Reboot setting for Never.""" + ALWAYS = "Always" + """Reboot setting for Always.""" + + +class WindowsVMGuestPatchMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated + to virtual machine scale set with OrchestrationMode as Flexible.

Possible values + are:

**Manual** - You control the application of patches to a virtual machine. You + do this by applying patches manually inside the VM. In this mode, automatic updates are + disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

+ **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property + WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** + - the virtual machine will automatically updated by the platform. The properties + provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. + """ + + MANUAL = "Manual" + """Manual VM guest patch mode.""" + AUTOMATIC_BY_OS = "AutomaticByOS" + """AutomaticByOS VM guest patch mode.""" + AUTOMATIC_BY_PLATFORM = "AutomaticByPlatform" + """AutomaticByPlatform VM guest patch mode.""" + + +class ZonePlacementPolicyType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the policy for resource's placement in availability zone. Possible values are: + **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An + availability zone will be automatically picked by system as part of resource creation. + """ + + ANY = "Any" + """ANY.""" + AUTO = "Auto" + """The platform automatically selects an availability zone based on the request.""" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py index 5c4026b9e264..4709f6250866 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py @@ -9,7 +9,7 @@ # pylint: disable=useless-super-delegation import datetime -from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload +from typing import Any, Literal, Mapping, Optional, TYPE_CHECKING, Union, overload from azure.core.exceptions import ODataV4Format @@ -19,23 +19,36 @@ from .. import models as _models -class CancelOccurrenceRequest(_Model): - """The request to cancel an occurrence. +class AdditionalCapabilities(_Model): + """Enables or disables a capability on the virtual machine or virtual machine scale set. - :ivar resource_ids: The resources the cancellation should act on. If no resource is passed in - the list, Scheduled Action will cancel the occurrence for all resources. Required. - :vartype resource_ids: list[str] + :ivar ultra_ssd_enabled: The flag that enables or disables a capability to have one or more + managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with + storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale + set only if this property is enabled. + :vartype ultra_ssd_enabled: bool + :ivar hibernation_enabled: The flag that enables or disables hibernation capability on the VM. + :vartype hibernation_enabled: bool """ - resource_ids: List[str] = rest_field(name="resourceIds", visibility=["read", "create", "update", "delete", "query"]) - """The resources the cancellation should act on. If no resource is passed in the list, Scheduled - Action will cancel the occurrence for all resources. Required.""" + ultra_ssd_enabled: Optional[bool] = rest_field( + name="ultraSSDEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """The flag that enables or disables a capability to have one or more managed data disks with + UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type + UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this + property is enabled.""" + hibernation_enabled: Optional[bool] = rest_field( + name="hibernationEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """The flag that enables or disables hibernation capability on the VM.""" @overload def __init__( self, *, - resource_ids: List[str], + ultra_ssd_enabled: Optional[bool] = None, + hibernation_enabled: Optional[bool] = None, ) -> None: ... @overload @@ -49,28 +62,55 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CancelOperationsRequest(_Model): - """This is the request to cancel running operations in scheduled actions using the operation ids. - - :ivar operation_ids: The list of operation ids to cancel operations on. Required. - :vartype operation_ids: list[str] - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str +class AdditionalUnattendContent(_Model): + """Specifies additional XML formatted information that can be included in the Unattend.xml file, + which is used by Windows Setup. Contents are defined by setting name, component name, and the + pass in which the content is applied. + + :ivar pass_name: The pass name. Currently, the only allowable value is OobeSystem. Default + value is "OobeSystem". + :vartype pass_name: str + :ivar component_name: The component name. Currently, the only allowable value is + Microsoft-Windows-Shell-Setup. Default value is "Microsoft-Windows-Shell-Setup". + :vartype component_name: str + :ivar setting_name: Specifies the name of the setting to which the content applies. Possible + values are: FirstLogonCommands and AutoLogon. Known values are: "AutoLogon" and + "FirstLogonCommands". + :vartype setting_name: str or ~azure.mgmt.computeschedule.models.SettingNames + :ivar content: Specifies the XML formatted content that is added to the unattend.xml file for + the specified path and component. The XML must be less than 4KB and must include the root + element for the setting or feature that is being inserted. + :vartype content: str """ - operation_ids: List[str] = rest_field( - name="operationIds", visibility=["read", "create", "update", "delete", "query"] + pass_name: Optional[Literal["OobeSystem"]] = rest_field( + name="passName", visibility=["read", "create", "update", "delete", "query"] ) - """The list of operation ids to cancel operations on. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """The pass name. Currently, the only allowable value is OobeSystem. Default value is + \"OobeSystem\".""" + component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] = rest_field( + name="componentName", visibility=["read", "create", "update", "delete", "query"] + ) + """The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + Default value is \"Microsoft-Windows-Shell-Setup\".""" + setting_name: Optional[Union[str, "_models.SettingNames"]] = rest_field( + name="settingName", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the name of the setting to which the content applies. Possible values are: + FirstLogonCommands and AutoLogon. Known values are: \"AutoLogon\" and \"FirstLogonCommands\".""" + content: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the XML formatted content that is added to the unattend.xml file for the specified + path and component. The XML must be less than 4KB and must include the root element for the + setting or feature that is being inserted.""" @overload def __init__( self, *, - operation_ids: List[str], - correlationid: str, + pass_name: Optional[Literal["OobeSystem"]] = None, + component_name: Optional[Literal["Microsoft-Windows-Shell-Setup"]] = None, + setting_name: Optional[Union[str, "_models.SettingNames"]] = None, + content: Optional[str] = None, ) -> None: ... @overload @@ -84,21 +124,25 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CancelOperationsResponse(_Model): - """This is the response from a cancel operations request. +class AllInstancesDown(_Model): + """Specifies if Scheduled Events should be auto-approved when all instances are down. - :ivar results: An array of resource operations that were successfully cancelled. Required. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar automatically_approve: Specifies if Scheduled Events should be auto-approved when all + instances are down. Its default value is true. + :vartype automatically_approve: bool """ - results: List["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of resource operations that were successfully cancelled. Required.""" + automatically_approve: Optional[bool] = rest_field( + name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies if Scheduled Events should be auto-approved when all instances are down. Its default + value is true.""" @overload def __init__( self, *, - results: List["_models.ResourceOperation"], + automatically_approve: Optional[bool] = None, ) -> None: ... @overload @@ -112,38 +156,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class CreateResourceOperationResponse(_Model): - """The response from a create request. +class ApiEntityReference(_Model): + """The API entity reference. - :ivar description: The description of the operation response. Required. - :vartype description: str - :ivar type: The type of resources used in the create request eg virtual machines. Required. - :vartype type: str - :ivar location: The location of the start request eg westus. Required. - :vartype location: str - :ivar results: The results from the start request if no errors exist. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar id: The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + :vartype id: str """ - description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The description of the operation response. Required.""" - type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The type of resources used in the create request eg virtual machines. Required.""" - location: str = rest_field(visibility=["read", "create"]) - """The location of the start request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The results from the start request if no errors exist.""" + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ARM resource id in the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...""" @overload def __init__( self, *, - description: str, - type: str, - location: str, - results: Optional[List["_models.ResourceOperation"]] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin ) -> None: ... @overload @@ -157,38 +186,24 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class DeallocateResourceOperationResponse(_Model): - """The response from a deallocate request. +class ApplicationProfile(_Model): + """Contains the list of gallery applications that should be made available to the VM. - :ivar description: The description of the operation response. Required. - :vartype description: str - :ivar type: The type of resources used in the deallocate request eg virtual machines. Required. - :vartype type: str - :ivar location: The location of the deallocate request eg westus. Required. - :vartype location: str - :ivar results: The results from the deallocate request if no errors exist. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar gallery_applications: Specifies the gallery applications that should be made available to + the VM. + :vartype gallery_applications: list[~azure.mgmt.computeschedule.models.VMGalleryApplication] """ - description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The description of the operation response. Required.""" - type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The type of resources used in the deallocate request eg virtual machines. Required.""" - location: str = rest_field(visibility=["read", "create"]) - """The location of the deallocate request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + gallery_applications: Optional[list["_models.VMGalleryApplication"]] = rest_field( + name="galleryApplications", visibility=["read", "create", "update", "delete", "query"] ) - """The results from the deallocate request if no errors exist.""" + """Specifies the gallery applications that should be made available to the VM.""" @overload def __init__( self, *, - description: str, - type: str, - location: str, - results: Optional[List["_models.ResourceOperation"]] = None, + gallery_applications: Optional[list["_models.VMGalleryApplication"]] = None, ) -> None: ... @overload @@ -202,29 +217,33 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class DelayRequest(_Model): - """Request to ask for a delay in an occurrence, delay should be set to client local time eg (ACST) - 2025-05-30T22:03:00+09:30, (PST) 2025-05-30T06:35:00-07:00. +class BootDiagnostics(_Model): + """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot + to diagnose VM status. You can easily view the output of your console log. Azure also enables + you to see a screenshot of the VM from the hypervisor. - :ivar delay: The exact time to delay the operations to. Required. - :vartype delay: ~datetime.datetime - :ivar resource_ids: The resources that should be delayed. If empty, the delay will apply to the - all resources in the occurrence. Required. - :vartype resource_ids: list[str] + :ivar enabled: Whether boot diagnostics should be enabled on the Virtual Machine. + :vartype enabled: bool + :ivar storage_uri: Uri of the storage account to use for placing the console output and + screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage + will be used. + :vartype storage_uri: str """ - delay: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") - """The exact time to delay the operations to. Required.""" - resource_ids: List[str] = rest_field(name="resourceIds", visibility=["read", "create", "update", "delete", "query"]) - """The resources that should be delayed. If empty, the delay will apply to the all resources in - the occurrence. Required.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Whether boot diagnostics should be enabled on the Virtual Machine.""" + storage_uri: Optional[str] = rest_field( + name="storageUri", visibility=["read", "create", "update", "delete", "query"] + ) + """Uri of the storage account to use for placing the console output and screenshot. If storageUri + is not specified while enabling boot diagnostics, managed storage will be used.""" @overload def __init__( self, *, - delay: datetime.datetime, - resource_ids: List[str], + enabled: Optional[bool] = None, + storage_uri: Optional[str] = None, ) -> None: ... @overload @@ -238,38 +257,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class DeleteResourceOperationResponse(_Model): - """The response from a delete request. +class BulkActionVMExtension(_Model): + """Defines a virtual machine extension. - :ivar description: The description of the operation response. Required. - :vartype description: str - :ivar type: The type of resources used in the delete request eg virtual machines. Required. - :vartype type: str - :ivar location: The location of the start request eg westus. Required. - :vartype location: str - :ivar results: The results from the start request if no errors exist. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar name: The name of the virtual machine extension. Required. + :vartype name: str + :ivar properties: Properties of the virtual machine extension. Required. + :vartype properties: ~azure.mgmt.computeschedule.models.BulkActionVmExtensionProperties """ - description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The description of the operation response. Required.""" - type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The type of resources used in the delete request eg virtual machines. Required.""" - location: str = rest_field(visibility=["read", "create"]) - """The location of the start request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field( + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the virtual machine extension. Required.""" + properties: "_models.BulkActionVmExtensionProperties" = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The results from the start request if no errors exist.""" + """Properties of the virtual machine extension. Required.""" @overload def __init__( self, *, - description: str, - type: str, - location: str, - results: Optional[List["_models.ResourceOperation"]] = None, + name: str, + properties: "_models.BulkActionVmExtensionProperties", ) -> None: ... @overload @@ -283,65 +292,104 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ErrorAdditionalInfo(_Model): - """The resource management error additional info. +class BulkActionVmExtensionProperties(_Model): + """Describes the properties of a Virtual Machine Extension. - :ivar type: The additional info type. + :ivar force_update_tag: How the extension handler should be forced to update even if the + extension configuration has not changed. + :vartype force_update_tag: str + :ivar publisher: The name of the extension handler publisher. + :vartype publisher: str + :ivar type: Specifies the type of the extension; an example is 'CustomScriptExtension'. :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - type: Optional[str] = rest_field(visibility=["read"]) - """The additional info type.""" - info: Optional[Any] = rest_field(visibility=["read"]) - """The additional info.""" - - -class ErrorDetail(_Model): - """The error detail. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.computeschedule.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.computeschedule.models.ErrorAdditionalInfo] + :ivar type_handler_version: Specifies the version of the script handler. + :vartype type_handler_version: str + :ivar 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. + :vartype auto_upgrade_minor_version: bool + :ivar enable_automatic_upgrade: Indicates whether the extension should be automatically + upgraded by the platform if there is a newer version of the extension available. + :vartype enable_automatic_upgrade: bool + :ivar settings: JSON formatted public settings for the extension. + :vartype settings: dict[str, any] + :ivar protected_settings: The extension can contain either protectedSettings or + protectedSettingsFromKeyVault or no protected settings at all. + :vartype protected_settings: dict[str, any] + :ivar suppress_failures: Indicates whether failures stemming from the extension will be + suppressed (Operational failures such as not connecting to the VM will not be suppressed + regardless of this value). The default is false. + :vartype suppress_failures: bool + :ivar protected_settings_from_key_vault: The extensions protected settings that are passed by + reference, and consumed from key vault. + :vartype protected_settings_from_key_vault: + ~azure.mgmt.computeschedule.models.KeyVaultSecretReference + :ivar provision_after_extensions: Collection of extension names after which this extension + needs to be provisioned. + :vartype provision_after_extensions: list[str] """ - code: Optional[str] = rest_field(visibility=["read"]) - """The error code.""" - message: Optional[str] = rest_field(visibility=["read"]) - """The error message.""" - target: Optional[str] = rest_field(visibility=["read"]) - """The error target.""" - details: Optional[List["_models.ErrorDetail"]] = rest_field(visibility=["read"]) - """The error details.""" - additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = rest_field( - name="additionalInfo", visibility=["read"] + force_update_tag: Optional[str] = rest_field( + name="forceUpdateTag", visibility=["read", "create", "update", "delete", "query"] ) - """The error additional info.""" - - -class ErrorResponse(_Model): - """Error response. - - :ivar error: The error object. - :vartype error: ~azure.mgmt.computeschedule.models.ErrorDetail - """ - - error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The error object.""" + """How the extension handler should be forced to update even if the extension configuration has + not changed.""" + publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the extension handler publisher.""" + type: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the type of the extension; an example is 'CustomScriptExtension'.""" + type_handler_version: Optional[str] = rest_field( + name="typeHandlerVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the version of the script handler.""" + auto_upgrade_minor_version: Optional[bool] = rest_field( + name="autoUpgradeMinorVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """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.""" + enable_automatic_upgrade: Optional[bool] = rest_field( + name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether the extension should be automatically upgraded by the platform if there is a + newer version of the extension available.""" + settings: Optional[dict[str, Any]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """JSON formatted public settings for the extension.""" + protected_settings: Optional[dict[str, Any]] = rest_field( + name="protectedSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no + protected settings at all.""" + suppress_failures: Optional[bool] = rest_field( + name="suppressFailures", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether failures stemming from the extension will be suppressed (Operational failures + such as not connecting to the VM will not be suppressed regardless of this value). The default + is false.""" + protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = rest_field( + name="protectedSettingsFromKeyVault", visibility=["read", "create", "update", "delete", "query"] + ) + """The extensions protected settings that are passed by reference, and consumed from key vault.""" + provision_after_extensions: Optional[list[str]] = rest_field( + name="provisionAfterExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """Collection of extension names after which this extension needs to be provisioned.""" @overload def __init__( self, *, - error: Optional["_models.ErrorDetail"] = None, + force_update_tag: Optional[str] = None, + publisher: Optional[str] = None, + type: Optional[str] = None, + type_handler_version: Optional[str] = None, + auto_upgrade_minor_version: Optional[bool] = None, + enable_automatic_upgrade: Optional[bool] = None, + settings: Optional[dict[str, Any]] = None, + protected_settings: Optional[dict[str, Any]] = None, + suppress_failures: Optional[bool] = None, + protected_settings_from_key_vault: Optional["_models.KeyVaultSecretReference"] = None, + provision_after_extensions: Optional[list[str]] = None, ) -> None: ... @overload @@ -355,36 +403,146 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteCreateRequest(_Model): - """The ExecuteCreateRequest request for create operations. - - :ivar resource_config_parameters: resource creation payload. Required. - :vartype resource_config_parameters: - ~azure.mgmt.computeschedule.models.ResourceProvisionPayload - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar correlationid: CorrelationId item. - :vartype correlationid: str +class BulkActionVMProperties(_Model): + """Describes the properties of a Virtual Machine for create. + + :ivar scheduled_events_policy: Specifies Redeploy, Reboot and + ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations for the + virtual machine. + :vartype scheduled_events_policy: ~azure.mgmt.computeschedule.models.ScheduledEventsPolicy + :ivar storage_profile: Specifies the storage settings for the virtual machine disks. + :vartype storage_profile: ~azure.mgmt.computeschedule.models.StorageProfile + :ivar additional_capabilities: Specifies additional capabilities enabled or disabled on the + virtual machine. + :vartype additional_capabilities: ~azure.mgmt.computeschedule.models.AdditionalCapabilities + :ivar os_profile: Specifies the operating system settings used while creating the virtual + machine. Some of the settings cannot be changed once VM is provisioned. + :vartype os_profile: ~azure.mgmt.computeschedule.models.OSProfile + :ivar network_profile: Specifies the network interfaces of the virtual machine. + :vartype network_profile: ~azure.mgmt.computeschedule.models.NetworkProfile + :ivar hardware_profile: Specifies the hardware profile for the virtual machine. + :vartype hardware_profile: ~azure.mgmt.computeschedule.models.HardwareProfile + :ivar security_profile: Specifies the Security related profile settings for the virtual + machine. + :vartype security_profile: ~azure.mgmt.computeschedule.models.SecurityProfile + :ivar diagnostics_profile: Specifies the boot diagnostic settings state. Minimum compute + api-version: 2015-06-15. + :vartype diagnostics_profile: ~azure.mgmt.computeschedule.models.DiagnosticsProfile + :ivar license_type: Specifies that the image or disk that is being used 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 + `_ +

`Azure Hybrid Use Benefit for Linux Server + `_

+ Minimum api-version: 2015-06-15. + :vartype license_type: str + :ivar extensions_time_budget: Specifies the time alloted for all extensions to start. The time + duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in + ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum compute api-version: + 2020-06-01. + :vartype extensions_time_budget: str + :ivar scheduled_events_profile: Specifies Scheduled Event related configurations. + :vartype scheduled_events_profile: ~azure.mgmt.computeschedule.models.ScheduledEventsProfile + :ivar user_data: UserData for the VM, which must be base-64 encoded. Customer should not pass + any secrets in here. Minimum compute api-version: 2021-03-01. + :vartype user_data: str + :ivar capacity_reservation: Specifies information about the capacity reservation that is used + to allocate virtual machine. Minimum compute api-version: 2021-04-01. + :vartype capacity_reservation: ~azure.mgmt.computeschedule.models.CapacityReservationProfile + :ivar application_profile: Specifies the gallery applications that should be made available to + the VM. + :vartype application_profile: ~azure.mgmt.computeschedule.models.ApplicationProfile """ - resource_config_parameters: "_models.ResourceProvisionPayload" = rest_field( - name="resourceConfigParameters", visibility=["read", "create", "update", "delete", "query"] + scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = rest_field( + name="scheduledEventsPolicy", visibility=["read", "create", "update", "delete", "query"] ) - """resource creation payload. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event + related configurations for the virtual machine.""" + storage_profile: Optional["_models.StorageProfile"] = rest_field( + name="storageProfile", visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - correlationid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item.""" + """Specifies the storage settings for the virtual machine disks.""" + additional_capabilities: Optional["_models.AdditionalCapabilities"] = rest_field( + name="additionalCapabilities", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies additional capabilities enabled or disabled on the virtual machine.""" + os_profile: Optional["_models.OSProfile"] = rest_field( + name="osProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the operating system settings used while creating the virtual machine. Some of the + settings cannot be changed once VM is provisioned.""" + network_profile: Optional["_models.NetworkProfile"] = rest_field( + name="networkProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the network interfaces of the virtual machine.""" + hardware_profile: Optional["_models.HardwareProfile"] = rest_field( + name="hardwareProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the hardware profile for the virtual machine.""" + security_profile: Optional["_models.SecurityProfile"] = rest_field( + name="securityProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Security related profile settings for the virtual machine.""" + diagnostics_profile: Optional["_models.DiagnosticsProfile"] = rest_field( + name="diagnosticsProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15.""" + license_type: Optional[str] = rest_field( + name="licenseType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies that the image or disk that is being used 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 + `_ +

`Azure Hybrid Use Benefit for Linux Server + `_

+ Minimum api-version: 2015-06-15.""" + extensions_time_budget: Optional[str] = rest_field( + name="extensionsTimeBudget", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the time alloted for all extensions to start. The time duration should be between 15 + minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default + value is 90 minutes (PT1H30M). Minimum compute api-version: 2020-06-01.""" + scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = rest_field( + name="scheduledEventsProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Scheduled Event related configurations.""" + user_data: Optional[str] = rest_field(name="userData", visibility=["read", "create", "update", "delete", "query"]) + """UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in + here. Minimum compute api-version: 2021-03-01.""" + capacity_reservation: Optional["_models.CapacityReservationProfile"] = rest_field( + name="capacityReservation", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies information about the capacity reservation that is used to allocate virtual machine. + Minimum compute api-version: 2021-04-01.""" + application_profile: Optional["_models.ApplicationProfile"] = rest_field( + name="applicationProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the gallery applications that should be made available to the VM.""" @overload def __init__( self, *, - resource_config_parameters: "_models.ResourceProvisionPayload", - execution_parameters: "_models.ExecutionParameters", - correlationid: Optional[str] = None, + scheduled_events_policy: Optional["_models.ScheduledEventsPolicy"] = None, + storage_profile: Optional["_models.StorageProfile"] = None, + additional_capabilities: Optional["_models.AdditionalCapabilities"] = None, + os_profile: Optional["_models.OSProfile"] = None, + network_profile: Optional["_models.NetworkProfile"] = None, + hardware_profile: Optional["_models.HardwareProfile"] = None, + security_profile: Optional["_models.SecurityProfile"] = None, + diagnostics_profile: Optional["_models.DiagnosticsProfile"] = None, + license_type: Optional[str] = None, + extensions_time_budget: Optional[str] = None, + scheduled_events_profile: Optional["_models.ScheduledEventsProfile"] = None, + user_data: Optional[str] = None, + capacity_reservation: Optional["_models.CapacityReservationProfile"] = None, + application_profile: Optional["_models.ApplicationProfile"] = None, ) -> None: ... @overload @@ -398,33 +556,85 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteDeallocateRequest(_Model): - """The ExecuteDeallocateRequest request for executeDeallocate operations. +class BulkVMConfiguration(_Model): + """Specifies the configuration for a virtual machine operation. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str + :ivar name: Identifier for created virtual machine. If not passed, it will be created from + resource prefix. + :vartype name: str + :ivar compute_api_version: Specifies the Microsoft.Compute API version to use when creating + underlying Virtual Machines. + :vartype compute_api_version: str + :ivar resource_group_name: Resource group name for the virtual machine. + :vartype resource_group_name: str + :ivar zones: The availability zones. + :vartype zones: list[str] + :ivar plan: The marketplace image plan used for the virtual machine. + :vartype plan: ~azure.mgmt.computeschedule.models.Plan + :ivar identity: The identity of the virtual machine, if configured. + :vartype identity: ~azure.mgmt.computeschedule.models.VirtualMachineIdentity + :ivar extended_location: The extended location of the Virtual Machine. + :vartype extended_location: ~azure.mgmt.computeschedule.models.ExtendedLocation + :ivar placement: Placement constraints for virtual machine hardware placement. + :vartype placement: ~azure.mgmt.computeschedule.models.Placement + :ivar tags: Resource tags to apply to the virtual machines created by this bulk action. + :vartype tags: dict[str, str] + :ivar properties: Specifies the properties of the virtual machine to be created. + :vartype properties: ~azure.mgmt.computeschedule.models.BulkActionVMProperties + :ivar vm_extensions: Virtual Machine Extensions Array to be applied to the Virtual Machines. + :vartype vm_extensions: list[~azure.mgmt.computeschedule.models.BulkActionVMExtension] """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Identifier for created virtual machine. If not passed, it will be created from resource prefix.""" + compute_api_version: Optional[str] = rest_field( + name="computeApiVersion", visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machines.""" + resource_group_name: Optional[str] = rest_field( + name="resourceGroupName", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource group name for the virtual machine.""" + zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The availability zones.""" + plan: Optional["_models.Plan"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The marketplace image plan used for the virtual machine.""" + identity: Optional["_models.VirtualMachineIdentity"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The identity of the virtual machine, if configured.""" + extended_location: Optional["_models.ExtendedLocation"] = rest_field( + name="extendedLocation", visibility=["read", "create", "update", "delete", "query"] + ) + """The extended location of the Virtual Machine.""" + placement: Optional["_models.Placement"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Placement constraints for virtual machine hardware placement.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags to apply to the virtual machines created by this bulk action.""" + properties: Optional["_models.BulkActionVMProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the properties of the virtual machine to be created.""" + vm_extensions: Optional[list["_models.BulkActionVMExtension"]] = rest_field( + name="vmExtensions", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual Machine Extensions Array to be applied to the Virtual Machines.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: str, + name: Optional[str] = None, + compute_api_version: Optional[str] = None, + resource_group_name: Optional[str] = None, + zones: Optional[list[str]] = None, + plan: Optional["_models.Plan"] = None, + identity: Optional["_models.VirtualMachineIdentity"] = None, + extended_location: Optional["_models.ExtendedLocation"] = None, + placement: Optional["_models.Placement"] = None, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.BulkActionVMProperties"] = None, + vm_extensions: Optional[list["_models.BulkActionVMExtension"]] = None, ) -> None: ... @overload @@ -438,40 +648,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteDeleteRequest(_Model): - """The ExecuteDeleteRequest for delete VM operation. +class CancelOccurrenceRequest(_Model): + """The request to cancel an occurrence. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. - :vartype correlationid: str - :ivar force_deletion: Forced delete resource item. - :vartype force_deletion: bool + :ivar resource_ids: The resources the cancellation should act on. If no resource is passed in + the list, Scheduled Action will cancel the occurrence for all resources. Required. + :vartype resource_ids: list[str] """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] - ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item.""" - force_deletion: Optional[bool] = rest_field( - name="forceDeletion", visibility=["read", "create", "update", "delete", "query"] - ) - """Forced delete resource item.""" + resource_ids: list[str] = rest_field(name="resourceIds", visibility=["read", "create", "update", "delete", "query"]) + """The resources the cancellation should act on. If no resource is passed in the list, Scheduled + Action will cancel the occurrence for all resources. Required.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: Optional[str] = None, - force_deletion: Optional[bool] = None, + resource_ids: list[str], ) -> None: ... @overload @@ -485,23 +678,19 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteHibernateRequest(_Model): - """The ExecuteHibernateRequest request for executeHibernate operations. +class CancelOperationsContent(_Model): + """This is the request to cancel running operations in scheduled actions using the operation ids. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar operation_ids: The list of operation ids to cancel operations on. Required. + :vartype operation_ids: list[str] :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + operation_ids: list[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" + """The list of operation ids to cancel operations on. Required.""" correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """CorrelationId item. Required.""" @@ -509,8 +698,7 @@ class ExecuteHibernateRequest(_Model): def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", + operation_ids: list[str], correlationid: str, ) -> None: ... @@ -525,33 +713,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecuteStartRequest(_Model): - """The ExecuteStartRequest request for executeStart operations. +class CancelOperationsResponse(_Model): + """This is the response from a cancel operations request. - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str + :ivar results: An array of resource operations that were successfully cancelled. Required. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] - ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + results: list["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """An array of resource operations that were successfully cancelled. Required.""" @overload def __init__( self, *, - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: str, + results: list["_models.ResourceOperation"], ) -> None: ... @overload @@ -565,33 +741,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ExecutionParameters(_Model): - """Extra details needed to run the user's request. +class CapacityReservationProfile(_Model): + """The parameters of a capacity reservation Profile. - :ivar optimization_preference: Details that could optimize the user's request. Known values - are: "Cost", "Availability", and "CostAvailabilityBalanced". - :vartype optimization_preference: str or - ~azure.mgmt.computeschedule.models.OptimizationPreference - :ivar retry_policy: Retry policy the user can pass. - :vartype retry_policy: ~azure.mgmt.computeschedule.models.RetryPolicy + :ivar capacity_reservation_group: Specifies the capacity reservation group resource id that + should be used for allocating the virtual machine provided enough capacity has been reserved. + Please refer to `https://aka.ms/CapacityReservation `_ for + more details. + :vartype capacity_reservation_group: ~azure.mgmt.computeschedule.models.SubResource """ - optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = rest_field( - name="optimizationPreference", visibility=["read", "create", "update", "delete", "query"] - ) - """Details that could optimize the user's request. Known values are: \"Cost\", \"Availability\", - and \"CostAvailabilityBalanced\".""" - retry_policy: Optional["_models.RetryPolicy"] = rest_field( - name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + capacity_reservation_group: Optional["_models.SubResource"] = rest_field( + name="capacityReservationGroup", visibility=["read", "create", "update", "delete", "query"] ) - """Retry policy the user can pass.""" + """Specifies the capacity reservation group resource id that should be used for allocating the + virtual machine provided enough capacity has been reserved. Please refer to + `https://aka.ms/CapacityReservation `_ for more details.""" @overload def __init__( self, *, - optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = None, - retry_policy: Optional["_models.RetryPolicy"] = None, + capacity_reservation_group: Optional["_models.SubResource"] = None, ) -> None: ... @overload @@ -605,68 +776,84 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resource(_Model): - """Resource. +class CreateFlexResourceOperationResponse(_Model): + """The response from a create flex request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the create flex request eg virtual machines. + Required. :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar location: The location of the create flex request eg westus. Required. + :vartype location: str + :ivar results: The results from the create flex request if no errors exist. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - id: Optional[str] = rest_field(visibility=["read"]) - """Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" - name: Optional[str] = rest_field(visibility=["read"]) - """The name of the resource.""" - type: Optional[str] = rest_field(visibility=["read"]) - """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or - \"Microsoft.Storage/storageAccounts\".""" - system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) - """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description of the operation response. Required.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resources used in the create flex request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the create flex request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The results from the create flex request if no errors exist.""" + @overload + def __init__( + self, + *, + description: str, + type: str, + location: str, + results: Optional[list["_models.ResourceOperation"]] = None, + ) -> None: ... -class ExtensionResource(Resource): - """The base extension resource. + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - """ + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) -class GetOperationErrorsRequest(_Model): - """This is the request to get errors per vm operations. +class CreateResourceOperationResponse(_Model): + """The response from a create request. - :ivar operation_ids: The list of operation ids to query errors of. Required. - :vartype operation_ids: list[str] + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the create request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the start request eg westus. Required. + :vartype location: str + :ivar results: The results from the start request if no errors exist. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - operation_ids: List[str] = rest_field( - name="operationIds", visibility=["read", "create", "update", "delete", "query"] + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description of the operation response. Required.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resources used in the create request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the start request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The list of operation ids to query errors of. Required.""" + """The results from the start request if no errors exist.""" @overload def __init__( self, *, - operation_ids: List[str], + description: str, + type: str, + location: str, + results: Optional[list["_models.ResourceOperation"]] = None, ) -> None: ... @overload @@ -680,23 +867,133 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GetOperationErrorsResponse(_Model): - """This is the response from a get operations errors request. +class DataDisk(_Model): + """Describes a data disk. - :ivar results: An array of operationids and their corresponding errors if any. Required. - :vartype results: list[~azure.mgmt.computeschedule.models.OperationErrorsResult] + :ivar lun: Specifies the logical unit number of the data disk. This value is used to identify + data disks within the VM and therefore must be unique for each data disk attached to a VM. + Required. + :vartype lun: int + :ivar name: The disk name. + :vartype name: str + :ivar vhd: The virtual hard disk. + :vartype vhd: ~azure.mgmt.computeschedule.models.VirtualHardDisk + :ivar image: The source user image virtual hard disk. The virtual hard disk will be copied + before being attached to the virtual machine. If SourceImage is provided, the destination + virtual hard drive must not exist. + :vartype image: ~azure.mgmt.computeschedule.models.VirtualHardDisk + :ivar caching: Specifies the caching requirements. Possible values are: None, ReadOnly, + ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + Known values are: "None", "ReadOnly", and "ReadWrite". + :vartype caching: str or ~azure.mgmt.computeschedule.models.CachingTypes + :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or + disabled on the disk. + :vartype write_accelerator_enabled: bool + :ivar create_option: Specifies how the virtual machine disk should be created. Possible values + are Attach, FromImage, Empty, Copy, Restore. Required. Known values are: "FromImage", "Empty", + "Attach", "Copy", and "Restore". + :vartype create_option: str or ~azure.mgmt.computeschedule.models.DiskCreateOptionTypes + :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be + used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is + the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + :vartype disk_size_gb: int + :ivar managed_disk: The managed disk parameters. + :vartype managed_disk: ~azure.mgmt.computeschedule.models.ManagedDiskParameters + :ivar source_resource: The source resource identifier. It can be a snapshot, or disk restore + point from which to create a disk. + :vartype source_resource: ~azure.mgmt.computeschedule.models.ApiEntityReference + :ivar to_be_detached: Specifies whether the data disk is in process of detachment from the + VirtualMachine/VirtualMachineScaleset. + :vartype to_be_detached: bool + :ivar detach_option: Specifies the detach behavior to be used while detaching a disk or which + is already in the process of detachment from the virtual machine. Supported values: + ForceDetach. This feature is still in preview. To force-detach a data disk update toBeDetached + to 'true' along with setting detachOption: 'ForceDetach'. "ForceDetach" + :vartype detach_option: str or ~azure.mgmt.computeschedule.models.DiskDetachOptionTypes + :ivar delete_option: Specifies whether data disk should be deleted or detached upon VM + deletion. Possible values are: Delete, Detach. The default value is set to Detach. Known values + are: "Delete" and "Detach". + :vartype delete_option: str or ~azure.mgmt.computeschedule.models.DiskDeleteOptionTypes """ - results: List["_models.OperationErrorsResult"] = rest_field( + lun: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the logical unit number of the data disk. This value is used to identify data disks + within the VM and therefore must be unique for each data disk attached to a VM. Required.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The disk name.""" + vhd: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The virtual hard disk.""" + image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source user image virtual hard disk. The virtual hard disk will be copied before being + attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive + must not exist.""" + caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """An array of operationids and their corresponding errors if any. Required.""" + """Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. Known values + are: \"None\", \"ReadOnly\", and \"ReadWrite\".""" + write_accelerator_enabled: Optional[bool] = rest_field( + name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" + create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field( + name="createOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies how the virtual machine disk should be created. Possible values are Attach, + FromImage, Empty, Copy, Restore. Required. Known values are: \"FromImage\", \"Empty\", + \"Attach\", \"Copy\", and \"Restore\".""" + disk_size_gb: Optional[int] = rest_field( + name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite + the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of + bytes x 1024^3 for the disk and the value cannot be larger than 1023.""" + managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field( + name="managedDisk", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed disk parameters.""" + source_resource: Optional["_models.ApiEntityReference"] = rest_field( + name="sourceResource", visibility=["read", "create", "update", "delete", "query"] + ) + """The source resource identifier. It can be a snapshot, or disk restore point from which to + create a disk.""" + to_be_detached: Optional[bool] = rest_field( + name="toBeDetached", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the data disk is in process of detachment from the + VirtualMachine/VirtualMachineScaleset.""" + detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = rest_field( + name="detachOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the detach behavior to be used while detaching a disk or which is already in the + process of detachment from the virtual machine. Supported values: ForceDetach. This feature is + still in preview. To force-detach a data disk update toBeDetached to 'true' along with setting + detachOption: 'ForceDetach'. \"ForceDetach\"""" + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether data disk should be deleted or detached upon VM deletion. Possible values + are: Delete, Detach. The default value is set to Detach. Known values are: \"Delete\" and + \"Detach\".""" @overload def __init__( self, *, - results: List["_models.OperationErrorsResult"], + lun: int, + create_option: Union[str, "_models.DiskCreateOptionTypes"], + name: Optional[str] = None, + vhd: Optional["_models.VirtualHardDisk"] = None, + image: Optional["_models.VirtualHardDisk"] = None, + caching: Optional[Union[str, "_models.CachingTypes"]] = None, + write_accelerator_enabled: Optional[bool] = None, + disk_size_gb: Optional[int] = None, + managed_disk: Optional["_models.ManagedDiskParameters"] = None, + source_resource: Optional["_models.ApiEntityReference"] = None, + to_be_detached: Optional[bool] = None, + detach_option: Optional[Union[str, "_models.DiskDetachOptionTypes"]] = None, + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None, ) -> None: ... @overload @@ -710,28 +1007,38 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GetOperationStatusRequest(_Model): - """This is the request to get operation status using operationids. +class DeallocateResourceOperationResponse(_Model): + """The response from a deallocate request. - :ivar operation_ids: The list of operation ids to get the status of. Required. - :vartype operation_ids: list[str] - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the deallocate request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the deallocate request eg westus. Required. + :vartype location: str + :ivar results: The results from the deallocate request if no errors exist. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ - operation_ids: List[str] = rest_field( - name="operationIds", visibility=["read", "create", "update", "delete", "query"] + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description of the operation response. Required.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resources used in the deallocate request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the deallocate request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The list of operation ids to get the status of. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """The results from the deallocate request if no errors exist.""" @overload def __init__( self, *, - operation_ids: List[str], - correlationid: str, + description: str, + type: str, + location: str, + results: Optional[list["_models.ResourceOperation"]] = None, ) -> None: ... @overload @@ -745,21 +1052,29 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GetOperationStatusResponse(_Model): - """This is the response from a get operations status request. +class DelayRequest(_Model): + """Request to ask for a delay in an occurrence, delay should be set to client local time eg (ACST) + 2025-05-30T22:03:00+09:30, (PST) 2025-05-30T06:35:00-07:00. - :ivar results: An array of resource operations based on their operation ids. Required. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar delay: The exact time to delay the operations to. Required. + :vartype delay: ~datetime.datetime + :ivar resource_ids: The resources that should be delayed. If empty, the delay will apply to the + all resources in the occurrence. Required. + :vartype resource_ids: list[str] """ - results: List["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """An array of resource operations based on their operation ids. Required.""" + delay: datetime.datetime = rest_field(visibility=["read", "create", "update", "delete", "query"], format="rfc3339") + """The exact time to delay the operations to. Required.""" + resource_ids: list[str] = rest_field(name="resourceIds", visibility=["read", "create", "update", "delete", "query"]) + """The resources that should be delayed. If empty, the delay will apply to the all resources in + the occurrence. Required.""" @overload def __init__( self, *, - results: List["_models.ResourceOperation"], + delay: datetime.datetime, + resource_ids: list[str], ) -> None: ... @overload @@ -773,29 +1088,29 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class HibernateResourceOperationResponse(_Model): - """The response from a Hibernate request. +class DeleteResourceOperationResponse(_Model): + """The response from a delete request. :ivar description: The description of the operation response. Required. :vartype description: str - :ivar type: The type of resources used in the Hibernate request eg virtual machines. Required. + :ivar type: The type of resources used in the delete request eg virtual machines. Required. :vartype type: str - :ivar location: The location of the Hibernate request eg westus. Required. + :ivar location: The location of the start request eg westus. Required. :vartype location: str - :ivar results: The results from the Hibernate request if no errors exist. + :ivar results: The results from the start request if no errors exist. :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] """ description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The description of the operation response. Required.""" type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The type of resources used in the Hibernate request eg virtual machines. Required.""" + """The type of resources used in the delete request eg virtual machines. Required.""" location: str = rest_field(visibility=["read", "create"]) - """The location of the Hibernate request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field( + """The location of the start request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The results from the Hibernate request if no errors exist.""" + """The results from the start request if no errors exist.""" @overload def __init__( @@ -804,7 +1119,7 @@ def __init__( description: str, type: str, location: str, - results: Optional[List["_models.ResourceOperation"]] = None, + results: Optional[list["_models.ResourceOperation"]] = None, ) -> None: ... @overload @@ -818,39 +1133,30 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class NotificationProperties(_Model): - """The information about notifications to be send to about upcoming operations. +class DiagnosticsProfile(_Model): + """Specifies the boot diagnostic settings state. Minimum compute api-version: 2015-06-15. - :ivar destination: Where the notification should be sent. For email, it should follow email - format. Required. - :vartype destination: str - :ivar type: Type of notification to be sent. Required. "Email" - :vartype type: str or ~azure.mgmt.computeschedule.models.NotificationType - :ivar language: The language the notification should be sent on. Required. "en-us" - :vartype language: str or ~azure.mgmt.computeschedule.models.Language - :ivar disabled: Tells if the notification is enabled or not. - :vartype disabled: bool + :ivar boot_diagnostics: Boot Diagnostics is a debugging feature which allows you to view + Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified + then ensure that the storage account is in the same region and subscription as the VM. You can + easily view the output of your console log. Azure also enables you to see a screenshot of the + VM from the hypervisor. + :vartype boot_diagnostics: ~azure.mgmt.computeschedule.models.BootDiagnostics """ - destination: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Where the notification should be sent. For email, it should follow email format. Required.""" - type: Union[str, "_models.NotificationType"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + boot_diagnostics: Optional["_models.BootDiagnostics"] = rest_field( + name="bootDiagnostics", visibility=["read", "create", "update", "delete", "query"] ) - """Type of notification to be sent. Required. \"Email\"""" - language: Union[str, "_models.Language"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The language the notification should be sent on. Required. \"en-us\"""" - disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Tells if the notification is enabled or not.""" + """Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot + to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage + account is in the same region and subscription as the VM. You can easily view the output of + your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.""" @overload def __init__( self, *, - destination: str, - type: Union[str, "_models.NotificationType"], - language: Union[str, "_models.Language"], - disabled: Optional[bool] = None, + boot_diagnostics: Optional["_models.BootDiagnostics"] = None, ) -> None: ... @overload @@ -864,52 +1170,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ProxyResource(Resource): - """Proxy Resource. +class DiffDiskSettings(_Model): + """Describes the parameters of ephemeral disk settings that can be specified for operating system + disk. Note: The ephemeral disk settings can only be specified for managed disk. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - """ - - -class Occurrence(ProxyResource): - """Concrete proxy resource types can be created by aliasing this type using a specific property - type. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.computeschedule.models.OccurrenceProperties + :ivar option: Specifies the ephemeral disk settings for operating system disk. "Local" + :vartype option: str or ~azure.mgmt.computeschedule.models.DiffDiskOptions + :ivar placement: Specifies the ephemeral disk placement for operating system disk. Possible + values are: CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is + configured for the VM size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for + NvmeDisk: 2024-03-01. Known values are: "CacheDisk", "ResourceDisk", and "NvmeDisk". + :vartype placement: str or ~azure.mgmt.computeschedule.models.DiffDiskPlacement """ - properties: Optional["_models.OccurrenceProperties"] = rest_field( + option: Optional[Union[str, "_models.DiffDiskOptions"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" + """Specifies the ephemeral disk settings for operating system disk. \"Local\"""" + placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the ephemeral disk placement for operating system disk. Possible values are: + CacheDisk, ResourceDisk, NvmeDisk. The defaulting behavior is: CacheDisk if one is configured + for the VM size otherwise ResourceDisk or NvmeDisk is used. Minimum api-version for NvmeDisk: + 2024-03-01. Known values are: \"CacheDisk\", \"ResourceDisk\", and \"NvmeDisk\".""" @overload def __init__( self, *, - properties: Optional["_models.OccurrenceProperties"] = None, + option: Optional[Union[str, "_models.DiffDiskOptions"]] = None, + placement: Optional[Union[str, "_models.DiffDiskPlacement"]] = None, ) -> None: ... @overload @@ -923,59 +1214,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OccurrenceExtensionProperties(_Model): - """The properties of the occurrence extension. +class SubResource(_Model): + """Describes a reference to a sub-resource. - :ivar resource_id: The ARM Id of the resource. - "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". - Required. - :vartype resource_id: str - :ivar notification_settings: The desired notification settings for the specified resource. - :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] - :ivar scheduled_time: The time the occurrence is scheduled for the resource. Specified in UTC. - Required. - :vartype scheduled_time: ~datetime.datetime - :ivar provisioning_state: The current state of the resource. Known values are: "Succeeded", - "Failed", and "Canceled". - :vartype provisioning_state: str or - ~azure.mgmt.computeschedule.models.ResourceProvisioningState - :ivar error_details: Error details for the resource. Only populated if resource is in failed - state. - :vartype error_details: ~azure.core.ODataV4Format - :ivar scheduled_action_id: The arm identifier of the scheduled action the occurrence belongs - to. Required. - :vartype scheduled_action_id: str + :ivar id: The ID of the sub-resource. + :vartype id: str """ - resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) - """The ARM Id of the resource. - \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". - Required.""" - notification_settings: Optional[List["_models.NotificationProperties"]] = rest_field( - name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] - ) - """The desired notification settings for the specified resource.""" - scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") - """The time the occurrence is scheduled for the resource. Specified in UTC. Required.""" - provisioning_state: Optional[Union[str, "_models.ResourceProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The current state of the resource. Known values are: \"Succeeded\", \"Failed\", and - \"Canceled\".""" - error_details: Optional[ODataV4Format] = rest_field(name="errorDetails", visibility=["read"]) - """Error details for the resource. Only populated if resource is in failed state.""" - scheduled_action_id: str = rest_field( - name="scheduledActionId", visibility=["read", "create", "update", "delete", "query"] - ) - """The arm identifier of the scheduled action the occurrence belongs to. Required.""" + id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The ID of the sub-resource.""" @overload def __init__( self, *, - resource_id: str, - scheduled_action_id: str, - notification_settings: Optional[List["_models.NotificationProperties"]] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin ) -> None: ... @overload @@ -989,34 +1242,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OccurrenceExtensionResource(ExtensionResource): - """The scheduled action extension. +class DiskEncryptionSetParameters(SubResource): + """Describes the parameter of customer managed disk encryption set resource id that can be + specified for disk. **Note:** The disk encryption set resource id can only be specified for + managed disk. Please refer `https://aka.ms/mdssewithcmkoverview + `_ for more details. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :ivar id: The ID of the sub-resource. :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.computeschedule.models.OccurrenceExtensionProperties """ - properties: Optional["_models.OccurrenceExtensionProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - @overload def __init__( self, *, - properties: Optional["_models.OccurrenceExtensionProperties"] = None, + id: Optional[str] = None, # pylint: disable=redefined-builtin ) -> None: ... @overload @@ -1030,88 +1270,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OccurrenceProperties(_Model): - """Properties for an occurrence. - - :ivar scheduled_time: The time the occurrence is scheduled for. This value can be changed by - calling the delay API. Required. - :vartype scheduled_time: ~datetime.datetime - :ivar result_summary: The result for occurrences that achieved a terminal state. Required. - :vartype result_summary: ~azure.mgmt.computeschedule.models.OccurrenceResultSummary - :ivar provisioning_state: The aggregated provisioning state of the occurrence. Known values - are: "Created", "Rescheduling", "Scheduled", "Succeeded", "Failed", "Cancelling", and - "Canceled". - :vartype provisioning_state: str or ~azure.mgmt.computeschedule.models.OccurrenceState - """ - - scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") - """The time the occurrence is scheduled for. This value can be changed by calling the delay API. - Required.""" - result_summary: "_models.OccurrenceResultSummary" = rest_field(name="resultSummary", visibility=["read"]) - """The result for occurrences that achieved a terminal state. Required.""" - provisioning_state: Optional[Union[str, "_models.OccurrenceState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The aggregated provisioning state of the occurrence. Known values are: \"Created\", - \"Rescheduling\", \"Scheduled\", \"Succeeded\", \"Failed\", \"Cancelling\", and \"Canceled\".""" - - -class OccurrenceResource(_Model): - """Represents an scheduled action resource metadata. +class DiskEncryptionSettings(_Model): + """Describes a Encryption Settings for a Disk. - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar id: The compute RP resource id of the resource in the scheduled actions scope. Required. - :vartype id: str - :ivar type: The type of resource. - :vartype type: str - :ivar resource_id: The ARM Id of the resource. - "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". - Required. - :vartype resource_id: str - :ivar notification_settings: The desired notification settings for the specified resource. - :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] - :ivar scheduled_time: The time the occurrence is scheduled for the resource. Required. - :vartype scheduled_time: ~datetime.datetime - :ivar provisioning_state: The current state of the resource. Known values are: "Succeeded", - "Failed", and "Canceled". - :vartype provisioning_state: str or - ~azure.mgmt.computeschedule.models.ResourceProvisioningState - :ivar error_details: Error details for the resource. Only populated if resource is in failed - state. - :vartype error_details: ~azure.core.ODataV4Format + :ivar disk_encryption_key: Specifies the location of the disk encryption key, which is a Key + Vault Secret. + :vartype disk_encryption_key: ~azure.mgmt.computeschedule.models.KeyVaultSecretReference + :ivar key_encryption_key: Specifies the location of the key encryption key in Key Vault. + :vartype key_encryption_key: ~azure.mgmt.computeschedule.models.KeyVaultKeyReference + :ivar enabled: Specifies whether disk encryption should be enabled on the virtual machine. + :vartype enabled: bool """ - name: str = rest_field(visibility=["read"]) - """The name of the resource. Required.""" - id: str = rest_field(visibility=["read"]) - """The compute RP resource id of the resource in the scheduled actions scope. Required.""" - type: Optional[str] = rest_field(visibility=["read"]) - """The type of resource.""" - resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) - """The ARM Id of the resource. - \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". - Required.""" - notification_settings: Optional[List["_models.NotificationProperties"]] = rest_field( - name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = rest_field( + name="diskEncryptionKey", visibility=["read", "create", "update", "delete", "query"] ) - """The desired notification settings for the specified resource.""" - scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") - """The time the occurrence is scheduled for the resource. Required.""" - provisioning_state: Optional[Union[str, "_models.ResourceProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] + """Specifies the location of the disk encryption key, which is a Key Vault Secret.""" + key_encryption_key: Optional["_models.KeyVaultKeyReference"] = rest_field( + name="keyEncryptionKey", visibility=["read", "create", "update", "delete", "query"] ) - """The current state of the resource. Known values are: \"Succeeded\", \"Failed\", and - \"Canceled\".""" - error_details: Optional[ODataV4Format] = rest_field(name="errorDetails", visibility=["read"]) - """Error details for the resource. Only populated if resource is in failed state.""" + """Specifies the location of the key encryption key in Key Vault.""" + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether disk encryption should be enabled on the virtual machine.""" @overload def __init__( self, *, - resource_id: str, - notification_settings: Optional[List["_models.NotificationProperties"]] = None, + disk_encryption_key: Optional["_models.KeyVaultSecretReference"] = None, + key_encryption_key: Optional["_models.KeyVaultKeyReference"] = None, + enabled: Optional[bool] = None, ) -> None: ... @overload @@ -1125,29 +1313,24 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OccurrenceResultSummary(_Model): - """The summarized provisioning result of an occurrence. +class EncryptionIdentity(_Model): + """Specifies the Managed Identity used by ADE to get access token for keyvault operations. - :ivar total: The total number of resources that the occurrence was supposed to act on. - Required. - :vartype total: int - :ivar statuses: The summarized status of the resources. Required. - :vartype statuses: list[~azure.mgmt.computeschedule.models.ResourceResultSummary] + :ivar user_assigned_identity_resource_id: Specifies ARM Resource ID of one of the user + identities associated with the VM. + :vartype user_assigned_identity_resource_id: str """ - total: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The total number of resources that the occurrence was supposed to act on. Required.""" - statuses: List["_models.ResourceResultSummary"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + user_assigned_identity_resource_id: Optional[str] = rest_field( + name="userAssignedIdentityResourceId", visibility=["read", "create", "update", "delete", "query"] ) - """The summarized status of the resources. Required.""" + """Specifies ARM Resource ID of one of the user identities associated with the VM.""" @overload def __init__( self, *, - total: int, - statuses: List["_models.ResourceResultSummary"], + user_assigned_identity_resource_id: Optional[str] = None, ) -> None: ... @overload @@ -1161,50 +1344,65 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Operation(_Model): - """REST API Operation. +class ErrorAdditionalInfo(_Model): + """The resource management error additional info. - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for Azure Resource Manager/control-plane operations. - :vartype is_data_action: bool - :ivar display: Localized display information for this particular operation. - :vartype display: ~azure.mgmt.computeschedule.models.OperationDisplay - :ivar origin: The intended executor of the operation; as in Resource Based Access Control - (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", - and "user,system". - :vartype origin: str or ~azure.mgmt.computeschedule.models.Origin - :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions - that are for internal only APIs. "Internal" - :vartype action_type: str or ~azure.mgmt.computeschedule.models.ActionType + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ - name: Optional[str] = rest_field(visibility=["read"]) - """The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - \"Microsoft.Compute/virtualMachines/write\", - \"Microsoft.Compute/virtualMachines/capture/action\".""" - is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) - """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and - \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + type: Optional[str] = rest_field(visibility=["read"]) + """The additional info type.""" + info: Optional[Any] = rest_field(visibility=["read"]) + """The additional info.""" + + +class ErrorDetail(_Model): + """The error detail. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.computeschedule.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.computeschedule.models.ErrorAdditionalInfo] + """ + + code: Optional[str] = rest_field(visibility=["read"]) + """The error code.""" + message: Optional[str] = rest_field(visibility=["read"]) + """The error message.""" + target: Optional[str] = rest_field(visibility=["read"]) + """The error target.""" + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + """The error details.""" + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( + name="additionalInfo", visibility=["read"] ) - """Localized display information for this particular operation.""" - origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) - """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit - logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and - \"user,system\".""" - action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) - """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for - internal only APIs. \"Internal\"""" + """The error additional info.""" + + +class ErrorResponse(_Model): + """Error response. + + :ivar error: The error object. + :vartype error: ~azure.mgmt.computeschedule.models.ErrorDetail + """ + + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error object.""" @overload def __init__( self, *, - display: Optional["_models.OperationDisplay"] = None, + error: Optional["_models.ErrorDetail"] = None, ) -> None: ... @overload @@ -1218,85 +1416,4363 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationDisplay(_Model): - """Localized display information for and operation. +class EventGridAndResourceGraph(_Model): + """Specifies eventGridAndResourceGraph related Scheduled Event related configurations. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft - Monitoring Insights" or "Microsoft Compute". - :vartype provider: str - :ivar resource: The localized friendly name of the resource type related to this operation. - E.g. "Virtual Machines" or "Job Schedule Collections". - :vartype resource: str - :ivar operation: The concise, localized friendly name for the operation; suitable for - dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - :vartype operation: str - :ivar description: The short, localized friendly description of the operation; suitable for - tool tips and detailed views. - :vartype description: str + :ivar enable: Specifies if event grid and resource graph is enabled for Scheduled event related + configurations. + :vartype enable: bool + :ivar scheduled_events_api_version: Specifies the api-version to determine which Scheduled + Events configuration schema version will be delivered. + :vartype scheduled_events_api_version: str """ - provider: Optional[str] = rest_field(visibility=["read"]) - """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring - Insights\" or \"Microsoft Compute\".""" - resource: Optional[str] = rest_field(visibility=["read"]) - """The localized friendly name of the resource type related to this operation. E.g. \"Virtual - Machines\" or \"Job Schedule Collections\".""" - operation: Optional[str] = rest_field(visibility=["read"]) - """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create - or Update Virtual Machine\", \"Restart Virtual Machine\".""" - description: Optional[str] = rest_field(visibility=["read"]) - """The short, localized friendly description of the operation; suitable for tool tips and detailed - views.""" + enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies if event grid and resource graph is enabled for Scheduled event related + configurations.""" + scheduled_events_api_version: Optional[str] = rest_field( + name="scheduledEventsApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the api-version to determine which Scheduled Events configuration schema version will + be delivered.""" + @overload + def __init__( + self, + *, + enable: Optional[bool] = None, + scheduled_events_api_version: Optional[str] = None, + ) -> None: ... -class OperationErrorDetails(_Model): - """This defines a list of operation errors associated with a unique operationId. + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ - :ivar error_code: The error code of the operation. Required. - :vartype error_code: str - :ivar error_details: The error details of the operation. Required. - :vartype error_details: str - :ivar timestamp: The timestamp of the error occurence. - :vartype timestamp: ~datetime.datetime - :ivar time_stamp: The timestamp of the error occurence. - :vartype time_stamp: ~datetime.datetime - :ivar azure_operation_name: The compute operationid of the Start/Deallocate/Hibernate request. - :vartype azure_operation_name: str - :ivar crp_operation_id: The compute operationid of the Start/Deallocate/Hibernate request. - :vartype crp_operation_id: str + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteCreateContent(_Model): + """The ExecuteCreateRequest request for create operations. + + :ivar resource_config_parameters: resource creation payload. Required. + :vartype resource_config_parameters: + ~azure.mgmt.computeschedule.models.ResourceProvisionPayload + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar correlationid: CorrelationId item. + :vartype correlationid: str """ - error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) - """The error code of the operation. Required.""" - error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) - """The error details of the operation. Required.""" - timestamp: Optional[datetime.datetime] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + resource_config_parameters: "_models.ResourceProvisionPayload" = rest_field( + name="resourceConfigParameters", visibility=["read", "create", "update", "delete", "query"] ) - """The timestamp of the error occurence.""" - time_stamp: Optional[datetime.datetime] = rest_field( - name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + """resource creation payload. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] ) - """The timestamp of the error occurence.""" - azure_operation_name: Optional[str] = rest_field( - name="azureOperationName", visibility=["read", "create", "update", "delete", "query"] + """The execution parameters for the request. Required.""" + correlationid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item.""" + + @overload + def __init__( + self, + *, + resource_config_parameters: "_models.ResourceProvisionPayload", + execution_parameters: "_models.ExecutionParameters", + correlationid: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteCreateFlexContent(_Model): + """The ExecuteCreateFlexRequest request for executeCreateFlex operations. + + :ivar resource_config_parameters: Resource creation payload with flex properties. Required. + :vartype resource_config_parameters: + ~azure.mgmt.computeschedule.models.ResourceProvisionFlexPayload + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar correlationid: Correlationid item. + :vartype correlationid: str + """ + + resource_config_parameters: "_models.ResourceProvisionFlexPayload" = rest_field( + name="resourceConfigParameters", visibility=["read", "create", "update", "delete", "query"] ) - """The compute operationid of the Start/Deallocate/Hibernate request.""" - crp_operation_id: Optional[str] = rest_field( - name="crpOperationId", visibility=["read", "create", "update", "delete", "query"] + """Resource creation payload with flex properties. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] ) - """The compute operationid of the Start/Deallocate/Hibernate request.""" + """The execution parameters for the request. Required.""" + correlationid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Correlationid item.""" @overload def __init__( self, *, - error_code: str, - error_details: str, - timestamp: Optional[datetime.datetime] = None, - time_stamp: Optional[datetime.datetime] = None, - azure_operation_name: Optional[str] = None, - crp_operation_id: Optional[str] = None, + resource_config_parameters: "_models.ResourceProvisionFlexPayload", + execution_parameters: "_models.ExecutionParameters", + correlationid: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteDeallocateContent(_Model): + """The ExecuteDeallocateRequest request for executeDeallocate operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteDeleteContent(_Model): + """The ExecuteDeleteRequest for delete VM operation. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. + :vartype correlationid: str + :ivar force_deletion: Forced delete resource item. + :vartype force_deletion: bool + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item.""" + force_deletion: Optional[bool] = rest_field( + name="forceDeletion", visibility=["read", "create", "update", "delete", "query"] + ) + """Forced delete resource item.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: Optional[str] = None, + force_deletion: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteHibernateContent(_Model): + """The ExecuteHibernateRequest request for executeHibernate operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecuteStartContent(_Model): + """The ExecuteStartRequest request for executeStart operations. + + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExecutionParameters(_Model): + """Extra details needed to run the user's request. + + :ivar optimization_preference: Details that could optimize the user's request. Known values + are: "Cost", "Availability", and "CostAvailabilityBalanced". + :vartype optimization_preference: str or + ~azure.mgmt.computeschedule.models.OptimizationPreference + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: ~azure.mgmt.computeschedule.models.RetryPolicy + """ + + optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = rest_field( + name="optimizationPreference", visibility=["read", "create", "update", "delete", "query"] + ) + """Details that could optimize the user's request. Known values are: \"Cost\", \"Availability\", + and \"CostAvailabilityBalanced\".""" + retry_policy: Optional["_models.RetryPolicy"] = rest_field( + name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry policy the user can pass.""" + + @overload + def __init__( + self, + *, + optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = None, + retry_policy: Optional["_models.RetryPolicy"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ExtendedLocation(_Model): + """The complex type of the extended location. + + :ivar name: The name of the extended location. Required. + :vartype name: str + :ivar type: The type of the extended location. Required. Known values are: "EdgeZone" and + "CustomLocation". + :vartype type: str or ~azure.mgmt.computeschedule.models.ExtendedLocationType + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the extended location. Required.""" + type: Union[str, "_models.ExtendedLocationType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The type of the extended location. Required. Known values are: \"EdgeZone\" and + \"CustomLocation\".""" + + @overload + def __init__( + self, + *, + name: str, + type: Union[str, "_models.ExtendedLocationType"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Resource(_Model): + """Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + """ + + id: Optional[str] = rest_field(visibility=["read"]) + """Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the resource.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or + \"Microsoft.Storage/storageAccounts\".""" + system_data: Optional["_models.SystemData"] = rest_field(name="systemData", visibility=["read"]) + """Azure Resource Manager metadata containing createdBy and modifiedBy information.""" + + +class ExtensionResource(Resource): + """The base extension resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + """ + + +class FallbackOperationInfo(_Model): + """Describes the fallback operation that was performed. + + :ivar last_op_type: The last operation type that was performed as a fallback. Required. Known + values are: "Unknown", "Start", "Deallocate", "Hibernate", "Create", and "Delete". + :vartype last_op_type: str or ~azure.mgmt.computeschedule.models.ResourceOperationType + :ivar status: The status of the fallback operation. Required. + :vartype status: str + :ivar error: The error code if the fallback operation failed. + :vartype error: ~azure.mgmt.computeschedule.models.ResourceOperationError + """ + + last_op_type: Union[str, "_models.ResourceOperationType"] = rest_field( + name="lastOpType", visibility=["read", "create", "update", "delete", "query"] + ) + """The last operation type that was performed as a fallback. Required. Known values are: + \"Unknown\", \"Start\", \"Deallocate\", \"Hibernate\", \"Create\", and \"Delete\".""" + status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The status of the fallback operation. Required.""" + error: Optional["_models.ResourceOperationError"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The error code if the fallback operation failed.""" + + @overload + def __init__( + self, + *, + last_op_type: Union[str, "_models.ResourceOperationType"], + status: str, + error: Optional["_models.ResourceOperationError"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class FlexProperties(_Model): + """The flex properties for flexible VM creation. + + :ivar vm_size_profiles: The list of VM size profiles to use for flex creation. Required. + :vartype vm_size_profiles: list[~azure.mgmt.computeschedule.models.VmSizeProfile] + :ivar os_type: The operating system type for the VMs. Required. Known values are: "Windows" and + "Linux". + :vartype os_type: str or ~azure.mgmt.computeschedule.models.OsType + :ivar priority_profile: The priority profile for VM allocation. Required. + :vartype priority_profile: ~azure.mgmt.computeschedule.models.PriorityProfile + :ivar zone_allocation_policy: The zone allocation policy for distributing VMs across + availability zones. + :vartype zone_allocation_policy: ~azure.mgmt.computeschedule.models.ZoneAllocationPolicy + """ + + vm_size_profiles: list["_models.VmSizeProfile"] = rest_field( + name="vmSizeProfiles", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of VM size profiles to use for flex creation. Required.""" + os_type: Union[str, "_models.OsType"] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) + """The operating system type for the VMs. Required. Known values are: \"Windows\" and \"Linux\".""" + priority_profile: "_models.PriorityProfile" = rest_field( + name="priorityProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """The priority profile for VM allocation. Required.""" + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = rest_field( + name="zoneAllocationPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The zone allocation policy for distributing VMs across availability zones.""" + + @overload + def __init__( + self, + *, + vm_size_profiles: list["_models.VmSizeProfile"], + os_type: Union[str, "_models.OsType"], + priority_profile: "_models.PriorityProfile", + zone_allocation_policy: Optional["_models.ZoneAllocationPolicy"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetOperationErrorsContent(_Model): + """This is the request to get errors per vm operations. + + :ivar operation_ids: The list of operation ids to query errors of. Required. + :vartype operation_ids: list[str] + """ + + operation_ids: list[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of operation ids to query errors of. Required.""" + + @overload + def __init__( + self, + *, + operation_ids: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetOperationErrorsResponse(_Model): + """This is the response from a get operations errors request. + + :ivar results: An array of operationids and their corresponding errors if any. Required. + :vartype results: list[~azure.mgmt.computeschedule.models.OperationErrorsResult] + """ + + results: list["_models.OperationErrorsResult"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """An array of operationids and their corresponding errors if any. Required.""" + + @overload + def __init__( + self, + *, + results: list["_models.OperationErrorsResult"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetOperationStatusContent(_Model): + """This is the request to get operation status using operationids. + + :ivar operation_ids: The list of operation ids to get the status of. Required. + :vartype operation_ids: list[str] + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + operation_ids: list[str] = rest_field( + name="operationIds", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of operation ids to get the status of. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + operation_ids: list[str], + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class GetOperationStatusResponse(_Model): + """This is the response from a get operations status request. + + :ivar results: An array of resource operations based on their operation ids. Required. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + """ + + results: list["_models.ResourceOperation"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """An array of resource operations based on their operation ids. Required.""" + + @overload + def __init__( + self, + *, + results: list["_models.ResourceOperation"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HardwareProfile(_Model): + """Specifies the hardware profile for the virtual machine. + + :ivar vm_size: Specifies the size of the virtual machine. The enum data type is currently + deprecated and will be removed by December 23rd 2023. The recommended way to get the list of + available sizes is using these APIs: `List all available virtual machine sizes in an + availability set + `_, `List all + available virtual machine sizes in a region + `_, `List all available virtual + machine sizes for resizing + `_. For more + information about virtual machine sizes, see `Sizes for virtual machines + `_. The available VM sizes depend on + region and availability set. + :vartype vm_size: str + :ivar vm_size_properties: Specifies the properties for customizing the size of the virtual + machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not + supported for VirtualMachineScaleSet. Please follow the instructions in `VM Customization + `_ for more details. + :vartype vm_size_properties: ~azure.mgmt.computeschedule.models.VmSizeProperties + """ + + vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"]) + """Specifies the size of the virtual machine. The enum data type is currently deprecated and will + be removed by December 23rd 2023. The recommended way to get the list of available sizes is + using these APIs: `List all available virtual machine sizes in an availability set + `_, `List all + available virtual machine sizes in a region + `_, `List all available virtual + machine sizes for resizing + `_. For more + information about virtual machine sizes, see `Sizes for virtual machines + `_. The available VM sizes depend on + region and availability set.""" + vm_size_properties: Optional["_models.VmSizeProperties"] = rest_field( + name="vmSizeProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the properties for customizing the size of the virtual machine. Minimum api-version: + 2021-07-01. This feature is still in preview mode and is not supported for + VirtualMachineScaleSet. Please follow the instructions in `VM Customization + `_ for more details.""" + + @overload + def __init__( + self, + *, + vm_size: Optional[str] = None, + vm_size_properties: Optional["_models.VmSizeProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HibernateResourceOperationResponse(_Model): + """The response from a Hibernate request. + + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the Hibernate request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the Hibernate request eg westus. Required. + :vartype location: str + :ivar results: The results from the Hibernate request if no errors exist. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + """ + + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description of the operation response. Required.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resources used in the Hibernate request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the Hibernate request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The results from the Hibernate request if no errors exist.""" + + @overload + def __init__( + self, + *, + description: str, + type: str, + location: str, + results: Optional[list["_models.ResourceOperation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class HostEndpointSettings(_Model): + """Specifies particular host endpoint settings. + + :ivar mode: Specifies the execution mode. In Audit mode, the system acts as if it is enforcing + the access control policy, including emitting access denial entries in the logs but it does not + actually deny any requests to host endpoints. In Enforce mode, the system will enforce the + access control and it is the recommended mode of operation. Known values are: "Audit", + "Enforce", and "Disabled". + :vartype mode: str or ~azure.mgmt.computeschedule.models.Modes + :ivar in_vm_access_control_profile_reference_id: Specifies the InVMAccessControlProfileVersion + resource id in the format of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + :vartype in_vm_access_control_profile_reference_id: str + """ + + mode: Optional[Union[str, "_models.Modes"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the execution mode. In Audit mode, the system acts as if it is enforcing the access + control policy, including emitting access denial entries in the logs but it does not actually + deny any requests to host endpoints. In Enforce mode, the system will enforce the access + control and it is the recommended mode of operation. Known values are: \"Audit\", \"Enforce\", + and \"Disabled\".""" + in_vm_access_control_profile_reference_id: Optional[str] = rest_field( + name="inVMAccessControlProfileReferenceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the InVMAccessControlProfileVersion resource id in the format of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}.""" + + @overload + def __init__( + self, + *, + mode: Optional[Union[str, "_models.Modes"]] = None, + in_vm_access_control_profile_reference_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ImageReference(SubResource): + """Specifies information about the image to use. You can specify information about platform + images, marketplace images, or virtual machine images. This element is required when you want + to use a platform image, marketplace image, or virtual machine image, but is not used in other + creation operations. NOTE: Image reference publisher and offer can only be set when you create + the scale set. + + :ivar id: The ID of the sub-resource. + :vartype id: str + :ivar publisher: The image publisher. + :vartype publisher: str + :ivar offer: Specifies the offer of the platform image or marketplace image used to create the + virtual machine. + :vartype offer: str + :ivar sku: The image SKU. + :vartype sku: str + :ivar version: Specifies the version of the platform image or marketplace image used to create + the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and + Build are decimal numbers. Specify 'latest' to use the latest version of an image available at + deploy time. Even if you use 'latest', the VM image will not automatically update after deploy + time even if a new version becomes available. Please do not use field 'version' for gallery + image deployment, gallery image should always use 'id' field for deployment, to use 'latest' + version of gallery image, just set + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' + in the 'id' field without version input. + :vartype version: str + :ivar shared_gallery_image_id: Specified the shared gallery image unique id for vm deployment. + This can be fetched from shared gallery image GET call. + :vartype shared_gallery_image_id: str + :ivar community_gallery_image_id: Specified the community gallery image unique id for vm + deployment. This can be fetched from community gallery image GET call. + :vartype community_gallery_image_id: str + """ + + publisher: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The image publisher.""" + offer: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the offer of the platform image or marketplace image used to create the virtual + machine.""" + sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The image SKU.""" + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the version of the platform image or marketplace image used to create the virtual + machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are + decimal numbers. Specify 'latest' to use the latest version of an image available at deploy + time. Even if you use 'latest', the VM image will not automatically update after deploy time + even if a new version becomes available. Please do not use field 'version' for gallery image + deployment, gallery image should always use 'id' field for deployment, to use 'latest' version + of gallery image, just set + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' + in the 'id' field without version input.""" + shared_gallery_image_id: Optional[str] = rest_field( + name="sharedGalleryImageId", visibility=["read", "create", "update", "delete", "query"] + ) + """Specified the shared gallery image unique id for vm deployment. This can be fetched from shared + gallery image GET call.""" + community_gallery_image_id: Optional[str] = rest_field( + name="communityGalleryImageId", visibility=["read", "create", "update", "delete", "query"] + ) + """Specified the community gallery image unique id for vm deployment. This can be fetched from + community gallery image GET call.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + publisher: Optional[str] = None, + offer: Optional[str] = None, + sku: Optional[str] = None, + version: Optional[str] = None, + shared_gallery_image_id: Optional[str] = None, + community_gallery_image_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KeyVaultKeyReference(_Model): + """Describes a reference to Key Vault Key. + + :ivar key_url: The URL referencing a key encryption key in Key Vault. Required. + :vartype key_url: str + :ivar source_vault: The relative URL of the Key Vault containing the key. Required. + :vartype source_vault: ~azure.mgmt.computeschedule.models.SubResource + """ + + key_url: str = rest_field(name="keyUrl", visibility=["read", "create", "update", "delete", "query"]) + """The URL referencing a key encryption key in Key Vault. Required.""" + source_vault: "_models.SubResource" = rest_field( + name="sourceVault", visibility=["read", "create", "update", "delete", "query"] + ) + """The relative URL of the Key Vault containing the key. Required.""" + + @overload + def __init__( + self, + *, + key_url: str, + source_vault: "_models.SubResource", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class KeyVaultSecretReference(_Model): + """Describes a reference to Key Vault Secret. + + :ivar secret_url: The URL referencing a secret in a Key Vault. Required. + :vartype secret_url: str + :ivar source_vault: The relative URL of the Key Vault containing the secret. Required. + :vartype source_vault: ~azure.mgmt.computeschedule.models.SubResource + """ + + secret_url: str = rest_field(name="secretUrl", visibility=["read", "create", "update", "delete", "query"]) + """The URL referencing a secret in a Key Vault. Required.""" + source_vault: "_models.SubResource" = rest_field( + name="sourceVault", visibility=["read", "create", "update", "delete", "query"] + ) + """The relative URL of the Key Vault containing the secret. Required.""" + + @overload + def __init__( + self, + *, + secret_url: str, + source_vault: "_models.SubResource", + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LinuxConfiguration(_Model): + """Specifies the Linux operating system settings on the virtual machine. For a list of supported + Linux distributions, see `Linux on Azure-Endorsed Distributions + `_. + + :ivar disable_password_authentication: Specifies whether password authentication should be + disabled. + :vartype disable_password_authentication: bool + :ivar ssh: Specifies the ssh key configuration for a Linux OS. + :vartype ssh: ~azure.mgmt.computeschedule.models.SshConfiguration + :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the + virtual machine. When this property is not specified in the request body, default behavior is + to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can + be added to the VM later. + :vartype provision_vm_agent: bool + :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on + Linux. + :vartype patch_settings: ~azure.mgmt.computeschedule.models.LinuxPatchSettings + :ivar enable_vm_agent_platform_updates: Indicates whether VMAgent Platform Updates is enabled + for the Linux virtual machine. Default value is false. + :vartype enable_vm_agent_platform_updates: bool + """ + + disable_password_authentication: Optional[bool] = rest_field( + name="disablePasswordAuthentication", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether password authentication should be disabled.""" + ssh: Optional["_models.SshConfiguration"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the ssh key configuration for a Linux OS.""" + provision_vm_agent: Optional[bool] = rest_field( + name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this + property is not specified in the request body, default behavior is to set it to true. This will + ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.""" + patch_settings: Optional["_models.LinuxPatchSettings"] = rest_field( + name="patchSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """[Preview Feature] Specifies settings related to VM Guest Patching on Linux.""" + enable_vm_agent_platform_updates: Optional[bool] = rest_field( + name="enableVMAgentPlatformUpdates", visibility=["read", "create", "update", "delete", "query"] + ) + """Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default + value is false.""" + + @overload + def __init__( + self, + *, + disable_password_authentication: Optional[bool] = None, + ssh: Optional["_models.SshConfiguration"] = None, + provision_vm_agent: Optional[bool] = None, + patch_settings: Optional["_models.LinuxPatchSettings"] = None, + enable_vm_agent_platform_updates: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LinuxPatchSettings(_Model): + """Specifies settings related to VM Guest Patching on Linux. + + :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual + machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**ImageDefault** - The virtual machine's default patching + configuration is used.

**AutomaticByPlatform** - The virtual machine will be + automatically updated by the platform. The property provisionVMAgent must be true. Known values + are: "ImageDefault" and "AutomaticByPlatform". + :vartype patch_mode: str or ~azure.mgmt.computeschedule.models.LinuxVMGuestPatchMode + :ivar assessment_mode: Specifies the mode of VM Guest Patch Assessment for the IaaS virtual + machine.

Possible values are:

**ImageDefault** - You control the timing + of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform + will trigger periodic patch assessments. The property provisionVMAgent must be true. Known + values are: "ImageDefault" and "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.computeschedule.models.LinuxPatchAssessmentMode + :ivar automatic_by_platform_settings: Specifies additional settings for patch mode + AutomaticByPlatform in VM Guest Patching on Linux. + :vartype automatic_by_platform_settings: + ~azure.mgmt.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformSettings + """ + + patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = rest_field( + name="patchMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated + to virtual machine scale set with OrchestrationMode as Flexible.

Possible values + are:

**ImageDefault** - The virtual machine's default patching configuration is + used.

**AutomaticByPlatform** - The virtual machine will be automatically updated + by the platform. The property provisionVMAgent must be true. Known values are: \"ImageDefault\" + and \"AutomaticByPlatform\".""" + assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = rest_field( + name="assessmentMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

+ Possible values are:

**ImageDefault** - You control the timing of patch assessments + on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic + patch assessments. The property provisionVMAgent must be true. Known values are: + \"ImageDefault\" and \"AutomaticByPlatform\".""" + automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = rest_field( + name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.""" + + @overload + def __init__( + self, + *, + patch_mode: Optional[Union[str, "_models.LinuxVMGuestPatchMode"]] = None, + assessment_mode: Optional[Union[str, "_models.LinuxPatchAssessmentMode"]] = None, + automatic_by_platform_settings: Optional["_models.LinuxVMGuestPatchAutomaticByPlatformSettings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class LinuxVMGuestPatchAutomaticByPlatformSettings(_Model): # pylint: disable=name-too-long + """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in + Linux patch settings. + + :ivar reboot_setting: Specifies the reboot setting for all AutomaticByPlatform patch + installation operations. Known values are: "Unknown", "IfRequired", "Never", and "Always". + :vartype reboot_setting: str or + ~azure.mgmt.computeschedule.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting + :ivar bypass_platform_safety_checks_on_user_schedule: Enables customer to schedule patching + without accidental upgrades. + :vartype bypass_platform_safety_checks_on_user_schedule: bool + """ + + reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field( + name="rebootSetting", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known + values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field( + name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"] + ) + """Enables customer to schedule patching without accidental upgrades.""" + + @overload + def __init__( + self, + *, + reboot_setting: Optional[Union[str, "_models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting"]] = None, + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ManagedDiskParameters(SubResource): + """The parameters of a managed disk. + + :ivar id: The ID of the sub-resource. + :vartype id: str + :ivar storage_account_type: Specifies the storage account type for the managed disk. NOTE: + UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Known values + are: "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", + "StandardSSD_ZRS", and "PremiumV2_LRS". + :vartype storage_account_type: str or ~azure.mgmt.computeschedule.models.StorageAccountTypes + :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for + the managed disk. + :vartype disk_encryption_set: ~azure.mgmt.computeschedule.models.DiskEncryptionSetParameters + :ivar security_profile: Specifies the security profile for the managed disk. + :vartype security_profile: ~azure.mgmt.computeschedule.models.VMDiskSecurityProfile + """ + + storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = rest_field( + name="storageAccountType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used + with data disks, it cannot be used with OS Disk. Known values are: \"Standard_LRS\", + \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\", \"Premium_ZRS\", \"StandardSSD_ZRS\", + and \"PremiumV2_LRS\".""" + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field( + name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the customer managed disk encryption set resource id for the managed disk.""" + security_profile: Optional["_models.VMDiskSecurityProfile"] = rest_field( + name="securityProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the security profile for the managed disk.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + storage_account_type: Optional[Union[str, "_models.StorageAccountTypes"]] = None, + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None, + security_profile: Optional["_models.VMDiskSecurityProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkInterfaceReference(SubResource): + """Describes a network interface reference. + + :ivar id: The ID of the sub-resource. + :vartype id: str + :ivar properties: Describes a network interface reference properties. + :vartype properties: ~azure.mgmt.computeschedule.models.NetworkInterfaceReferenceProperties + """ + + properties: Optional["_models.NetworkInterfaceReferenceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes a network interface reference properties.""" + + @overload + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + properties: Optional["_models.NetworkInterfaceReferenceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkInterfaceReferenceProperties(_Model): + """Describes a network interface reference properties. + + :ivar primary: Specifies the primary network interface in case the virtual machine has more + than 1 network interface. + :vartype primary: bool + :ivar delete_option: Specify what happens to the network interface when the VM is deleted. + Known values are: "Delete" and "Detach". + :vartype delete_option: str or ~azure.mgmt.computeschedule.models.DeleteOptions + """ + + primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify what happens to the network interface when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + + @overload + def __init__( + self, + *, + primary: Optional[bool] = None, + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NetworkProfile(_Model): + """Specifies the network interfaces or the networking configuration of the virtual machine. + + :ivar network_interfaces: Specifies the list of resource Ids for the network interfaces + associated with the virtual machine. + :vartype network_interfaces: list[~azure.mgmt.computeschedule.models.NetworkInterfaceReference] + :ivar network_api_version: specifies the Microsoft.Network API version used when creating + networking resources in the Network Interface Configurations. Known values are: "2020-11-01" + and "2022-11-01". + :vartype network_api_version: str or ~azure.mgmt.computeschedule.models.NetworkApiVersion + :ivar network_interface_configurations: Specifies the networking configurations that will be + used to create the virtual machine networking resources. + :vartype network_interface_configurations: + list[~azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceConfiguration] + """ + + network_interfaces: Optional[list["_models.NetworkInterfaceReference"]] = rest_field( + name="networkInterfaces", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the list of resource Ids for the network interfaces associated with the virtual + machine.""" + network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = rest_field( + name="networkApiVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """specifies the Microsoft.Network API version used when creating networking resources in the + Network Interface Configurations. Known values are: \"2020-11-01\" and \"2022-11-01\".""" + network_interface_configurations: Optional[list["_models.VirtualMachineNetworkInterfaceConfiguration"]] = ( + rest_field(name="networkInterfaceConfigurations", visibility=["read", "create", "update", "delete", "query"]) + ) + """Specifies the networking configurations that will be used to create the virtual machine + networking resources.""" + + @overload + def __init__( + self, + *, + network_interfaces: Optional[list["_models.NetworkInterfaceReference"]] = None, + network_api_version: Optional[Union[str, "_models.NetworkApiVersion"]] = None, + network_interface_configurations: Optional[list["_models.VirtualMachineNetworkInterfaceConfiguration"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class NotificationProperties(_Model): + """The information about notifications to be send to about upcoming operations. + + :ivar destination: Where the notification should be sent. For email, it should follow email + format. Required. + :vartype destination: str + :ivar type: Type of notification to be sent. Required. "Email" + :vartype type: str or ~azure.mgmt.computeschedule.models.NotificationType + :ivar language: The language the notification should be sent on. Required. "en-us" + :vartype language: str or ~azure.mgmt.computeschedule.models.Language + :ivar disabled: Tells if the notification is enabled or not. + :vartype disabled: bool + """ + + destination: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Where the notification should be sent. For email, it should follow email format. Required.""" + type: Union[str, "_models.NotificationType"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Type of notification to be sent. Required. \"Email\"""" + language: Union[str, "_models.Language"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The language the notification should be sent on. Required. \"en-us\"""" + disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tells if the notification is enabled or not.""" + + @overload + def __init__( + self, + *, + destination: str, + type: Union[str, "_models.NotificationType"], + language: Union[str, "_models.Language"], + disabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProxyResource(Resource): + """Proxy Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + """ + + +class Occurrence(ProxyResource): + """Concrete proxy resource types can be created by aliasing this type using a specific property + type. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.computeschedule.models.OccurrenceProperties + """ + + properties: Optional["_models.OccurrenceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.OccurrenceProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OccurrenceExtensionProperties(_Model): + """The properties of the occurrence extension. + + :ivar resource_id: The ARM Id of the resource. + "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". + Required. + :vartype resource_id: str + :ivar notification_settings: The desired notification settings for the specified resource. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + :ivar scheduled_time: The time the occurrence is scheduled for the resource. Specified in UTC. + Required. + :vartype scheduled_time: ~datetime.datetime + :ivar provisioning_state: The current state of the resource. Known values are: "Succeeded", + "Failed", and "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.computeschedule.models.ResourceProvisioningState + :ivar error_details: Error details for the resource. Only populated if resource is in failed + state. + :vartype error_details: ~azure.core.ODataV4Format + :ivar scheduled_action_id: The arm identifier of the scheduled action the occurrence belongs + to. Required. + :vartype scheduled_action_id: str + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The ARM Id of the resource. + \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". + Required.""" + notification_settings: Optional[list["_models.NotificationProperties"]] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The desired notification settings for the specified resource.""" + scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") + """The time the occurrence is scheduled for the resource. Specified in UTC. Required.""" + provisioning_state: Optional[Union[str, "_models.ResourceProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The current state of the resource. Known values are: \"Succeeded\", \"Failed\", and + \"Canceled\".""" + error_details: Optional[ODataV4Format] = rest_field(name="errorDetails", visibility=["read"]) + """Error details for the resource. Only populated if resource is in failed state.""" + scheduled_action_id: str = rest_field( + name="scheduledActionId", visibility=["read", "create", "update", "delete", "query"] + ) + """The arm identifier of the scheduled action the occurrence belongs to. Required.""" + + @overload + def __init__( + self, + *, + resource_id: str, + scheduled_action_id: str, + notification_settings: Optional[list["_models.NotificationProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OccurrenceExtensionResource(ExtensionResource): + """The scheduled action extension. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.computeschedule.models.OccurrenceExtensionProperties + """ + + properties: Optional["_models.OccurrenceExtensionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.OccurrenceExtensionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OccurrenceProperties(_Model): + """Properties for an occurrence. + + :ivar scheduled_time: The time the occurrence is scheduled for. This value can be changed by + calling the delay API. Required. + :vartype scheduled_time: ~datetime.datetime + :ivar result_summary: The result for occurrences that achieved a terminal state. Required. + :vartype result_summary: ~azure.mgmt.computeschedule.models.OccurrenceResultSummary + :ivar provisioning_state: The aggregated provisioning state of the occurrence. Known values + are: "Created", "Rescheduling", "Scheduled", "Succeeded", "Failed", "Cancelling", and + "Canceled". + :vartype provisioning_state: str or ~azure.mgmt.computeschedule.models.OccurrenceState + """ + + scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") + """The time the occurrence is scheduled for. This value can be changed by calling the delay API. + Required.""" + result_summary: "_models.OccurrenceResultSummary" = rest_field(name="resultSummary", visibility=["read"]) + """The result for occurrences that achieved a terminal state. Required.""" + provisioning_state: Optional[Union[str, "_models.OccurrenceState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The aggregated provisioning state of the occurrence. Known values are: \"Created\", + \"Rescheduling\", \"Scheduled\", \"Succeeded\", \"Failed\", \"Cancelling\", and \"Canceled\".""" + + +class OccurrenceResource(_Model): + """Represents an scheduled action resource metadata. + + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar id: The compute RP resource id of the resource in the scheduled actions scope. Required. + :vartype id: str + :ivar type: The type of resource. + :vartype type: str + :ivar resource_id: The ARM Id of the resource. + "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". + Required. + :vartype resource_id: str + :ivar notification_settings: The desired notification settings for the specified resource. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + :ivar scheduled_time: The time the occurrence is scheduled for the resource. Required. + :vartype scheduled_time: ~datetime.datetime + :ivar provisioning_state: The current state of the resource. Known values are: "Succeeded", + "Failed", and "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.computeschedule.models.ResourceProvisioningState + :ivar error_details: Error details for the resource. Only populated if resource is in failed + state. + :vartype error_details: ~azure.core.ODataV4Format + """ + + name: str = rest_field(visibility=["read"]) + """The name of the resource. Required.""" + id: str = rest_field(visibility=["read"]) + """The compute RP resource id of the resource in the scheduled actions scope. Required.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of resource.""" + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The ARM Id of the resource. + \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". + Required.""" + notification_settings: Optional[list["_models.NotificationProperties"]] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The desired notification settings for the specified resource.""" + scheduled_time: datetime.datetime = rest_field(name="scheduledTime", visibility=["read"], format="rfc3339") + """The time the occurrence is scheduled for the resource. Required.""" + provisioning_state: Optional[Union[str, "_models.ResourceProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The current state of the resource. Known values are: \"Succeeded\", \"Failed\", and + \"Canceled\".""" + error_details: Optional[ODataV4Format] = rest_field(name="errorDetails", visibility=["read"]) + """Error details for the resource. Only populated if resource is in failed state.""" + + @overload + def __init__( + self, + *, + resource_id: str, + notification_settings: Optional[list["_models.NotificationProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OccurrenceResultSummary(_Model): + """The summarized provisioning result of an occurrence. + + :ivar total: The total number of resources that the occurrence was supposed to act on. + Required. + :vartype total: int + :ivar statuses: The summarized status of the resources. Required. + :vartype statuses: list[~azure.mgmt.computeschedule.models.ResourceResultSummary] + """ + + total: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The total number of resources that the occurrence was supposed to act on. Required.""" + statuses: list["_models.ResourceResultSummary"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The summarized status of the resources. Required.""" + + @overload + def __init__( + self, + *, + total: int, + statuses: list["_models.ResourceResultSummary"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Operation(_Model): + """REST API Operation. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for Azure Resource Manager/control-plane operations. + :vartype is_data_action: bool + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.computeschedule.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", + and "user,system". + :vartype origin: str or ~azure.mgmt.computeschedule.models.Origin + :ivar action_type: Extensible enum. Indicates the action type. "Internal" refers to actions + that are for internal only APIs. "Internal" + :vartype action_type: str or ~azure.mgmt.computeschedule.models.ActionType + """ + + name: Optional[str] = rest_field(visibility=["read"]) + """The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + \"Microsoft.Compute/virtualMachines/write\", + \"Microsoft.Compute/virtualMachines/capture/action\".""" + is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) + """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and + \"false\" for Azure Resource Manager/control-plane operations.""" + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Localized display information for this particular operation.""" + origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and + \"user,system\".""" + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) + """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for + internal only APIs. \"Internal\"""" + + @overload + def __init__( + self, + *, + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationDisplay(_Model): + """Localized display information for an operation. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + provider: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring + Insights\" or \"Microsoft Compute\".""" + resource: Optional[str] = rest_field(visibility=["read"]) + """The localized friendly name of the resource type related to this operation. E.g. \"Virtual + Machines\" or \"Job Schedule Collections\".""" + operation: Optional[str] = rest_field(visibility=["read"]) + """The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create + or Update Virtual Machine\", \"Restart Virtual Machine\".""" + description: Optional[str] = rest_field(visibility=["read"]) + """The short, localized friendly description of the operation; suitable for tool tips and detailed + views.""" + + +class OperationErrorDetails(_Model): + """This defines a list of operation errors associated with a unique operationId. + + :ivar error_code: The error code of the operation. Required. + :vartype error_code: str + :ivar error_details: The error details of the operation. Required. + :vartype error_details: str + :ivar timestamp: The timestamp of the error occurence. + :vartype timestamp: ~datetime.datetime + :ivar time_stamp: The timestamp of the error occurence. + :vartype time_stamp: ~datetime.datetime + :ivar azure_operation_name: The compute operationid of the Start/Deallocate/Hibernate request. + :vartype azure_operation_name: str + :ivar crp_operation_id: The compute operationid of the Start/Deallocate/Hibernate request. + :vartype crp_operation_id: str + """ + + error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) + """The error code of the operation. Required.""" + error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) + """The error details of the operation. Required.""" + timestamp: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of the error occurence.""" + time_stamp: Optional[datetime.datetime] = rest_field( + name="timeStamp", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of the error occurence.""" + azure_operation_name: Optional[str] = rest_field( + name="azureOperationName", visibility=["read", "create", "update", "delete", "query"] + ) + """The compute operationid of the Start/Deallocate/Hibernate request.""" + crp_operation_id: Optional[str] = rest_field( + name="crpOperationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The compute operationid of the Start/Deallocate/Hibernate request.""" + + @overload + def __init__( + self, + *, + error_code: str, + error_details: str, + timestamp: Optional[datetime.datetime] = None, + time_stamp: Optional[datetime.datetime] = None, + azure_operation_name: Optional[str] = None, + crp_operation_id: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OperationErrorsResult(_Model): + """This is the first level of operation errors from the request when clients get errors per vm + operation. + + :ivar operation_id: The operationId identifying a vm operation. + :vartype operation_id: str + :ivar creation_time: The creation time of the error result. + :vartype creation_time: ~datetime.datetime + :ivar activation_time: The activation time of a vm operation. + :vartype activation_time: ~datetime.datetime + :ivar completed_at: The completion time of the operation if the operation was completed. + :vartype completed_at: ~datetime.datetime + :ivar operation_errors: A list of errors associated with the operationid. + :vartype operation_errors: list[~azure.mgmt.computeschedule.models.OperationErrorDetails] + :ivar request_error_code: Request level error code. + :vartype request_error_code: str + :ivar request_error_details: Request level error details. + :vartype request_error_details: str + """ + + operation_id: Optional[str] = rest_field( + name="operationId", visibility=["read", "create", "update", "delete", "query"] + ) + """The operationId identifying a vm operation.""" + creation_time: Optional[datetime.datetime] = rest_field( + name="creationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The creation time of the error result.""" + activation_time: Optional[datetime.datetime] = rest_field( + name="activationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The activation time of a vm operation.""" + completed_at: Optional[datetime.datetime] = rest_field( + name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The completion time of the operation if the operation was completed.""" + operation_errors: Optional[list["_models.OperationErrorDetails"]] = rest_field( + name="operationErrors", visibility=["read", "create", "update", "delete", "query"] + ) + """A list of errors associated with the operationid.""" + request_error_code: Optional[str] = rest_field( + name="requestErrorCode", visibility=["read", "create", "update", "delete", "query"] + ) + """Request level error code.""" + request_error_details: Optional[str] = rest_field( + name="requestErrorDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Request level error details.""" + + @overload + def __init__( + self, + *, + operation_id: Optional[str] = None, + creation_time: Optional[datetime.datetime] = None, + activation_time: Optional[datetime.datetime] = None, + completed_at: Optional[datetime.datetime] = None, + operation_errors: Optional[list["_models.OperationErrorDetails"]] = None, + request_error_code: Optional[str] = None, + request_error_details: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OSDisk(_Model): + """Specifies information about the operating system disk used by the virtual machine. For more + information about disks, see `About disks and VHDs for Azure virtual machines + `_. + + :ivar os_type: This property allows you to specify the type of the OS that is included in the + disk if creating a VM from user-image or a specialized VHD. Possible values are: Windows, + Linux. Known values are: "Windows" and "Linux". + :vartype os_type: str or ~azure.mgmt.computeschedule.models.OperatingSystemTypes + :ivar encryption_settings: Specifies the encryption settings for the OS Disk. Minimum compute + api-version: 2015-06-15. + :vartype encryption_settings: ~azure.mgmt.computeschedule.models.DiskEncryptionSettings + :ivar name: The disk name. + :vartype name: str + :ivar vhd: The virtual hard disk. + :vartype vhd: ~azure.mgmt.computeschedule.models.VirtualHardDisk + :ivar image: The source user image virtual hard disk. The virtual hard disk will be copied + before being attached to the virtual machine. If SourceImage is provided, the destination + virtual hard drive must not exist. + :vartype image: ~azure.mgmt.computeschedule.models.VirtualHardDisk + :ivar caching: Specifies the caching requirements. Possible values are: None, ReadOnly, + ReadWrite. The defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. + Known values are: "None", "ReadOnly", and "ReadWrite". + :vartype caching: str or ~azure.mgmt.computeschedule.models.CachingTypes + :ivar write_accelerator_enabled: Specifies whether writeAccelerator should be enabled or + disabled on the disk. + :vartype write_accelerator_enabled: bool + :ivar diff_disk_settings: Specifies the ephemeral Disk Settings for the operating system disk + used by the virtual machine. + :vartype diff_disk_settings: ~azure.mgmt.computeschedule.models.DiffDiskSettings + :ivar create_option: Specifies how the virtual machine disk should be created. Possible values + are Attach, FromImage. If you are using a platform image, you should also use the + imageReference element described above. If you are using a marketplace image, you should also + use the plan element previously described. Required. Known values are: "FromImage", "Empty", + "Attach", "Copy", and "Restore". + :vartype create_option: str or ~azure.mgmt.computeschedule.models.DiskCreateOptionTypes + :ivar disk_size_gb: Specifies the size of an empty data disk in gigabytes. This element can be + used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is + the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + :vartype disk_size_gb: int + :ivar managed_disk: The managed disk parameters. + :vartype managed_disk: ~azure.mgmt.computeschedule.models.ManagedDiskParameters + :ivar delete_option: Specifies whether OS Disk should be deleted or detached upon VM deletion. + Possible values are: Delete, Detach. The default value is set to Detach. For an ephemeral OS + Disk, the default value is set to Delete. The user cannot change the delete option for an + ephemeral OS Disk. Known values are: "Delete" and "Detach". + :vartype delete_option: str or ~azure.mgmt.computeschedule.models.DiskDeleteOptionTypes + """ + + os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = rest_field( + name="osType", visibility=["read", "create", "update", "delete", "query"] + ) + """This property allows you to specify the type of the OS that is included in the disk if creating + a VM from user-image or a specialized VHD. Possible values are: Windows, Linux. Known values + are: \"Windows\" and \"Linux\".""" + encryption_settings: Optional["_models.DiskEncryptionSettings"] = rest_field( + name="encryptionSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the encryption settings for the OS Disk. Minimum compute api-version: 2015-06-15.""" + name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The disk name.""" + vhd: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The virtual hard disk.""" + image: Optional["_models.VirtualHardDisk"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The source user image virtual hard disk. The virtual hard disk will be copied before being + attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive + must not exist.""" + caching: Optional[Union[str, "_models.CachingTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The + defaulting behavior is: None for Standard storage. ReadOnly for Premium storage. Known values + are: \"None\", \"ReadOnly\", and \"ReadWrite\".""" + write_accelerator_enabled: Optional[bool] = rest_field( + name="writeAcceleratorEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether writeAccelerator should be enabled or disabled on the disk.""" + diff_disk_settings: Optional["_models.DiffDiskSettings"] = rest_field( + name="diffDiskSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the ephemeral Disk Settings for the operating system disk used by the virtual + machine.""" + create_option: Union[str, "_models.DiskCreateOptionTypes"] = rest_field( + name="createOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies how the virtual machine disk should be created. Possible values are Attach, + FromImage. If you are using a platform image, you should also use the imageReference element + described above. If you are using a marketplace image, you should also use the plan element + previously described. Required. Known values are: \"FromImage\", \"Empty\", \"Attach\", + \"Copy\", and \"Restore\".""" + disk_size_gb: Optional[int] = rest_field( + name="diskSizeGB", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite + the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of + bytes x 1024^3 for the disk and the value cannot be larger than 1023.""" + managed_disk: Optional["_models.ManagedDiskParameters"] = rest_field( + name="managedDisk", visibility=["read", "create", "update", "delete", "query"] + ) + """The managed disk parameters.""" + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: + Delete, Detach. The default value is set to Detach. For an ephemeral OS Disk, the default value + is set to Delete. The user cannot change the delete option for an ephemeral OS Disk. Known + values are: \"Delete\" and \"Detach\".""" + + @overload + def __init__( + self, + *, + create_option: Union[str, "_models.DiskCreateOptionTypes"], + os_type: Optional[Union[str, "_models.OperatingSystemTypes"]] = None, + encryption_settings: Optional["_models.DiskEncryptionSettings"] = None, + name: Optional[str] = None, + vhd: Optional["_models.VirtualHardDisk"] = None, + image: Optional["_models.VirtualHardDisk"] = None, + caching: Optional[Union[str, "_models.CachingTypes"]] = None, + write_accelerator_enabled: Optional[bool] = None, + diff_disk_settings: Optional["_models.DiffDiskSettings"] = None, + disk_size_gb: Optional[int] = None, + managed_disk: Optional["_models.ManagedDiskParameters"] = None, + delete_option: Optional[Union[str, "_models.DiskDeleteOptionTypes"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OSImageNotificationProfile(_Model): + """Profile for the OS Image Scheduled event. + + :ivar not_before_timeout: Length of time a Virtual Machine being reimaged or having its OS + upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto + approved (timed out). The configuration is specified in ISO 8601 format, and the value must be + 15 minutes (PT15M). + :vartype not_before_timeout: str + :ivar enable: Specifies whether the OS Image Scheduled event is enabled or disabled. + :vartype enable: bool + """ + + not_before_timeout: Optional[str] = rest_field( + name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"] + ) + """Length of time a Virtual Machine being reimaged or having its OS upgraded will have to + potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). + The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M).""" + enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether the OS Image Scheduled event is enabled or disabled.""" + + @overload + def __init__( + self, + *, + not_before_timeout: Optional[str] = None, + enable: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class OSProfile(_Model): + """Specifies the operating system settings for the virtual machine. Some of the settings cannot be + changed once VM is provisioned. + + :ivar computer_name: Specifies the host OS name of the virtual machine. This name cannot be + updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length + (Linux):** 64 characters. For naming conventions and restrictions see `Azure infrastructure + services implementation guidelines + `_. + :vartype computer_name: str + :ivar admin_username: Specifies the name of the administrator account.

This property + cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in + "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", + "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", + "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", + "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length + (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length + (Windows):** 20 characters. + :vartype admin_username: str + :ivar admin_password: Specifies the password of the administrator account.

+ **Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters +

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 + characters

**Complexity requirements:** 3 out of 4 conditions below need to be + fulfilled
Has lower characters
Has upper characters
Has a digit
Has a + special character (Regex match [\\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", + "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", + "iloveyou!"

For resetting the password, see `How to reset the Remote Desktop service + or its login password in a Windows VM + `_

For + resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs + using the VMAccess Extension + `_. + :vartype admin_password: str + :ivar custom_data: Specifies a base-64 encoded string of custom data. The base-64 encoded + string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum + length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in + customData property.** This property cannot be updated after the VM is created. The property + 'customData' is passed to the VM to be saved as a file, for more information see `Custom Data + on Azure VMs `_. + For using cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during + creation `_. + :vartype custom_data: str + :ivar windows_configuration: Specifies Windows operating system settings on the virtual + machine. + :vartype windows_configuration: ~azure.mgmt.computeschedule.models.WindowsConfiguration + :ivar linux_configuration: Specifies the Linux operating system settings on the virtual + machine. For a list of supported Linux distributions, see `Linux on Azure-Endorsed + Distributions `_. + :vartype linux_configuration: ~azure.mgmt.computeschedule.models.LinuxConfiguration + :ivar secrets: Specifies set of certificates that should be installed onto the virtual machine. + To install certificates on a virtual machine it is recommended to use the `Azure Key Vault + virtual machine extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_. + :vartype secrets: list[~azure.mgmt.computeschedule.models.VaultSecretGroup] + :ivar allow_extension_operations: Specifies whether extension operations should be allowed on + the virtual machine. This may only be set to False when no extensions are present on the + virtual machine. + :vartype allow_extension_operations: bool + :ivar require_guest_provision_signal: Optional property which must either be set to True or + omitted. + :vartype require_guest_provision_signal: bool + """ + + computer_name: Optional[str] = rest_field( + name="computerName", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is + created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For + naming conventions and restrictions see `Azure infrastructure services implementation + guidelines + `_.""" + admin_username: Optional[str] = rest_field( + name="adminUsername", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the name of the administrator account.

This property cannot be updated after + the VM is created.

**Windows-only restriction:** Cannot end in \".\"

+ **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", + \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", + \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", + \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", + \"user4\", \"user5\".

**Minimum-length (Linux):** 1 character

**Max-length + (Linux):** 64 characters

**Max-length (Windows):** 20 characters.""" + admin_password: Optional[str] = rest_field( + name="adminPassword", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 + characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** + 123 characters

**Max-length (Linux):** 72 characters

**Complexity + requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters +
Has upper characters
Has a digit
Has a special character (Regex match [\W_]) +

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", + \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" +

For resetting the password, see `How to reset the Remote Desktop service or its login + password in a Windows VM + `_

For + resetting root password, see `Manage users, SSH, and check or repair disks on Azure Linux VMs + using the VMAccess Extension + `_.""" + custom_data: Optional[str] = rest_field( + name="customData", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a + binary array that is saved as a file on the Virtual Machine. The maximum length of the binary + array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** + This property cannot be updated after the VM is created. The property 'customData' is passed to + the VM to be saved as a file, for more information see `Custom Data on Azure VMs + `_. For using + cloud-init for your Linux VM, see `Using cloud-init to customize a Linux VM during creation + `_.""" + windows_configuration: Optional["_models.WindowsConfiguration"] = rest_field( + name="windowsConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Windows operating system settings on the virtual machine.""" + linux_configuration: Optional["_models.LinuxConfiguration"] = rest_field( + name="linuxConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Linux operating system settings on the virtual machine. For a list of supported + Linux distributions, see `Linux on Azure-Endorsed Distributions + `_.""" + secrets: Optional[list["_models.VaultSecretGroup"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies set of certificates that should be installed onto the virtual machine. To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine + extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_.""" + allow_extension_operations: Optional[bool] = rest_field( + name="allowExtensionOperations", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether extension operations should be allowed on the virtual machine. This may only + be set to False when no extensions are present on the virtual machine.""" + require_guest_provision_signal: Optional[bool] = rest_field( + name="requireGuestProvisionSignal", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional property which must either be set to True or omitted.""" + + @overload + def __init__( + self, + *, + computer_name: Optional[str] = None, + admin_username: Optional[str] = None, + admin_password: Optional[str] = None, + custom_data: Optional[str] = None, + windows_configuration: Optional["_models.WindowsConfiguration"] = None, + linux_configuration: Optional["_models.LinuxConfiguration"] = None, + secrets: Optional[list["_models.VaultSecretGroup"]] = None, + allow_extension_operations: Optional[bool] = None, + require_guest_provision_signal: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PatchSettings(_Model): + """Specifies settings related to VM Guest Patching on Windows. + + :ivar patch_mode: Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual + machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a + virtual machine. You do this by applying patches manually inside the VM. In this mode, + automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must + be false

**AutomaticByOS** - The virtual machine will automatically be updated by + the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

+ **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The + properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known + values are: "Manual", "AutomaticByOS", and "AutomaticByPlatform". + :vartype patch_mode: str or ~azure.mgmt.computeschedule.models.WindowsVMGuestPatchMode + :ivar enable_hotpatching: Enables customers to patch their Azure VMs without requiring a + reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must + be set to 'AutomaticByPlatform'. + :vartype enable_hotpatching: bool + :ivar assessment_mode: Specifies the mode of VM Guest patch assessment for the IaaS virtual + machine.

Possible values are:

**ImageDefault** - You control the timing + of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform + will trigger periodic patch assessments. The property provisionVMAgent must be true. Known + values are: "ImageDefault" and "AutomaticByPlatform". + :vartype assessment_mode: str or ~azure.mgmt.computeschedule.models.WindowsPatchAssessmentMode + :ivar automatic_by_platform_settings: Specifies additional settings for patch mode + AutomaticByPlatform in VM Guest Patching on Windows. + :vartype automatic_by_platform_settings: + ~azure.mgmt.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformSettings + """ + + patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = rest_field( + name="patchMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated + to virtual machine scale set with OrchestrationMode as Flexible.

Possible values + are:

**Manual** - You control the application of patches to a virtual machine. You + do this by applying patches manually inside the VM. In this mode, automatic updates are + disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

+ **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property + WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** + - the virtual machine will automatically updated by the platform. The properties + provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Known values + are: \"Manual\", \"AutomaticByOS\", and \"AutomaticByPlatform\".""" + enable_hotpatching: Optional[bool] = rest_field( + name="enableHotpatching", visibility=["read", "create", "update", "delete", "query"] + ) + """Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, + the 'provisionVMAgent' must be set to true and 'patchMode' must be set to + 'AutomaticByPlatform'.""" + assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = rest_field( + name="assessmentMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

+ Possible values are:

**ImageDefault** - You control the timing of patch assessments + on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic + patch assessments. The property provisionVMAgent must be true. Known values are: + \"ImageDefault\" and \"AutomaticByPlatform\".""" + automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = rest_field( + name="automaticByPlatformSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on + Windows.""" + + @overload + def __init__( + self, + *, + patch_mode: Optional[Union[str, "_models.WindowsVMGuestPatchMode"]] = None, + enable_hotpatching: Optional[bool] = None, + assessment_mode: Optional[Union[str, "_models.WindowsPatchAssessmentMode"]] = None, + automatic_by_platform_settings: Optional["_models.WindowsVMGuestPatchAutomaticByPlatformSettings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Placement(_Model): + """Describes the user-defined constraints for resource hardware placement. + + :ivar zone_placement_policy: Specifies the policy for resource's placement in availability + zone. Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual + Machine Scale Sets) - An availability zone will be automatically picked by system as part of + resource creation. Known values are: "Any" and "Auto". + :vartype zone_placement_policy: str or + ~azure.mgmt.computeschedule.models.ZonePlacementPolicyType + :ivar include_zones: This property supplements the 'zonePlacementPolicy' property. If + 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be + present in the list of availability zones passed with 'includeZones'. If 'includeZones' is not + provided, all availability zones in region will be considered for selection. + :vartype include_zones: list[str] + :ivar exclude_zones: This property supplements the 'zonePlacementPolicy' property. If + 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not + be present in the list of availability zones passed with 'excludeZones'. If 'excludeZones' is + not provided, all availability zones in region will be considered for selection. + :vartype exclude_zones: list[str] + """ + + zone_placement_policy: Optional[Union[str, "_models.ZonePlacementPolicyType"]] = rest_field( + name="zonePlacementPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the policy for resource's placement in availability zone. Possible values are: + **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An + availability zone will be automatically picked by system as part of resource creation. Known + values are: \"Any\" and \"Auto\".""" + include_zones: Optional[list[str]] = rest_field( + name="includeZones", visibility=["read", "create", "update", "delete", "query"] + ) + """This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set + to 'Any'/'Auto', availability zone selected by the system must be present in the list of + availability zones passed with 'includeZones'. If 'includeZones' is not provided, all + availability zones in region will be considered for selection.""" + exclude_zones: Optional[list[str]] = rest_field( + name="excludeZones", visibility=["read", "create", "update", "delete", "query"] + ) + """This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set + to 'Any'/'Auto', availability zone selected by the system must not be present in the list of + availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all + availability zones in region will be considered for selection.""" + + @overload + def __init__( + self, + *, + zone_placement_policy: Optional[Union[str, "_models.ZonePlacementPolicyType"]] = None, + include_zones: Optional[list[str]] = None, + exclude_zones: Optional[list[str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Plan(_Model): + """Plan for the resource. + + :ivar name: A user defined name of the 3rd Party Artifact that is being procured. Required. + :vartype name: str + :ivar publisher: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + Required. + :vartype publisher: str + :ivar product: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to + the OfferID specified for the artifact at the time of Data Market onboarding. Required. + :vartype product: str + :ivar promotion_code: A publisher provided promotion code as provisioned in Data Market for the + said product/artifact. + :vartype promotion_code: str + :ivar version: The version of the desired product/artifact. + :vartype version: str + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """A user defined name of the 3rd Party Artifact that is being procured. Required.""" + publisher: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. Required.""" + product: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID + specified for the artifact at the time of Data Market onboarding. Required.""" + promotion_code: Optional[str] = rest_field( + name="promotionCode", visibility=["read", "create", "update", "delete", "query"] + ) + """A publisher provided promotion code as provisioned in Data Market for the said + product/artifact.""" + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The version of the desired product/artifact.""" + + @overload + def __init__( + self, + *, + name: str, + publisher: str, + product: str, + promotion_code: Optional[str] = None, + version: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PriorityProfile(_Model): + """The priority profile for flex VM creation. + + :ivar type: The priority type for VM allocation. Known values are: "Regular" and "Spot". + :vartype type: str or ~azure.mgmt.computeschedule.models.PriorityType + :ivar allocation_strategy: The allocation strategy for VM size selection. Known values are: + "LowestPrice", "Prioritized", and "CapacityOptimized". + :vartype allocation_strategy: str or ~azure.mgmt.computeschedule.models.AllocationStrategy + """ + + type: Optional[Union[str, "_models.PriorityType"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The priority type for VM allocation. Known values are: \"Regular\" and \"Spot\".""" + allocation_strategy: Optional[Union[str, "_models.AllocationStrategy"]] = rest_field( + name="allocationStrategy", visibility=["read", "create", "update", "delete", "query"] + ) + """The allocation strategy for VM size selection. Known values are: \"LowestPrice\", + \"Prioritized\", and \"CapacityOptimized\".""" + + @overload + def __init__( + self, + *, + type: Optional[Union[str, "_models.PriorityType"]] = None, + allocation_strategy: Optional[Union[str, "_models.AllocationStrategy"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ProxyAgentSettings(_Model): + """Specifies ProxyAgent settings for the virtual machine or virtual machine scale set. Minimum + api-version: 2023-09-01. + + :ivar enabled: Specifies whether ProxyAgent feature should be enabled on the virtual machine or + virtual machine scale set. + :vartype enabled: bool + :ivar mode: Specifies the mode that ProxyAgent will execute on. Warning: this property has been + deprecated, please specify 'mode' under particular hostendpoint setting. Known values are: + "Audit" and "Enforce". + :vartype mode: str or ~azure.mgmt.computeschedule.models.Mode + :ivar key_incarnation_id: Increase the value of this property allows users to reset the key + used for securing communication channel between guest and host. + :vartype key_incarnation_id: int + :ivar wire_server: Specifies the Wire Server endpoint settings while creating the virtual + machine or virtual machine scale set. Minimum api-version: 2024-03-01. + :vartype wire_server: ~azure.mgmt.computeschedule.models.HostEndpointSettings + :ivar imds: Specifies the IMDS endpoint settings while creating the virtual machine or virtual + machine scale set. Minimum api-version: 2024-03-01. + :vartype imds: ~azure.mgmt.computeschedule.models.HostEndpointSettings + :ivar add_proxy_agent_extension: Specify whether to implicitly install the ProxyAgent + Extension. This option is currently applicable only for Linux Os. + :vartype add_proxy_agent_extension: bool + """ + + enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether ProxyAgent feature should be enabled on the virtual machine or virtual + machine scale set.""" + mode: Optional[Union[str, "_models.Mode"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the mode that ProxyAgent will execute on. Warning: this property has been deprecated, + please specify 'mode' under particular hostendpoint setting. Known values are: \"Audit\" and + \"Enforce\".""" + key_incarnation_id: Optional[int] = rest_field( + name="keyIncarnationId", visibility=["read", "create", "update", "delete", "query"] + ) + """Increase the value of this property allows users to reset the key used for securing + communication channel between guest and host.""" + wire_server: Optional["_models.HostEndpointSettings"] = rest_field( + name="wireServer", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Wire Server endpoint settings while creating the virtual machine or virtual + machine scale set. Minimum api-version: 2024-03-01.""" + imds: Optional["_models.HostEndpointSettings"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the IMDS endpoint settings while creating the virtual machine or virtual machine + scale set. Minimum api-version: 2024-03-01.""" + add_proxy_agent_extension: Optional[bool] = rest_field( + name="addProxyAgentExtension", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify whether to implicitly install the ProxyAgent Extension. This option is currently + applicable only for Linux Os.""" + + @overload + def __init__( + self, + *, + enabled: Optional[bool] = None, + mode: Optional[Union[str, "_models.Mode"]] = None, + key_incarnation_id: Optional[int] = None, + wire_server: Optional["_models.HostEndpointSettings"] = None, + imds: Optional["_models.HostEndpointSettings"] = None, + add_proxy_agent_extension: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class PublicIPAddressSku(_Model): + """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + + :ivar name: Specify public IP sku name. Known values are: "Basic" and "Standard". + :vartype name: str or ~azure.mgmt.computeschedule.models.PublicIPAddressSkuName + :ivar tier: Specify public IP sku tier. Known values are: "Regional" and "Global". + :vartype tier: str or ~azure.mgmt.computeschedule.models.PublicIPAddressSkuTier + """ + + name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specify public IP sku name. Known values are: \"Basic\" and \"Standard\".""" + tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Specify public IP sku tier. Known values are: \"Regional\" and \"Global\".""" + + @overload + def __init__( + self, + *, + name: Optional[Union[str, "_models.PublicIPAddressSkuName"]] = None, + tier: Optional[Union[str, "_models.PublicIPAddressSkuTier"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RecurringActionsResourceOperationResult(_Model): + """The response from scheduled action resource requests, which contains the status of each + resource. + + :ivar total_resources: The total number of resources operated on. Required. + :vartype total_resources: int + :ivar resources_statuses: The resource status of for each resource. Required. + :vartype resources_statuses: list[~azure.mgmt.computeschedule.models.ResourceStatus] + """ + + total_resources: int = rest_field(name="totalResources", visibility=["read", "create", "update", "delete", "query"]) + """The total number of resources operated on. Required.""" + resources_statuses: list["_models.ResourceStatus"] = rest_field( + name="resourcesStatuses", visibility=["read", "create", "update", "delete", "query"] + ) + """The resource status of for each resource. Required.""" + + @overload + def __init__( + self, + *, + total_resources: int, + resources_statuses: list["_models.ResourceStatus"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceAttachRequest(_Model): + """Request model to attach a list of scheduled action resources. + + :ivar resources: List of resources to be attached/patched. Required. + :vartype resources: list[~azure.mgmt.computeschedule.models.ScheduledActionResource] + """ + + resources: list["_models.ScheduledActionResource"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """List of resources to be attached/patched. Required.""" + + @overload + def __init__( + self, + *, + resources: list["_models.ScheduledActionResource"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceDetachRequest(_Model): + """Request model to detach a list of scheduled action resources. + + :ivar resources: List of resources to be detached. Required. + :vartype resources: list[str] + """ + + resources: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """List of resources to be detached. Required.""" + + @overload + def __init__( + self, + *, + resources: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceOperation(_Model): + """High level response from an operation on a resource. + + :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. + :vartype resource_id: str + :ivar error_code: Resource level error code if it exists. + :vartype error_code: str + :ivar error_details: Resource level error details if they exist. + :vartype error_details: str + :ivar operation: Details of the operation performed on a resource. + :vartype operation: ~azure.mgmt.computeschedule.models.ResourceOperationDetails + """ + + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique identifier for the resource involved in the operation, eg ArmId.""" + error_code: Optional[str] = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) + """Resource level error code if it exists.""" + error_details: Optional[str] = rest_field( + name="errorDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """Resource level error details if they exist.""" + operation: Optional["_models.ResourceOperationDetails"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Details of the operation performed on a resource.""" + + @overload + def __init__( + self, + *, + resource_id: Optional[str] = None, + error_code: Optional[str] = None, + error_details: Optional[str] = None, + operation: Optional["_models.ResourceOperationDetails"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceOperationDetails(_Model): + """The details of a response from an operation on a resource. + + :ivar operation_id: Operation identifier for the unique operation. Required. + :vartype operation_id: str + :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. + :vartype resource_id: str + :ivar op_type: Type of operation performed on the resources. Known values are: "Unknown", + "Start", "Deallocate", "Hibernate", "Create", and "Delete". + :vartype op_type: str or ~azure.mgmt.computeschedule.models.ResourceOperationType + :ivar subscription_id: Subscription id attached to the request. + :vartype subscription_id: str + :ivar deadline: Deadline for the operation. + :vartype deadline: ~datetime.datetime + :ivar deadline_type: Type of deadline of the operation. Known values are: "Unknown", + "InitiateAt", and "CompleteBy". + :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType + :ivar state: Current state of the operation. Known values are: "Unknown", "PendingScheduling", + "Scheduled", "PendingExecution", "Executing", "Succeeded", "Failed", "Cancelled", and + "Blocked". + :vartype state: str or ~azure.mgmt.computeschedule.models.OperationState + :ivar timezone: Timezone for the operation. + :vartype timezone: str + :ivar time_zone: Timezone for the operation. + :vartype time_zone: str + :ivar resource_operation_error: Operation level errors if they exist. + :vartype resource_operation_error: ~azure.mgmt.computeschedule.models.ResourceOperationError + :ivar fallback_operation_info: Fallback operation details if a fallback was performed. + :vartype fallback_operation_info: ~azure.mgmt.computeschedule.models.FallbackOperationInfo + :ivar completed_at: Time the operation was complete if errors are null. + :vartype completed_at: ~datetime.datetime + :ivar retry_policy: Retry policy the user can pass. + :vartype retry_policy: ~azure.mgmt.computeschedule.models.RetryPolicy + """ + + operation_id: str = rest_field(name="operationId", visibility=["read", "create", "update", "delete", "query"]) + """Operation identifier for the unique operation. Required.""" + resource_id: Optional[str] = rest_field( + name="resourceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Unique identifier for the resource involved in the operation, eg ArmId.""" + op_type: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field( + name="opType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of operation performed on the resources. Known values are: \"Unknown\", \"Start\", + \"Deallocate\", \"Hibernate\", \"Create\", and \"Delete\".""" + subscription_id: Optional[str] = rest_field( + name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] + ) + """Subscription id attached to the request.""" + deadline: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Deadline for the operation.""" + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( + name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + ) + """Type of deadline of the operation. Known values are: \"Unknown\", \"InitiateAt\", and + \"CompleteBy\".""" + state: Optional[Union[str, "_models.OperationState"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Current state of the operation. Known values are: \"Unknown\", \"PendingScheduling\", + \"Scheduled\", \"PendingExecution\", \"Executing\", \"Succeeded\", \"Failed\", \"Cancelled\", + and \"Blocked\".""" + timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Timezone for the operation.""" + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) + """Timezone for the operation.""" + resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field( + name="resourceOperationError", visibility=["read", "create", "update", "delete", "query"] + ) + """Operation level errors if they exist.""" + fallback_operation_info: Optional["_models.FallbackOperationInfo"] = rest_field( + name="fallbackOperationInfo", visibility=["read", "create", "update", "delete", "query"] + ) + """Fallback operation details if a fallback was performed.""" + completed_at: Optional[datetime.datetime] = rest_field( + name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """Time the operation was complete if errors are null.""" + retry_policy: Optional["_models.RetryPolicy"] = rest_field( + name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry policy the user can pass.""" + + @overload + def __init__( + self, + *, + operation_id: str, + resource_id: Optional[str] = None, + op_type: Optional[Union[str, "_models.ResourceOperationType"]] = None, + subscription_id: Optional[str] = None, + deadline: Optional[datetime.datetime] = None, + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = None, + state: Optional[Union[str, "_models.OperationState"]] = None, + timezone: Optional[str] = None, + time_zone: Optional[str] = None, + resource_operation_error: Optional["_models.ResourceOperationError"] = None, + fallback_operation_info: Optional["_models.FallbackOperationInfo"] = None, + completed_at: Optional[datetime.datetime] = None, + retry_policy: Optional["_models.RetryPolicy"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceOperationError(_Model): + """These describe errors that occur at the resource level. + + :ivar error_code: Code for the error eg 404, 500. Required. + :vartype error_code: str + :ivar error_details: Detailed message about the error. Required. + :vartype error_details: str + """ + + error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) + """Code for the error eg 404, 500. Required.""" + error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) + """Detailed message about the error. Required.""" + + @overload + def __init__( + self, + *, + error_code: str, + error_details: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourcePatchRequest(_Model): + """Request model perform a resource operation in a list of resources. + + :ivar resources: The list of resources we watch to patch. Required. + :vartype resources: list[~azure.mgmt.computeschedule.models.ScheduledActionResource] + """ + + resources: list["_models.ScheduledActionResource"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The list of resources we watch to patch. Required.""" + + @overload + def __init__( + self, + *, + resources: list["_models.ScheduledActionResource"], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProvisionFlexPayload(_Model): + """Resource creation data model for flex VM provisioning. + + :ivar virtual_machine_base_profile: JSON object that contains VM properties that are common + across all VMs in this batch. + :vartype virtual_machine_base_profile: ~azure.mgmt.computeschedule.models.BulkVMConfiguration + :ivar virtual_machine_overrides: JSON array that contains VM properties that should be + overridden for each VM in the batch. + :vartype virtual_machine_overrides: + list[~azure.mgmt.computeschedule.models.BulkVMConfiguration] + :ivar resource_count: Number of VMs to be created. Required. + :vartype resource_count: int + :ivar resource_prefix: If resourceOverrides doesn't contain name, service will create name + based on prefix and resourceCount. + :vartype resource_prefix: str + :ivar flex_properties: The flex properties for flexible VM creation. Required. + :vartype flex_properties: ~azure.mgmt.computeschedule.models.FlexProperties + """ + + virtual_machine_base_profile: Optional["_models.BulkVMConfiguration"] = rest_field( + name="virtualMachineBaseProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """JSON object that contains VM properties that are common across all VMs in this batch.""" + virtual_machine_overrides: Optional[list["_models.BulkVMConfiguration"]] = rest_field( + name="virtualMachineOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """JSON array that contains VM properties that should be overridden for each VM in the batch.""" + resource_count: int = rest_field(name="resourceCount", visibility=["read", "create", "update", "delete", "query"]) + """Number of VMs to be created. Required.""" + resource_prefix: Optional[str] = rest_field( + name="resourcePrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """If resourceOverrides doesn't contain name, service will create name based on prefix and + resourceCount.""" + flex_properties: "_models.FlexProperties" = rest_field( + name="flexProperties", visibility=["read", "create", "update", "delete", "query"] + ) + """The flex properties for flexible VM creation. Required.""" + + @overload + def __init__( + self, + *, + resource_count: int, + flex_properties: "_models.FlexProperties", + virtual_machine_base_profile: Optional["_models.BulkVMConfiguration"] = None, + virtual_machine_overrides: Optional[list["_models.BulkVMConfiguration"]] = None, + resource_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceProvisionPayload(_Model): + """Resource creation data model. + + :ivar virtual_machine_base_profile: Virtual machine profile object that contains VM properties + that are common across all VMs in this batch (if you want to create 100 VMs in this request, + and they all have same vmSize, then include vmSize in baseProfile). + :vartype virtual_machine_base_profile: ~azure.mgmt.computeschedule.models.BulkVMConfiguration + :ivar virtual_machine_overrides: Virtual machine profile array that contains VM properties that + needs to be overridden for each VM in the batch (if you want to create 100 VMs, they all need a + distinct computerName property, you pass computerNames for each VM in batch in this array), + service will merge baseProfile with VM specific overrides and create a merged VMProfile. + :vartype virtual_machine_overrides: + list[~azure.mgmt.computeschedule.models.BulkVMConfiguration] + :ivar resource_count: Number of VMs to be created. Required. + :vartype resource_count: int + :ivar resource_prefix: if resourceOverrides doesn't contain "name", service will create name + based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1.. + :vartype resource_prefix: str + """ + + virtual_machine_base_profile: Optional["_models.BulkVMConfiguration"] = rest_field( + name="virtualMachineBaseProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual machine profile object that contains VM properties that are common across all VMs in + this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then + include vmSize in baseProfile).""" + virtual_machine_overrides: Optional[list["_models.BulkVMConfiguration"]] = rest_field( + name="virtualMachineOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """Virtual machine profile array that contains VM properties that needs to be overridden for each + VM in the batch (if you want to create 100 VMs, they all need a distinct computerName property, + you pass computerNames for each VM in batch in this array), service will merge baseProfile with + VM specific overrides and create a merged VMProfile.""" + resource_count: int = rest_field(name="resourceCount", visibility=["read", "create", "update", "delete", "query"]) + """Number of VMs to be created. Required.""" + resource_prefix: Optional[str] = rest_field( + name="resourcePrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """if resourceOverrides doesn't contain \"name\", service will create name based of prefix and + ResourceCount e.g. resourceprefix-0,resourceprefix-1..""" + + @overload + def __init__( + self, + *, + resource_count: int, + virtual_machine_base_profile: Optional["_models.BulkVMConfiguration"] = None, + virtual_machine_overrides: Optional[list["_models.BulkVMConfiguration"]] = None, + resource_prefix: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceResultSummary(_Model): + """The status of the resources. + + :ivar code: The error code for those resources. In case of success, code is populated with + Success. Required. + :vartype code: str + :ivar count: The number of resources that the code applies to. Required. + :vartype count: int + :ivar error_details: The error details for the resources. Not populated on success cases. + :vartype error_details: ~azure.core.ODataV4Format + """ + + code: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The error code for those resources. In case of success, code is populated with Success. + Required.""" + count: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The number of resources that the code applies to. Required.""" + error_details: Optional[ODataV4Format] = rest_field( + name="errorDetails", visibility=["read", "create", "update", "delete", "query"] + ) + """The error details for the resources. Not populated on success cases.""" + + @overload + def __init__( + self, + *, + code: str, + count: int, + error_details: Optional[ODataV4Format] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Resources(_Model): + """The resources needed for the user request. + + :ivar ids: The resource ids used for the request. Required. + :vartype ids: list[str] + """ + + ids: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resource ids used for the request. Required.""" + + @overload + def __init__( + self, + *, + ids: list[str], + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ResourceStatus(_Model): + """The status of a resource after a resource level operation was performed. + + :ivar resource_id: The arm identifier of the resource. Required. + :vartype resource_id: str + :ivar status: The state the resource is currently on. Required. Known values are: "Succeeded" + and "Failed". + :vartype status: str or ~azure.mgmt.computeschedule.models.ResourceOperationStatus + :ivar error: Errors encountered while trying to perform. + :vartype error: ~azure.core.ODataV4Format + """ + + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The arm identifier of the resource. Required.""" + status: Union[str, "_models.ResourceOperationStatus"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The state the resource is currently on. Required. Known values are: \"Succeeded\" and + \"Failed\".""" + error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Errors encountered while trying to perform.""" + + @overload + def __init__( + self, + *, + resource_id: str, + status: Union[str, "_models.ResourceOperationStatus"], + error: Optional[ODataV4Format] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class RetryPolicy(_Model): + """The retry policy for the user request. + + :ivar retry_count: Retry count for user request. + :vartype retry_count: int + :ivar retry_window_in_minutes: Retry window in minutes for user request. + :vartype retry_window_in_minutes: int + :ivar on_failure_action: Action to take on failure. Known values are: "Unknown", "Start", + "Deallocate", "Hibernate", "Create", and "Delete". + :vartype on_failure_action: str or ~azure.mgmt.computeschedule.models.ResourceOperationType + """ + + retry_count: Optional[int] = rest_field( + name="retryCount", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry count for user request.""" + retry_window_in_minutes: Optional[int] = rest_field( + name="retryWindowInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Retry window in minutes for user request.""" + on_failure_action: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field( + name="onFailureAction", visibility=["read", "create", "update", "delete", "query"] + ) + """Action to take on failure. Known values are: \"Unknown\", \"Start\", \"Deallocate\", + \"Hibernate\", \"Create\", and \"Delete\".""" + + @overload + def __init__( + self, + *, + retry_count: Optional[int] = None, + retry_window_in_minutes: Optional[int] = None, + on_failure_action: Optional[Union[str, "_models.ResourceOperationType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class Schedule(_Model): + """The schedule details for the user request. + + :ivar deadline: The deadline for the operation. + :vartype deadline: ~datetime.datetime + :ivar dead_line: The deadline for the operation. + :vartype dead_line: ~datetime.datetime + :ivar timezone: The timezone for the operation. + :vartype timezone: str + :ivar time_zone: The timezone for the operation. + :vartype time_zone: str + :ivar deadline_type: The deadlinetype of the operation, this can either be InitiateAt or + CompleteBy. Required. Known values are: "Unknown", "InitiateAt", and "CompleteBy". + :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType + """ + + deadline: Optional[datetime.datetime] = rest_field( + visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The deadline for the operation.""" + dead_line: Optional[datetime.datetime] = rest_field( + name="deadLine", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The deadline for the operation.""" + timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The timezone for the operation.""" + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) + """The timezone for the operation.""" + deadline_type: Union[str, "_models.DeadlineType"] = rest_field( + name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + ) + """The deadlinetype of the operation, this can either be InitiateAt or CompleteBy. Required. Known + values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" + + @overload + def __init__( + self, + *, + deadline_type: Union[str, "_models.DeadlineType"], + deadline: Optional[datetime.datetime] = None, + dead_line: Optional[datetime.datetime] = None, + timezone: Optional[str] = None, + time_zone: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class TrackedResource(Resource): + """Tracked Resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + location: str = rest_field(visibility=["read", "create"]) + """The geo-location where the resource lives. Required.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledAction(TrackedResource): + """The scheduled action resource. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar location: The geo-location where the resource lives. Required. + :vartype location: str + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionProperties + """ + + properties: Optional["_models.ScheduledActionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + location: str, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ScheduledActionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionProperties(_Model): + """Scheduled action properties. + + :ivar resource_type: The type of resource the scheduled action is targeting. Required. Known + values are: "VirtualMachine" and "VirtualMachineScaleSet". + :vartype resource_type: str or ~azure.mgmt.computeschedule.models.ResourceType + :ivar action_type: The action the scheduled action should perform in the resources. Required. + Known values are: "Start", "Deallocate", and "Hibernate". + :vartype action_type: str or ~azure.mgmt.computeschedule.models.ScheduledActionType + :ivar start_time: The time which the scheduled action is supposed to start running. Required. + :vartype start_time: ~datetime.datetime + :ivar end_time: The time when the scheduled action is supposed to stop scheduling. + :vartype end_time: ~datetime.datetime + :ivar schedule: The schedule the scheduled action is supposed to follow. Required. + :vartype schedule: ~azure.mgmt.computeschedule.models.ScheduledActionsSchedule + :ivar notification_settings: The notification settings for the scheduled action. Required. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + :ivar disabled: Tell if the scheduled action is disabled or not. + :vartype disabled: bool + :ivar provisioning_state: The status of the last provisioning operation performed on the + resource. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.computeschedule.models.ProvisioningState + """ + + resource_type: Union[str, "_models.ResourceType"] = rest_field( + name="resourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource the scheduled action is targeting. Required. Known values are: + \"VirtualMachine\" and \"VirtualMachineScaleSet\".""" + action_type: Union[str, "_models.ScheduledActionType"] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The action the scheduled action should perform in the resources. Required. Known values are: + \"Start\", \"Deallocate\", and \"Hibernate\".""" + start_time: datetime.datetime = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time which the scheduled action is supposed to start running. Required.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when the scheduled action is supposed to stop scheduling.""" + schedule: "_models.ScheduledActionsSchedule" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The schedule the scheduled action is supposed to follow. Required.""" + notification_settings: list["_models.NotificationProperties"] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification settings for the scheduled action. Required.""" + disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tell if the scheduled action is disabled or not.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The status of the last provisioning operation performed on the resource. Known values are: + \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + + @overload + def __init__( + self, + *, + resource_type: Union[str, "_models.ResourceType"], + action_type: Union[str, "_models.ScheduledActionType"], + start_time: datetime.datetime, + schedule: "_models.ScheduledActionsSchedule", + notification_settings: list["_models.NotificationProperties"], + end_time: Optional[datetime.datetime] = None, + disabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionResource(_Model): + """Represents an scheduled action resource metadata. + + :ivar name: The name of the resource. Required. + :vartype name: str + :ivar id: The compute RP resource id of the resource in the scheduled actions scope. Required. + :vartype id: str + :ivar type: The type of resource. + :vartype type: str + :ivar resource_id: The ARM Id of the resource. + "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". + Required. + :vartype resource_id: str + :ivar notification_settings: The desired notification settings for the specified resource. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + """ + + name: str = rest_field(visibility=["read"]) + """The name of the resource. Required.""" + id: str = rest_field(visibility=["read"]) + """The compute RP resource id of the resource in the scheduled actions scope. Required.""" + type: Optional[str] = rest_field(visibility=["read"]) + """The type of resource.""" + resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) + """The ARM Id of the resource. + \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". + Required.""" + notification_settings: Optional[list["_models.NotificationProperties"]] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The desired notification settings for the specified resource.""" + + @overload + def __init__( + self, + *, + resource_id: str, + notification_settings: Optional[list["_models.NotificationProperties"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionResources(ExtensionResource): + """The scheduled action extension. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionsExtensionProperties + """ + + properties: Optional["_models.ScheduledActionsExtensionProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + properties: Optional["_models.ScheduledActionsExtensionProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionsExtensionProperties(_Model): + """Scheduled action extension properties. + + :ivar resource_type: The type of resource the scheduled action is targeting. Required. Known + values are: "VirtualMachine" and "VirtualMachineScaleSet". + :vartype resource_type: str or ~azure.mgmt.computeschedule.models.ResourceType + :ivar action_type: The action the scheduled action should perform in the resources. Required. + Known values are: "Start", "Deallocate", and "Hibernate". + :vartype action_type: str or ~azure.mgmt.computeschedule.models.ScheduledActionType + :ivar start_time: The time which the scheduled action is supposed to start running. Required. + :vartype start_time: ~datetime.datetime + :ivar end_time: The time when the scheduled action is supposed to stop scheduling. + :vartype end_time: ~datetime.datetime + :ivar schedule: The schedule the scheduled action is supposed to follow. Required. + :vartype schedule: ~azure.mgmt.computeschedule.models.ScheduledActionsSchedule + :ivar notification_settings: The notification settings for the scheduled action. Required. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + :ivar disabled: Tell if the scheduled action is disabled or not. + :vartype disabled: bool + :ivar provisioning_state: The status of the last provisioning operation performed on the + resource. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". + :vartype provisioning_state: str or ~azure.mgmt.computeschedule.models.ProvisioningState + :ivar resource_notification_settings: The notification settings for the scheduled action at a + resource level. Resource level notification settings are scope to specific resources only and + submitted through attach requests. + :vartype resource_notification_settings: + list[~azure.mgmt.computeschedule.models.NotificationProperties] + """ + + resource_type: Union[str, "_models.ResourceType"] = rest_field( + name="resourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource the scheduled action is targeting. Required. Known values are: + \"VirtualMachine\" and \"VirtualMachineScaleSet\".""" + action_type: Union[str, "_models.ScheduledActionType"] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The action the scheduled action should perform in the resources. Required. Known values are: + \"Start\", \"Deallocate\", and \"Hibernate\".""" + start_time: datetime.datetime = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time which the scheduled action is supposed to start running. Required.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when the scheduled action is supposed to stop scheduling.""" + schedule: "_models.ScheduledActionsSchedule" = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The schedule the scheduled action is supposed to follow. Required.""" + notification_settings: list["_models.NotificationProperties"] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification settings for the scheduled action. Required.""" + disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tell if the scheduled action is disabled or not.""" + provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( + name="provisioningState", visibility=["read"] + ) + """The status of the last provisioning operation performed on the resource. Known values are: + \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + resource_notification_settings: Optional[list["_models.NotificationProperties"]] = rest_field( + name="resourceNotificationSettings", visibility=["read"] + ) + """The notification settings for the scheduled action at a resource level. Resource level + notification settings are scope to specific resources only and submitted through attach + requests.""" + + @overload + def __init__( + self, + *, + resource_type: Union[str, "_models.ResourceType"], + action_type: Union[str, "_models.ScheduledActionType"], + start_time: datetime.datetime, + schedule: "_models.ScheduledActionsSchedule", + notification_settings: list["_models.NotificationProperties"], + end_time: Optional[datetime.datetime] = None, + disabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionsSchedule(_Model): + """Specify the schedule in which the scheduled action is supposed to follow. + + :ivar scheduled_time: The time the scheduled action is supposed to run on. Required. + :vartype scheduled_time: ~datetime.time + :ivar time_zone: The timezone the scheduled time is specified on. Required. + :vartype time_zone: str + :ivar requested_week_days: The week days the scheduled action is supposed to run on. Required. + :vartype requested_week_days: list[str or ~azure.mgmt.computeschedule.models.WeekDay] + :ivar requested_months: The months the scheduled action is supposed to run on. Required. + :vartype requested_months: list[str or ~azure.mgmt.computeschedule.models.Month] + :ivar requested_days_of_the_month: The days of the month the scheduled action is supposed to + run on. If empty, it means it will run on every day of the month. Required. + :vartype requested_days_of_the_month: list[int] + :ivar execution_parameters: The execution parameters the scheduled action is supposed to + follow. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar deadline_type: The type of deadline the scheduled action is supposed to follow for the + schedule. If no value is passed, it will default to InitiateAt. Known values are: "Unknown", + "InitiateAt", and "CompleteBy". + :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType + """ + + scheduled_time: datetime.time = rest_field( + name="scheduledTime", visibility=["read", "create", "update", "delete", "query"] + ) + """The time the scheduled action is supposed to run on. Required.""" + time_zone: str = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) + """The timezone the scheduled time is specified on. Required.""" + requested_week_days: list[Union[str, "_models.WeekDay"]] = rest_field( + name="requestedWeekDays", visibility=["read", "create", "update", "delete", "query"] + ) + """The week days the scheduled action is supposed to run on. Required.""" + requested_months: list[Union[str, "_models.Month"]] = rest_field( + name="requestedMonths", visibility=["read", "create", "update", "delete", "query"] + ) + """The months the scheduled action is supposed to run on. Required.""" + requested_days_of_the_month: list[int] = rest_field( + name="requestedDaysOfTheMonth", visibility=["read", "create", "update", "delete", "query"] + ) + """The days of the month the scheduled action is supposed to run on. If empty, it means it will + run on every day of the month. Required.""" + execution_parameters: Optional["_models.ExecutionParameters"] = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters the scheduled action is supposed to follow.""" + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( + name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of deadline the scheduled action is supposed to follow for the schedule. If no value + is passed, it will default to InitiateAt. Known values are: \"Unknown\", \"InitiateAt\", and + \"CompleteBy\".""" + + @overload + def __init__( + self, + *, + scheduled_time: datetime.time, + time_zone: str, + requested_week_days: list[Union[str, "_models.WeekDay"]], + requested_months: list[Union[str, "_models.Month"]], + requested_days_of_the_month: list[int], + execution_parameters: Optional["_models.ExecutionParameters"] = None, + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionUpdate(_Model): + """The type used for update operations of the ScheduledAction. + + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :ivar properties: The resource-specific properties for this resource. + :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionUpdateProperties + """ + + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags.""" + properties: Optional["_models.ScheduledActionUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The resource-specific properties for this resource.""" + + @overload + def __init__( + self, + *, + tags: Optional[dict[str, str]] = None, + properties: Optional["_models.ScheduledActionUpdateProperties"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledActionUpdateProperties(_Model): + """The updatable properties of the ScheduledAction. + + :ivar resource_type: The type of resource the scheduled action is targeting. Known values are: + "VirtualMachine" and "VirtualMachineScaleSet". + :vartype resource_type: str or ~azure.mgmt.computeschedule.models.ResourceType + :ivar action_type: The action the scheduled action should perform in the resources. Known + values are: "Start", "Deallocate", and "Hibernate". + :vartype action_type: str or ~azure.mgmt.computeschedule.models.ScheduledActionType + :ivar start_time: The time which the scheduled action is supposed to start running. + :vartype start_time: ~datetime.datetime + :ivar end_time: The time when the scheduled action is supposed to stop scheduling. + :vartype end_time: ~datetime.datetime + :ivar schedule: The schedule the scheduled action is supposed to follow. + :vartype schedule: ~azure.mgmt.computeschedule.models.ScheduledActionsSchedule + :ivar notification_settings: The notification settings for the scheduled action. + :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] + :ivar disabled: Tell if the scheduled action is disabled or not. + :vartype disabled: bool + """ + + resource_type: Optional[Union[str, "_models.ResourceType"]] = rest_field( + name="resourceType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of resource the scheduled action is targeting. Known values are: \"VirtualMachine\" + and \"VirtualMachineScaleSet\".""" + action_type: Optional[Union[str, "_models.ScheduledActionType"]] = rest_field( + name="actionType", visibility=["read", "create", "update", "delete", "query"] + ) + """The action the scheduled action should perform in the resources. Known values are: \"Start\", + \"Deallocate\", and \"Hibernate\".""" + start_time: Optional[datetime.datetime] = rest_field( + name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time which the scheduled action is supposed to start running.""" + end_time: Optional[datetime.datetime] = rest_field( + name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The time when the scheduled action is supposed to stop scheduling.""" + schedule: Optional["_models.ScheduledActionsSchedule"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The schedule the scheduled action is supposed to follow.""" + notification_settings: Optional[list["_models.NotificationProperties"]] = rest_field( + name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The notification settings for the scheduled action.""" + disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Tell if the scheduled action is disabled or not.""" + + @overload + def __init__( + self, + *, + resource_type: Optional[Union[str, "_models.ResourceType"]] = None, + action_type: Optional[Union[str, "_models.ScheduledActionType"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + schedule: Optional["_models.ScheduledActionsSchedule"] = None, + notification_settings: Optional[list["_models.NotificationProperties"]] = None, + disabled: Optional[bool] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledEventsAdditionalPublishingTargets(_Model): # pylint: disable=name-too-long + """Specifies additional publishing targets for scheduled events. + + :ivar event_grid_and_resource_graph: The configuration parameters used while creating + eventGridAndResourceGraph Scheduled Event setting. + :vartype event_grid_and_resource_graph: + ~azure.mgmt.computeschedule.models.EventGridAndResourceGraph + """ + + event_grid_and_resource_graph: Optional["_models.EventGridAndResourceGraph"] = rest_field( + name="eventGridAndResourceGraph", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration parameters used while creating eventGridAndResourceGraph Scheduled Event + setting.""" + + @overload + def __init__( + self, + *, + event_grid_and_resource_graph: Optional["_models.EventGridAndResourceGraph"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledEventsPolicy(_Model): + """Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event + related configurations. + + :ivar user_initiated_redeploy: The configuration parameters used while creating + userInitiatedRedeploy scheduled event setting creation. + :vartype user_initiated_redeploy: ~azure.mgmt.computeschedule.models.UserInitiatedRedeploy + :ivar user_initiated_reboot: The configuration parameters used while creating + userInitiatedReboot scheduled event setting creation. + :vartype user_initiated_reboot: ~azure.mgmt.computeschedule.models.UserInitiatedReboot + :ivar scheduled_events_additional_publishing_targets: The configuration parameters used while + publishing scheduledEventsAdditionalPublishingTargets. + :vartype scheduled_events_additional_publishing_targets: + ~azure.mgmt.computeschedule.models.ScheduledEventsAdditionalPublishingTargets + :ivar all_instances_down: The configuration parameters used while creating AllInstancesDown + scheduled event setting creation. + :vartype all_instances_down: ~azure.mgmt.computeschedule.models.AllInstancesDown + """ + + user_initiated_redeploy: Optional["_models.UserInitiatedRedeploy"] = rest_field( + name="userInitiatedRedeploy", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration parameters used while creating userInitiatedRedeploy scheduled event setting + creation.""" + user_initiated_reboot: Optional["_models.UserInitiatedReboot"] = rest_field( + name="userInitiatedReboot", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration parameters used while creating userInitiatedReboot scheduled event setting + creation.""" + scheduled_events_additional_publishing_targets: Optional["_models.ScheduledEventsAdditionalPublishingTargets"] = ( + rest_field( + name="scheduledEventsAdditionalPublishingTargets", + visibility=["read", "create", "update", "delete", "query"], + ) + ) + """The configuration parameters used while publishing scheduledEventsAdditionalPublishingTargets.""" + all_instances_down: Optional["_models.AllInstancesDown"] = rest_field( + name="allInstancesDown", visibility=["read", "create", "update", "delete", "query"] + ) + """The configuration parameters used while creating AllInstancesDown scheduled event setting + creation.""" + + @overload + def __init__( + self, + *, + user_initiated_redeploy: Optional["_models.UserInitiatedRedeploy"] = None, + user_initiated_reboot: Optional["_models.UserInitiatedReboot"] = None, + scheduled_events_additional_publishing_targets: Optional[ + "_models.ScheduledEventsAdditionalPublishingTargets" + ] = None, + all_instances_down: Optional["_models.AllInstancesDown"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class ScheduledEventsProfile(_Model): + """Profile for the scheduled events. + + :ivar terminate_notification_profile: Specifies Terminate Scheduled Event related + configurations. + :vartype terminate_notification_profile: + ~azure.mgmt.computeschedule.models.TerminateNotificationProfile + :ivar os_image_notification_profile: Specifies OS Image Scheduled Event related configurations. + :vartype os_image_notification_profile: + ~azure.mgmt.computeschedule.models.OSImageNotificationProfile + """ + + terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = rest_field( + name="terminateNotificationProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Terminate Scheduled Event related configurations.""" + os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = rest_field( + name="osImageNotificationProfile", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies OS Image Scheduled Event related configurations.""" + + @overload + def __init__( + self, + *, + terminate_notification_profile: Optional["_models.TerminateNotificationProfile"] = None, + os_image_notification_profile: Optional["_models.OSImageNotificationProfile"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SecurityProfile(_Model): + """Specifies the Security profile settings for the virtual machine or virtual machine scale set. + + :ivar uefi_settings: Specifies the security settings like secure boot and vTPM used while + creating the virtual machine. Minimum compute api-version: 2020-12-01. + :vartype uefi_settings: ~azure.mgmt.computeschedule.models.UefiSettings + :ivar encryption_at_host: This property can be used by user in the request to enable or disable + the Host Encryption for the virtual machine or virtual machine scale set. This will enable the + encryption for all the disks including Resource/Temp disk at host itself. The default behavior + is: The Encryption at host will be disabled unless this property is set to true for the + resource. + :vartype encryption_at_host: bool + :ivar security_type: Specifies the SecurityType of the virtual machine. It has to be set to any + specified value to enable UefiSettings. The default behavior is: UefiSettings will not be + enabled unless this property is set. Known values are: "TrustedLaunch" and "ConfidentialVM". + :vartype security_type: str or ~azure.mgmt.computeschedule.models.SecurityTypes + :ivar encryption_identity: Specifies the Managed Identity used by ADE to get access token for + keyvault operations. + :vartype encryption_identity: ~azure.mgmt.computeschedule.models.EncryptionIdentity + :ivar proxy_agent_settings: Specifies ProxyAgent settings while creating the virtual machine. + Minimum compute api-version: 2023-09-01. + :vartype proxy_agent_settings: ~azure.mgmt.computeschedule.models.ProxyAgentSettings + """ + + uefi_settings: Optional["_models.UefiSettings"] = rest_field( + name="uefiSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the security settings like secure boot and vTPM used while creating the virtual + machine. Minimum compute api-version: 2020-12-01.""" + encryption_at_host: Optional[bool] = rest_field( + name="encryptionAtHost", visibility=["read", "create", "update", "delete", "query"] + ) + """This property can be used by user in the request to enable or disable the Host Encryption for + the virtual machine or virtual machine scale set. This will enable the encryption for all the + disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at + host will be disabled unless this property is set to true for the resource.""" + security_type: Optional[Union[str, "_models.SecurityTypes"]] = rest_field( + name="securityType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the SecurityType of the virtual machine. It has to be set to any specified value to + enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this + property is set. Known values are: \"TrustedLaunch\" and \"ConfidentialVM\".""" + encryption_identity: Optional["_models.EncryptionIdentity"] = rest_field( + name="encryptionIdentity", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the Managed Identity used by ADE to get access token for keyvault operations.""" + proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = rest_field( + name="proxyAgentSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies ProxyAgent settings while creating the virtual machine. Minimum compute api-version: + 2023-09-01.""" + + @overload + def __init__( + self, + *, + uefi_settings: Optional["_models.UefiSettings"] = None, + encryption_at_host: Optional[bool] = None, + security_type: Optional[Union[str, "_models.SecurityTypes"]] = None, + encryption_identity: Optional["_models.EncryptionIdentity"] = None, + proxy_agent_settings: Optional["_models.ProxyAgentSettings"] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SshConfiguration(_Model): + """SSH configuration for Linux based VMs running on Azure. + + :ivar public_keys: The list of SSH public keys used to authenticate with linux based VMs. + :vartype public_keys: list[~azure.mgmt.computeschedule.models.SshPublicKey] + """ + + public_keys: Optional[list["_models.SshPublicKey"]] = rest_field( + name="publicKeys", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of SSH public keys used to authenticate with linux based VMs.""" + + @overload + def __init__( + self, + *, + public_keys: Optional[list["_models.SshPublicKey"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SshPublicKey(_Model): + """Contains information about SSH certificate public key and the path on the Linux VM where the + public key is placed. + + :ivar path: Specifies the full path on the created VM where ssh public key is stored. If the + file already exists, the specified key is appended to the file. Example: + /home/user/.ssh/authorized_keys. + :vartype path: str + :ivar key_data: SSH public key certificate used to authenticate with the VM through ssh. The + key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH + keys on Linux and Mac for Linux VMs in + Azure]`https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed + `_). + :vartype key_data: str + """ + + path: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the full path on the created VM where ssh public key is stored. If the file already + exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys.""" + key_data: Optional[str] = rest_field(name="keyData", visibility=["read", "create", "update", "delete", "query"]) + """SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at + least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and + Mac for Linux VMs in + Azure]`https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed + `_).""" + + @overload + def __init__( + self, + *, + path: Optional[str] = None, + key_data: Optional[str] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StartResourceOperationResponse(_Model): + """The response from a start request. + + :ivar description: The description of the operation response. Required. + :vartype description: str + :ivar type: The type of resources used in the start request eg virtual machines. Required. + :vartype type: str + :ivar location: The location of the start request eg westus. Required. + :vartype location: str + :ivar results: The results from the start request if no errors exist. + :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + """ + + description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The description of the operation response. Required.""" + type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The type of resources used in the start request eg virtual machines. Required.""" + location: str = rest_field(visibility=["read", "create"]) + """The location of the start request eg westus. Required.""" + results: Optional[list["_models.ResourceOperation"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The results from the start request if no errors exist.""" + + @overload + def __init__( + self, + *, + description: str, + type: str, + location: str, + results: Optional[list["_models.ResourceOperation"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class StorageProfile(_Model): + """Specifies the storage settings for the virtual machine disks. + + :ivar image_reference: Specifies information about the image to use. You can specify + information about platform images, marketplace images, or virtual machine images. This element + is required when you want to use a platform image, marketplace image, or virtual machine image, + but is not used in other creation operations. + :vartype image_reference: ~azure.mgmt.computeschedule.models.ImageReference + :ivar os_disk: Specifies information about the operating system disk used by the virtual + machine. For more information about disks, see `About disks and VHDs for Azure virtual machines + `_. + :vartype os_disk: ~azure.mgmt.computeschedule.models.OSDisk + :ivar data_disks: Specifies the parameters that are used to add a data disk to a virtual + machine. For more information about disks, see `About disks and VHDs for Azure virtual machines + `_. + :vartype data_disks: list[~azure.mgmt.computeschedule.models.DataDisk] + :ivar disk_controller_type: Specifies the disk controller type configured for the VM. **Note:** + This property will be set to the default disk controller type if not specified provided virtual + machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the + operating system disk and VM size from the the specified minimum api version. You need to + deallocate the VM before updating its disk controller type unless you are updating the VM size + in the VM configuration which implicitly deallocates and reallocates the VM. Minimum + api-version: 2022-08-01. Known values are: "SCSI" and "NVMe". + :vartype disk_controller_type: str or ~azure.mgmt.computeschedule.models.DiskControllerTypes + """ + + image_reference: Optional["_models.ImageReference"] = rest_field( + name="imageReference", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies information about the image to use. You can specify information about platform + images, marketplace images, or virtual machine images. This element is required when you want + to use a platform image, marketplace image, or virtual machine image, but is not used in other + creation operations.""" + os_disk: Optional["_models.OSDisk"] = rest_field( + name="osDisk", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies information about the operating system disk used by the virtual machine. For more + information about disks, see `About disks and VHDs for Azure virtual machines + `_.""" + data_disks: Optional[list["_models.DataDisk"]] = rest_field( + name="dataDisks", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the parameters that are used to add a data disk to a virtual machine. For more + information about disks, see `About disks and VHDs for Azure virtual machines + `_.""" + disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = rest_field( + name="diskControllerType", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the disk controller type configured for the VM. **Note:** This property will be set + to the default disk controller type if not specified provided virtual machine is being created + with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM + size from the the specified minimum api version. You need to deallocate the VM before updating + its disk controller type unless you are updating the VM size in the VM configuration which + implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. Known values + are: \"SCSI\" and \"NVMe\".""" + + @overload + def __init__( + self, + *, + image_reference: Optional["_models.ImageReference"] = None, + os_disk: Optional["_models.OSDisk"] = None, + data_disks: Optional[list["_models.DataDisk"]] = None, + disk_controller_type: Optional[Union[str, "_models.DiskControllerTypes"]] = None, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubmitDeallocateContent(_Model): + """The deallocate request for resources. + + :ivar schedule: The schedule for the request. Required. + :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The schedule for the request. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + schedule: "_models.Schedule", + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubmitHibernateContent(_Model): + """This is the request for hibernate. + + :ivar schedule: The schedule for the request. Required. + :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The schedule for the request. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + schedule: "_models.Schedule", + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SubmitStartContent(_Model): + """This is the request for start. + + :ivar schedule: The schedule for the request. Required. + :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule + :ivar execution_parameters: The execution parameters for the request. Required. + :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters + :ivar resources: The resources for the request. Required. + :vartype resources: ~azure.mgmt.computeschedule.models.Resources + :ivar correlationid: CorrelationId item. Required. + :vartype correlationid: str + """ + + schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The schedule for the request. Required.""" + execution_parameters: "_models.ExecutionParameters" = rest_field( + name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + ) + """The execution parameters for the request. Required.""" + resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The resources for the request. Required.""" + correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """CorrelationId item. Required.""" + + @overload + def __init__( + self, + *, + schedule: "_models.Schedule", + execution_parameters: "_models.ExecutionParameters", + resources: "_models.Resources", + correlationid: str, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + +class SystemData(_Model): + """Metadata pertaining to creation and last modification of the resource. + + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Known values are: + "User", "Application", "ManagedIdentity", and "Key". + :vartype created_by_type: str or ~azure.mgmt.computeschedule.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Known values + are: "User", "Application", "ManagedIdentity", and "Key". + :vartype last_modified_by_type: str or ~azure.mgmt.computeschedule.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime + """ + + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) + """The identity that created the resource.""" + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that created the resource. Known values are: \"User\", \"Application\", + \"ManagedIdentity\", and \"Key\".""" + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource creation (UTC).""" + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) + """The identity that last modified the resource.""" + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) + """The type of identity that last modified the resource. Known values are: \"User\", + \"Application\", \"ManagedIdentity\", and \"Key\".""" + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) + """The timestamp of resource last modification (UTC).""" + + @overload + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, ) -> None: ... @overload @@ -1310,66 +5786,33 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class OperationErrorsResult(_Model): - """This is the first level of operation errors from the request when clients get errors per vm - operation. +class TerminateNotificationProfile(_Model): + """Profile properties for the Terminate Scheduled event. - :ivar operation_id: The operationId identifying a vm operation. - :vartype operation_id: str - :ivar creation_time: The creation time of the error result. - :vartype creation_time: ~datetime.datetime - :ivar activation_time: The activation time of a vm operation. - :vartype activation_time: ~datetime.datetime - :ivar completed_at: The completion time of the operation if the operation was completed. - :vartype completed_at: ~datetime.datetime - :ivar operation_errors: A list of errors associated with the operationid. - :vartype operation_errors: list[~azure.mgmt.computeschedule.models.OperationErrorDetails] - :ivar request_error_code: Request level error code. - :vartype request_error_code: str - :ivar request_error_details: Request level error details. - :vartype request_error_details: str + :ivar not_before_timeout: Configurable length of time a Virtual Machine being deleted will have + to potentially approve the Terminate Scheduled Event before the event is auto approved (timed + out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes + (PT5M). + :vartype not_before_timeout: str + :ivar enable: Specifies whether the Terminate Scheduled event is enabled or disabled. + :vartype enable: bool """ - operation_id: Optional[str] = rest_field( - name="operationId", visibility=["read", "create", "update", "delete", "query"] - ) - """The operationId identifying a vm operation.""" - creation_time: Optional[datetime.datetime] = rest_field( - name="creationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The creation time of the error result.""" - activation_time: Optional[datetime.datetime] = rest_field( - name="activationTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The activation time of a vm operation.""" - completed_at: Optional[datetime.datetime] = rest_field( - name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The completion time of the operation if the operation was completed.""" - operation_errors: Optional[List["_models.OperationErrorDetails"]] = rest_field( - name="operationErrors", visibility=["read", "create", "update", "delete", "query"] - ) - """A list of errors associated with the operationid.""" - request_error_code: Optional[str] = rest_field( - name="requestErrorCode", visibility=["read", "create", "update", "delete", "query"] + not_before_timeout: Optional[str] = rest_field( + name="notBeforeTimeout", visibility=["read", "create", "update", "delete", "query"] ) - """Request level error code.""" - request_error_details: Optional[str] = rest_field( - name="requestErrorDetails", visibility=["read", "create", "update", "delete", "query"] - ) - """Request level error details.""" + """Configurable length of time a Virtual Machine being deleted will have to potentially approve + the Terminate Scheduled Event before the event is auto approved (timed out). The configuration + must be specified in ISO 8601 format, the default value is 5 minutes (PT5M).""" + enable: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies whether the Terminate Scheduled event is enabled or disabled.""" @overload def __init__( self, *, - operation_id: Optional[str] = None, - creation_time: Optional[datetime.datetime] = None, - activation_time: Optional[datetime.datetime] = None, - completed_at: Optional[datetime.datetime] = None, - operation_errors: Optional[List["_models.OperationErrorDetails"]] = None, - request_error_code: Optional[str] = None, - request_error_details: Optional[str] = None, + not_before_timeout: Optional[str] = None, + enable: Optional[bool] = None, ) -> None: ... @overload @@ -1383,29 +5826,35 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class RecurringActionsResourceOperationResult(_Model): - """The response from scheduled action resource requests, which contains the status of each - resource. +class UefiSettings(_Model): + """Specifies the security settings like secure boot and vTPM used while creating the virtual + machine. Minimum api-version: 2020-12-01. - :ivar total_resources: The total number of resources operated on. Required. - :vartype total_resources: int - :ivar resources_statuses: The resource status of for each resource. Required. - :vartype resources_statuses: list[~azure.mgmt.computeschedule.models.ResourceStatus] + :ivar secure_boot_enabled: Specifies whether secure boot should be enabled on the virtual + machine. Minimum compute api-version: 2020-12-01. + :vartype secure_boot_enabled: bool + :ivar v_tpm_enabled: Specifies whether vTPM should be enabled on the virtual machine. Minimum + compute api-version: 2020-12-01. + :vartype v_tpm_enabled: bool """ - total_resources: int = rest_field(name="totalResources", visibility=["read", "create", "update", "delete", "query"]) - """The total number of resources operated on. Required.""" - resources_statuses: List["_models.ResourceStatus"] = rest_field( - name="resourcesStatuses", visibility=["read", "create", "update", "delete", "query"] + secure_boot_enabled: Optional[bool] = rest_field( + name="secureBootEnabled", visibility=["read", "create", "update", "delete", "query"] ) - """The resource status of for each resource. Required.""" + """Specifies whether secure boot should be enabled on the virtual machine. Minimum compute + api-version: 2020-12-01.""" + v_tpm_enabled: Optional[bool] = rest_field( + name="vTpmEnabled", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether vTPM should be enabled on the virtual machine. Minimum compute api-version: + 2020-12-01.""" @overload def __init__( self, *, - total_resources: int, - resources_statuses: List["_models.ResourceStatus"], + secure_boot_enabled: Optional[bool] = None, + v_tpm_enabled: Optional[bool] = None, ) -> None: ... @overload @@ -1419,23 +5868,38 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceAttachRequest(_Model): - """Request model to attach a list of scheduled action resources. +class UserAssignedIdentitiesValue(_Model): + """UserAssignedIdentitiesValue. - :ivar resources: List of resources to be attached/patched. Required. - :vartype resources: list[~azure.mgmt.computeschedule.models.ScheduledActionResource] + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str """ - resources: List["_models.ScheduledActionResource"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal id of user assigned identity.""" + client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) + """The client id of user assigned identity.""" + + +class UserInitiatedReboot(_Model): + """Specifies Reboot related Scheduled Event related configurations. + + :ivar automatically_approve: Specifies Reboot Scheduled Event related configurations. + :vartype automatically_approve: bool + """ + + automatically_approve: Optional[bool] = rest_field( + name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"] ) - """List of resources to be attached/patched. Required.""" + """Specifies Reboot Scheduled Event related configurations.""" @overload def __init__( self, *, - resources: List["_models.ScheduledActionResource"], + automatically_approve: Optional[bool] = None, ) -> None: ... @overload @@ -1449,21 +5913,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceDetachRequest(_Model): - """Request model to detach a list of scheduled action resources. +class UserInitiatedRedeploy(_Model): + """Specifies Redeploy related Scheduled Event related configurations. - :ivar resources: List of resources to be detached. Required. - :vartype resources: list[str] + :ivar automatically_approve: Specifies Redeploy Scheduled Event related configurations. + :vartype automatically_approve: bool """ - resources: List[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """List of resources to be detached. Required.""" + automatically_approve: Optional[bool] = rest_field( + name="automaticallyApprove", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies Redeploy Scheduled Event related configurations.""" @overload def __init__( self, *, - resources: List[str], + automatically_approve: Optional[bool] = None, ) -> None: ... @overload @@ -1477,42 +5943,58 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceOperation(_Model): - """High level response from an operation on a resource. - - :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. - :vartype resource_id: str - :ivar error_code: Resource level error code if it exists. - :vartype error_code: str - :ivar error_details: Resource level error details if they exist. - :vartype error_details: str - :ivar operation: Details of the operation performed on a resource. - :vartype operation: ~azure.mgmt.computeschedule.models.ResourceOperationDetails +class VaultCertificate(_Model): + """Describes a single certificate reference in a Key Vault, and where the certificate should + reside on the VM. + + :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as + a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault + `_. In this case, your + certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded + in UTF-8:

{
'data':'',
'dataType':'pfx',
+ 'password':''
}
To install certificates on a virtual machine it is + recommended to use the `Azure Key Vault virtual machine extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_. + :vartype certificate_url: str + :ivar certificate_store: For Windows VMs, specifies the certificate store on the Virtual + Machine to which the certificate should be added. The specified certificate store is implicitly + in the LocalMachine account. For Linux VMs, the certificate file is placed under the + /var/lib/waagent directory, with the file name .crt for the X509 + certificate file and .prv for private key. Both of these files are .pem + formatted. + :vartype certificate_store: str """ - resource_id: Optional[str] = rest_field( - name="resourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """Unique identifier for the resource involved in the operation, eg ArmId.""" - error_code: Optional[str] = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) - """Resource level error code if it exists.""" - error_details: Optional[str] = rest_field( - name="errorDetails", visibility=["read", "create", "update", "delete", "query"] + certificate_url: Optional[str] = rest_field( + name="certificateUrl", visibility=["read", "create", "update", "delete", "query"] ) - """Resource level error details if they exist.""" - operation: Optional["_models.ResourceOperationDetails"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a + secret to the Key Vault, see `Add a key or secret to the key vault + `_. In this case, your + certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded + in UTF-8:

{
'data':'',
'dataType':'pfx',
+ 'password':''
}
To install certificates on a virtual machine it is + recommended to use the `Azure Key Vault virtual machine extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_.""" + certificate_store: Optional[str] = rest_field( + name="certificateStore", visibility=["read", "create", "update", "delete", "query"] ) - """Details of the operation performed on a resource.""" + """For Windows VMs, specifies the certificate store on the Virtual Machine to which the + certificate should be added. The specified certificate store is implicitly in the LocalMachine + account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, + with the file name .crt for the X509 certificate file and + .prv for private key. Both of these files are .pem formatted.""" @overload def __init__( self, *, - resource_id: Optional[str] = None, - error_code: Optional[str] = None, - error_details: Optional[str] = None, - operation: Optional["_models.ResourceOperationDetails"] = None, + certificate_url: Optional[str] = None, + certificate_store: Optional[str] = None, ) -> None: ... @overload @@ -1526,102 +6008,32 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceOperationDetails(_Model): - """The details of a response from an operation on a resource. +class VaultSecretGroup(_Model): + """Describes a set of certificates which are all in the same Key Vault. - :ivar operation_id: Operation identifier for the unique operation. Required. - :vartype operation_id: str - :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. - :vartype resource_id: str - :ivar op_type: Type of operation performed on the resources. Known values are: "Unknown", - "Start", "Deallocate", and "Hibernate". - :vartype op_type: str or ~azure.mgmt.computeschedule.models.ResourceOperationType - :ivar subscription_id: Subscription id attached to the request. - :vartype subscription_id: str - :ivar deadline: Deadline for the operation. - :vartype deadline: ~datetime.datetime - :ivar deadline_type: Type of deadline of the operation. Known values are: "Unknown", - "InitiateAt", and "CompleteBy". - :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType - :ivar state: Current state of the operation. Known values are: "Unknown", "PendingScheduling", - "Scheduled", "PendingExecution", "Executing", "Succeeded", "Failed", "Cancelled", and - "Blocked". - :vartype state: str or ~azure.mgmt.computeschedule.models.OperationState - :ivar timezone: Timezone for the operation. - :vartype timezone: str - :ivar time_zone: Timezone for the operation. - :vartype time_zone: str - :ivar resource_operation_error: Operation level errors if they exist. - :vartype resource_operation_error: ~azure.mgmt.computeschedule.models.ResourceOperationError - :ivar completed_at: Time the operation was complete if errors are null. - :vartype completed_at: ~datetime.datetime - :ivar retry_policy: Retry policy the user can pass. - :vartype retry_policy: ~azure.mgmt.computeschedule.models.RetryPolicy + :ivar source_vault: The relative URL of the Key Vault containing all of the certificates in + VaultCertificates. + :vartype source_vault: ~azure.mgmt.computeschedule.models.SubResource + :ivar vault_certificates: The list of key vault references in SourceVault which contain + certificates. + :vartype vault_certificates: list[~azure.mgmt.computeschedule.models.VaultCertificate] """ - operation_id: str = rest_field(name="operationId", visibility=["read", "create", "update", "delete", "query"]) - """Operation identifier for the unique operation. Required.""" - resource_id: Optional[str] = rest_field( - name="resourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """Unique identifier for the resource involved in the operation, eg ArmId.""" - op_type: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field( - name="opType", visibility=["read", "create", "update", "delete", "query"] - ) - """Type of operation performed on the resources. Known values are: \"Unknown\", \"Start\", - \"Deallocate\", and \"Hibernate\".""" - subscription_id: Optional[str] = rest_field( - name="subscriptionId", visibility=["read", "create", "update", "delete", "query"] - ) - """Subscription id attached to the request.""" - deadline: Optional[datetime.datetime] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """Deadline for the operation.""" - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( - name="deadlineType", visibility=["read", "create", "update", "delete", "query"] - ) - """Type of deadline of the operation. Known values are: \"Unknown\", \"InitiateAt\", and - \"CompleteBy\".""" - state: Optional[Union[str, "_models.OperationState"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Current state of the operation. Known values are: \"Unknown\", \"PendingScheduling\", - \"Scheduled\", \"PendingExecution\", \"Executing\", \"Succeeded\", \"Failed\", \"Cancelled\", - and \"Blocked\".""" - timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Timezone for the operation.""" - time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) - """Timezone for the operation.""" - resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field( - name="resourceOperationError", visibility=["read", "create", "update", "delete", "query"] - ) - """Operation level errors if they exist.""" - completed_at: Optional[datetime.datetime] = rest_field( - name="completedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + source_vault: Optional["_models.SubResource"] = rest_field( + name="sourceVault", visibility=["read", "create", "update", "delete", "query"] ) - """Time the operation was complete if errors are null.""" - retry_policy: Optional["_models.RetryPolicy"] = rest_field( - name="retryPolicy", visibility=["read", "create", "update", "delete", "query"] + """The relative URL of the Key Vault containing all of the certificates in VaultCertificates.""" + vault_certificates: Optional[list["_models.VaultCertificate"]] = rest_field( + name="vaultCertificates", visibility=["read", "create", "update", "delete", "query"] ) - """Retry policy the user can pass.""" + """The list of key vault references in SourceVault which contain certificates.""" @overload def __init__( self, *, - operation_id: str, - resource_id: Optional[str] = None, - op_type: Optional[Union[str, "_models.ResourceOperationType"]] = None, - subscription_id: Optional[str] = None, - deadline: Optional[datetime.datetime] = None, - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = None, - state: Optional[Union[str, "_models.OperationState"]] = None, - timezone: Optional[str] = None, - time_zone: Optional[str] = None, - resource_operation_error: Optional["_models.ResourceOperationError"] = None, - completed_at: Optional[datetime.datetime] = None, - retry_policy: Optional["_models.RetryPolicy"] = None, + source_vault: Optional["_models.SubResource"] = None, + vault_certificates: Optional[list["_models.VaultCertificate"]] = None, ) -> None: ... @overload @@ -1635,26 +6047,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceOperationError(_Model): - """These describe errors that occur at the resource level. +class VirtualHardDisk(_Model): + """Describes the uri of a disk. - :ivar error_code: Code for the error eg 404, 500. Required. - :vartype error_code: str - :ivar error_details: Detailed message about the error. Required. - :vartype error_details: str + :ivar uri: Specifies the virtual hard disk's uri. + :vartype uri: str """ - error_code: str = rest_field(name="errorCode", visibility=["read", "create", "update", "delete", "query"]) - """Code for the error eg 404, 500. Required.""" - error_details: str = rest_field(name="errorDetails", visibility=["read", "create", "update", "delete", "query"]) - """Detailed message about the error. Required.""" + uri: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the virtual hard disk's uri.""" @overload def __init__( self, *, - error_code: str, - error_details: str, + uri: Optional[str] = None, ) -> None: ... @overload @@ -1668,23 +6075,53 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourcePatchRequest(_Model): - """Request model perform a resource operation in a list of resources. - - :ivar resources: The list of resources we watch to patch. Required. - :vartype resources: list[~azure.mgmt.computeschedule.models.ScheduledActionResource] +class VirtualMachineIdentity(_Model): + """Identity for the virtual machine. + + :ivar principal_id: The principal id of virtual machine identity. This property will only be + provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the virtual machine. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :ivar type: The type of identity used for the virtual machine. The type 'SystemAssigned, + UserAssigned' includes both an implicitly created identity and a set of user assigned + identities. The type 'None' will remove any identities from the virtual machine. Known values + are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". + :vartype type: str or ~azure.mgmt.computeschedule.models.ResourceIdentityType + :ivar user_assigned_identities: The list of user identities associated with the Virtual + Machine. The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.computeschedule.models.UserAssignedIdentitiesValue] """ - resources: List["_models.ScheduledActionResource"] = rest_field( + principal_id: Optional[str] = rest_field(name="principalId", visibility=["read"]) + """The principal id of virtual machine identity. This property will only be provided for a system + assigned identity.""" + tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) + """The tenant id associated with the virtual machine. This property will only be provided for a + system assigned identity.""" + type: Optional[Union[str, "_models.ResourceIdentityType"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The list of resources we watch to patch. Required.""" + """The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' + includes both an implicitly created identity and a set of user assigned identities. The type + 'None' will remove any identities from the virtual machine. Known values are: + \"SystemAssigned\", \"UserAssigned\", \"SystemAssigned, UserAssigned\", and \"None\".""" + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = rest_field( + name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of user identities associated with the Virtual Machine. The user identity dictionary + key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.""" @overload def __init__( self, *, - resources: List["_models.ScheduledActionResource"], + type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentitiesValue"]] = None, ) -> None: ... @overload @@ -1698,54 +6135,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceProvisionPayload(_Model): - """Resource creation data model. +class VirtualMachineIpTag(_Model): + """Contains the IP tag associated with the public IP address. - :ivar base_profile: JSON object that contains VM properties that are common across all VMs in - this batch (if you want to create 100 VMs in this request, and they all have same vmSize, then - include vmSize in baseProfile). - :vartype base_profile: dict[str, any] - :ivar resource_overrides: JSON array, that contains VM properties that should to be overridden - for each VM in the batch (if you want to create 100 VMs, they all need a distinct computerName - property, you pass computerNames for each VM in batch in this array), service will merge - baseProfile with VM specific overrides and create a merged VMProfile. - :vartype resource_overrides: list[dict[str, any]] - :ivar resource_count: Number of VMs to be created. Required. - :vartype resource_count: int - :ivar resource_prefix: if resourceOverrides doesn't contain "name", service will create name - based of prefix and ResourceCount e.g. resourceprefix-0,resourceprefix-1.. - :vartype resource_prefix: str + :ivar ip_tag_type: IP tag type. Example: FirstPartyUsage. + :vartype ip_tag_type: str + :ivar tag: IP tag associated with the public IP. Example: SQL, Storage etc. + :vartype tag: str """ - base_profile: Optional[Dict[str, Any]] = rest_field( - name="baseProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """JSON object that contains VM properties that are common across all VMs in this batch (if you - want to create 100 VMs in this request, and they all have same vmSize, then include vmSize in - baseProfile).""" - resource_overrides: Optional[List[Dict[str, Any]]] = rest_field( - name="resourceOverrides", visibility=["read", "create", "update", "delete", "query"] - ) - """JSON array, that contains VM properties that should to be overridden for each VM in the batch - (if you want to create 100 VMs, they all need a distinct computerName property, you pass - computerNames for each VM in batch in this array), service will merge baseProfile with VM - specific overrides and create a merged VMProfile.""" - resource_count: int = rest_field(name="resourceCount", visibility=["read", "create", "update", "delete", "query"]) - """Number of VMs to be created. Required.""" - resource_prefix: Optional[str] = rest_field( - name="resourcePrefix", visibility=["read", "create", "update", "delete", "query"] + ip_tag_type: Optional[str] = rest_field( + name="ipTagType", visibility=["read", "create", "update", "delete", "query"] ) - """if resourceOverrides doesn't contain \"name\", service will create name based of prefix and - ResourceCount e.g. resourceprefix-0,resourceprefix-1..""" + """IP tag type. Example: FirstPartyUsage.""" + tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """IP tag associated with the public IP. Example: SQL, Storage etc.""" @overload def __init__( self, *, - resource_count: int, - base_profile: Optional[Dict[str, Any]] = None, - resource_overrides: Optional[List[Dict[str, Any]]] = None, - resource_prefix: Optional[str] = None, + ip_tag_type: Optional[str] = None, + tag: Optional[str] = None, ) -> None: ... @overload @@ -1759,35 +6170,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceResultSummary(_Model): - """The status of the resources. - - :ivar code: The error code for those resources. In case of success, code is populated with - Success. Required. - :vartype code: str - :ivar count: The number of resources that the code applies to. Required. - :vartype count: int - :ivar error_details: The error details for the resources. Not populated on success cases. - :vartype error_details: ~azure.core.ODataV4Format - """ +class VirtualMachineNetworkInterfaceConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network interface configurations. - code: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The error code for those resources. In case of success, code is populated with Success. - Required.""" - count: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The number of resources that the code applies to. Required.""" - error_details: Optional[ODataV4Format] = rest_field( - name="errorDetails", visibility=["read", "create", "update", "delete", "query"] + :ivar name: The network interface configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machine network profile's IP configuration. + :vartype properties: + ~azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceConfigurationProperties + :ivar tags: Resource tags applied to the networkInterface address created by this + NetworkInterfaceConfiguration. + :vartype tags: dict[str, str] + """ + + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The network interface configuration name. Required.""" + properties: Optional["_models.VirtualMachineNetworkInterfaceConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The error details for the resources. Not populated on success cases.""" + """Describes a virtual machine network profile's IP configuration.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags applied to the networkInterface address created by this + NetworkInterfaceConfiguration.""" @overload def __init__( self, *, - code: str, - count: int, - error_details: Optional[ODataV4Format] = None, + name: str, + properties: Optional["_models.VirtualMachineNetworkInterfaceConfigurationProperties"] = None, + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -1801,21 +6213,111 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Resources(_Model): - """The resources needed for the user request. - - :ivar ids: The resource ids used for the request. Required. - :vartype ids: list[str] +class VirtualMachineNetworkInterfaceConfigurationProperties(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network profile's IP configuration. + + :ivar primary: Specifies the primary network interface in case the virtual machine has more + than 1 network interface. + :vartype primary: bool + :ivar delete_option: Specify what happens to the network interface when the VM is deleted. + Known values are: "Delete" and "Detach". + :vartype delete_option: str or ~azure.mgmt.computeschedule.models.DeleteOptions + :ivar enable_accelerated_networking: Specifies whether the network interface is accelerated + networking-enabled. + :vartype enable_accelerated_networking: bool + :ivar disable_tcp_state_tracking: Specifies whether the network interface is disabled for tcp + state tracking. + :vartype disable_tcp_state_tracking: bool + :ivar enable_fpga: Specifies whether the network interface is FPGA networking-enabled. + :vartype enable_fpga: bool + :ivar enable_ip_forwarding: Whether IP forwarding enabled on this NIC. + :vartype enable_ip_forwarding: bool + :ivar network_security_group: The network security group. + :vartype network_security_group: ~azure.mgmt.computeschedule.models.SubResource + :ivar dns_settings: The dns settings to be applied on the network interfaces. + :vartype dns_settings: + ~azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration + :ivar ip_configurations: Specifies the IP configurations of the network interface. Required. + :vartype ip_configurations: + list[~azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceIPConfiguration] + :ivar dscp_configuration: The DSCP configuration for the network interface. + :vartype dscp_configuration: ~azure.mgmt.computeschedule.models.SubResource + :ivar auxiliary_mode: Specifies whether the Auxiliary mode is enabled for the Network Interface + resource. Known values are: "None", "AcceleratedConnections", and "Floating". + :vartype auxiliary_mode: str or + ~azure.mgmt.computeschedule.models.NetworkInterfaceAuxiliaryMode + :ivar auxiliary_sku: Specifies whether the Auxiliary sku is enabled for the Network Interface + resource. Known values are: "None", "A1", "A2", "A4", and "A8". + :vartype auxiliary_sku: str or ~azure.mgmt.computeschedule.models.NetworkInterfaceAuxiliarySku """ - ids: List[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resource ids used for the request. Required.""" + primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify what happens to the network interface when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + enable_accelerated_networking: Optional[bool] = rest_field( + name="enableAcceleratedNetworking", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the network interface is accelerated networking-enabled.""" + disable_tcp_state_tracking: Optional[bool] = rest_field( + name="disableTcpStateTracking", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the network interface is disabled for tcp state tracking.""" + enable_fpga: Optional[bool] = rest_field( + name="enableFpga", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the network interface is FPGA networking-enabled.""" + enable_ip_forwarding: Optional[bool] = rest_field( + name="enableIPForwarding", visibility=["read", "create", "update", "delete", "query"] + ) + """Whether IP forwarding enabled on this NIC.""" + network_security_group: Optional["_models.SubResource"] = rest_field( + name="networkSecurityGroup", visibility=["read", "create", "update", "delete", "query"] + ) + """The network security group.""" + dns_settings: Optional["_models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration"] = rest_field( + name="dnsSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The dns settings to be applied on the network interfaces.""" + ip_configurations: list["_models.VirtualMachineNetworkInterfaceIPConfiguration"] = rest_field( + name="ipConfigurations", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the IP configurations of the network interface. Required.""" + dscp_configuration: Optional["_models.SubResource"] = rest_field( + name="dscpConfiguration", visibility=["read", "create", "update", "delete", "query"] + ) + """The DSCP configuration for the network interface.""" + auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = rest_field( + name="auxiliaryMode", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the Auxiliary mode is enabled for the Network Interface resource. Known + values are: \"None\", \"AcceleratedConnections\", and \"Floating\".""" + auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = rest_field( + name="auxiliarySku", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies whether the Auxiliary sku is enabled for the Network Interface resource. Known values + are: \"None\", \"A1\", \"A2\", \"A4\", and \"A8\".""" @overload def __init__( self, *, - ids: List[str], + ip_configurations: list["_models.VirtualMachineNetworkInterfaceIPConfiguration"], + primary: Optional[bool] = None, + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None, + enable_accelerated_networking: Optional[bool] = None, + disable_tcp_state_tracking: Optional[bool] = None, + enable_fpga: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + network_security_group: Optional["_models.SubResource"] = None, + dns_settings: Optional["_models.VirtualMachineNetworkInterfaceDnsSettingsConfiguration"] = None, + dscp_configuration: Optional["_models.SubResource"] = None, + auxiliary_mode: Optional[Union[str, "_models.NetworkInterfaceAuxiliaryMode"]] = None, + auxiliary_sku: Optional[Union[str, "_models.NetworkInterfaceAuxiliarySku"]] = None, ) -> None: ... @overload @@ -1829,35 +6331,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceStatus(_Model): - """The status of a resource after a resource level operation was performed. +class VirtualMachineNetworkInterfaceDnsSettingsConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. - :ivar resource_id: The arm identifier of the resource. Required. - :vartype resource_id: str - :ivar status: The state the resource is currently on. Required. Known values are: "Succeeded" - and "Failed". - :vartype status: str or ~azure.mgmt.computeschedule.models.ResourceOperationStatus - :ivar error: Errors encountered while trying to perform. - :vartype error: ~azure.core.ODataV4Format + :ivar dns_servers: List of DNS servers IP addresses. + :vartype dns_servers: list[str] """ - resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) - """The arm identifier of the resource. Required.""" - status: Union[str, "_models.ResourceOperationStatus"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + dns_servers: Optional[list[str]] = rest_field( + name="dnsServers", visibility=["read", "create", "update", "delete", "query"] ) - """The state the resource is currently on. Required. Known values are: \"Succeeded\" and - \"Failed\".""" - error: Optional[ODataV4Format] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Errors encountered while trying to perform.""" + """List of DNS servers IP addresses.""" @overload def __init__( self, *, - resource_id: str, - status: Union[str, "_models.ResourceOperationStatus"], - error: Optional[ODataV4Format] = None, + dns_servers: Optional[list[str]] = None, ) -> None: ... @overload @@ -1871,30 +6361,29 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class RetryPolicy(_Model): - """The retry policy for the user request. +class VirtualMachineNetworkInterfaceIPConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network profile's IP configuration. - :ivar retry_count: Retry count for user request. - :vartype retry_count: int - :ivar retry_window_in_minutes: Retry window in minutes for user request. - :vartype retry_window_in_minutes: int + :ivar name: The IP configuration name. Required. + :vartype name: str + :ivar properties: Describes a virtual machine network interface IP configuration properties. + :vartype properties: + ~azure.mgmt.computeschedule.models.VirtualMachineNetworkInterfaceIPConfigurationProperties """ - retry_count: Optional[int] = rest_field( - name="retryCount", visibility=["read", "create", "update", "delete", "query"] - ) - """Retry count for user request.""" - retry_window_in_minutes: Optional[int] = rest_field( - name="retryWindowInMinutes", visibility=["read", "create", "update", "delete", "query"] + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The IP configuration name. Required.""" + properties: Optional["_models.VirtualMachineNetworkInterfaceIPConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Retry window in minutes for user request.""" + """Describes a virtual machine network interface IP configuration properties.""" @overload def __init__( self, *, - retry_count: Optional[int] = None, - retry_window_in_minutes: Optional[int] = None, + name: str, + properties: Optional["_models.VirtualMachineNetworkInterfaceIPConfigurationProperties"] = None, ) -> None: ... @overload @@ -1908,49 +6397,81 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Schedule(_Model): - """The schedule details for the user request. - - :ivar deadline: The deadline for the operation. - :vartype deadline: ~datetime.datetime - :ivar dead_line: The deadline for the operation. - :vartype dead_line: ~datetime.datetime - :ivar timezone: The timezone for the operation. - :vartype timezone: str - :ivar time_zone: The timezone for the operation. - :vartype time_zone: str - :ivar deadline_type: The deadlinetype of the operation, this can either be InitiateAt or - CompleteBy. Required. Known values are: "Unknown", "InitiateAt", and "CompleteBy". - :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType +class VirtualMachineNetworkInterfaceIPConfigurationProperties(_Model): # pylint: disable=name-too-long + """Describes a virtual machine network interface IP configuration properties. + + :ivar subnet: Specifies the identifier of the subnet. + :vartype subnet: ~azure.mgmt.computeschedule.models.SubResource + :ivar primary: Specifies the primary network interface in case the virtual machine has more + than 1 network interface. + :vartype primary: bool + :ivar public_ip_address_configuration: The publicIPAddressConfiguration. + :vartype public_ip_address_configuration: + ~azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressConfiguration + :ivar private_ip_address_version: Available from Api-Version 2017-03-30 onwards, it represents + whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible + values are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6". + :vartype private_ip_address_version: str or ~azure.mgmt.computeschedule.models.IPVersions + :ivar application_security_groups: Specifies an array of references to application security + group. + :vartype application_security_groups: list[~azure.mgmt.computeschedule.models.SubResource] + :ivar application_gateway_backend_address_pools: Specifies an array of references to backend + address pools of application gateways. A virtual machine can reference backend address pools of + multiple application gateways. Multiple virtual machines cannot use the same application + gateway. + :vartype application_gateway_backend_address_pools: + list[~azure.mgmt.computeschedule.models.SubResource] + :ivar load_balancer_backend_address_pools: Specifies an array of references to backend address + pools of load balancers. A virtual machine can reference backend address pools of one public + and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load + balancer]. + :vartype load_balancer_backend_address_pools: + list[~azure.mgmt.computeschedule.models.SubResource] """ - deadline: Optional[datetime.datetime] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + subnet: Optional["_models.SubResource"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the identifier of the subnet.""" + primary: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the primary network interface in case the virtual machine has more than 1 network + interface.""" + public_ip_address_configuration: Optional["_models.VirtualMachinePublicIPAddressConfiguration"] = rest_field( + name="publicIPAddressConfiguration", visibility=["read", "create", "update", "delete", "query"] ) - """The deadline for the operation.""" - dead_line: Optional[datetime.datetime] = rest_field( - name="deadLine", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + """The publicIPAddressConfiguration.""" + private_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = rest_field( + name="privateIPAddressVersion", visibility=["read", "create", "update", "delete", "query"] ) - """The deadline for the operation.""" - timezone: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The timezone for the operation.""" - time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) - """The timezone for the operation.""" - deadline_type: Union[str, "_models.DeadlineType"] = rest_field( - name="deadlineType", visibility=["read", "create", "update", "delete", "query"] + """Available from Api-Version 2017-03-30 onwards, it represents whether the specific + ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and + 'IPv6'. Known values are: \"IPv4\" and \"IPv6\".""" + application_security_groups: Optional[list["_models.SubResource"]] = rest_field( + name="applicationSecurityGroups", visibility=["read", "create", "update", "delete", "query"] ) - """The deadlinetype of the operation, this can either be InitiateAt or CompleteBy. Required. Known - values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" + """Specifies an array of references to application security group.""" + application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field( + name="applicationGatewayBackendAddressPools", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies an array of references to backend address pools of application gateways. A virtual + machine can reference backend address pools of multiple application gateways. Multiple virtual + machines cannot use the same application gateway.""" + load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = rest_field( + name="loadBalancerBackendAddressPools", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies an array of references to backend address pools of load balancers. A virtual machine + can reference backend address pools of one public and one internal load balancer. [Multiple + virtual machines cannot use the same basic sku load balancer].""" @overload def __init__( self, *, - deadline_type: Union[str, "_models.DeadlineType"], - deadline: Optional[datetime.datetime] = None, - dead_line: Optional[datetime.datetime] = None, - timezone: Optional[str] = None, - time_zone: Optional[str] = None, + subnet: Optional["_models.SubResource"] = None, + primary: Optional[bool] = None, + public_ip_address_configuration: Optional["_models.VirtualMachinePublicIPAddressConfiguration"] = None, + private_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = None, + application_security_groups: Optional[list["_models.SubResource"]] = None, + application_gateway_backend_address_pools: Optional[list["_models.SubResource"]] = None, + load_balancer_backend_address_pools: Optional[list["_models.SubResource"]] = None, ) -> None: ... @overload @@ -1964,37 +6485,41 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class TrackedResource(Resource): - """Tracked Resource. +class VirtualMachinePublicIPAddressConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines IP Configuration's PublicIPAddress configuration. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The publicIP address configuration name. Required. :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - :ivar tags: Resource tags. + :ivar properties: Describes a virtual machines IP Configuration's PublicIPAddress + configuration. + :vartype properties: + ~azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressConfigurationProperties + :ivar sku: Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + :vartype sku: ~azure.mgmt.computeschedule.models.PublicIPAddressSku + :ivar tags: Resource tags applied to the publicIP address created by this + PublicIPAddressConfiguration. :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - location: str = rest_field(visibility=["read", "create"]) - """The geo-location where the resource lives. Required.""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The publicIP address configuration name. Required.""" + properties: Optional["_models.VirtualMachinePublicIPAddressConfigurationProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Describes a virtual machines IP Configuration's PublicIPAddress configuration.""" + sku: Optional["_models.PublicIPAddressSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.""" + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Resource tags applied to the publicIP address created by this PublicIPAddressConfiguration.""" @overload def __init__( self, *, - location: str, - tags: Optional[Dict[str, str]] = None, + name: str, + properties: Optional["_models.VirtualMachinePublicIPAddressConfigurationProperties"] = None, + sku: Optional["_models.PublicIPAddressSku"] = None, + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -2008,40 +6533,74 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledAction(TrackedResource): - """The scheduled action resource. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar location: The geo-location where the resource lives. Required. - :vartype location: str - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionProperties +class VirtualMachinePublicIPAddressConfigurationProperties(_Model): # pylint: disable=name-too-long + """Describes a virtual machines IP Configuration's PublicIPAddress configuration. + + :ivar idle_timeout_in_minutes: The idle timeout of the public IP address. + :vartype idle_timeout_in_minutes: int + :ivar delete_option: Specify what happens to the public IP address when the VM is deleted. + Known values are: "Delete" and "Detach". + :vartype delete_option: str or ~azure.mgmt.computeschedule.models.DeleteOptions + :ivar dns_settings: The dns settings to be applied on the publicIP addresses . + :vartype dns_settings: + ~azure.mgmt.computeschedule.models.VirtualMachinePublicIPAddressDnsSettingsConfiguration + :ivar ip_tags: The list of IP tags associated with the public IP address. + :vartype ip_tags: list[~azure.mgmt.computeschedule.models.VirtualMachineIpTag] + :ivar public_ip_prefix: The PublicIPPrefix from which to allocate publicIP addresses. + :vartype public_ip_prefix: ~azure.mgmt.computeschedule.models.SubResource + :ivar public_ip_address_version: Available from Api-Version 2019-07-01 onwards, it represents + whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values + are: 'IPv4' and 'IPv6'. Known values are: "IPv4" and "IPv6". + :vartype public_ip_address_version: str or ~azure.mgmt.computeschedule.models.IPVersions + :ivar public_ip_allocation_method: Specify the public IP allocation type. Known values are: + "Dynamic" and "Static". + :vartype public_ip_allocation_method: str or + ~azure.mgmt.computeschedule.models.PublicIPAllocationMethod """ - properties: Optional["_models.ScheduledActionProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + idle_timeout_in_minutes: Optional[int] = rest_field( + name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" + """The idle timeout of the public IP address.""" + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = rest_field( + name="deleteOption", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify what happens to the public IP address when the VM is deleted. Known values are: + \"Delete\" and \"Detach\".""" + dns_settings: Optional["_models.VirtualMachinePublicIPAddressDnsSettingsConfiguration"] = rest_field( + name="dnsSettings", visibility=["read", "create", "update", "delete", "query"] + ) + """The dns settings to be applied on the publicIP addresses .""" + ip_tags: Optional[list["_models.VirtualMachineIpTag"]] = rest_field( + name="ipTags", visibility=["read", "create", "update", "delete", "query"] + ) + """The list of IP tags associated with the public IP address.""" + public_ip_prefix: Optional["_models.SubResource"] = rest_field( + name="publicIPPrefix", visibility=["read", "create", "update", "delete", "query"] + ) + """The PublicIPPrefix from which to allocate publicIP addresses.""" + public_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = rest_field( + name="publicIPAddressVersion", visibility=["read", "create", "update", "delete", "query"] + ) + """Available from Api-Version 2019-07-01 onwards, it represents whether the specific + ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and + 'IPv6'. Known values are: \"IPv4\" and \"IPv6\".""" + public_ip_allocation_method: Optional[Union[str, "_models.PublicIPAllocationMethod"]] = rest_field( + name="publicIPAllocationMethod", visibility=["read", "create", "update", "delete", "query"] + ) + """Specify the public IP allocation type. Known values are: \"Dynamic\" and \"Static\".""" @overload def __init__( self, *, - location: str, - tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.ScheduledActionProperties"] = None, + idle_timeout_in_minutes: Optional[int] = None, + delete_option: Optional[Union[str, "_models.DeleteOptions"]] = None, + dns_settings: Optional["_models.VirtualMachinePublicIPAddressDnsSettingsConfiguration"] = None, + ip_tags: Optional[list["_models.VirtualMachineIpTag"]] = None, + public_ip_prefix: Optional["_models.SubResource"] = None, + public_ip_address_version: Optional[Union[str, "_models.IPVersions"]] = None, + public_ip_allocation_method: Optional[Union[str, "_models.PublicIPAllocationMethod"]] = None, ) -> None: ... @overload @@ -2055,75 +6614,41 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionProperties(_Model): - """Scheduled action properties. +class VirtualMachinePublicIPAddressDnsSettingsConfiguration(_Model): # pylint: disable=name-too-long + """Describes a virtual machines network configuration's DNS settings. - :ivar resource_type: The type of resource the scheduled action is targeting. Required. Known - values are: "VirtualMachine" and "VirtualMachineScaleSet". - :vartype resource_type: str or ~azure.mgmt.computeschedule.models.ResourceType - :ivar action_type: The action the scheduled action should perform in the resources. Required. - Known values are: "Start", "Deallocate", and "Hibernate". - :vartype action_type: str or ~azure.mgmt.computeschedule.models.ScheduledActionType - :ivar start_time: The time which the scheduled action is supposed to start running. Required. - :vartype start_time: ~datetime.datetime - :ivar end_time: The time when the scheduled action is supposed to stop scheduling. - :vartype end_time: ~datetime.datetime - :ivar schedule: The schedule the scheduled action is supposed to follow. Required. - :vartype schedule: ~azure.mgmt.computeschedule.models.ScheduledActionsSchedule - :ivar notification_settings: The notification settings for the scheduled action. Required. - :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] - :ivar disabled: Tell if the scheduled action is disabled or not. - :vartype disabled: bool - :ivar provisioning_state: The status of the last provisioning operation performed on the - resource. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". - :vartype provisioning_state: str or ~azure.mgmt.computeschedule.models.ProvisioningState + :ivar domain_name_label: The Domain name label prefix of the PublicIPAddress resources that + will be created. The generated name label is the concatenation of the domain name label and vm + network profile unique ID. Required. + :vartype domain_name_label: str + :ivar domain_name_label_scope: The Domain name label scope of the PublicIPAddress resources + that will be created. The generated name label is the concatenation of the hashed domain name + label with policy according to the domain name label scope and vm network profile unique ID. + Known values are: "TenantReuse", "SubscriptionReuse", "ResourceGroupReuse", and "NoReuse". + :vartype domain_name_label_scope: str or + ~azure.mgmt.computeschedule.models.DomainNameLabelScopeTypes """ - resource_type: Union[str, "_models.ResourceType"] = rest_field( - name="resourceType", visibility=["read", "create", "update", "delete", "query"] - ) - """The type of resource the scheduled action is targeting. Required. Known values are: - \"VirtualMachine\" and \"VirtualMachineScaleSet\".""" - action_type: Union[str, "_models.ScheduledActionType"] = rest_field( - name="actionType", visibility=["read", "create", "update", "delete", "query"] - ) - """The action the scheduled action should perform in the resources. Required. Known values are: - \"Start\", \"Deallocate\", and \"Hibernate\".""" - start_time: datetime.datetime = rest_field( - name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The time which the scheduled action is supposed to start running. Required.""" - end_time: Optional[datetime.datetime] = rest_field( - name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The time when the scheduled action is supposed to stop scheduling.""" - schedule: "_models.ScheduledActionsSchedule" = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The schedule the scheduled action is supposed to follow. Required.""" - notification_settings: List["_models.NotificationProperties"] = rest_field( - name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + domain_name_label: str = rest_field( + name="domainNameLabel", visibility=["read", "create", "update", "delete", "query"] ) - """The notification settings for the scheduled action. Required.""" - disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Tell if the scheduled action is disabled or not.""" - provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] + """The Domain name label prefix of the PublicIPAddress resources that will be created. The + generated name label is the concatenation of the domain name label and vm network profile + unique ID. Required.""" + domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = rest_field( + name="domainNameLabelScope", visibility=["read", "create", "update", "delete", "query"] ) - """The status of the last provisioning operation performed on the resource. Known values are: - \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + """The Domain name label scope of the PublicIPAddress resources that will be created. The + generated name label is the concatenation of the hashed domain name label with policy according + to the domain name label scope and vm network profile unique ID. Known values are: + \"TenantReuse\", \"SubscriptionReuse\", \"ResourceGroupReuse\", and \"NoReuse\".""" @overload def __init__( self, *, - resource_type: Union[str, "_models.ResourceType"], - action_type: Union[str, "_models.ScheduledActionType"], - start_time: datetime.datetime, - schedule: "_models.ScheduledActionsSchedule", - notification_settings: List["_models.NotificationProperties"], - end_time: Optional[datetime.datetime] = None, - disabled: Optional[bool] = None, + domain_name_label: str, + domain_name_label_scope: Optional[Union[str, "_models.DomainNameLabelScopeTypes"]] = None, ) -> None: ... @overload @@ -2137,44 +6662,44 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionResource(_Model): - """Represents an scheduled action resource metadata. - - :ivar name: The name of the resource. Required. - :vartype name: str - :ivar id: The compute RP resource id of the resource in the scheduled actions scope. Required. - :vartype id: str - :ivar type: The type of resource. - :vartype type: str - :ivar resource_id: The ARM Id of the resource. - "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}". - Required. - :vartype resource_id: str - :ivar notification_settings: The desired notification settings for the specified resource. - :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] +class VMDiskSecurityProfile(_Model): + """Specifies the security profile settings for the managed disk. **Note:** It can only be set for + Confidential VMs. + + :ivar security_encryption_type: Specifies the EncryptionType of the managed disk. It is set to + DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, + VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM for not + persisting firmware state in the VMGuestState blob.. **Note:** It can be set for only + Confidential VMs. Known values are: "VMGuestStateOnly", "DiskWithVMGuestState", and + "NonPersistedTPM". + :vartype security_encryption_type: str or + ~azure.mgmt.computeschedule.models.SecurityEncryptionTypes + :ivar disk_encryption_set: Specifies the customer managed disk encryption set resource id for + the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and + VMGuest blob. + :vartype disk_encryption_set: ~azure.mgmt.computeschedule.models.DiskEncryptionSetParameters """ - name: str = rest_field(visibility=["read"]) - """The name of the resource. Required.""" - id: str = rest_field(visibility=["read"]) - """The compute RP resource id of the resource in the scheduled actions scope. Required.""" - type: Optional[str] = rest_field(visibility=["read"]) - """The type of resource.""" - resource_id: str = rest_field(name="resourceId", visibility=["read", "create", "update", "delete", "query"]) - """The ARM Id of the resource. - \"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachines/{vmName}\". - Required.""" - notification_settings: Optional[List["_models.NotificationProperties"]] = rest_field( - name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = rest_field( + name="securityEncryptionType", visibility=["read", "create", "update", "delete", "query"] ) - """The desired notification settings for the specified resource.""" + """Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for + encryption of the managed disk along with VMGuestState blob, VMGuestStateOnly for encryption of + just the VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the + VMGuestState blob.. **Note:** It can be set for only Confidential VMs. Known values are: + \"VMGuestStateOnly\", \"DiskWithVMGuestState\", and \"NonPersistedTPM\".""" + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = rest_field( + name="diskEncryptionSet", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the customer managed disk encryption set resource id for the managed disk that is + used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.""" @overload def __init__( self, *, - resource_id: str, - notification_settings: Optional[List["_models.NotificationProperties"]] = None, + security_encryption_type: Optional[Union[str, "_models.SecurityEncryptionTypes"]] = None, + disk_encryption_set: Optional["_models.DiskEncryptionSetParameters"] = None, ) -> None: ... @overload @@ -2188,34 +6713,63 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionResources(ExtensionResource): - """The scheduled action extension. +class VMGalleryApplication(_Model): + """Specifies the required information to reference a compute gallery application version. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.computeschedule.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionProperties + :ivar tags: Optional, Specifies a passthrough value for more generic context. + :vartype tags: str + :ivar order: Optional, Specifies the order in which the packages have to be installed. + :vartype order: int + :ivar package_reference_id: Specifies the GalleryApplicationVersion resource id on the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + Required. + :vartype package_reference_id: str + :ivar configuration_reference: Optional, Specifies the uri to an azure blob that will replace + the default configuration for the package if provided. + :vartype configuration_reference: str + :ivar treat_failure_as_deployment_failure: Optional, If true, any failure for any operation in + the VmApplication will fail the deployment. + :vartype treat_failure_as_deployment_failure: bool + :ivar enable_automatic_upgrade: If set to true, when a new Gallery Application version is + available in PIR/SIG, it will be automatically updated for the VM/VMSS. + :vartype enable_automatic_upgrade: bool """ - properties: Optional["_models.ScheduledActionProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + tags: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Optional, Specifies a passthrough value for more generic context.""" + order: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Optional, Specifies the order in which the packages have to be installed.""" + package_reference_id: str = rest_field( + name="packageReferenceId", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the GalleryApplicationVersion resource id on the form of + /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}. + Required.""" + configuration_reference: Optional[str] = rest_field( + name="configurationReference", visibility=["read", "create", "update", "delete", "query"] + ) + """Optional, Specifies the uri to an azure blob that will replace the default configuration for + the package if provided.""" + treat_failure_as_deployment_failure: Optional[bool] = rest_field( + name="treatFailureAsDeploymentFailure", visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" + """Optional, If true, any failure for any operation in the VmApplication will fail the deployment.""" + enable_automatic_upgrade: Optional[bool] = rest_field( + name="enableAutomaticUpgrade", visibility=["read", "create", "update", "delete", "query"] + ) + """If set to true, when a new Gallery Application version is available in PIR/SIG, it will be + automatically updated for the VM/VMSS.""" @overload def __init__( self, *, - properties: Optional["_models.ScheduledActionProperties"] = None, + package_reference_id: str, + tags: Optional[str] = None, + order: Optional[int] = None, + configuration_reference: Optional[str] = None, + treat_failure_as_deployment_failure: Optional[bool] = None, + enable_automatic_upgrade: Optional[bool] = None, ) -> None: ... @overload @@ -2229,70 +6783,26 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionsSchedule(_Model): - """Specify the schedule in which the scheduled action is supposed to follow. +class VmSizeProfile(_Model): + """A VM size profile with a name and rank for flex VM creation. - :ivar scheduled_time: The time the scheduled action is supposed to run on. Required. - :vartype scheduled_time: ~datetime.time - :ivar time_zone: The timezone the scheduled time is specified on. Required. - :vartype time_zone: str - :ivar requested_week_days: The week days the scheduled action is supposed to run on. Required. - :vartype requested_week_days: list[str or ~azure.mgmt.computeschedule.models.WeekDay] - :ivar requested_months: The months the scheduled action is supposed to run on. Required. - :vartype requested_months: list[str or ~azure.mgmt.computeschedule.models.Month] - :ivar requested_days_of_the_month: The days of the month the scheduled action is supposed to - run on. If empty, it means it will run on every day of the month. Required. - :vartype requested_days_of_the_month: list[int] - :ivar execution_parameters: The execution parameters the scheduled action is supposed to - follow. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar deadline_type: The type of deadline the scheduled action is supposed to follow for the - schedule. If no value is passed, it will default to InitiateAt. Known values are: "Unknown", - "InitiateAt", and "CompleteBy". - :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType + :ivar name: The name of the VM size, eg Standard_D2ads_v5. Required. + :vartype name: str + :ivar rank: The rank of this VM size in the priority order. + :vartype rank: int """ - scheduled_time: datetime.time = rest_field( - name="scheduledTime", visibility=["read", "create", "update", "delete", "query"] - ) - """The time the scheduled action is supposed to run on. Required.""" - time_zone: str = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) - """The timezone the scheduled time is specified on. Required.""" - requested_week_days: List[Union[str, "_models.WeekDay"]] = rest_field( - name="requestedWeekDays", visibility=["read", "create", "update", "delete", "query"] - ) - """The week days the scheduled action is supposed to run on. Required.""" - requested_months: List[Union[str, "_models.Month"]] = rest_field( - name="requestedMonths", visibility=["read", "create", "update", "delete", "query"] - ) - """The months the scheduled action is supposed to run on. Required.""" - requested_days_of_the_month: List[int] = rest_field( - name="requestedDaysOfTheMonth", visibility=["read", "create", "update", "delete", "query"] - ) - """The days of the month the scheduled action is supposed to run on. If empty, it means it will - run on every day of the month. Required.""" - execution_parameters: Optional["_models.ExecutionParameters"] = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] - ) - """The execution parameters the scheduled action is supposed to follow.""" - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field( - name="deadlineType", visibility=["read", "create", "update", "delete", "query"] - ) - """The type of deadline the scheduled action is supposed to follow for the schedule. If no value - is passed, it will default to InitiateAt. Known values are: \"Unknown\", \"InitiateAt\", and - \"CompleteBy\".""" + name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The name of the VM size, eg Standard_D2ads_v5. Required.""" + rank: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of this VM size in the priority order.""" @overload def __init__( self, *, - scheduled_time: datetime.time, - time_zone: str, - requested_week_days: List[Union[str, "_models.WeekDay"]], - requested_months: List[Union[str, "_models.Month"]], - requested_days_of_the_month: List[int], - execution_parameters: Optional["_models.ExecutionParameters"] = None, - deadline_type: Optional[Union[str, "_models.DeadlineType"]] = None, + name: str, + rank: Optional[int] = None, ) -> None: ... @overload @@ -2306,28 +6816,44 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionUpdate(_Model): - """The type used for update operations of the ScheduledAction. - - :ivar tags: Resource tags. - :vartype tags: dict[str, str] - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.computeschedule.models.ScheduledActionUpdateProperties +class VmSizeProperties(_Model): + """Specifies VM Size Property settings on the virtual machine. + + :ivar v_cpus_available: Specifies the number of vCPUs available for the VM. When this property + is not specified in the request body the default behavior is to set it to the value of vCPUs + available for that VM size exposed in api response of `List all available virtual machine sizes + in a region `_. + :vartype v_cpus_available: int + :ivar v_cpus_per_core: Specifies the vCPU to physical core ratio. When this property is not + specified in the request body the default behavior is set to the value of vCPUsPerCore for the + VM Size exposed in api response of `List all available virtual machine sizes in a region + `_. **Setting this + property to 1 also means that hyper-threading is disabled.**. + :vartype v_cpus_per_core: int """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Resource tags.""" - properties: Optional["_models.ScheduledActionUpdateProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + v_cpus_available: Optional[int] = rest_field( + name="vCpusAvailable", visibility=["read", "create", "update", "delete", "query"] ) - """The resource-specific properties for this resource.""" + """Specifies the number of vCPUs available for the VM. When this property is not specified in the + request body the default behavior is to set it to the value of vCPUs available for that VM size + exposed in api response of `List all available virtual machine sizes in a region + `_.""" + v_cpus_per_core: Optional[int] = rest_field( + name="vCpusPerCore", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the vCPU to physical core ratio. When this property is not specified in the request + body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api + response of `List all available virtual machine sizes in a region + `_. **Setting this + property to 1 also means that hyper-threading is disabled.**.""" @overload def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - properties: Optional["_models.ScheduledActionUpdateProperties"] = None, + v_cpus_available: Optional[int] = None, + v_cpus_per_core: Optional[int] = None, ) -> None: ... @overload @@ -2341,67 +6867,78 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ScheduledActionUpdateProperties(_Model): - """The updatable properties of the ScheduledAction. - - :ivar resource_type: The type of resource the scheduled action is targeting. Known values are: - "VirtualMachine" and "VirtualMachineScaleSet". - :vartype resource_type: str or ~azure.mgmt.computeschedule.models.ResourceType - :ivar action_type: The action the scheduled action should perform in the resources. Known - values are: "Start", "Deallocate", and "Hibernate". - :vartype action_type: str or ~azure.mgmt.computeschedule.models.ScheduledActionType - :ivar start_time: The time which the scheduled action is supposed to start running. - :vartype start_time: ~datetime.datetime - :ivar end_time: The time when the scheduled action is supposed to stop scheduling. - :vartype end_time: ~datetime.datetime - :ivar schedule: The schedule the scheduled action is supposed to follow. - :vartype schedule: ~azure.mgmt.computeschedule.models.ScheduledActionsSchedule - :ivar notification_settings: The notification settings for the scheduled action. - :vartype notification_settings: list[~azure.mgmt.computeschedule.models.NotificationProperties] - :ivar disabled: Tell if the scheduled action is disabled or not. - :vartype disabled: bool +class WindowsConfiguration(_Model): + """Specifies Windows operating system settings on the virtual machine. + + :ivar provision_vm_agent: Indicates whether virtual machine agent should be provisioned on the + virtual machine. When this property is not specified in the request body, it is set to true by + default. This will ensure that VM Agent is installed on the VM so that extensions can be added + to the VM later. + :vartype provision_vm_agent: bool + :ivar enable_automatic_updates: Indicates whether Automatic Updates is enabled for the Windows + virtual machine. Default value is true. For virtual machine scale sets, this property can be + updated and updates will take effect on OS reprovisioning. + :vartype enable_automatic_updates: bool + :ivar time_zone: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". + Possible values can be `TimeZoneInfo.Id + `_ value + from time zones returned by `TimeZoneInfo.GetSystemTimeZones + `_. + :vartype time_zone: str + :ivar additional_unattend_content: Specifies additional base-64 encoded XML formatted + information that can be included in the Unattend.xml file, which is used by Windows Setup. + :vartype additional_unattend_content: + list[~azure.mgmt.computeschedule.models.AdditionalUnattendContent] + :ivar patch_settings: [Preview Feature] Specifies settings related to VM Guest Patching on + Windows. + :vartype patch_settings: ~azure.mgmt.computeschedule.models.PatchSettings + :ivar win_rm: Specifies the Windows Remote Management listeners. This enables remote Windows + PowerShell. + :vartype win_rm: ~azure.mgmt.computeschedule.models.WinRMConfiguration """ - resource_type: Optional[Union[str, "_models.ResourceType"]] = rest_field( - name="resourceType", visibility=["read", "create", "update", "delete", "query"] - ) - """The type of resource the scheduled action is targeting. Known values are: \"VirtualMachine\" - and \"VirtualMachineScaleSet\".""" - action_type: Optional[Union[str, "_models.ScheduledActionType"]] = rest_field( - name="actionType", visibility=["read", "create", "update", "delete", "query"] + provision_vm_agent: Optional[bool] = rest_field( + name="provisionVMAgent", visibility=["read", "create", "update", "delete", "query"] ) - """The action the scheduled action should perform in the resources. Known values are: \"Start\", - \"Deallocate\", and \"Hibernate\".""" - start_time: Optional[datetime.datetime] = rest_field( - name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + """Indicates whether virtual machine agent should be provisioned on the virtual machine. When this + property is not specified in the request body, it is set to true by default. This will ensure + that VM Agent is installed on the VM so that extensions can be added to the VM later.""" + enable_automatic_updates: Optional[bool] = rest_field( + name="enableAutomaticUpdates", visibility=["read", "create", "update", "delete", "query"] ) - """The time which the scheduled action is supposed to start running.""" - end_time: Optional[datetime.datetime] = rest_field( - name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + """Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value + is true. For virtual machine scale sets, this property can be updated and updates will take + effect on OS reprovisioning.""" + time_zone: Optional[str] = rest_field(name="timeZone", visibility=["read", "create", "update", "delete", "query"]) + """Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values + can be `TimeZoneInfo.Id + `_ value + from time zones returned by `TimeZoneInfo.GetSystemTimeZones + `_.""" + additional_unattend_content: Optional[list["_models.AdditionalUnattendContent"]] = rest_field( + name="additionalUnattendContent", visibility=["read", "create", "update", "delete", "query"] ) - """The time when the scheduled action is supposed to stop scheduling.""" - schedule: Optional["_models.ScheduledActionsSchedule"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Specifies additional base-64 encoded XML formatted information that can be included in the + Unattend.xml file, which is used by Windows Setup.""" + patch_settings: Optional["_models.PatchSettings"] = rest_field( + name="patchSettings", visibility=["read", "create", "update", "delete", "query"] ) - """The schedule the scheduled action is supposed to follow.""" - notification_settings: Optional[List["_models.NotificationProperties"]] = rest_field( - name="notificationSettings", visibility=["read", "create", "update", "delete", "query"] + """[Preview Feature] Specifies settings related to VM Guest Patching on Windows.""" + win_rm: Optional["_models.WinRMConfiguration"] = rest_field( + name="winRM", visibility=["read", "create", "update", "delete", "query"] ) - """The notification settings for the scheduled action.""" - disabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Tell if the scheduled action is disabled or not.""" + """Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.""" @overload def __init__( self, *, - resource_type: Optional[Union[str, "_models.ResourceType"]] = None, - action_type: Optional[Union[str, "_models.ScheduledActionType"]] = None, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - schedule: Optional["_models.ScheduledActionsSchedule"] = None, - notification_settings: Optional[List["_models.NotificationProperties"]] = None, - disabled: Optional[bool] = None, + provision_vm_agent: Optional[bool] = None, + enable_automatic_updates: Optional[bool] = None, + time_zone: Optional[str] = None, + additional_unattend_content: Optional[list["_models.AdditionalUnattendContent"]] = None, + patch_settings: Optional["_models.PatchSettings"] = None, + win_rm: Optional["_models.WinRMConfiguration"] = None, ) -> None: ... @overload @@ -2415,38 +6952,35 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StartResourceOperationResponse(_Model): - """The response from a start request. +class WindowsVMGuestPatchAutomaticByPlatformSettings(_Model): # pylint: disable=name-too-long + """Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in + Windows patch settings. - :ivar description: The description of the operation response. Required. - :vartype description: str - :ivar type: The type of resources used in the start request eg virtual machines. Required. - :vartype type: str - :ivar location: The location of the start request eg westus. Required. - :vartype location: str - :ivar results: The results from the start request if no errors exist. - :vartype results: list[~azure.mgmt.computeschedule.models.ResourceOperation] + :ivar reboot_setting: Specifies the reboot setting for all AutomaticByPlatform patch + installation operations. Known values are: "Unknown", "IfRequired", "Never", and "Always". + :vartype reboot_setting: str or + ~azure.mgmt.computeschedule.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting + :ivar bypass_platform_safety_checks_on_user_schedule: Enables customer to schedule patching + without accidental upgrades. + :vartype bypass_platform_safety_checks_on_user_schedule: bool """ - description: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The description of the operation response. Required.""" - type: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The type of resources used in the start request eg virtual machines. Required.""" - location: str = rest_field(visibility=["read", "create"]) - """The location of the start request eg westus. Required.""" - results: Optional[List["_models.ResourceOperation"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = rest_field( + name="rebootSetting", visibility=["read", "create", "update", "delete", "query"] ) - """The results from the start request if no errors exist.""" + """Specifies the reboot setting for all AutomaticByPlatform patch installation operations. Known + values are: \"Unknown\", \"IfRequired\", \"Never\", and \"Always\".""" + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = rest_field( + name="bypassPlatformSafetyChecksOnUserSchedule", visibility=["read", "create", "update", "delete", "query"] + ) + """Enables customer to schedule patching without accidental upgrades.""" @overload def __init__( self, *, - description: str, - type: str, - location: str, - results: Optional[List["_models.ResourceOperation"]] = None, + reboot_setting: Optional[Union[str, "_models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting"]] = None, + bypass_platform_safety_checks_on_user_schedule: Optional[bool] = None, ) -> None: ... @overload @@ -2460,38 +6994,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SubmitDeallocateRequest(_Model): - """The deallocate request for resources. +class WinRMConfiguration(_Model): + """Describes Windows Remote Management configuration of the VM. - :ivar schedule: The schedule for the request. Required. - :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str + :ivar listeners: The list of Windows Remote Management listeners. + :vartype listeners: list[~azure.mgmt.computeschedule.models.WinRMListener] """ - schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + listeners: Optional[list["_models.WinRMListener"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """The list of Windows Remote Management listeners.""" @overload def __init__( self, *, - schedule: "_models.Schedule", - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: str, + listeners: Optional[list["_models.WinRMListener"]] = None, ) -> None: ... @overload @@ -2505,38 +7024,51 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SubmitHibernateRequest(_Model): - """This is the request for hibernate. - - :ivar schedule: The schedule for the request. Required. - :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str +class WinRMListener(_Model): + """Describes Protocol and thumbprint of Windows Remote Management listener. + + :ivar protocol: Specifies the protocol of WinRM listener. Possible values are: **http,** + **https.**. Known values are: "Http" and "Https". + :vartype protocol: str or ~azure.mgmt.computeschedule.models.ProtocolTypes + :ivar certificate_url: This is the URL of a certificate that has been uploaded to Key Vault as + a secret. For adding a secret to the Key Vault, see `Add a key or secret to the key vault + `_. In this case, your + certificate needs to be the Base64 encoding of the following JSON Object which is encoded in + UTF-8:

{
"data":"",
"dataType":"pfx",
+ "password":""
}
To install certificates on a virtual machine it is + recommended to use the `Azure Key Vault virtual machine extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_. + :vartype certificate_url: str """ - schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + protocol: Optional[Union[str, "_models.ProtocolTypes"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**. Known + values are: \"Http\" and \"Https\".""" + certificate_url: Optional[str] = rest_field( + name="certificateUrl", visibility=["read", "create", "update", "delete", "query"] + ) + """This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a + secret to the Key Vault, see `Add a key or secret to the key vault + `_. In this case, your + certificate needs to be the Base64 encoding of the following JSON Object which is encoded in + UTF-8:

{
\"data\":\"\",
+ \"dataType\":\"pfx\",
\"password\":\"\"
}
To install + certificates on a virtual machine it is recommended to use the `Azure Key Vault virtual machine + extension for Linux + `_ or the `Azure + Key Vault virtual machine extension for Windows + `_.""" @overload def __init__( self, *, - schedule: "_models.Schedule", - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: str, + protocol: Optional[Union[str, "_models.ProtocolTypes"]] = None, + certificate_url: Optional[str] = None, ) -> None: ... @overload @@ -2550,38 +7082,32 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SubmitStartRequest(_Model): - """This is the request for start. +class ZoneAllocationPolicy(_Model): + """The zone allocation policy for distributing VMs across availability zones. - :ivar schedule: The schedule for the request. Required. - :vartype schedule: ~azure.mgmt.computeschedule.models.Schedule - :ivar execution_parameters: The execution parameters for the request. Required. - :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters - :ivar resources: The resources for the request. Required. - :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: CorrelationId item. Required. - :vartype correlationid: str + :ivar distribution_strategy: The distribution strategy for zone allocation. Required. Known + values are: "BestEffortSingleZone", "Prioritized", "BestEffortBalanced", and "StrictBalanced". + :vartype distribution_strategy: str or ~azure.mgmt.computeschedule.models.DistributionStrategy + :ivar zone_preferences: The zone preferences for allocation priority. + :vartype zone_preferences: list[~azure.mgmt.computeschedule.models.ZonePreference] """ - schedule: "_models.Schedule" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The schedule for the request. Required.""" - execution_parameters: "_models.ExecutionParameters" = rest_field( - name="executionParameters", visibility=["read", "create", "update", "delete", "query"] + distribution_strategy: Union[str, "_models.DistributionStrategy"] = rest_field( + name="distributionStrategy", visibility=["read", "create", "update", "delete", "query"] ) - """The execution parameters for the request. Required.""" - resources: "_models.Resources" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The resources for the request. Required.""" - correlationid: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """CorrelationId item. Required.""" + """The distribution strategy for zone allocation. Required. Known values are: + \"BestEffortSingleZone\", \"Prioritized\", \"BestEffortBalanced\", and \"StrictBalanced\".""" + zone_preferences: Optional[list["_models.ZonePreference"]] = rest_field( + name="zonePreferences", visibility=["read", "create", "update", "delete", "query"] + ) + """The zone preferences for allocation priority.""" @overload def __init__( self, *, - schedule: "_models.Schedule", - execution_parameters: "_models.ExecutionParameters", - resources: "_models.Resources", - correlationid: str, + distribution_strategy: Union[str, "_models.DistributionStrategy"], + zone_preferences: Optional[list["_models.ZonePreference"]] = None, ) -> None: ... @overload @@ -2595,60 +7121,26 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SystemData(_Model): - """Metadata pertaining to creation and last modification of the resource. +class ZonePreference(_Model): + """A zone preference with a zone identifier and rank. - :ivar created_by: The identity that created the resource. - :vartype created_by: str - :ivar created_by_type: The type of identity that created the resource. Known values are: - "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~azure.mgmt.computeschedule.models.CreatedByType - :ivar created_at: The timestamp of resource creation (UTC). - :vartype created_at: ~datetime.datetime - :ivar last_modified_by: The identity that last modified the resource. - :vartype last_modified_by: str - :ivar last_modified_by_type: The type of identity that last modified the resource. Known values - are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or ~azure.mgmt.computeschedule.models.CreatedByType - :ivar last_modified_at: The timestamp of resource last modification (UTC). - :vartype last_modified_at: ~datetime.datetime + :ivar zone: The zone identifier. Required. + :vartype zone: str + :ivar rank: The rank of this zone in the priority order. + :vartype rank: int """ - created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) - """The identity that created the resource.""" - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( - name="createdByType", visibility=["read", "create", "update", "delete", "query"] - ) - """The type of identity that created the resource. Known values are: \"User\", \"Application\", - \"ManagedIdentity\", and \"Key\".""" - created_at: Optional[datetime.datetime] = rest_field( - name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The timestamp of resource creation (UTC).""" - last_modified_by: Optional[str] = rest_field( - name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] - ) - """The identity that last modified the resource.""" - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( - name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] - ) - """The type of identity that last modified the resource. Known values are: \"User\", - \"Application\", \"ManagedIdentity\", and \"Key\".""" - last_modified_at: Optional[datetime.datetime] = rest_field( - name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The timestamp of resource last modification (UTC).""" + zone: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zone identifier. Required.""" + rank: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The rank of this zone in the priority order.""" @overload def __init__( self, *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, + zone: str, + rank: Optional[int] = None, ) -> None: ... @overload diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py index 2870e059a014..f6cc9583c565 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -39,8 +39,9 @@ from .._validation import api_version_validation T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] JSON = MutableMapping[str, Any] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -50,7 +51,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +73,7 @@ def build_scheduled_actions_virtual_machines_submit_deallocate_request( # pylin _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +103,7 @@ def build_scheduled_actions_virtual_machines_submit_hibernate_request( # pylint _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -132,7 +133,7 @@ def build_scheduled_actions_virtual_machines_submit_start_request( # pylint: di _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -162,7 +163,7 @@ def build_scheduled_actions_virtual_machines_execute_deallocate_request( # pyli _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -192,7 +193,7 @@ def build_scheduled_actions_virtual_machines_execute_hibernate_request( # pylin _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -222,7 +223,7 @@ def build_scheduled_actions_virtual_machines_execute_start_request( # pylint: d _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -245,6 +246,36 @@ def build_scheduled_actions_virtual_machines_execute_start_request( # pylint: d return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) +def build_scheduled_actions_virtual_machines_execute_create_flex_request( # pylint: disable=name-too-long + locationparameter: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteCreateFlex" + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "locationparameter": _SERIALIZER.url("locationparameter", locationparameter, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + def build_scheduled_actions_virtual_machines_execute_create_request( # pylint: disable=name-too-long locationparameter: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -252,7 +283,7 @@ def build_scheduled_actions_virtual_machines_execute_create_request( # pylint: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -282,7 +313,7 @@ def build_scheduled_actions_virtual_machines_execute_delete_request( # pylint: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -312,7 +343,7 @@ def build_scheduled_actions_virtual_machines_get_operation_status_request( # py _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -342,7 +373,7 @@ def build_scheduled_actions_virtual_machines_cancel_operations_request( # pylin _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -372,7 +403,7 @@ def build_scheduled_actions_virtual_machines_get_operation_errors_request( # py _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -401,7 +432,7 @@ def build_scheduled_actions_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -430,7 +461,7 @@ def build_scheduled_actions_create_or_update_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -461,7 +492,7 @@ def build_scheduled_actions_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -488,12 +519,9 @@ def build_scheduled_actions_update_request( def build_scheduled_actions_delete_request( resource_group_name: str, scheduled_action_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}" path_format_arguments = { @@ -507,10 +535,7 @@ def build_scheduled_actions_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_scheduled_actions_list_by_resource_group_request( # pylint: disable=name-too-long @@ -519,7 +544,7 @@ def build_scheduled_actions_list_by_resource_group_request( # pylint: disable=n _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -546,7 +571,7 @@ def build_scheduled_actions_list_by_subscription_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -572,7 +597,7 @@ def build_scheduled_actions_list_resources_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -601,7 +626,7 @@ def build_scheduled_actions_attach_resources_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -632,7 +657,7 @@ def build_scheduled_actions_detach_resources_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -663,7 +688,7 @@ def build_scheduled_actions_patch_resources_request( # pylint: disable=name-too _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -690,12 +715,9 @@ def build_scheduled_actions_patch_resources_request( # pylint: disable=name-too def build_scheduled_actions_disable_request( resource_group_name: str, scheduled_action_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/disable" path_format_arguments = { @@ -709,21 +731,15 @@ def build_scheduled_actions_disable_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) def build_scheduled_actions_enable_request( resource_group_name: str, scheduled_action_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ComputeSchedule/scheduledActions/{scheduledActionName}/enable" path_format_arguments = { @@ -737,10 +753,7 @@ def build_scheduled_actions_enable_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) def build_scheduled_actions_cancel_next_occurrence_request( # pylint: disable=name-too-long @@ -750,7 +763,7 @@ def build_scheduled_actions_cancel_next_occurrence_request( # pylint: disable=n _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -780,7 +793,7 @@ def build_scheduled_actions_trigger_manual_occurrence_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -808,7 +821,7 @@ def build_scheduled_action_extension_list_by_vms_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -834,7 +847,7 @@ def build_occurrences_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -863,7 +876,7 @@ def build_occurrences_list_by_scheduled_action_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -891,7 +904,7 @@ def build_occurrences_list_resources_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -921,7 +934,7 @@ def build_occurrences_cancel_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -953,7 +966,7 @@ def build_occurrences_delay_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -984,7 +997,7 @@ def build_occurrence_extension_list_occurrence_by_vms_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-04-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-04-15-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1081,7 +1094,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.Operation], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1097,7 +1113,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1126,7 +1145,7 @@ def __init__(self, *args, **kwargs) -> None: def virtual_machines_submit_deallocate( self, locationparameter: str, - request_body: _models.SubmitDeallocateRequest, + request_body: _models.SubmitDeallocateContent, *, content_type: str = "application/json", **kwargs: Any @@ -1137,7 +1156,7 @@ def virtual_machines_submit_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1191,7 +1210,7 @@ def virtual_machines_submit_deallocate( def virtual_machines_submit_deallocate( self, locationparameter: str, - request_body: Union[_models.SubmitDeallocateRequest, JSON, IO[bytes]], + request_body: Union[_models.SubmitDeallocateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines @@ -1199,9 +1218,9 @@ def virtual_machines_submit_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitDeallocateRequest, + :param request_body: The request body. Is one of the following types: SubmitDeallocateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.SubmitDeallocateContent or JSON or IO[bytes] :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is compatible with MutableMapping @@ -1243,6 +1262,7 @@ def virtual_machines_submit_deallocate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1257,11 +1277,14 @@ def virtual_machines_submit_deallocate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeallocateResourceOperationResponse, response.json()) @@ -1274,7 +1297,7 @@ def virtual_machines_submit_deallocate( def virtual_machines_submit_hibernate( self, locationparameter: str, - request_body: _models.SubmitHibernateRequest, + request_body: _models.SubmitHibernateContent, *, content_type: str = "application/json", **kwargs: Any @@ -1285,7 +1308,7 @@ def virtual_machines_submit_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1339,7 +1362,7 @@ def virtual_machines_submit_hibernate( def virtual_machines_submit_hibernate( self, locationparameter: str, - request_body: Union[_models.SubmitHibernateRequest, JSON, IO[bytes]], + request_body: Union[_models.SubmitHibernateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at @@ -1347,9 +1370,9 @@ def virtual_machines_submit_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitHibernateRequest, + :param request_body: The request body. Is one of the following types: SubmitHibernateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.SubmitHibernateContent or JSON or IO[bytes] :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is compatible with MutableMapping @@ -1391,6 +1414,7 @@ def virtual_machines_submit_hibernate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1405,11 +1429,14 @@ def virtual_machines_submit_hibernate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.HibernateResourceOperationResponse, response.json()) @@ -1422,7 +1449,7 @@ def virtual_machines_submit_hibernate( def virtual_machines_submit_start( self, locationparameter: str, - request_body: _models.SubmitStartRequest, + request_body: _models.SubmitStartContent, *, content_type: str = "application/json", **kwargs: Any @@ -1433,7 +1460,7 @@ def virtual_machines_submit_start( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartRequest + :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1485,16 +1512,16 @@ def virtual_machines_submit_start( @distributed_trace def virtual_machines_submit_start( - self, locationparameter: str, request_body: Union[_models.SubmitStartRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.SubmitStartContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: SubmitStartRequest, JSON, + :param request_body: The request body. Is one of the following types: SubmitStartContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartRequest or JSON or IO[bytes] + :type request_body: ~azure.mgmt.computeschedule.models.SubmitStartContent or JSON or IO[bytes] :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with MutableMapping :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse @@ -1535,6 +1562,7 @@ def virtual_machines_submit_start( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1549,11 +1577,14 @@ def virtual_machines_submit_start( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.StartResourceOperationResponse, response.json()) @@ -1566,7 +1597,7 @@ def virtual_machines_submit_start( def virtual_machines_execute_deallocate( self, locationparameter: str, - request_body: _models.ExecuteDeallocateRequest, + request_body: _models.ExecuteDeallocateContent, *, content_type: str = "application/json", **kwargs: Any @@ -1577,7 +1608,7 @@ def virtual_machines_execute_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1631,7 +1662,7 @@ def virtual_machines_execute_deallocate( def virtual_machines_execute_deallocate( self, locationparameter: str, - request_body: Union[_models.ExecuteDeallocateRequest, JSON, IO[bytes]], + request_body: Union[_models.ExecuteDeallocateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, @@ -1639,9 +1670,9 @@ def virtual_machines_execute_deallocate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteDeallocateRequest, + :param request_body: The request body. Is one of the following types: ExecuteDeallocateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeallocateContent or JSON or IO[bytes] :return: DeallocateResourceOperationResponse. The DeallocateResourceOperationResponse is compatible with MutableMapping @@ -1683,6 +1714,7 @@ def virtual_machines_execute_deallocate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1697,11 +1729,14 @@ def virtual_machines_execute_deallocate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeallocateResourceOperationResponse, response.json()) @@ -1714,7 +1749,7 @@ def virtual_machines_execute_deallocate( def virtual_machines_execute_hibernate( self, locationparameter: str, - request_body: _models.ExecuteHibernateRequest, + request_body: _models.ExecuteHibernateContent, *, content_type: str = "application/json", **kwargs: Any @@ -1725,7 +1760,7 @@ def virtual_machines_execute_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1779,7 +1814,7 @@ def virtual_machines_execute_hibernate( def virtual_machines_execute_hibernate( self, locationparameter: str, - request_body: Union[_models.ExecuteHibernateRequest, JSON, IO[bytes]], + request_body: Union[_models.ExecuteHibernateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, @@ -1787,9 +1822,9 @@ def virtual_machines_execute_hibernate( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteHibernateRequest, + :param request_body: The request body. Is one of the following types: ExecuteHibernateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteHibernateContent or JSON or IO[bytes] :return: HibernateResourceOperationResponse. The HibernateResourceOperationResponse is compatible with MutableMapping @@ -1831,6 +1866,7 @@ def virtual_machines_execute_hibernate( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1845,11 +1881,14 @@ def virtual_machines_execute_hibernate( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.HibernateResourceOperationResponse, response.json()) @@ -1862,7 +1901,7 @@ def virtual_machines_execute_hibernate( def virtual_machines_execute_start( self, locationparameter: str, - request_body: _models.ExecuteStartRequest, + request_body: _models.ExecuteStartContent, *, content_type: str = "application/json", **kwargs: Any @@ -1873,7 +1912,7 @@ def virtual_machines_execute_start( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1925,16 +1964,16 @@ def virtual_machines_execute_start( @distributed_trace def virtual_machines_execute_start( - self, locationparameter: str, request_body: Union[_models.ExecuteStartRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteStartContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteStartRequest, + :param request_body: The request body. Is one of the following types: ExecuteStartContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartRequest or JSON or IO[bytes] + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteStartContent or JSON or IO[bytes] :return: StartResourceOperationResponse. The StartResourceOperationResponse is compatible with MutableMapping :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse @@ -1975,6 +2014,7 @@ def virtual_machines_execute_start( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -1989,11 +2029,14 @@ def virtual_machines_execute_start( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.StartResourceOperationResponse, response.json()) @@ -2002,22 +2045,177 @@ def virtual_machines_execute_start( return deserialized # type: ignore + @overload + def virtual_machines_execute_create_flex( + self, + locationparameter: str, + body: _models.ExecuteCreateFlexContent, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: ~azure.mgmt.computeschedule.models.ExecuteCreateFlexContent + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def virtual_machines_execute_create_flex( + self, locationparameter: str, body: JSON, *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def virtual_machines_execute_create_flex( + self, locationparameter: str, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Required. + :type body: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + @api_version_validation( + method_added_on="2026-03-01-preview", + params_added_on={ + "2026-03-01-preview": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] + }, + api_versions_list=["2026-03-01-preview", "2026-04-15-preview"], + ) + def virtual_machines_execute_create_flex( + self, locationparameter: str, body: Union[_models.ExecuteCreateFlexContent, JSON, IO[bytes]], **kwargs: Any + ) -> _models.CreateFlexResourceOperationResponse: + """VirtualMachinesExecuteCreateFlex: Execute create operation for a batch of virtual machines with + flex properties, this operation is triggered as soon as Computeschedule receives it. + + :param locationparameter: The location name. Required. + :type locationparameter: str + :param body: The request body. Is one of the following types: ExecuteCreateFlexContent, JSON, + IO[bytes] Required. + :type body: ~azure.mgmt.computeschedule.models.ExecuteCreateFlexContent or JSON or IO[bytes] + :return: CreateFlexResourceOperationResponse. The CreateFlexResourceOperationResponse is + compatible with MutableMapping + :rtype: ~azure.mgmt.computeschedule.models.CreateFlexResourceOperationResponse + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.CreateFlexResourceOperationResponse] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(body, (IOBase, bytes)): + _content = body + else: + _content = json.dumps(body, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_scheduled_actions_virtual_machines_execute_create_flex_request( + locationparameter=locationparameter, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CreateFlexResourceOperationResponse, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + @overload def virtual_machines_execute_create( self, locationparameter: str, - request_body: _models.ExecuteCreateRequest, + request_body: _models.ExecuteCreateContent, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2031,8 +2229,8 @@ def virtual_machines_execute_create( def virtual_machines_execute_create( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -2051,8 +2249,8 @@ def virtual_machines_execute_create( def virtual_machines_execute_create( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -2073,19 +2271,25 @@ def virtual_machines_execute_create( params_added_on={ "2025-05-01": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] }, - api_versions_list=["2025-05-01", "2025-04-15-preview"], + api_versions_list=[ + "2025-05-01", + "2025-04-15-preview", + "2026-01-01-preview", + "2026-03-01-preview", + "2026-04-15-preview", + ], ) def virtual_machines_execute_create( - self, locationparameter: str, request_body: Union[_models.ExecuteCreateRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteCreateContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.CreateResourceOperationResponse: - """VirtualMachinesExecuteCreate: Execute create operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteCreate: Execute create operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteCreateRequest, + :param request_body: The request body. Is one of the following types: ExecuteCreateContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteCreateContent or JSON or IO[bytes] :return: CreateResourceOperationResponse. The CreateResourceOperationResponse is compatible with MutableMapping @@ -2127,6 +2331,7 @@ def virtual_machines_execute_create( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2141,11 +2346,14 @@ def virtual_machines_execute_create( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.CreateResourceOperationResponse, response.json()) @@ -2158,18 +2366,18 @@ def virtual_machines_execute_create( def virtual_machines_execute_delete( self, locationparameter: str, - request_body: _models.ExecuteDeleteRequest, + request_body: _models.ExecuteDeleteContent, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteRequest + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2183,8 +2391,8 @@ def virtual_machines_execute_delete( def virtual_machines_execute_delete( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -2203,8 +2411,8 @@ def virtual_machines_execute_delete( def virtual_machines_execute_delete( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -2225,19 +2433,25 @@ def virtual_machines_execute_delete( params_added_on={ "2025-05-01": ["api_version", "subscription_id", "locationparameter", "content_type", "accept"] }, - api_versions_list=["2025-05-01", "2025-04-15-preview"], + api_versions_list=[ + "2025-05-01", + "2025-04-15-preview", + "2026-01-01-preview", + "2026-03-01-preview", + "2026-04-15-preview", + ], ) def virtual_machines_execute_delete( - self, locationparameter: str, request_body: Union[_models.ExecuteDeleteRequest, JSON, IO[bytes]], **kwargs: Any + self, locationparameter: str, request_body: Union[_models.ExecuteDeleteContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeleteResourceOperationResponse: - """VirtualMachinesExecuteDelete: Execute delete operation for a batch of virtual machines, this - operation is triggered as soon as Computeschedule receives it. + """[PRIVATE PREVIEW]: VirtualMachinesExecuteDelete: Execute delete operation for a batch of + virtual machines, this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: ExecuteDeleteRequest, + :param request_body: The request body. Is one of the following types: ExecuteDeleteContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.ExecuteDeleteContent or JSON or IO[bytes] :return: DeleteResourceOperationResponse. The DeleteResourceOperationResponse is compatible with MutableMapping @@ -2279,6 +2493,7 @@ def virtual_machines_execute_delete( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2293,11 +2508,14 @@ def virtual_machines_execute_delete( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.DeleteResourceOperationResponse, response.json()) @@ -2310,7 +2528,7 @@ def virtual_machines_execute_delete( def virtual_machines_get_operation_status( self, locationparameter: str, - request_body: _models.GetOperationStatusRequest, + request_body: _models.GetOperationStatusContent, *, content_type: str = "application/json", **kwargs: Any @@ -2321,7 +2539,7 @@ def virtual_machines_get_operation_status( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusRequest + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2375,7 +2593,7 @@ def virtual_machines_get_operation_status( def virtual_machines_get_operation_status( self, locationparameter: str, - request_body: Union[_models.GetOperationStatusRequest, JSON, IO[bytes]], + request_body: Union[_models.GetOperationStatusContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationStatusResponse: """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on @@ -2384,8 +2602,8 @@ def virtual_machines_get_operation_status( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Is one of the following types: - GetOperationStatusRequest, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusRequest or JSON or + GetOperationStatusContent, JSON, IO[bytes] Required. + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationStatusContent or JSON or IO[bytes] :return: GetOperationStatusResponse. The GetOperationStatusResponse is compatible with MutableMapping @@ -2427,6 +2645,7 @@ def virtual_machines_get_operation_status( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2441,11 +2660,14 @@ def virtual_machines_get_operation_status( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.GetOperationStatusResponse, response.json()) @@ -2458,7 +2680,7 @@ def virtual_machines_get_operation_status( def virtual_machines_cancel_operations( self, locationparameter: str, - request_body: _models.CancelOperationsRequest, + request_body: _models.CancelOperationsContent, *, content_type: str = "application/json", **kwargs: Any @@ -2469,7 +2691,7 @@ def virtual_machines_cancel_operations( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsRequest + :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2523,7 +2745,7 @@ def virtual_machines_cancel_operations( def virtual_machines_cancel_operations( self, locationparameter: str, - request_body: Union[_models.CancelOperationsRequest, JSON, IO[bytes]], + request_body: Union[_models.CancelOperationsContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.CancelOperationsResponse: """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) @@ -2531,9 +2753,9 @@ def virtual_machines_cancel_operations( :param locationparameter: The location name. Required. :type locationparameter: str - :param request_body: The request body. Is one of the following types: CancelOperationsRequest, + :param request_body: The request body. Is one of the following types: CancelOperationsContent, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsRequest or JSON or + :type request_body: ~azure.mgmt.computeschedule.models.CancelOperationsContent or JSON or IO[bytes] :return: CancelOperationsResponse. The CancelOperationsResponse is compatible with MutableMapping @@ -2575,6 +2797,7 @@ def virtual_machines_cancel_operations( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2589,11 +2812,14 @@ def virtual_machines_cancel_operations( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.CancelOperationsResponse, response.json()) @@ -2606,7 +2832,7 @@ def virtual_machines_cancel_operations( def virtual_machines_get_operation_errors( self, locationparameter: str, - request_body: _models.GetOperationErrorsRequest, + request_body: _models.GetOperationErrorsContent, *, content_type: str = "application/json", **kwargs: Any @@ -2617,7 +2843,7 @@ def virtual_machines_get_operation_errors( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsRequest + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsContent :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2671,7 +2897,7 @@ def virtual_machines_get_operation_errors( def virtual_machines_get_operation_errors( self, locationparameter: str, - request_body: Union[_models.GetOperationErrorsRequest, JSON, IO[bytes]], + request_body: Union[_models.GetOperationErrorsContent, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationErrorsResponse: """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors @@ -2680,8 +2906,8 @@ def virtual_machines_get_operation_errors( :param locationparameter: The location name. Required. :type locationparameter: str :param request_body: The request body. Is one of the following types: - GetOperationErrorsRequest, JSON, IO[bytes] Required. - :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsRequest or JSON or + GetOperationErrorsContent, JSON, IO[bytes] Required. + :type request_body: ~azure.mgmt.computeschedule.models.GetOperationErrorsContent or JSON or IO[bytes] :return: GetOperationErrorsResponse. The GetOperationErrorsResponse is compatible with MutableMapping @@ -2723,6 +2949,7 @@ def virtual_machines_get_operation_errors( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2737,11 +2964,14 @@ def virtual_machines_get_operation_errors( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.GetOperationErrorsResponse, response.json()) @@ -2762,7 +2992,7 @@ def virtual_machines_get_operation_errors( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> _models.ScheduledAction: """Get a ScheduledAction. @@ -2802,6 +3032,7 @@ def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: An } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2816,11 +3047,14 @@ def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: An except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.ScheduledAction, response.json()) @@ -2841,7 +3075,7 @@ def get(self, resource_group_name: str, scheduled_action_name: str, **kwargs: An "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def _create_or_update_initial( self, @@ -2886,6 +3120,7 @@ def _create_or_update_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -2899,7 +3134,10 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2909,7 +3147,7 @@ def _create_or_update_initial( ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -3013,7 +3251,7 @@ def begin_create_or_update( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def begin_create_or_update( self, @@ -3183,7 +3421,7 @@ def update( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def update( self, @@ -3242,6 +3480,7 @@ def update( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3256,11 +3495,14 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.ScheduledAction, response.json()) @@ -3272,15 +3514,9 @@ def update( @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { @@ -3309,6 +3545,7 @@ def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3322,7 +3559,10 @@ def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3330,7 +3570,7 @@ def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -3341,15 +3581,9 @@ def _delete_initial(self, resource_group_name: str, scheduled_action_name: str, @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def begin_delete(self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any) -> LROPoller[None]: """Delete a ScheduledAction. @@ -3411,7 +3645,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: """List ScheduledAction resources by resource group. @@ -3477,7 +3711,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledAction], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3493,7 +3730,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3504,7 +3744,7 @@ def get_next(next_link=None): @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_subscription(self, **kwargs: Any) -> ItemPaged["_models.ScheduledAction"]: """List ScheduledAction resources by subscription ID. @@ -3566,7 +3806,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledAction], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledAction], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3582,7 +3825,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3601,7 +3847,7 @@ def get_next(next_link=None): "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_resources( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -3673,7 +3919,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledActionResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledActionResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -3689,7 +3938,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3793,7 +4045,7 @@ def attach_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def attach_resources( self, @@ -3853,6 +4105,7 @@ def attach_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -3867,11 +4120,14 @@ def attach_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -3977,7 +4233,7 @@ def detach_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def detach_resources( self, @@ -4037,6 +4293,7 @@ def detach_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4051,11 +4308,14 @@ def detach_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -4161,7 +4421,7 @@ def patch_resources( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def patch_resources( self, @@ -4221,6 +4481,7 @@ def patch_resources( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4235,11 +4496,14 @@ def patch_resources( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -4252,15 +4516,9 @@ def patch_resources( @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def disable( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -4311,7 +4569,10 @@ def disable( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4321,15 +4582,9 @@ def disable( # pylint: disable=inconsistent-return-statements @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={ - "2025-04-15-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "scheduled_action_name", - "accept", - ] + "2025-04-15-preview": ["api_version", "subscription_id", "resource_group_name", "scheduled_action_name"] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def enable( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -4380,7 +4635,10 @@ def enable( # pylint: disable=inconsistent-return-statements if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -4483,7 +4741,7 @@ def cancel_next_occurrence( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def cancel_next_occurrence( self, @@ -4543,6 +4801,7 @@ def cancel_next_occurrence( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4557,11 +4816,14 @@ def cancel_next_occurrence( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -4582,7 +4844,7 @@ def cancel_next_occurrence( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def trigger_manual_occurrence( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -4624,6 +4886,7 @@ def trigger_manual_occurrence( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4638,11 +4901,14 @@ def trigger_manual_occurrence( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.Occurrence, response.json()) @@ -4673,7 +4939,7 @@ def __init__(self, *args, **kwargs) -> None: @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "resource_uri", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_vms(self, resource_uri: str, **kwargs: Any) -> ItemPaged["_models.ScheduledActionResources"]: """List ScheduledActionResources resources by parent. @@ -4739,7 +5005,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.ScheduledActionResources], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.ScheduledActionResources], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -4755,7 +5024,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4793,7 +5065,7 @@ def __init__(self, *args, **kwargs) -> None: "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def get( self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any @@ -4838,6 +5110,7 @@ def get( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -4852,11 +5125,14 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.Occurrence, response.json()) @@ -4877,7 +5153,7 @@ def get( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_by_scheduled_action( self, resource_group_name: str, scheduled_action_name: str, **kwargs: Any @@ -4948,7 +5224,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Occurrence], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.Occurrence], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -4964,7 +5243,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4984,7 +5266,7 @@ def get_next(next_link=None): "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_resources( self, resource_group_name: str, scheduled_action_name: str, occurrence_id: str, **kwargs: Any @@ -5058,7 +5340,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.OccurrenceResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.OccurrenceResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5074,7 +5359,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -5188,7 +5476,7 @@ def cancel( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def cancel( self, @@ -5252,6 +5540,7 @@ def cancel( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -5266,11 +5555,14 @@ def cancel( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: deserialized = _deserialize(_models.RecurringActionsResourceOperationResult, response.json()) @@ -5292,7 +5584,7 @@ def cancel( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def _delay_initial( self, @@ -5339,6 +5631,7 @@ def _delay_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) + _decompress = kwargs.pop("decompress", True) _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs @@ -5352,7 +5645,10 @@ def _delay_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5360,7 +5656,7 @@ def _delay_initial( response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - deserialized = response.iter_bytes() + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: return cls(pipeline_response, deserialized, response_headers) # type: ignore @@ -5477,7 +5773,7 @@ def begin_delay( "accept", ] }, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def begin_delay( self, @@ -5584,7 +5880,7 @@ def __init__(self, *args, **kwargs) -> None: @api_version_validation( method_added_on="2025-04-15-preview", params_added_on={"2025-04-15-preview": ["api_version", "resource_uri", "accept"]}, - api_versions_list=["2025-04-15-preview"], + api_versions_list=["2025-04-15-preview", "2026-01-01-preview", "2026-03-01-preview", "2026-04-15-preview"], ) def list_occurrence_by_vms( self, resource_uri: str, **kwargs: Any @@ -5652,7 +5948,10 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.OccurrenceExtensionResource], deserialized.get("value", [])) + list_of_elem = _deserialize( + List[_models.OccurrenceExtensionResource], + deserialized.get("value", []), + ) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -5668,7 +5967,10 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py index a51b9b06f920..b9bf26e932d5 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -31,12 +32,12 @@ def main(): ) response = client.occurrence_extension.list_occurrence_by_vms( - resource_uri="sazvpabfud", + resource_uri="subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_minimum_set_gen.py new file mode 100644 index 000000000000..19d8c55ef90c --- /dev/null +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrence_extension_list_occurrence_by_vms_minimum_set_gen.py @@ -0,0 +1,43 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.computeschedule import ComputeScheduleMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-computeschedule +# USAGE + python occurrence_extension_list_occurrence_by_vms_minimum_set_gen.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ComputeScheduleMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.occurrence_extension.list_occurrence_by_vms( + resource_uri="subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", + ) + for item in response: + print(item) + + +# x-ms-original-file: 2026-04-15-preview/OccurrenceExtension_ListOccurrenceByVms_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_cancel_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_cancel_maximum_set_gen.py index f6b5193cb306..0a7efe9b6815 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_cancel_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_cancel_maximum_set_gen.py @@ -33,17 +33,17 @@ def main(): response = client.occurrences.cancel( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", - occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + scheduled_action_name="scheduled-action-01", + occurrence_id="11111111-1111-1111-1111-111111111111", body={ "resourceIds": [ - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Occurrences_Cancel_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_delay_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_delay_maximum_set_gen.py index 639d94540759..39dd704d6b9f 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_delay_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_delay_maximum_set_gen.py @@ -33,18 +33,18 @@ def main(): response = client.occurrences.begin_delay( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", - occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + scheduled_action_name="scheduled-action-01", + occurrence_id="11111111-1111-1111-1111-111111111111", body={ - "delay": "2025-05-22T17:00:00.000-07:00", + "delay": "2026-03-12T02:39:48.148Z", "resourceIds": [ - "/subscriptions/CB26D7CB-3E27-465F-99C8-EAF7A4118245/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ], }, ).result() print(response) -# x-ms-original-file: 2025-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Occurrences_Delay_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_get_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_get_maximum_set_gen.py index c6770e4dea75..9b31abfa8024 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_get_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_get_maximum_set_gen.py @@ -32,12 +32,12 @@ def main(): response = client.occurrences.get( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", - occurrence_id="67b5bada-4772-43fc-8dbb-402476d98a45", + scheduled_action_name="scheduled-action-01", + occurrence_id="11111111-1111-1111-1111-111111111111", ) print(response) -# x-ms-original-file: 2025-04-15-preview/Occurrences_Get_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Occurrences_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py index d885bb502904..395e8d7c1010 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_by_scheduled_action_maximum_set_gen.py @@ -32,12 +32,12 @@ def main(): response = client.occurrences.list_by_scheduled_action( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Occurrences_ListByScheduledAction_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_resources_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_resources_maximum_set_gen.py index 4b880c4a836d..290510919c83 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_resources_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/occurrences_list_resources_maximum_set_gen.py @@ -32,13 +32,13 @@ def main(): response = client.occurrences.list_resources( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", - occurrence_id="CB26D7CB-3E27-465F-99C8-EAF7A4118245", + scheduled_action_name="scheduled-action-01", + occurrence_id="11111111-1111-1111-1111-111111111111", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Occurrences_ListResources_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py index cb2f4f5b229c..a13a1f6dc836 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/Operations_List_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Operations_List_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py index 3099972b7689..ff7686918521 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/Operations_List_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/Operations_List_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py index 819e73e72c7e..def8a7734dfd 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -31,12 +32,12 @@ def main(): ) response = client.scheduled_action_extension.list_by_vms( - resource_uri="sazvpabfud", + resource_uri="subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_minimum_set_gen.py index 99c0bbb8af78..e78d15d8bed4 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_action_extension_list_by_vms_minimum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -31,12 +32,12 @@ def main(): ) response = client.scheduled_action_extension.list_by_vms( - resource_uri="sazvpabfud", + resource_uri="subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/myVm", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActionExtension_ListByVms_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py index 622a45e61347..a1fafa8f6b80 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_attach_resources_maximum_set_gen.py @@ -33,17 +33,12 @@ def main(): response = client.scheduled_actions.attach_resources( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", body={ "resources": [ { "notificationSettings": [ - { - "destination": "wbhryycyolvnypjxzlawwvb", - "disabled": True, - "language": "en-us", - "type": "Email", - } + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} ], "resourceId": "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm", } @@ -53,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_AttachResources_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py index 0d84237bd4dd..342a60917864 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_cancel_next_occurrence_maximum_set_gen.py @@ -33,16 +33,16 @@ def main(): response = client.scheduled_actions.cancel_next_occurrence( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", body={ "resourceIds": [ - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_CancelNextOccurrence_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py index 1c7140e9a912..aebe7c2462fe 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_create_or_update_maximum_set_gen.py @@ -32,37 +32,37 @@ def main(): response = client.scheduled_actions.begin_create_or_update( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", resource={ - "location": "vmuhgdgipeypkcv", + "location": "eastus2", "properties": { "actionType": "Start", "disabled": True, - "endTime": "2025-04-17T00:23:55.286Z", + "endTime": "2026-03-12T02:39:45.062Z", "notificationSettings": [ - {"destination": "wbhryycyolvnypjxzlawwvb", "disabled": True, "language": "en-us", "type": "Email"} + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} ], "resourceType": "VirtualMachine", "schedule": { "deadlineType": "Unknown", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, - "requestedDaysOfTheMonth": [15], + "requestedDaysOfTheMonth": [1], "requestedMonths": ["January"], "requestedWeekDays": ["Monday"], - "scheduledTime": "19:00:00", - "timeZone": "g", + "scheduledTime": "12:00:00", + "timeZone": "America/Los_Angeles", }, - "startTime": "2025-04-17T00:23:55.281Z", + "startTime": "2026-03-12T02:39:45.061Z", }, - "tags": {"key2102": "obwsqwdydpkscnzceopxgkrhrxtdhv"}, + "tags": {"environment": "production"}, }, ).result() print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_CreateOrUpdate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_delete_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_delete_maximum_set_gen.py index 019d3a4a2a14..954a72091319 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_delete_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_delete_maximum_set_gen.py @@ -32,10 +32,10 @@ def main(): client.scheduled_actions.begin_delete( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ).result() -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_Delete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py index bcce65f22225..01abc7fd243e 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_detach_resources_maximum_set_gen.py @@ -33,16 +33,16 @@ def main(): response = client.scheduled_actions.detach_resources( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", body={ "resources": [ - "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_DetachResources_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_disable_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_disable_maximum_set_gen.py index c305f87ef96e..4ec0bd0ad10b 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_disable_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_disable_maximum_set_gen.py @@ -32,10 +32,10 @@ def main(): client.scheduled_actions.disable( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_Disable_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_enable_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_enable_maximum_set_gen.py index 31e965817627..bd0f82416ff7 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_enable_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_enable_maximum_set_gen.py @@ -32,10 +32,10 @@ def main(): client.scheduled_actions.enable( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_Enable_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_get_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_get_maximum_set_gen.py index 3ff9af924144..2aca1d1a919c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_get_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_get_maximum_set_gen.py @@ -32,11 +32,11 @@ def main(): response = client.scheduled_actions.get( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_Get_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py index 49adce916214..12dc9a056915 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_maximum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_minimum_set_gen.py index 4dea2dd92aca..be1a6a11ff73 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_resource_group_minimum_set_gen.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListByResourceGroup_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py index 3ffcbc524815..55cbff65fc93 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_maximum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_minimum_set_gen.py index f7c010e4eefe..17a96b108c90 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_by_subscription_minimum_set_gen.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListBySubscription_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py index 2aca1d4df5e7..4c8f6209fb6a 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_list_resources_maximum_set_gen.py @@ -32,12 +32,12 @@ def main(): response = client.scheduled_actions.list_resources( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", ) for item in response: print(item) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_ListResources_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py index 17f2032a785b..54d218ab0946 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_patch_resources_maximum_set_gen.py @@ -33,17 +33,12 @@ def main(): response = client.scheduled_actions.patch_resources( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", body={ "resources": [ { "notificationSettings": [ - { - "destination": "wbhryycyolvnypjxzlawwvb", - "disabled": True, - "language": "en-us", - "type": "Email", - } + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} ], "resourceId": "/subscriptions/1d04e8f1-ee04-4056-b0b2-718f5bb45b04/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/myVm", } @@ -53,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_PatchResources_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py index f06fa6ac31f3..90bec57528bd 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_trigger_manual_occurrence_maximum_set_gen.py @@ -32,11 +32,11 @@ def main(): response = client.scheduled_actions.trigger_manual_occurrence( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="my-scheduled-action", ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_TriggerManualOccurrence_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_update_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_update_maximum_set_gen.py index c24ac0f4dcee..7c05c39dd493 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_update_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_update_maximum_set_gen.py @@ -32,36 +32,36 @@ def main(): response = client.scheduled_actions.update( resource_group_name="rgcomputeschedule", - scheduled_action_name="myScheduledAction", + scheduled_action_name="scheduled-action-01", properties={ "properties": { "actionType": "Start", "disabled": True, - "endTime": "2025-04-17T00:23:58.149Z", + "endTime": "2026-03-12T02:39:45.818Z", "notificationSettings": [ - {"destination": "wbhryycyolvnypjxzlawwvb", "disabled": True, "language": "en-us", "type": "Email"} + {"destination": "admin@contoso.com", "disabled": True, "language": "en-us", "type": "Email"} ], "resourceType": "VirtualMachine", "schedule": { "deadlineType": "Unknown", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, - "requestedDaysOfTheMonth": [15], + "requestedDaysOfTheMonth": [1], "requestedMonths": ["January"], "requestedWeekDays": ["Monday"], - "scheduledTime": "19:00:00", - "timeZone": "bni", + "scheduledTime": "12:00:00", + "timeZone": "America/Los_Angeles", }, - "startTime": "2025-04-17T00:23:58.149Z", + "startTime": "2026-03-12T02:39:45.818Z", }, - "tags": {"key9989": "tryjidk"}, + "tags": {"environment": "staging"}, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_Update_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py index 0c78560952ed..870379f33c96 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_cancel_operations( - locationparameter="nivsvluajruxhmsfgmxjnl", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", - "operationIds": ["b211f086-4b91-4686-a453-2f5c012e4d80"], + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "operationIds": ["01234567-89ab-cdef-0123-456789abcdef"], }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py index 1b3ed9fa485a..d2497e9f6cee 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_cancel_operations( - locationparameter="fhdunfivmjiltaiakwhhwdgemfcld", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", - "operationIds": ["b211f086-4b91-4686-a453-2f5c012e4d80"], + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "operationIds": ["01234567-89ab-cdef-0123-456789abcdef"], }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_maximum_set_gen.py new file mode 100644 index 000000000000..68f5921165dd --- /dev/null +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_maximum_set_gen.py @@ -0,0 +1,182 @@ +# pylint: disable=line-too-long,useless-suppression +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.computeschedule import ComputeScheduleMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-computeschedule +# USAGE + python scheduled_actions_virtual_machines_execute_create_flex_maximum_set_gen.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ComputeScheduleMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.virtual_machines_execute_create_flex( + locationparameter="eastus2", + body={ + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "executionParameters": { + "optimizationPreference": "Cost", + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, + }, + "resourceConfigParameters": { + "flexProperties": { + "osType": "Windows", + "priorityProfile": {"allocationStrategy": "LowestPrice", "type": "Regular"}, + "vmSizeProfiles": [ + {"name": "Standard_D2s_v3", "rank": 24}, + {"name": "Standard_D2s_v3", "rank": 24}, + ], + "zoneAllocationPolicy": { + "distributionStrategy": "BestEffortSingleZone", + "zonePreferences": [{"rank": 21, "zone": "1"}], + }, + }, + "resourceCount": 24, + "resourcePrefix": "myFlexVm", + "virtualMachineBaseProfile": { + "computeApiVersion": "2024-07-01", + "identity": {"type": "SystemAssigned"}, + "name": "baseFlexVmConfig", + "properties": { + "additionalCapabilities": {"hibernationEnabled": False, "ultraSSDEnabled": False}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": True}}, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic", + "properties": {"deleteOption": "Delete", "primary": True}, + } + ] + }, + "osProfile": { + "adminUsername": "azureuser", + "allowExtensionOperations": True, + "computerName": "myFlexVM", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [ + { + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQ...", + "path": "/home/azureuser/.ssh/authorized_keys", + } + ] + }, + }, + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadOnly", + "createOption": "Empty", + "deleteOption": "Delete", + "diskSizeGB": 256, + "lun": 0, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "myDataDisk-0", + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "offer": "0001-com-ubuntu-server-jammy", + "publisher": "Canonical", + "sku": "22_04-lts-gen2", + "version": "latest", + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskSizeGB": 128, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "myOsDisk", + "osType": "Linux", + }, + }, + }, + "resourceGroupName": "myResourceGroup", + "tags": {"department": "engineering", "environment": "production"}, + "vmExtensions": [ + { + "name": "AzureMonitorLinuxAgent", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "publisher": "Microsoft.Azure.Monitor", + "settings": {}, + "suppressFailures": False, + "type": "AzureMonitorLinuxAgent", + "typeHandlerVersion": "1.0", + }, + } + ], + "zones": ["1"], + }, + "virtualMachineOverrides": [ + { + "computeApiVersion": "2024-07-01", + "name": "overrideFlexVmConfig-0", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override", + "properties": {"deleteOption": "Delete", "primary": True}, + } + ] + }, + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskSizeGB": 256, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "overrideOsDisk", + "osType": "Linux", + } + }, + }, + "tags": {"department": "engineering", "environment": "production", "role": "web-server"}, + "zones": ["2"], + } + ], + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MaximumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_minimum_set_gen.py new file mode 100644 index 000000000000..d04f69000e32 --- /dev/null +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_flex_minimum_set_gen.py @@ -0,0 +1,55 @@ +# 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) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential + +from azure.mgmt.computeschedule import ComputeScheduleMgmtClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-computeschedule +# USAGE + python scheduled_actions_virtual_machines_execute_create_flex_minimum_set_gen.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = ComputeScheduleMgmtClient( + credential=DefaultAzureCredential(), + subscription_id="SUBSCRIPTION_ID", + ) + + response = client.scheduled_actions.virtual_machines_execute_create_flex( + locationparameter="eastus2", + body={ + "executionParameters": {}, + "resourceConfigParameters": { + "flexProperties": { + "osType": "Windows", + "priorityProfile": {}, + "vmSizeProfiles": [ + {"name": "Standard_D2s_v3", "rank": 24}, + {"name": "Standard_D2s_v3", "rank": 24}, + ], + }, + "resourceCount": 24, + }, + }, + ) + print(response) + + +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreateFlex_MinimumSet_Gen.json +if __name__ == "__main__": + main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_maximum_set_gen.py index a6ac45721b83..b01996d903b5 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_maximum_set_gen.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -31,82 +32,139 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_create( - locationparameter="oslhbouzgevzpeydssyelhw", + locationparameter="eastus2", request_body={ - "correlationid": "dfe927c5-16a6-40b7-a0f7-8524975ed642", - "executionParameters": {"retryPolicy": {"retryCount": 5, "retryWindowInMinutes": 40}}, + "correlationid": "01234567-89ab-cdef-0123-456789abcdef", + "executionParameters": { + "optimizationPreference": "Cost", + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, + }, "resourceConfigParameters": { - "baseProfile": { + "resourceCount": 3, + "resourcePrefix": "myBulkVm", + "virtualMachineBaseProfile": { "computeApiVersion": "2024-07-01", - "hardwareProfile": {"name": "F1"}, - "provisioningState": 0, - "resourcegroupName": "RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B", - "storageProfile": {"osDisk": {"osType": 0}}, - "vmExtensions": [ - { - "autoUpgradeMinorVersion": True, - "enableAutomaticUpgrade": True, - "protectedSettings": "SomeDecryptedSecretValue", - "provisioningState": 0, - "publisher": "Microsoft.Azure.Monitor", - "type": "AzureMonitorLinuxAgent", - "typeHandlerVersion": "1.0", + "identity": {"type": "SystemAssigned"}, + "name": "baseVmConfig", + "properties": { + "additionalCapabilities": {"hibernationEnabled": False, "ultraSSDEnabled": False}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": True}}, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic", + "properties": {"deleteOption": "Delete", "primary": True}, + } + ] }, - {"name": "myExtensionName"}, - ], - }, - "resourceCount": 2, - "resourceOverrides": [ - { - "location": "LocalDev", - "name": "myFleet_523", - "properties": { - "hardwareProfile": {"vmSize": "Standard_F1s"}, - "osProfile": { - "adminPassword": "SomeDecryptedSecretValue", - "adminUsername": "adminUser", - "computerName": "myFleet000000", - "windowsConfiguration": { - "additionalUnattendContent": [ - {"content": "", "passName": "someValue"}, - {"content": "SomeDecryptedSecretValue", "passName": "someOtherValue"}, + "osProfile": { + "adminUsername": "azureuser", + "allowExtensionOperations": True, + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": True, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform", + }, + "provisionVMAgent": True, + "ssh": { + "publicKeys": [ + { + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQ...", + "path": "/home/azureuser/.ssh/authorized_keys", + } ] }, }, - "priority": 0, - "provisioningState": 0, }, - "zones": ["1"], + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True}, + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadOnly", + "createOption": "Empty", + "deleteOption": "Delete", + "diskSizeGB": 256, + "lun": 0, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "myDataDisk-0", + } + ], + "diskControllerType": "SCSI", + "imageReference": { + "offer": "0001-com-ubuntu-server-jammy", + "publisher": "Canonical", + "sku": "22_04-lts-gen2", + "version": "latest", + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskSizeGB": 128, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "myOsDisk", + "osType": "Linux", + }, + }, }, + "resourceGroupName": "myResourceGroup", + "tags": {"department": "engineering", "environment": "production"}, + "vmExtensions": [ + { + "name": "AzureMonitorLinuxAgent", + "properties": { + "autoUpgradeMinorVersion": True, + "enableAutomaticUpgrade": True, + "publisher": "Microsoft.Azure.Monitor", + "settings": {}, + "suppressFailures": False, + "type": "AzureMonitorLinuxAgent", + "typeHandlerVersion": "1.0", + }, + } + ], + "zones": ["1"], + }, + "virtualMachineOverrides": [ { - "location": "LocalDev", - "name": "myFleet_524", + "computeApiVersion": "2024-07-01", + "name": "overrideVmConfig-0", "properties": { - "hardwareProfile": {"vmSize": "Standard_G1s"}, - "osProfile": { - "adminPassword": "SomeDecryptedSecretValue", - "adminUsername": "adminUser", - "computerName": "myFleet000000", - "windowsConfiguration": { - "additionalUnattendContent": [ - {"content": "", "passName": "someValue"}, - {"content": "SomeDecryptedSecretValue", "passName": "someOtherValue"}, - ] - }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/myNic-override", + "properties": {"deleteOption": "Delete", "primary": True}, + } + ] + }, + "storageProfile": { + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "deleteOption": "Delete", + "diskSizeGB": 256, + "managedDisk": {"storageAccountType": "Premium_LRS"}, + "name": "overrideOsDisk", + "osType": "Linux", + } }, - "priority": 0, - "provisioningState": 0, }, + "tags": {"department": "engineering", "environment": "production", "role": "web-server"}, "zones": ["2"], - }, + } ], - "resourcePrefix": "TL1", }, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_minimum_set_gen.py index 1d9849f6fbd1..8532812bd91a 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_create_minimum_set_gen.py @@ -31,80 +31,12 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_create( - locationparameter="useast", - request_body={ - "executionParameters": {}, - "resourceConfigParameters": { - "baseProfile": { - "computeApiVersion": "2024-07-01", - "hardwareProfile": {"name": "F1"}, - "provisioningState": 0, - "resourcegroupName": "RG5ABF491C-3164-42A6-8CB5-BF3CB53B018B", - "storageProfile": {"osDisk": {"osType": 0}}, - "vmExtensions": [ - { - "autoUpgradeMinorVersion": True, - "enableAutomaticUpgrade": True, - "protectedSettings": "SomeDecryptedSecretValue", - "provisioningState": 0, - "publisher": "Microsoft.Azure.Monitor", - "type": "AzureMonitorLinuxAgent", - "typeHandlerVersion": "1.0", - }, - {"name": "myExtensionName"}, - ], - }, - "resourceCount": 2, - "resourceOverrides": [ - { - "location": "LocalDev", - "name": "myFleet_523", - "properties": { - "hardwareProfile": {"vmSize": "Standard_F1s"}, - "osProfile": { - "adminPassword": "SomeDecryptedSecretValue", - "adminUsername": "adminUser", - "computerName": "myFleet000000", - "windowsConfiguration": { - "additionalUnattendContent": [ - {"content": "", "passName": "someValue"}, - {"content": "SomeDecryptedSecretValue", "passName": "someOtherValue"}, - ] - }, - }, - "priority": 0, - "provisioningState": 0, - }, - "zones": ["1"], - }, - { - "location": "LocalDev", - "name": "myFleet_524", - "properties": { - "hardwareProfile": {"vmSize": "Standard_G1s"}, - "osProfile": { - "adminPassword": "SomeDecryptedSecretValue", - "adminUsername": "adminUser", - "computerName": "myFleet000000", - "windowsConfiguration": { - "additionalUnattendContent": [ - {"content": "", "passName": "someValue"}, - {"content": "SomeDecryptedSecretValue", "passName": "someOtherValue"}, - ] - }, - }, - "priority": 0, - "provisioningState": 0, - }, - "zones": ["2"], - }, - ], - }, - }, + locationparameter="eastus2", + request_body={"executionParameters": {}, "resourceConfigParameters": {"resourceCount": 3}}, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteCreate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py index a6cc9c6d60b2..aae53a44edb3 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py @@ -32,16 +32,16 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_deallocate( - locationparameter="ykcaptgboliddcfyaiuimj", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py index f381345964dc..294f0335fa62 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py @@ -32,13 +32,13 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_deallocate( - locationparameter="qqfrkswrovcice", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_maximum_set_gen.py index b9a18086e232..3c8bfe91409c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_maximum_set_gen.py @@ -32,15 +32,17 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_delete( - locationparameter="east", + locationparameter="eastus2", request_body={ - "correlationid": "dfe927c5-16a6-40b7-a0f7-8524975ed642", - "executionParameters": {"retryPolicy": {"retryCount": 2, "retryWindowInMinutes": 4}}, - "forceDeletion": False, + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "executionParameters": { + "optimizationPreference": "Cost", + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, + }, + "forceDeletion": True, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4", + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -48,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_minimum_set_gen.py index 2fb624eab049..1f7832c63456 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_delete_minimum_set_gen.py @@ -32,13 +32,12 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_delete( - locationparameter="east", + locationparameter="eastus2", request_body={ "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3", - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4", + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -46,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteDelete_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py index ee60e97506fa..7db995481a31 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py @@ -32,16 +32,16 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_hibernate( - locationparameter="gztd", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py index d50175329eab..51e0c6516ac9 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py @@ -32,13 +32,13 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_hibernate( - locationparameter="xtmm", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py index cebea483d2ac..2e17d609204a 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py @@ -32,16 +32,16 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_start( - locationparameter="qk", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py index 4af55d830334..5f0cec249ec4 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py @@ -32,13 +32,13 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_start( - locationparameter="fbdewllahrteoavajbomjc", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, }, @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py index 1cf21ed0bf05..c21fa0eb085c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py @@ -31,12 +31,12 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_errors( - locationparameter="ennweqswbghorrgzbet", - request_body={"operationIds": ["ksufjznokhsbowdupyt"]}, + locationparameter="eastus2", + request_body={"operationIds": ["01234567-89ab-cdef-0123-456789abcdef"]}, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py index 02c7b7046108..8047e76ce007 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py @@ -31,12 +31,12 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_errors( - locationparameter="gcdqwzmxtcn", - request_body={"operationIds": ["ksufjznokhsbowdupyt"]}, + locationparameter="eastus2", + request_body={"operationIds": ["01234567-89ab-cdef-0123-456789abcdef"]}, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py index a509eb35aa99..5625b5c0d966 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_status( - locationparameter="ntfcikxsmthfkdhdcjpevmydzu", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", - "operationIds": ["b211f086-4b91-4686-a453-2f5c012e4d80"], + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "operationIds": ["01234567-89ab-cdef-0123-456789abcdef"], }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py index f19210d8dd8d..fd3c3febe163 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_status( - locationparameter="ykvvjfoopmkwznctgaiblzvea", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", - "operationIds": ["duhqnwosjzexcfwfhryvy"], + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "operationIds": ["01234567-89ab-cdef-0123-456789abcdef"], }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py index a120479fe8d2..32defdf81bfb 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py @@ -32,28 +32,30 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_deallocate( - locationparameter="ycipx", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", + "deadLine": "2026-03-12T02:39:44.444Z", + "deadline": "2026-03-12T02:39:44.444Z", "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", + "timeZone": "America/Los_Angeles", + "timezone": "America/Los_Angeles", }, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py index cd06538c3010..04385679d708 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py @@ -32,25 +32,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_deallocate( - locationparameter="zrcmkxsbuxsxxulky", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, - "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", - "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", - }, + "schedule": {"deadlineType": "Unknown"}, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py index 379ac508095b..b966da8eb095 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py @@ -32,28 +32,30 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_hibernate( - locationparameter="rhadyapnyvmobwg", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", + "deadLine": "2026-03-12T02:39:44.444Z", + "deadline": "2026-03-12T02:39:44.444Z", "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", + "timeZone": "America/Los_Angeles", + "timezone": "America/Los_Angeles", }, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py index 38f04dbecd3d..d927f23f5bbc 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py @@ -32,25 +32,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_hibernate( - locationparameter="zuevcqpgdohzbjodhachtr", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, - "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", - "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", - }, + "schedule": {"deadlineType": "Unknown"}, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py index 5881ca438c87..63a0d11e0da7 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py @@ -32,28 +32,30 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_start( - locationparameter="pxtvvk", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": { "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 17, "retryWindowInMinutes": 29}, + "retryPolicy": {"onFailureAction": "Unknown", "retryCount": 3, "retryWindowInMinutes": 30}, }, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", + "deadLine": "2026-03-12T02:39:44.444Z", + "deadline": "2026-03-12T02:39:44.444Z", "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", + "timeZone": "America/Los_Angeles", + "timezone": "America/Los_Angeles", }, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py index 66a438457765..e06466360d8a 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py @@ -32,25 +32,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_start( - locationparameter="ufrcsuw", + locationparameter="eastus2", request_body={ - "correlationid": "b211f086-4b91-4686-a453-2f5c012e4d80", + "correlationid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "executionParameters": {}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/732116BD-AF31-4E74-9283-B387C44B4A44/resourceGroups/rgcomputeschedule/providers/Microsoft.Compute/virtualMachines/vm1" ] }, - "schedule": { - "deadLine": "2025-04-17T00:23:56.803Z", - "deadlineType": "Unknown", - "timeZone": "aigbjdnldtzkteqi", - }, + "schedule": {"deadlineType": "Unknown"}, }, ) print(response) -# x-ms-original-file: 2025-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json +# x-ms-original-file: 2026-04-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py index d56f301fda0d..0fddf3cfe81e 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def test_scheduled_actions_virtual_machines_submit_deallocate(self, resource_gro "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -52,7 +53,7 @@ def test_scheduled_actions_virtual_machines_submit_hibernate(self, resource_grou "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -77,7 +78,7 @@ def test_scheduled_actions_virtual_machines_submit_start(self, resource_group): "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -102,7 +103,7 @@ def test_scheduled_actions_virtual_machines_execute_deallocate(self, resource_gr "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -120,7 +121,7 @@ def test_scheduled_actions_virtual_machines_execute_hibernate(self, resource_gro "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -138,7 +139,7 @@ def test_scheduled_actions_virtual_machines_execute_start(self, resource_group): "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -147,6 +148,566 @@ def test_scheduled_actions_virtual_machines_execute_start(self, resource_group): # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_scheduled_actions_virtual_machines_execute_create_flex(self, resource_group): + response = self.client.scheduled_actions.virtual_machines_execute_create_flex( + locationparameter="str", + body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "resourceConfigParameters": { + "flexProperties": { + "osType": "str", + "priorityProfile": {"allocationStrategy": "str", "type": "str"}, + "vmSizeProfiles": [{"name": "str", "rank": 0}], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, + }, + "resourceCount": 0, + "resourcePrefix": "str", + "virtualMachineBaseProfile": { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": {"excludeZones": ["str"], "includeZones": ["str"], "zonePlacementPolicy": "str"}, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": {"enable": bool, "scheduledEventsApiVersion": "str"} + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + }, + "virtualMachineOverrides": [ + { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": { + "excludeZones": ["str"], + "includeZones": ["str"], + "zonePlacementPolicy": "str", + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": bool, + "scheduledEventsApiVersion": "str", + } + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": { + "secretUrl": "str", + "sourceVault": {"id": "str"}, + }, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + } + ], + }, + "correlationid": "str", + }, + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_scheduled_actions_virtual_machines_execute_create(self, resource_group): @@ -155,13 +716,541 @@ def test_scheduled_actions_virtual_machines_execute_create(self, resource_group) request_body={ "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resourceConfigParameters": { "resourceCount": 0, - "baseProfile": {"str": {}}, - "resourceOverrides": [{"str": {}}], "resourcePrefix": "str", + "virtualMachineBaseProfile": { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": {"excludeZones": ["str"], "includeZones": ["str"], "zonePlacementPolicy": "str"}, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": {"enable": bool, "scheduledEventsApiVersion": "str"} + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + }, + "virtualMachineOverrides": [ + { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": { + "excludeZones": ["str"], + "includeZones": ["str"], + "zonePlacementPolicy": "str", + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": bool, + "scheduledEventsApiVersion": "str", + } + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": { + "secretUrl": "str", + "sourceVault": {"id": "str"}, + }, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + } + ], }, "correlationid": "str", }, @@ -178,7 +1267,7 @@ def test_scheduled_actions_virtual_machines_execute_delete(self, resource_group) request_body={ "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "correlationid": "str", @@ -258,7 +1347,7 @@ def test_scheduled_actions_begin_create_or_update(self, resource_group): "deadlineType": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, }, "startTime": "2020-02-20 00:00:00", @@ -306,7 +1395,7 @@ def test_scheduled_actions_update(self, resource_group): "deadlineType": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, }, "startTime": "2020-02-20 00:00:00", diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py index dacc05201dc7..c5646eb8abc0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -28,7 +29,7 @@ async def test_scheduled_actions_virtual_machines_submit_deallocate(self, resour "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -53,7 +54,7 @@ async def test_scheduled_actions_virtual_machines_submit_hibernate(self, resourc "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -78,7 +79,7 @@ async def test_scheduled_actions_virtual_machines_submit_start(self, resource_gr "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "schedule": { @@ -103,7 +104,7 @@ async def test_scheduled_actions_virtual_machines_execute_deallocate(self, resou "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -121,7 +122,7 @@ async def test_scheduled_actions_virtual_machines_execute_hibernate(self, resour "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -139,7 +140,7 @@ async def test_scheduled_actions_virtual_machines_execute_start(self, resource_g "correlationid": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, }, @@ -148,6 +149,566 @@ async def test_scheduled_actions_virtual_machines_execute_start(self, resource_g # please add some check logic here by yourself # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_scheduled_actions_virtual_machines_execute_create_flex(self, resource_group): + response = await self.client.scheduled_actions.virtual_machines_execute_create_flex( + locationparameter="str", + body={ + "executionParameters": { + "optimizationPreference": "str", + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, + }, + "resourceConfigParameters": { + "flexProperties": { + "osType": "str", + "priorityProfile": {"allocationStrategy": "str", "type": "str"}, + "vmSizeProfiles": [{"name": "str", "rank": 0}], + "zoneAllocationPolicy": { + "distributionStrategy": "str", + "zonePreferences": [{"zone": "str", "rank": 0}], + }, + }, + "resourceCount": 0, + "resourcePrefix": "str", + "virtualMachineBaseProfile": { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": {"excludeZones": ["str"], "includeZones": ["str"], "zonePlacementPolicy": "str"}, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": {"enable": bool, "scheduledEventsApiVersion": "str"} + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + }, + "virtualMachineOverrides": [ + { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": { + "excludeZones": ["str"], + "includeZones": ["str"], + "zonePlacementPolicy": "str", + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": bool, + "scheduledEventsApiVersion": "str", + } + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": { + "secretUrl": "str", + "sourceVault": {"id": "str"}, + }, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + } + ], + }, + "correlationid": "str", + }, + ) + + # please add some check logic here by yourself + # ... + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_scheduled_actions_virtual_machines_execute_create(self, resource_group): @@ -156,13 +717,541 @@ async def test_scheduled_actions_virtual_machines_execute_create(self, resource_ request_body={ "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resourceConfigParameters": { "resourceCount": 0, - "baseProfile": {"str": {}}, - "resourceOverrides": [{"str": {}}], "resourcePrefix": "str", + "virtualMachineBaseProfile": { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": {"excludeZones": ["str"], "includeZones": ["str"], "zonePlacementPolicy": "str"}, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": {"enable": bool, "scheduledEventsApiVersion": "str"} + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + }, + "virtualMachineOverrides": [ + { + "computeApiVersion": "str", + "extendedLocation": {"name": "str", "type": "str"}, + "identity": { + "principalId": "str", + "tenantId": "str", + "type": "str", + "userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}}, + }, + "name": "str", + "placement": { + "excludeZones": ["str"], + "includeZones": ["str"], + "zonePlacementPolicy": "str", + }, + "plan": { + "name": "str", + "product": "str", + "publisher": "str", + "promotionCode": "str", + "version": "str", + }, + "properties": { + "additionalCapabilities": {"hibernationEnabled": bool, "ultraSSDEnabled": bool}, + "applicationProfile": { + "galleryApplications": [ + { + "packageReferenceId": "str", + "configurationReference": "str", + "enableAutomaticUpgrade": bool, + "order": 0, + "tags": "str", + "treatFailureAsDeploymentFailure": bool, + } + ] + }, + "capacityReservation": {"capacityReservationGroup": {"id": "str"}}, + "diagnosticsProfile": {"bootDiagnostics": {"enabled": bool, "storageUri": "str"}}, + "extensionsTimeBudget": "str", + "hardwareProfile": { + "vmSize": "str", + "vmSizeProperties": {"vCpusAvailable": 0, "vCpusPerCore": 0}, + }, + "licenseType": "str", + "networkProfile": { + "networkApiVersion": "str", + "networkInterfaceConfigurations": [ + { + "name": "str", + "properties": { + "ipConfigurations": [ + { + "name": "str", + "properties": { + "applicationGatewayBackendAddressPools": [{"id": "str"}], + "applicationSecurityGroups": [{"id": "str"}], + "loadBalancerBackendAddressPools": [{"id": "str"}], + "primary": bool, + "privateIPAddressVersion": "str", + "publicIPAddressConfiguration": { + "name": "str", + "properties": { + "deleteOption": "str", + "dnsSettings": { + "domainNameLabel": "str", + "domainNameLabelScope": "str", + }, + "idleTimeoutInMinutes": 0, + "ipTags": [{"ipTagType": "str", "tag": "str"}], + "publicIPAddressVersion": "str", + "publicIPAllocationMethod": "str", + "publicIPPrefix": {"id": "str"}, + }, + "sku": {"name": "str", "tier": "str"}, + "tags": {"str": "str"}, + }, + "subnet": {"id": "str"}, + }, + } + ], + "auxiliaryMode": "str", + "auxiliarySku": "str", + "deleteOption": "str", + "disableTcpStateTracking": bool, + "dnsSettings": {"dnsServers": ["str"]}, + "dscpConfiguration": {"id": "str"}, + "enableAcceleratedNetworking": bool, + "enableFpga": bool, + "enableIPForwarding": bool, + "networkSecurityGroup": {"id": "str"}, + "primary": bool, + }, + "tags": {"str": "str"}, + } + ], + "networkInterfaces": [ + {"id": "str", "properties": {"deleteOption": "str", "primary": bool}} + ], + }, + "osProfile": { + "adminPassword": "str", + "adminUsername": "str", + "allowExtensionOperations": bool, + "computerName": "str", + "customData": "str", + "linuxConfiguration": { + "disablePasswordAuthentication": bool, + "enableVMAgentPlatformUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "ssh": {"publicKeys": [{"keyData": "str", "path": "str"}]}, + }, + "requireGuestProvisionSignal": bool, + "secrets": [ + { + "sourceVault": {"id": "str"}, + "vaultCertificates": [{"certificateStore": "str", "certificateUrl": "str"}], + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "str", + "passName": "OobeSystem", + "settingName": "str", + } + ], + "enableAutomaticUpdates": bool, + "patchSettings": { + "assessmentMode": "str", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": bool, + "rebootSetting": "str", + }, + "enableHotpatching": bool, + "patchMode": "str", + }, + "provisionVMAgent": bool, + "timeZone": "str", + "winRM": {"listeners": [{"certificateUrl": "str", "protocol": "str"}]}, + }, + }, + "scheduledEventsPolicy": { + "allInstancesDown": {"automaticallyApprove": bool}, + "scheduledEventsAdditionalPublishingTargets": { + "eventGridAndResourceGraph": { + "enable": bool, + "scheduledEventsApiVersion": "str", + } + }, + "userInitiatedReboot": {"automaticallyApprove": bool}, + "userInitiatedRedeploy": {"automaticallyApprove": bool}, + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + "terminateNotificationProfile": {"enable": bool, "notBeforeTimeout": "str"}, + }, + "securityProfile": { + "encryptionAtHost": bool, + "encryptionIdentity": {"userAssignedIdentityResourceId": "str"}, + "proxyAgentSettings": { + "addProxyAgentExtension": bool, + "enabled": bool, + "imds": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + "keyIncarnationId": 0, + "mode": "str", + "wireServer": {"inVMAccessControlProfileReferenceId": "str", "mode": "str"}, + }, + "securityType": "str", + "uefiSettings": {"secureBootEnabled": bool, "vTpmEnabled": bool}, + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "str", + "lun": 0, + "caching": "str", + "deleteOption": "str", + "detachOption": "str", + "diskSizeGB": 0, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "sourceResource": {"id": "str"}, + "toBeDetached": bool, + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + } + ], + "diskControllerType": "str", + "imageReference": { + "communityGalleryImageId": "str", + "id": "str", + "offer": "str", + "publisher": "str", + "sharedGalleryImageId": "str", + "sku": "str", + "version": "str", + }, + "osDisk": { + "createOption": "str", + "caching": "str", + "deleteOption": "str", + "diffDiskSettings": {"option": "str", "placement": "str"}, + "diskSizeGB": 0, + "encryptionSettings": { + "diskEncryptionKey": {"secretUrl": "str", "sourceVault": {"id": "str"}}, + "enabled": bool, + "keyEncryptionKey": {"keyUrl": "str", "sourceVault": {"id": "str"}}, + }, + "image": {"uri": "str"}, + "managedDisk": { + "diskEncryptionSet": {"id": "str"}, + "id": "str", + "securityProfile": { + "diskEncryptionSet": {"id": "str"}, + "securityEncryptionType": "str", + }, + "storageAccountType": "str", + }, + "name": "str", + "osType": "str", + "vhd": {"uri": "str"}, + "writeAcceleratorEnabled": bool, + }, + }, + "userData": "str", + }, + "resourceGroupName": "str", + "tags": {"str": "str"}, + "vmExtensions": [ + { + "name": "str", + "properties": { + "autoUpgradeMinorVersion": bool, + "enableAutomaticUpgrade": bool, + "forceUpdateTag": "str", + "protectedSettings": {"str": {}}, + "protectedSettingsFromKeyVault": { + "secretUrl": "str", + "sourceVault": {"id": "str"}, + }, + "provisionAfterExtensions": ["str"], + "publisher": "str", + "settings": {"str": {}}, + "suppressFailures": bool, + "type": "str", + "typeHandlerVersion": "str", + }, + } + ], + "zones": ["str"], + } + ], }, "correlationid": "str", }, @@ -179,7 +1268,7 @@ async def test_scheduled_actions_virtual_machines_execute_delete(self, resource_ request_body={ "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, "correlationid": "str", @@ -260,7 +1349,7 @@ async def test_scheduled_actions_begin_create_or_update(self, resource_group): "deadlineType": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, }, "startTime": "2020-02-20 00:00:00", @@ -309,7 +1398,7 @@ async def test_scheduled_actions_update(self, resource_group): "deadlineType": "str", "executionParameters": { "optimizationPreference": "str", - "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, + "retryPolicy": {"onFailureAction": "str", "retryCount": 0, "retryWindowInMinutes": 0}, }, }, "startTime": "2020-02-20 00:00:00", diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/pyproject.toml b/sdk/computeschedule/azure-mgmt-computeschedule/pyproject.toml index 540da07d41af..9d6afac8bd26 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/pyproject.toml +++ b/sdk/computeschedule/azure-mgmt-computeschedule/pyproject.toml @@ -1,6 +1,88 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-computeschedule" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Computeschedule Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.computeschedule._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-computeschedule" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Computeschedule Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +sample_link = "" +exclude_folders = "" +title = "ComputeScheduleMgmtClient" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/sdk_packaging.toml b/sdk/computeschedule/azure-mgmt-computeschedule/sdk_packaging.toml deleted file mode 100644 index 770639ddf61f..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/sdk_packaging.toml +++ /dev/null @@ -1,12 +0,0 @@ -[packaging] -package_name = "azure-mgmt-computeschedule" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "Computeschedule Management" -package_doc_id = "" -is_stable = false -is_arm = true -need_msrestazure = false -need_azuremgmtcore = true -sample_link = "" -exclude_folders = "" -title = "ComputeScheduleMgmtClient" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/setup.py b/sdk/computeschedule/azure-mgmt-computeschedule/setup.py deleted file mode 100644 index 9272fb177345..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-computeschedule" -PACKAGE_PPRINT_NAME = "Computeschedule Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.5.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml index 20b208eb7ab1..29e3f4278245 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: a9b095e39f774899a97d857d92a34c7715dc3f42 +commit: 13d51ee484703ea6845668fbf4b9de13f41bf5c2 repo: Azure/azure-rest-api-specs additionalDirectories: